@platform-modules/civil-aviation-authority 2.3.5 → 2.3.7

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 (33) hide show
  1. package/.env +14 -9
  2. package/dist/data-source.js +15 -1
  3. package/dist/index.d.ts +15 -2
  4. package/dist/index.js +16 -5
  5. package/dist/models/DutyMissionAirTicketDetailsModel.d.ts +20 -0
  6. package/dist/models/DutyMissionAirTicketDetailsModel.js +100 -0
  7. package/dist/models/DutyMissionApprovalModel.d.ts +23 -0
  8. package/dist/models/DutyMissionApprovalModel.js +96 -0
  9. package/dist/models/DutyMissionAttachmentModel.d.ts +12 -0
  10. package/dist/models/DutyMissionAttachmentModel.js +64 -0
  11. package/dist/models/DutyMissionChatModel.d.ts +19 -0
  12. package/dist/models/DutyMissionChatModel.js +77 -0
  13. package/dist/models/DutyMissionEmployeeDetailsModel.d.ts +17 -0
  14. package/dist/models/DutyMissionEmployeeDetailsModel.js +85 -0
  15. package/dist/models/DutyMissionRequestModel.d.ts +64 -0
  16. package/dist/models/DutyMissionRequestModel.js +237 -0
  17. package/dist/models/DutyMissionWorkflowModel.d.ts +18 -0
  18. package/dist/models/DutyMissionWorkflowModel.js +76 -0
  19. package/dist/models/Workflows.d.ts +0 -9
  20. package/package.json +1 -1
  21. package/src/data-source.ts +195 -181
  22. package/src/index.ts +111 -98
  23. package/src/models/DutyMissionAirTicketDetailsModel.ts +87 -0
  24. package/src/models/DutyMissionApprovalModel.ts +83 -0
  25. package/src/models/DutyMissionAttachmentModel.ts +51 -0
  26. package/src/models/DutyMissionChatModel.ts +65 -0
  27. package/src/models/DutyMissionEmployeeDetailsModel.ts +72 -0
  28. package/src/models/DutyMissionRequestModel.ts +224 -0
  29. package/src/models/DutyMissionWorkflowModel.ts +62 -0
  30. package/src/models/HrServiceRequestModel.ts +167 -167
  31. package/dist/models/TemporaryAssignmentRequestModel.d.ts +0 -49
  32. package/dist/models/TemporaryAssignmentRequestModel.js +0 -204
  33. package/src/models/TemporaryAssignmentRequestModel.ts +0 -194
