@platform-modules/civil-aviation-authority 2.3.152 → 2.3.156

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.
Files changed (34) hide show
  1. package/.env +10 -10
  2. package/dist/models/AccommodationRequestModel.d.ts +7 -4
  3. package/dist/models/AccommodationRequestModel.js +12 -3
  4. package/dist/models/ITApprovalSettings.d.ts +7 -0
  5. package/dist/models/ITApprovalSettings.js +40 -0
  6. package/dist/models/ITServicesTypesMuscatModel.d.ts +6 -0
  7. package/dist/models/ITServicesTypesMuscatModel.js +34 -0
  8. package/dist/models/ITServicesTypesSalalahModel.d.ts +6 -0
  9. package/dist/models/ITServicesTypesSalalahModel.js +34 -0
  10. package/dist/models/LegalComplaintRequestModel.d.ts +101 -6
  11. package/dist/models/LegalComplaintRequestModel.js +257 -5
  12. package/dist/models/Workflows.d.ts +9 -0
  13. package/dist/models/Workflows.js +31 -0
  14. package/package.json +1 -1
  15. package/src/models/AccommodationApprovalModel.ts +8 -8
  16. package/src/models/AccommodationRequestModel.ts +54 -45
  17. package/src/models/AnnualIncrementRequestEmployeeModel.ts +65 -65
  18. package/src/models/AnnualIncrementRequestModel.ts +25 -25
  19. package/src/models/AppealAgainstAdministrativeDecisionRequestModel.ts +23 -23
  20. package/src/models/CAAServices.ts +33 -33
  21. package/src/models/CAASubServices.ts +33 -33
  22. package/src/models/CAIRatingMasterModel.ts +39 -39
  23. package/src/models/CSRMBusinessImpactRatingMasterModel.ts +25 -25
  24. package/src/models/CSRMLikelihoodMasterModel.ts +25 -25
  25. package/src/models/CashAllowanceLeaveRequestModel.ts +11 -11
  26. package/src/models/CyberSecurityAuditRequestModel.ts +32 -32
  27. package/src/models/HrServiceRequestModel.ts +193 -193
  28. package/src/models/LegalComplaintRequestModel.ts +322 -8
  29. package/src/models/PerformanceCyclePeriodModel.ts +26 -26
  30. package/src/models/PerformanceGoalMasterModel.ts +27 -27
  31. package/src/models/PerformanceManagementRequestGoalModel.ts +46 -46
  32. package/src/models/PerformanceManagementRequestModel.ts +14 -14
  33. package/src/models/PromotionRequestModel.ts +11 -11
  34. package/src/models/UserSkillModel.ts +56 -56
@@ -8,6 +8,260 @@ export enum LegalComplaintRequestStatus {
8
8
  RFC = 'RFC',
9
9
  }
10
10
 
