@platform-modules/civil-aviation-authority 2.3.86 → 2.3.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +9 -14
- package/dist/index.d.ts +8 -0
- package/dist/index.js +17 -1
- package/dist/models/HumanResourceAnnualPlanningRequestModel.d.ts +35 -0
- package/dist/models/HumanResourceAnnualPlanningRequestModel.js +121 -0
- package/dist/models/HumanResourceAnnualPlanningTaskModel.d.ts +25 -0
- package/dist/models/HumanResourceAnnualPlanningTaskModel.js +83 -0
- package/dist/models/PerformanceCyclePeriodModel.d.ts +7 -0
- package/dist/models/PerformanceCyclePeriodModel.js +40 -0
- package/dist/models/PerformanceGoalMasterModel.d.ts +8 -0
- package/dist/models/PerformanceGoalMasterModel.js +45 -0
- package/dist/models/PerformanceManagementRequestModel.d.ts +34 -0
- package/dist/models/PerformanceManagementRequestModel.js +128 -0
- package/dist/models/RequestForCoverageRequestModel.d.ts +7 -2
- package/dist/models/RequestForCoverageRequestModel.js +26 -5
- package/dist/models/Workflows.d.ts +9 -0
- package/package.json +1 -1
- package/src/index.ts +13 -1
- package/src/models/HrServiceRequestModel.ts +193 -193
- package/src/models/HumanResourceAnnualPlanningRequestModel.ts +108 -0
- package/src/models/HumanResourceAnnualPlanningTaskModel.ts +70 -0
- package/src/models/PerformanceCyclePeriodModel.ts +23 -0
- package/src/models/PerformanceGoalMasterModel.ts +27 -0
- package/src/models/PerformanceManagementRequestModel.ts +115 -0
- package/src/models/RequestForCoverageRequestModel.ts +27 -5
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Column, Entity, Index } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
@Entity({ name: "performance_cycle_periods" })
|
|
5
|
+
@Index("uq_performance_cycle_period", ["cycle_period", "cycle_year"], { unique: true })
|
|
6
|
+
export class PerformanceCyclePeriod extends BaseModel {
|
|
7
|
+
@Column({ type: "varchar", length: 50, nullable: false })
|
|
8
|
+
cycle_period: string;
|
|
9
|
+
|
|
10
|
+
@Column({ type: "integer", nullable: false })
|
|
11
|
+
cycle_year: number;
|
|
12
|
+
|
|
13
|
+
@Column({ type: "boolean", default: false })
|
|
14
|
+
is_active: boolean;
|
|
15
|
+
|
|
16
|
+
constructor(cycle_period?: string, cycle_year?: number) {
|
|
17
|
+
super();
|
|
18
|
+
this.cycle_period = cycle_period || "";
|
|
19
|
+
this.cycle_year = cycle_year || new Date().getFullYear();
|
|
20
|
+
this.is_active = false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Column, Entity, Index } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
@Entity({ name: "performance_management_goals" })
|
|
5
|
+
export class PerformanceGoalMaster extends BaseModel {
|
|
6
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
7
|
+
goal_title: string;
|
|
8
|
+
|
|
9
|
+
@Column({ type: "text", nullable: true })
|
|
10
|
+
goal_description: string | null;
|
|
11
|
+
|
|
12
|
+
@Column({ type: "integer", nullable: false })
|
|
13
|
+
@Index("idx_performance_goal_cycle_period_id")
|
|
14
|
+
cycle_period_id: number;
|
|
15
|
+
|
|
16
|
+
@Column({ type: "boolean", default: true })
|
|
17
|
+
is_active: boolean;
|
|
18
|
+
|
|
19
|
+
constructor(goal_title?: string, goal_description?: string | null, cycle_period_id?: number) {
|
|
20
|
+
super();
|
|
21
|
+
this.goal_title = goal_title || "";
|
|
22
|
+
this.goal_description = goal_description || null;
|
|
23
|
+
this.cycle_period_id = cycle_period_id || 0;
|
|
24
|
+
this.is_active = true;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum PerformanceManagementRequestStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
ASSIGNED = "Assigned",
|
|
7
|
+
IN_PROGRESS = "In Progress",
|
|
8
|
+
COMPLETED = "Completed",
|
|
9
|
+
APPROVED = "Approved",
|
|
10
|
+
REJECTED = "Rejected"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum PerformanceManagementCyclePeriod {
|
|
14
|
+
JAN_JUN = "Jan-Jun",
|
|
15
|
+
JUL_DEC = "Jul-Dec"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@Entity({ name: "performance_management_requests" })
|
|
19
|
+
export class PerformanceManagementRequest extends BaseModel {
|
|
20
|
+
@Column({ type: "integer", nullable: true })
|
|
21
|
+
req_user_department_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: "integer", nullable: true })
|
|
24
|
+
req_user_section_id: number | null;
|
|
25
|
+
|
|
26
|
+
@Column({ type: "integer", nullable: true })
|
|
27
|
+
req_user_position_id: number | null;
|
|
28
|
+
|
|
29
|
+
@Column({ type: "integer", nullable: false })
|
|
30
|
+
user_id: number;
|
|
31
|
+
|
|
32
|
+
@Column({ type: "integer", nullable: true })
|
|
33
|
+
service_id: number | null;
|
|
34
|
+
|
|
35
|
+
@Column({ type: "integer", nullable: true })
|
|
36
|
+
sub_service_id: number | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: "enum", enum: PerformanceManagementRequestStatus, default: PerformanceManagementRequestStatus.PENDING, nullable: false })
|
|
39
|
+
status: PerformanceManagementRequestStatus;
|
|
40
|
+
|
|
41
|
+
@Column({ type: "integer", nullable: true })
|
|
42
|
+
reviewer_user_id: number | null;
|
|
43
|
+
|
|
44
|
+
@Column({ type: "integer", nullable: true })
|
|
45
|
+
assigned_to_user_id: number | null;
|
|
46
|
+
|
|
47
|
+
@Column({ type: "timestamp", nullable: true })
|
|
48
|
+
assigned_at: Date | null;
|
|
49
|
+
|
|
50
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
51
|
+
workflow_execution_id: string | null;
|
|
52
|
+
|
|
53
|
+
@Column({ type: "text", nullable: true })
|
|
54
|
+
description: string | null;
|
|
55
|
+
|
|
56
|
+
// Performance Management specific fields
|
|
57
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
58
|
+
goal_title: string;
|
|
59
|
+
|
|
60
|
+
@Column({ type: "varchar", length: 100, nullable: false })
|
|
61
|
+
goal_id: string;
|
|
62
|
+
|
|
63
|
+
@Column({ type: "text", nullable: false })
|
|
64
|
+
goal_description: string;
|
|
65
|
+
|
|
66
|
+
@Column({ type: "enum", enum: PerformanceManagementCyclePeriod, nullable: false })
|
|
67
|
+
cycle_period: PerformanceManagementCyclePeriod;
|
|
68
|
+
|
|
69
|
+
@Column({ type: "integer", nullable: false, default: 0 })
|
|
70
|
+
goal_weight: number;
|
|
71
|
+
|
|
72
|
+
@Column({ type: "integer", nullable: true })
|
|
73
|
+
cycle_year: number | null;
|
|
74
|
+
|
|
75
|
+
constructor(
|
|
76
|
+
user_id: number,
|
|
77
|
+
status: PerformanceManagementRequestStatus = PerformanceManagementRequestStatus.PENDING,
|
|
78
|
+
service_id?: number | null,
|
|
79
|
+
sub_service_id?: number | null,
|
|
80
|
+
req_user_department_id?: number | null,
|
|
81
|
+
req_user_section_id?: number | null,
|
|
82
|
+
req_user_position_id?: number | null,
|
|
83
|
+
description?: string | null,
|
|
84
|
+
reviewer_user_id?: number | null,
|
|
85
|
+
assigned_to_user_id?: number | null,
|
|
86
|
+
assigned_at?: Date | null,
|
|
87
|
+
workflow_execution_id?: string | null,
|
|
88
|
+
goal_title?: string,
|
|
89
|
+
goal_id?: string,
|
|
90
|
+
goal_description?: string,
|
|
91
|
+
cycle_period?: PerformanceManagementCyclePeriod,
|
|
92
|
+
goal_weight?: number,
|
|
93
|
+
cycle_year?: number | null
|
|
94
|
+
) {
|
|
95
|
+
super();
|
|
96
|
+
this.user_id = user_id;
|
|
97
|
+
this.status = status;
|
|
98
|
+
this.service_id = service_id || null;
|
|
99
|
+
this.sub_service_id = sub_service_id || null;
|
|
100
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
101
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
102
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
103
|
+
this.description = description || null;
|
|
104
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
105
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
106
|
+
this.assigned_at = assigned_at || null;
|
|
107
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
108
|
+
this.goal_title = goal_title || "";
|
|
109
|
+
this.goal_id = goal_id || "";
|
|
110
|
+
this.goal_description = goal_description || "";
|
|
111
|
+
this.cycle_period = cycle_period || PerformanceManagementCyclePeriod.JAN_JUN;
|
|
112
|
+
this.goal_weight = goal_weight || 0;
|
|
113
|
+
this.cycle_year = cycle_year || null;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -50,8 +50,21 @@ export class RequestForCoverageRequest extends BaseModel {
|
|
|
50
50
|
@Column({ type: "varchar", length: 255, nullable: true })
|
|
51
51
|
suggested_photography: string | null;
|
|
52
52
|
|
|
53
|
-
@Column({ type: "
|
|
54
|
-
|
|
53
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
54
|
+
event_name: string | null;
|
|
55
|
+
|
|
56
|
+
/** Use event_from_date for new data; kept for backward compatibility with existing rows */
|
|
57
|
+
@Column({ type: "date", nullable: true })
|
|
58
|
+
event_date: Date | null;
|
|
59
|
+
|
|
60
|
+
@Column({ type: "date", nullable: true })
|
|
61
|
+
event_from_date: Date | null;
|
|
62
|
+
|
|
63
|
+
@Column({ type: "date", nullable: true })
|
|
64
|
+
event_to_date: Date | null;
|
|
65
|
+
|
|
66
|
+
@Column({ type: "text", nullable: true })
|
|
67
|
+
tags: string | null;
|
|
55
68
|
|
|
56
69
|
@Column({ type: "time", nullable: false })
|
|
57
70
|
event_time: string;
|
|
@@ -112,7 +125,7 @@ export class RequestForCoverageRequest extends BaseModel {
|
|
|
112
125
|
|
|
113
126
|
constructor(
|
|
114
127
|
user_id: number,
|
|
115
|
-
|
|
128
|
+
event_from_date: Date,
|
|
116
129
|
event_time: string,
|
|
117
130
|
event_location: string,
|
|
118
131
|
event_details: string,
|
|
@@ -138,11 +151,16 @@ export class RequestForCoverageRequest extends BaseModel {
|
|
|
138
151
|
assigned_to_user_id?: number | null,
|
|
139
152
|
assigned_at?: Date | null,
|
|
140
153
|
workflow_execution_id?: string | null,
|
|
141
|
-
rejection_reason?: string | null
|
|
154
|
+
rejection_reason?: string | null,
|
|
155
|
+
event_name?: string | null,
|
|
156
|
+
event_to_date?: Date | null,
|
|
157
|
+
tags?: string | null,
|
|
158
|
+
event_date?: Date | null
|
|
142
159
|
) {
|
|
143
160
|
super();
|
|
144
161
|
this.user_id = user_id;
|
|
145
|
-
this.
|
|
162
|
+
this.event_from_date = event_from_date ?? event_date ?? null;
|
|
163
|
+
this.event_date = event_date ?? event_from_date ?? null;
|
|
146
164
|
this.event_time = event_time;
|
|
147
165
|
this.event_location = event_location;
|
|
148
166
|
this.event_details = event_details;
|
|
@@ -169,6 +187,10 @@ export class RequestForCoverageRequest extends BaseModel {
|
|
|
169
187
|
this.assigned_at = assigned_at || null;
|
|
170
188
|
this.workflow_execution_id = workflow_execution_id || null;
|
|
171
189
|
this.rejection_reason = rejection_reason || null;
|
|
190
|
+
this.event_name = event_name || null;
|
|
191
|
+
this.event_to_date = event_to_date || null;
|
|
192
|
+
this.tags = tags || null;
|
|
193
|
+
this.event_date = event_date ?? null;
|
|
172
194
|
}
|
|
173
195
|
}
|
|
174
196
|
|