@@ -1,194 +0,0 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from "./BaseModel";
3
-
4
- export enum TemporaryAssignmentRequestStatus {
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 SalaryPaymentSource {
14
- AUTHORITY = "Authority",
15
- OTHER_ENTITY = "Other Entity"
16
- }
17
-
18
- @Entity({ name: "temporary_assignment_requests" })
19
- export class TemporaryAssignmentRequest 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: true })
30
- service_id: number | null;
31
-
32
- @Column({ type: "integer", nullable: true })
33
- sub_service_id: number | null;
34
-
35
- @Column({ type: "integer", nullable: false })
36
- user_id: number;
37
-
38
- @Column({ type: "text", nullable: true })
39
- description: string | null;
40
-
41
- @Column({ type: "enum", enum: TemporaryAssignmentRequestStatus, default: TemporaryAssignmentRequestStatus.PENDING, nullable: false })
42
- status: TemporaryAssignmentRequestStatus;
43
-
44
- @Column({ type: "integer", nullable: true })
45
- reviewer_user_id: number | null;
46
-
47
- @Column({ type: "integer", nullable: true })
48
- assigned_to_user_id: number | null;
49
-
50
- @Column({ type: "timestamp", nullable: true })
51
- assigned_at: Date | null;
52
-
53
- @Column({ type: "varchar", length: 255, nullable: true })
54
- workflow_execution_id: string | null;
55
-
56
- // Temporary Assignment Decision specific fields
57
- @Column({ type: "varchar", length: 255, nullable: false })
58
- assigned_employee_name: string;
59
-
60
- @Column({ type: "varchar", length: 50, nullable: true })
61
- civil_id_card_number: string | null;
62
-
63
- @Column({ type: "varchar", length: 100, nullable: false })
64
- employee_id: string;
65
-
66
- @Column({ type: "varchar", length: 255, nullable: false })
67
- current_job_position: string;
68
-
69
- @Column({ type: "varchar", length: 255, nullable: false })
70
- assigned_job_position: string;
71
-
72
- @Column({ type: "integer", nullable: false })
73
- original_department_id: number;
74
-
75
- @Column({ type: "integer", nullable: false })
76
- assigned_department_id: number;
77
-
78
- @Column({ type: "varchar", length: 500, nullable: true })
79
- entity: string | null;
80
-
81
- @Column({ type: "date", nullable: false })
82
- start_date: Date;
83
-
84
- @Column({ type: "date", nullable: false })
85
- end_date: Date;
86
-
87
- @Column({ type: "varchar", length: 20, nullable: false })
88
- phone_number: string;
89
-
90
- @Column({ type: "text", nullable: false })
91
- reason_for_request: string;
92
-
93
- // NEW FIELDS for External Temporary Assignment
94
- @Column({ type: "enum", enum: SalaryPaymentSource, nullable: false })
95
- salary_payment_source: SalaryPaymentSource;
96
-
97
- @Column({ type: "varchar", length: 500, nullable: true })
98
- social_service_fund_contribution: string | null;
99
-
100
- // Replacement tracking fields
101
- @Column({ type: "boolean", default: false, nullable: false })
102
- is_replaced: boolean;
103
-
104
- @Column({ type: "varchar", length: 255, nullable: true })
105
- replacement_employee_name: string | null;
106
-
107
- @Column({ type: "varchar", length: 100, nullable: true })
108
- replacement_employee_id: string | null;
109
-
110
- @Column({ type: "varchar", length: 50, nullable: true })
111
- replacement_civil_id_card_number: string | null;
112
-
113
- @Column({ type: "text", nullable: true })
114
- replacement_reason: string | null;
115
-
116
- @Column({ type: "integer", nullable: true })
117
- replaced_by_user_id: number | null;
118
-
119
- @Column({ type: "timestamp", nullable: true })
120
- replaced_at: Date | null;
121
-
122
- constructor(
123
- user_id: number,
124
- status: TemporaryAssignmentRequestStatus = TemporaryAssignmentRequestStatus.PENDING,
125
- service_id?: number | null,
126
- sub_service_id?: number | null,
127
- req_user_department_id?: number | null,
128
- req_user_section_id?: number | null,
129
- req_user_position_id?: number | null,
130
- description?: string | null,
131
- reviewer_user_id?: number | null,
132
- assigned_to_user_id?: number | null,
133
- assigned_at?: Date | null,
134
- workflow_execution_id?: string | null,
135
- assigned_employee_name?: string,
136
- civil_id_card_number?: string | null,
137
- employee_id?: string,
138
- current_job_position?: string,
139
- assigned_job_position?: string,
140
- original_department_id?: number,
141
- assigned_department_id?: number,
142
- entity?: string | null,
143
- start_date?: Date,
144
- end_date?: Date,
145
- phone_number?: string,
146
- reason_for_request?: string,
147
- salary_payment_source?: SalaryPaymentSource,
148
- social_service_fund_contribution?: string | null,
149
- is_replaced?: boolean,
150
- replacement_employee_name?: string | null,
151
- replacement_employee_id?: string | null,
152
- replacement_civil_id_card_number?: string | null,
153
- replacement_reason?: string | null,
154
- replaced_by_user_id?: number | null,
155
- replaced_at?: Date | null
156
- ) {
157
- super();
158
- this.user_id = user_id;
159
- this.status = status;
160
- this.service_id = service_id || null;
161
- this.sub_service_id = sub_service_id || null;
162
- this.req_user_department_id = req_user_department_id || null;
163
- this.req_user_section_id = req_user_section_id || null;
164
- this.req_user_position_id = req_user_position_id || null;
165
- this.description = description || null;
166
- this.reviewer_user_id = reviewer_user_id || null;
167
- this.assigned_to_user_id = assigned_to_user_id || null;
168
- this.assigned_at = assigned_at || null;
169
- this.workflow_execution_id = workflow_execution_id || null;
170
- this.assigned_employee_name = assigned_employee_name || "";
171
- this.civil_id_card_number = civil_id_card_number || null;
172
- this.employee_id = employee_id || "";
173
- this.current_job_position = current_job_position || "";
174
- this.assigned_job_position = assigned_job_position || "";
175
- this.original_department_id = original_department_id || 0;
176
- this.assigned_department_id = assigned_department_id || 0;
177
- this.entity = entity || null;
178
- this.start_date = start_date || new Date();
179
- this.end_date = end_date || new Date();
180
- this.phone_number = phone_number || "";
181
- this.reason_for_request = reason_for_request || "";
182
- this.salary_payment_source = salary_payment_source || SalaryPaymentSource.AUTHORITY;
183
- this.social_service_fund_contribution = social_service_fund_contribution || null;
184
- this.is_replaced = is_replaced || false;
185
- this.replacement_employee_name = replacement_employee_name || null;
186
- this.replacement_employee_id = replacement_employee_id || null;
187
- this.replacement_civil_id_card_number = replacement_civil_id_card_number || null;
188
- this.replacement_reason = replacement_reason || null;
189
- this.replaced_by_user_id = replaced_by_user_id || null;
190
- this.replaced_at = replaced_at || null;
191
- }
192
- }
193
-
194
-