11
+ /** Step 2 — Complaint details (individuals, time, incident date, location, events, other details). */
12
+ export interface LegalComplaintIncidentInput {
13
+ incident_time?: string | null;
14
+ /** Date of the incident (step 2); distinct from request `complaint_date` / `date` on the body. */
15
+ incident_date?: string | null;
16
+ incident_location?: string | null;
17
+ individuals_involved?: string | null;
18
+ /** Events / narrative (UI “Events”). */
19
+ incident_events?: string | null;
20
+ /** “Any other details related to complaint”. */
21
+ incident_other_details?: string | null;
22
+ /** Optional combined narrative; if omitted, parser may derive from events + other_details. */
23
+ incident_description?: string;
24
+ }
25
+
26
+ /** Step 3 — Complainant: Name / Position / Employee ID / Directorate / Department / Section. */
27
+ export interface LegalComplaintComplainantInput {
28
+ name: string;
29
+ position?: string | null;
30
+ employee_id?: string | null;
31
+ directorate?: string | null;
32
+ department_id?: number | null;
33
+ section_id?: number | null;
34
+ /** When UI sends department as text instead of id. */
35
+ department_name?: string | null;
36
+ section_name?: string | null;
37
+ }
38
+
39
+ /** Step 4 — Subject of complaint: Name / Position / Salary grade / Directorate / Department / Section. */
40
+ export interface LegalComplaintSubjectEmployeeInput {
41
+ name: string;
42
+ position?: string | null;
43
+ salary_grade?: string | null;
44
+ directorate?: string | null;
45
+ department_id?: number | null;
46
+ section_id?: number | null;
47
+ department_name?: string | null;
48
+ section_name?: string | null;
49
+ }
50
+
51
+ export interface LegalComplaintStructuredCreateFields {
52
+ incident_time: string | null;
53
+ incident_date: string | null;
54
+ incident_location: string | null;
55
+ individuals_involved: string | null;
56
+ incident_events: string | null;
57
+ incident_other_details: string | null;
58
+ incident_description: string;
59
+ complainant_name: string;
60
+ complainant_position: string | null;
61
+ complainant_employee_id: string | null;
62
+ complainant_directorate: string | null;
63
+ complainant_department_id: number | null;
64
+ complainant_department_name: string | null;
65
+ complainant_section_id: number | null;
66
+ complainant_section_name: string | null;
67
+ complained_employee_name: string;
68
+ complained_employee_position: string | null;
69
+ complained_employee_salary_grade: string | null;
70
+ complained_employee_directorate: string | null;
71
+ complained_employee_department_id: number | null;
72
+ complained_employee_department_name: string | null;
73
+ complained_employee_section_id: number | null;
74
+ complained_employee_section_name: string | null;
75
+ }
76
+
77
+ export type LegalComplaintCreateFieldParseResult =
78
+ | { ok: true; fields: LegalComplaintStructuredCreateFields }
79
+ | { ok: false; message: string };
80
+
81
+ function pickStr(v: unknown): string | null {
82
+ if (v == null || v === '') return null;
83
+ const s = String(v).trim();
84
+ return s === '' ? null : s;
85
+ }
86
+
87
+ function pickNum(v: unknown): number | null {
88
+ if (v == null || v === '') return null;
89
+ const n = Number(v);
90
+ return Number.isFinite(n) && n > 0 ? Math.floor(n) : null;
91
+ }
92
+
93
+ /** YYYY-MM-DD or parseable date string; returns null if invalid. */
94
+ function pickDateOnlyStr(v: unknown): string | null {
95
+ if (v == null || v === '') return null;
96
+ const s = String(v).trim();
97
+ const iso = s.match(/^(\d{4}-\d{2}-\d{2})/);
98
+ if (iso) return iso[1];
99
+ const d = new Date(s);
100
+ if (Number.isNaN(d.getTime())) return null;
101
+ return d.toISOString().slice(0, 10);
102
+ }
103
+
104
+ function pickDepartmentSectionNames(
105
+ obj: Record<string, any>,
106
+ idKey: string,
107
+ altIdKey: string,
108
+ nameKey: string,
109
+ plainKey: string,
110
+ ): { id: number | null; name: string | null } {
111
+ let id = pickNum(obj[idKey] ?? obj[altIdKey]);
112
+ let name = pickStr(obj[nameKey]);
113
+ const plain = obj[plainKey];
114
+ if (plain != null && plain !== '') {
115
+ if (typeof plain === 'number' || (typeof plain === 'string' && /^\d+$/.test(String(plain).trim()))) {
116
+ const n = pickNum(plain);
117
+ if (n != null && id == null) id = n;
118
+ } else {
119
+ const ps = pickStr(plain);
120
+ if (ps) name = name || ps;
121
+ }
122
+ }
123
+ return { id, name };
124
+ }
125
+
126
+ /**
127
+ * Maps API / Conductor `requestData` to DB columns.
128
+ * Preferred: `complaint_incident`, `complainant`, `complained_employee` objects.
129
+ * Legacy: `complaint_details`, `complainant_details`, `complained_employee_details` non-empty strings.
130
+ */
131
+ export function parseLegalComplaintCreateFields(body: Record<string, any>): LegalComplaintCreateFieldParseResult {
132
+ const legacyComplaint = body.complaint_details;
133
+ const legacyComplainant = body.complainant_details;
134
+ const legacySubject = body.complained_employee_details;
135
+
136
+ const inc = body.complaint_incident ?? body.complaintIncident;
137
+ let incident_time: string | null = null;
138
+ let incident_date: string | null = null;
139
+ let incident_location: string | null = null;
140
+ let individuals_involved: string | null = null;
141
+ let incident_events: string | null = null;
142
+ let incident_other_details: string | null = null;
143
+ let incident_description = '';
144
+
145
+ if (typeof legacyComplaint === 'string' && legacyComplaint.trim() !== '' && (inc == null || typeof inc !== 'object')) {
146
+ incident_description = legacyComplaint.trim();
147
+ } else if (inc != null && typeof inc === 'object' && !Array.isArray(inc)) {
148
+ incident_time = pickStr(inc.incident_time ?? inc.time);
149
+ incident_date = pickDateOnlyStr(inc.incident_date ?? inc.date_of_incident);
150
+ incident_location = pickStr(inc.incident_location ?? inc.location);
151
+ individuals_involved = pickStr(inc.individuals_involved ?? inc.persons_involved);
152
+ incident_events = pickStr(inc.incident_events ?? inc.events);
153
+ incident_other_details = pickStr(
154
+ inc.incident_other_details ?? inc.other_details ?? inc.any_other_details_related_to_complaint,
155
+ );
156
+ incident_description = String(inc.incident_description ?? inc.description ?? '').trim();
157
+ if (!incident_description) {
158
+ const parts = [incident_events, incident_other_details].filter((x) => x && String(x).trim()) as string[];
159
+ incident_description = parts.join('\n\n').trim();
160
+ }
161
+ }
162
+
163
+ if (!incident_description) {
164
+ return {
165
+ ok: false,
166
+ message:
167
+ 'complaint_incident must include incident_description, or incident_events / incident_other_details, or legacy complaint_details text',
168
+ };
169
+ }
170
+
171
+ const comp = body.complainant;
172
+ let complainant_name = '';
173
+ let complainant_position: string | null = null;
174
+ let complainant_employee_id: string | null = null;
175
+ let complainant_directorate: string | null = null;
176
+ let complainant_department_id: number | null = null;
177
+ let complainant_department_name: string | null = null;
178
+ let complainant_section_id: number | null = null;
179
+ let complainant_section_name: string | null = null;
180
+
181
+ if (typeof legacyComplainant === 'string' && legacyComplainant.trim() !== '' && (comp == null || typeof comp !== 'object')) {
182
+ complainant_name = legacyComplainant.trim();
183
+ } else if (comp != null && typeof comp === 'object' && !Array.isArray(comp)) {
184
+ complainant_name = String(comp.name ?? '').trim();
185
+ complainant_position = pickStr(comp.position);
186
+ complainant_employee_id = pickStr(comp.employee_id ?? comp.employeeId);
187
+ complainant_directorate = pickStr(comp.directorate);
188
+ const dep = pickDepartmentSectionNames(comp, 'department_id', 'departmentId', 'department_name', 'department');
189
+ const sec = pickDepartmentSectionNames(comp, 'section_id', 'sectionId', 'section_name', 'section');
190
+ complainant_department_id = dep.id;
191
+ complainant_department_name = dep.name;
192
+ complainant_section_id = sec.id;
193
+ complainant_section_name = sec.name;
194
+ }
195
+
196
+ if (!complainant_name) {
197
+ return {
198
+ ok: false,
199
+ message: 'complainant.name is required (or legacy complainant_details text)',
200
+ };
201
+ }
202
+
203
+ const sub = body.complained_employee ?? body.complainedEmployee;
204
+ let complained_employee_name = '';
205
+ let complained_employee_position: string | null = null;
206
+ let complained_employee_salary_grade: string | null = null;
207
+ let complained_employee_directorate: string | null = null;
208
+ let complained_employee_department_id: number | null = null;
209
+ let complained_employee_department_name: string | null = null;
210
+ let complained_employee_section_id: number | null = null;
211
+ let complained_employee_section_name: string | null = null;
212
+
213
+ if (typeof legacySubject === 'string' && legacySubject.trim() !== '' && (sub == null || typeof sub !== 'object')) {
214
+ complained_employee_name = legacySubject.trim();
215
+ } else if (sub != null && typeof sub === 'object' && !Array.isArray(sub)) {
216
+ complained_employee_name = String(sub.name ?? '').trim();
217
+ complained_employee_position = pickStr(sub.position);
218
+ complained_employee_salary_grade = pickStr(sub.salary_grade ?? sub.salaryGrade);
219
+ complained_employee_directorate = pickStr(sub.directorate);
220
+ const dep = pickDepartmentSectionNames(sub, 'department_id', 'departmentId', 'department_name', 'department');
221
+ const sec = pickDepartmentSectionNames(sub, 'section_id', 'sectionId', 'section_name', 'section');
222
+ complained_employee_department_id = dep.id;
223
+ complained_employee_department_name = dep.name;
224
+ complained_employee_section_id = sec.id;
225
+ complained_employee_section_name = sec.name;
226
+ }
227
+
228
+ if (!complained_employee_name) {
229
+ return {
230
+ ok: false,
231
+ message: 'complained_employee.name is required (or legacy complained_employee_details text)',
232
+ };
233
+ }
234
+
235
+ return {
236
+ ok: true,
237
+ fields: {
238
+ incident_time,
239
+ incident_date,
240
+ incident_location,
241
+ individuals_involved,
242
+ incident_events,
243
+ incident_other_details,
244
+ incident_description,
245
+ complainant_name,
246
+ complainant_position,
247
+ complainant_employee_id,
248
+ complainant_directorate,
249
+ complainant_department_id,
250
+ complainant_department_name,
251
+ complainant_section_id,
252
+ complainant_section_name,
253
+ complained_employee_name,
254
+ complained_employee_position,
255
+ complained_employee_salary_grade,
256
+ complained_employee_directorate,
257
+ complained_employee_department_id,
258
+ complained_employee_department_name,
259
+ complained_employee_section_id,
260
+ complained_employee_section_name,
261
+ },
262
+ };
263
+ }
264
+
11
265
  @Entity({ name: 'legal_complaint_requests' })
12
266
  export class LegalComplaintRequest extends BaseModel {
13
267
  @Column({ type: 'date', nullable: false })
@@ -19,17 +273,77 @@ export class LegalComplaintRequest extends BaseModel {
19
273
  @Column({ type: 'text', nullable: false })
20
274
  description: string;
21
275
 
22
- /** Times, dates, locations, individuals, events, etc. */
23
- @Column({ type: 'text', nullable: false })
24
- complaint_details: string;
276
+ @Column({ type: 'varchar', length: 255, nullable: true })
277
+ incident_time: string | null;
25
278
 
26
- /** Name / Position / Employee ID / Directorate / Department / Section (structured text or JSON) */
27
- @Column({ type: 'text', nullable: false })
28
- complainant_details: string;
279
+ @Column({ type: 'text', nullable: true })
280
+ incident_location: string | null;
281
+
282
+ @Column({ type: 'text', nullable: true })
283
+ individuals_involved: string | null;
284
+
285
+ /** Date of the incident (wizard step 2); request submission date remains `complaint_date`. */
286
+ @Column({ type: 'date', nullable: true })
287
+ incident_date: Date | null;
288
+
289
+ /** UI “Events”. */
290
+ @Column({ type: 'text', nullable: true })
291
+ incident_events: string | null;
292
+
293
+ /** “Any other details related to complaint”. */
294
+ @Column({ type: 'text', nullable: true })
295
+ incident_other_details: string | null;
29
296
 
30
- /** Subject of complaint: Name / Position / Salary Grade / Directorate / Department / Section */
31
297
  @Column({ type: 'text', nullable: false })
32
- complained_employee_details: string;
298
+ incident_description: string;
299
+
300
+ @Column({ type: 'varchar', length: 255, nullable: false })
301
+ complainant_name: string;
302
+
303
+ @Column({ type: 'varchar', length: 255, nullable: true })
304
+ complainant_position: string | null;
305
+
306
+ @Column({ type: 'varchar', length: 100, nullable: true })
307
+ complainant_employee_id: string | null;
308
+
309
+ @Column({ type: 'varchar', length: 500, nullable: true })
310
+ complainant_directorate: string | null;
311
+
312
+ @Column({ type: 'int', nullable: true })
313
+ complainant_department_id: number | null;
314
+
315
+ @Column({ type: 'varchar', length: 500, nullable: true })
316
+ complainant_department_name: string | null;
317
+
318
+ @Column({ type: 'int', nullable: true })
319
+ complainant_section_id: number | null;
320
+
321
+ @Column({ type: 'varchar', length: 500, nullable: true })
322
+ complainant_section_name: string | null;
323
+
324
+ @Column({ type: 'varchar', length: 255, nullable: false })
325
+ complained_employee_name: string;
326
+
327
+ @Column({ type: 'varchar', length: 255, nullable: true })
328
+ complained_employee_position: string | null;
329
+
330
+ @Column({ type: 'varchar', length: 100, nullable: true })
331
+ complained_employee_salary_grade: string | null;
332
+
333
+ @Column({ type: 'varchar', length: 500, nullable: true })
334
+ complained_employee_directorate: string | null;
335
+
336
+ @Column({ type: 'int', nullable: true })
337
+ complained_employee_department_id: number | null;
338
+
339
+ @Column({ type: 'varchar', length: 500, nullable: true })
340
+ complained_employee_department_name: string | null;
341
+
342
+ @Column({ type: 'int', nullable: true })
343
+ complained_employee_section_id: number | null;
344
+
345
+ @Column({ type: 'varchar', length: 500, nullable: true })
346
+ complained_employee_section_name: string | null;
33
347
 
34
348
  @Column({ type: 'int', nullable: true })
35
349
  req_user_department_id: number | null;
@@ -1,26 +1,26 @@
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: "varchar", length: 255, nullable: false, default: "" })
14
- title: string;
15
-
16
- @Column({ type: "boolean", default: false })
17
- is_active: boolean;
18
-
19
- constructor(cycle_period?: string, cycle_year?: number, title?: string) {
20
- super();
21
- this.cycle_period = cycle_period || "";
22
- this.cycle_year = cycle_year || new Date().getFullYear();
23
- this.title = title || "";
24
- this.is_active = false;
25
- }
26
- }
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: "varchar", length: 255, nullable: false, default: "" })
14
+ title: string;
15
+
16
+ @Column({ type: "boolean", default: false })
17
+ is_active: boolean;
18
+
19
+ constructor(cycle_period?: string, cycle_year?: number, title?: string) {
20
+ super();
21
+ this.cycle_period = cycle_period || "";
22
+ this.cycle_year = cycle_year || new Date().getFullYear();
23
+ this.title = title || "";
24
+ this.is_active = false;
25
+ }
26
+ }
@@ -1,27 +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
-
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
+
@@ -1,46 +1,46 @@
1
- import { Column, Entity, Index } from "typeorm";
2
- import { BaseModel } from "./BaseModel";
3
-
4
- @Entity({ name: "performance_management_request_goals" })
5
- export class PerformanceManagementRequestGoal extends BaseModel {
6
- @Index("idx_pm_request_goals_request_id")
7
- @Column({ type: "integer", nullable: false })
8
- request_id: number;
9
-
10
- @Column({ type: "varchar", length: 255, nullable: false })
11
- goal_title: string;
12
-
13
- @Column({ type: "varchar", length: 100, nullable: false })
14
- goal_id: string;
15
-
16
- @Column({ type: "text", nullable: false })
17
- goal_description: string;
18
-
19
- @Column({ type: "integer", nullable: false, default: 0 })
20
- goal_weight: number;
21
-
22
- @Column({ type: "integer", nullable: true, default: null })
23
- rating: number | null;
24
-
25
- @Column({ type: "text", nullable: true, default: null })
26
- remark: string | null;
27
-
28
- constructor(
29
- request_id?: number,
30
- goal_title?: string,
31
- goal_id?: string,
32
- goal_description?: string,
33
- goal_weight?: number,
34
- rating?: number | null,
35
- remark?: string | null
36
- ) {
37
- super();
38
- this.request_id = request_id || 0;
39
- this.goal_title = goal_title || "";
40
- this.goal_id = goal_id || "";
41
- this.goal_description = goal_description || "";
42
- this.goal_weight = goal_weight || 0;
43
- this.rating = rating ?? null;
44
- this.remark = remark ?? null;
45
- }
46
- }
1
+ import { Column, Entity, Index } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ @Entity({ name: "performance_management_request_goals" })
5
+ export class PerformanceManagementRequestGoal extends BaseModel {
6
+ @Index("idx_pm_request_goals_request_id")
7
+ @Column({ type: "integer", nullable: false })
8
+ request_id: number;
9
+
10
+ @Column({ type: "varchar", length: 255, nullable: false })
11
+ goal_title: string;
12
+
13
+ @Column({ type: "varchar", length: 100, nullable: false })
14
+ goal_id: string;
15
+
16
+ @Column({ type: "text", nullable: false })
17
+ goal_description: string;
18
+
19
+ @Column({ type: "integer", nullable: false, default: 0 })
20
+ goal_weight: number;
21
+
22
+ @Column({ type: "integer", nullable: true, default: null })
23
+ rating: number | null;
24
+
25
+ @Column({ type: "text", nullable: true, default: null })
26
+ remark: string | null;
27
+
28
+ constructor(
29
+ request_id?: number,
30
+ goal_title?: string,
31
+ goal_id?: string,
32
+ goal_description?: string,
33
+ goal_weight?: number,
34
+ rating?: number | null,
35
+ remark?: string | null
36
+ ) {
37
+ super();
38
+ this.request_id = request_id || 0;
39
+ this.goal_title = goal_title || "";
40
+ this.goal_id = goal_id || "";
41
+ this.goal_description = goal_description || "";
42
+ this.goal_weight = goal_weight || 0;
43
+ this.rating = rating ?? null;
44
+ this.remark = remark ?? null;
45
+ }
46
+ }
@@ -53,8 +53,8 @@ export class PerformanceManagementRequest extends BaseModel {
53
53
  @Column({ type: "text", nullable: true })
54
54
  description: string | null;
55
55
 
56
- @Column({ type: "enum", enum: PerformanceManagementCyclePeriod, nullable: false })
57
- cycle_period: PerformanceManagementCyclePeriod;
56
+ @Column({ type: "enum", enum: PerformanceManagementCyclePeriod, nullable: false })
57
+ cycle_period: PerformanceManagementCyclePeriod;
58
58
 
59
59
  @Column({ type: "integer", nullable: true })
60
60
  cycle_year: number | null;
@@ -70,11 +70,11 @@ export class PerformanceManagementRequest extends BaseModel {
70
70
  description?: string | null,
71
71
  reviewer_user_id?: number | null,
72
72
  assigned_to_user_id?: number | null,
73
- assigned_at?: Date | null,
74
- workflow_execution_id?: string | null,
75
- cycle_period?: PerformanceManagementCyclePeriod,
76
- cycle_year?: number | null
77
- ) {
73
+ assigned_at?: Date | null,
74
+ workflow_execution_id?: string | null,
75
+ cycle_period?: PerformanceManagementCyclePeriod,
76
+ cycle_year?: number | null
77
+ ) {
78
78
  super();
79
79
  this.user_id = user_id;
80
80
  this.status = status;
@@ -85,10 +85,10 @@ export class PerformanceManagementRequest extends BaseModel {
85
85
  this.req_user_position_id = req_user_position_id || null;
86
86
  this.description = description || null;
87
87
  this.reviewer_user_id = reviewer_user_id || null;
88
- this.assigned_to_user_id = assigned_to_user_id || null;
89
- this.assigned_at = assigned_at || null;
90
- this.workflow_execution_id = workflow_execution_id || null;
91
- this.cycle_period = cycle_period || PerformanceManagementCyclePeriod.JAN_JUN;
92
- this.cycle_year = cycle_year || null;
93
- }
94
- }
88
+ this.assigned_to_user_id = assigned_to_user_id || null;
89
+ this.assigned_at = assigned_at || null;
90
+ this.workflow_execution_id = workflow_execution_id || null;
91
+ this.cycle_period = cycle_period || PerformanceManagementCyclePeriod.JAN_JUN;
92
+ this.cycle_year = cycle_year || null;
93
+ }
94
+ }
@@ -45,12 +45,12 @@ export class PromotionRequest extends BaseModel {
45
45
  @Column({ type: "timestamp", nullable: true })
46
46
  assigned_at: Date | null;
47
47
 
48
- @Column({ type: "varchar", length: 255, nullable: true })
49
- workflow_execution_id: string | null;
50
-
51
- @Column({ type: "varchar", length: 255, nullable: true })
52
- reference_number: string | null;
53
-
48
+ @Column({ type: "varchar", length: 255, nullable: true })
49
+ workflow_execution_id: string | null;
50
+
51
+ @Column({ type: "varchar", length: 255, nullable: true })
52
+ reference_number: string | null;
53
+
54
54
  // Promotion Decision specific fields
55
55
  @Column({ type: "varchar", length: 255, nullable: false })
56
56
  employee_name: string;
@@ -108,11 +108,11 @@ export class PromotionRequest extends BaseModel {
108
108
  this.req_user_position_id = req_user_position_id || null;
109
109
  this.description = description || null;
110
110
  this.reviewer_user_id = reviewer_user_id || null;
111
- this.assigned_to_user_id = assigned_to_user_id || null;
112
- this.assigned_at = assigned_at || null;
113
- this.workflow_execution_id = workflow_execution_id || null;
114
- this.reference_number = null;
115
- this.employee_name = employee_name || "";
111
+ this.assigned_to_user_id = assigned_to_user_id || null;
112
+ this.assigned_at = assigned_at || null;
113
+ this.workflow_execution_id = workflow_execution_id || null;
114
+ this.reference_number = null;
115
+ this.employee_name = employee_name || "";
116
116
  this.employee_id = employee_id || "";
117
117
  this.current_job_title = current_job_title || "";
118
118
  this.proposed_job_title = proposed_job_title || "";