@platform-modules/civil-aviation-authority 2.3.4 → 2.3.5
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 +1 -20
- package/dist/data-source.js +11 -1
- package/dist/index.d.ts +2 -13
- package/dist/index.js +5 -20
- package/dist/models/TemporaryAssignmentRequestModel.d.ts +49 -0
- package/dist/models/TemporaryAssignmentRequestModel.js +204 -0
- package/dist/models/Workflows.d.ts +9 -0
- package/package.json +1 -1
- package/src/data-source.ts +181 -183
- package/src/index.ts +98 -109
- package/src/models/HrServiceRequestModel.ts +167 -167
- package/src/models/TemporaryAssignmentRequestModel.ts +194 -0
- package/dist/models/DutyMissionAirTicketDetailsModel.d.ts +0 -20
- package/dist/models/DutyMissionAirTicketDetailsModel.js +0 -100
- package/dist/models/DutyMissionApprovalModel.d.ts +0 -23
- package/dist/models/DutyMissionApprovalModel.js +0 -96
- package/dist/models/DutyMissionAttachmentModel.d.ts +0 -12
- package/dist/models/DutyMissionAttachmentModel.js +0 -64
- package/dist/models/DutyMissionChatModel.d.ts +0 -19
- package/dist/models/DutyMissionChatModel.js +0 -77
- package/dist/models/DutyMissionEmployeeDetailsModel.d.ts +0 -17
- package/dist/models/DutyMissionEmployeeDetailsModel.js +0 -85
- package/dist/models/DutyMissionRequestModel.d.ts +0 -67
- package/dist/models/DutyMissionRequestModel.js +0 -252
- package/dist/models/DutyMissionWorkflowModel.d.ts +0 -18
- package/dist/models/DutyMissionWorkflowModel.js +0 -76
- package/src/models/DutyMissionAirTicketDetailsModel.ts +0 -87
- package/src/models/DutyMissionApprovalModel.ts +0 -83
- package/src/models/DutyMissionAttachmentModel.ts +0 -51
- package/src/models/DutyMissionChatModel.ts +0 -65
- package/src/models/DutyMissionEmployeeDetailsModel.ts +0 -72
- package/src/models/DutyMissionRequestModel.ts +0 -239
- package/src/models/DutyMissionWorkflowModel.ts +0 -62
|
@@ -1,167 +1,167 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
export enum HrServiceRequestStatus {
|
|
5
|
-
PENDING = "Pending",
|
|
6
|
-
ASSIGNED = "Assigned",
|
|
7
|
-
IN_PROGRESS = "In Progress",
|
|
8
|
-
COMPLETED = "Completed",
|
|
9
|
-
APPROVED = "Approved",
|
|
10
|
-
REJECTED = "Rejected"
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@Entity({ name: "hr_service_requests" })
|
|
14
|
-
export class HrServiceRequest extends BaseModel {
|
|
15
|
-
@Column({ type: "integer", nullable: true })
|
|
16
|
-
req_user_department_id: number | null;
|
|
17
|
-
|
|
18
|
-
@Column({ type: "integer", nullable: true })
|
|
19
|
-
req_user_section_id: number | null;
|
|
20
|
-
|
|
21
|
-
@Column({ type: "integer", nullable: true })
|
|
22
|
-
req_user_position_id: number | null;
|
|
23
|
-
|
|
24
|
-
@Column({ type: "integer", nullable: true })
|
|
25
|
-
service_id: number | null;
|
|
26
|
-
|
|
27
|
-
@Column({ type: "integer", nullable: true })
|
|
28
|
-
sub_service_id: number | null;
|
|
29
|
-
|
|
30
|
-
@Column({ type: "integer", nullable: false })
|
|
31
|
-
user_id: number;
|
|
32
|
-
|
|
33
|
-
@Column({ type: "text", nullable: true })
|
|
34
|
-
description: string | null;
|
|
35
|
-
|
|
36
|
-
@Column({ type: "enum", enum: HrServiceRequestStatus, default: HrServiceRequestStatus.PENDING, nullable: false })
|
|
37
|
-
status: HrServiceRequestStatus;
|
|
38
|
-
|
|
39
|
-
@Column({ type: "integer", nullable: true })
|
|
40
|
-
reviewer_user_id: number | null;
|
|
41
|
-
|
|
42
|
-
@Column({ type: "integer", nullable: true })
|
|
43
|
-
assigned_to_user_id: number | null;
|
|
44
|
-
|
|
45
|
-
@Column({ type: "timestamp", nullable: true })
|
|
46
|
-
assigned_at: Date | null;
|
|
47
|
-
|
|
48
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
49
|
-
workflow_execution_id: string | null;
|
|
50
|
-
|
|
51
|
-
// Assignment Decision specific fields
|
|
52
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
53
|
-
assigned_employee_name: string;
|
|
54
|
-
|
|
55
|
-
@Column({ type: "varchar", length: 50, nullable: true })
|
|
56
|
-
civil_id_card_number: string | null;
|
|
57
|
-
|
|
58
|
-
@Column({ type: "varchar", length: 100, nullable: false })
|
|
59
|
-
employee_id: string;
|
|
60
|
-
|
|
61
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
62
|
-
current_job_position: string;
|
|
63
|
-
|
|
64
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
65
|
-
assigned_job_position: string;
|
|
66
|
-
|
|
67
|
-
@Column({ type: "date", nullable: false })
|
|
68
|
-
start_date: Date;
|
|
69
|
-
|
|
70
|
-
@Column({ type: "date", nullable: false })
|
|
71
|
-
end_date: Date;
|
|
72
|
-
|
|
73
|
-
@Column({ type: "decimal", precision: 5, scale: 2, nullable: true })
|
|
74
|
-
assignment_allowance: number | null; // 0-100 percentage
|
|
75
|
-
|
|
76
|
-
@Column({ type: "varchar", length: 20, nullable: false })
|
|
77
|
-
phone_number: string;
|
|
78
|
-
|
|
79
|
-
@Column({ type: "text", nullable: false })
|
|
80
|
-
reason_for_request: string;
|
|
81
|
-
|
|
82
|
-
// Replacement tracking fields
|
|
83
|
-
@Column({ type: "boolean", default: false, nullable: false })
|
|
84
|
-
is_replaced: boolean;
|
|
85
|
-
|
|
86
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
87
|
-
replacement_employee_name: string | null;
|
|
88
|
-
|
|
89
|
-
@Column({ type: "varchar", length: 100, nullable: true })
|
|
90
|
-
replacement_employee_id: string | null;
|
|
91
|
-
|
|
92
|
-
@Column({ type: "varchar", length: 50, nullable: true })
|
|
93
|
-
replacement_civil_id_card_number: string | null;
|
|
94
|
-
|
|
95
|
-
@Column({ type: "text", nullable: true })
|
|
96
|
-
replacement_reason: string | null;
|
|
97
|
-
|
|
98
|
-
@Column({ type: "integer", nullable: true })
|
|
99
|
-
replaced_by_user_id: number | null;
|
|
100
|
-
|
|
101
|
-
@Column({ type: "timestamp", nullable: true })
|
|
102
|
-
replaced_at: Date | null;
|
|
103
|
-
|
|
104
|
-
constructor(
|
|
105
|
-
user_id: number,
|
|
106
|
-
status: HrServiceRequestStatus = HrServiceRequestStatus.PENDING,
|
|
107
|
-
service_id?: number | null,
|
|
108
|
-
sub_service_id?: number | null,
|
|
109
|
-
req_user_department_id?: number | null,
|
|
110
|
-
req_user_section_id?: number | null,
|
|
111
|
-
req_user_position_id?: number | null,
|
|
112
|
-
description?: string | null,
|
|
113
|
-
reviewer_user_id?: number | null,
|
|
114
|
-
assigned_to_user_id?: number | null,
|
|
115
|
-
assigned_at?: Date | null,
|
|
116
|
-
workflow_execution_id?: string | null,
|
|
117
|
-
assigned_employee_name?: string,
|
|
118
|
-
civil_id_card_number?: string | null,
|
|
119
|
-
employee_id?: string,
|
|
120
|
-
current_job_position?: string,
|
|
121
|
-
assigned_job_position?: string,
|
|
122
|
-
start_date?: Date,
|
|
123
|
-
end_date?: Date,
|
|
124
|
-
assignment_allowance?: number | null,
|
|
125
|
-
phone_number?: string,
|
|
126
|
-
reason_for_request?: string,
|
|
127
|
-
is_replaced?: boolean,
|
|
128
|
-
replacement_employee_name?: string | null,
|
|
129
|
-
replacement_employee_id?: string | null,
|
|
130
|
-
replacement_civil_id_card_number?: string | null,
|
|
131
|
-
replacement_reason?: string | null,
|
|
132
|
-
replaced_by_user_id?: number | null,
|
|
133
|
-
replaced_at?: Date | null
|
|
134
|
-
) {
|
|
135
|
-
super();
|
|
136
|
-
this.user_id = user_id;
|
|
137
|
-
this.status = status;
|
|
138
|
-
this.service_id = service_id || null;
|
|
139
|
-
this.sub_service_id = sub_service_id || null;
|
|
140
|
-
this.req_user_department_id = req_user_department_id || null;
|
|
141
|
-
this.req_user_section_id = req_user_section_id || null;
|
|
142
|
-
this.req_user_position_id = req_user_position_id || null;
|
|
143
|
-
this.description = description || null;
|
|
144
|
-
this.reviewer_user_id = reviewer_user_id || null;
|
|
145
|
-
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
146
|
-
this.assigned_at = assigned_at || null;
|
|
147
|
-
this.workflow_execution_id = workflow_execution_id || null;
|
|
148
|
-
this.assigned_employee_name = assigned_employee_name || "";
|
|
149
|
-
this.civil_id_card_number = civil_id_card_number || null;
|
|
150
|
-
this.employee_id = employee_id || "";
|
|
151
|
-
this.current_job_position = current_job_position || "";
|
|
152
|
-
this.assigned_job_position = assigned_job_position || "";
|
|
153
|
-
this.start_date = start_date || new Date();
|
|
154
|
-
this.end_date = end_date || new Date();
|
|
155
|
-
this.assignment_allowance = assignment_allowance || null;
|
|
156
|
-
this.phone_number = phone_number || "";
|
|
157
|
-
this.reason_for_request = reason_for_request || "";
|
|
158
|
-
this.is_replaced = is_replaced || false;
|
|
159
|
-
this.replacement_employee_name = replacement_employee_name || null;
|
|
160
|
-
this.replacement_employee_id = replacement_employee_id || null;
|
|
161
|
-
this.replacement_civil_id_card_number = replacement_civil_id_card_number || null;
|
|
162
|
-
this.replacement_reason = replacement_reason || null;
|
|
163
|
-
this.replaced_by_user_id = replaced_by_user_id || null;
|
|
164
|
-
this.replaced_at = replaced_at || null;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum HrServiceRequestStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
ASSIGNED = "Assigned",
|
|
7
|
+
IN_PROGRESS = "In Progress",
|
|
8
|
+
COMPLETED = "Completed",
|
|
9
|
+
APPROVED = "Approved",
|
|
10
|
+
REJECTED = "Rejected"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@Entity({ name: "hr_service_requests" })
|
|
14
|
+
export class HrServiceRequest extends BaseModel {
|
|
15
|
+
@Column({ type: "integer", nullable: true })
|
|
16
|
+
req_user_department_id: number | null;
|
|
17
|
+
|
|
18
|
+
@Column({ type: "integer", nullable: true })
|
|
19
|
+
req_user_section_id: number | null;
|
|
20
|
+
|
|
21
|
+
@Column({ type: "integer", nullable: true })
|
|
22
|
+
req_user_position_id: number | null;
|
|
23
|
+
|
|
24
|
+
@Column({ type: "integer", nullable: true })
|
|
25
|
+
service_id: number | null;
|
|
26
|
+
|
|
27
|
+
@Column({ type: "integer", nullable: true })
|
|
28
|
+
sub_service_id: number | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: "integer", nullable: false })
|
|
31
|
+
user_id: number;
|
|
32
|
+
|
|
33
|
+
@Column({ type: "text", nullable: true })
|
|
34
|
+
description: string | null;
|
|
35
|
+
|
|
36
|
+
@Column({ type: "enum", enum: HrServiceRequestStatus, default: HrServiceRequestStatus.PENDING, nullable: false })
|
|
37
|
+
status: HrServiceRequestStatus;
|
|
38
|
+
|
|
39
|
+
@Column({ type: "integer", nullable: true })
|
|
40
|
+
reviewer_user_id: number | null;
|
|
41
|
+
|
|
42
|
+
@Column({ type: "integer", nullable: true })
|
|
43
|
+
assigned_to_user_id: number | null;
|
|
44
|
+
|
|
45
|
+
@Column({ type: "timestamp", nullable: true })
|
|
46
|
+
assigned_at: Date | null;
|
|
47
|
+
|
|
48
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
49
|
+
workflow_execution_id: string | null;
|
|
50
|
+
|
|
51
|
+
// Assignment Decision specific fields
|
|
52
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
53
|
+
assigned_employee_name: string;
|
|
54
|
+
|
|
55
|
+
@Column({ type: "varchar", length: 50, nullable: true })
|
|
56
|
+
civil_id_card_number: string | null;
|
|
57
|
+
|
|
58
|
+
@Column({ type: "varchar", length: 100, nullable: false })
|
|
59
|
+
employee_id: string;
|
|
60
|
+
|
|
61
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
62
|
+
current_job_position: string;
|
|
63
|
+
|
|
64
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
65
|
+
assigned_job_position: string;
|
|
66
|
+
|
|
67
|
+
@Column({ type: "date", nullable: false })
|
|
68
|
+
start_date: Date;
|
|
69
|
+
|
|
70
|
+
@Column({ type: "date", nullable: false })
|
|
71
|
+
end_date: Date;
|
|
72
|
+
|
|
73
|
+
@Column({ type: "decimal", precision: 5, scale: 2, nullable: true })
|
|
74
|
+
assignment_allowance: number | null; // 0-100 percentage
|
|
75
|
+
|
|
76
|
+
@Column({ type: "varchar", length: 20, nullable: false })
|
|
77
|
+
phone_number: string;
|
|
78
|
+
|
|
79
|
+
@Column({ type: "text", nullable: false })
|
|
80
|
+
reason_for_request: string;
|
|
81
|
+
|
|
82
|
+
// Replacement tracking fields
|
|
83
|
+
@Column({ type: "boolean", default: false, nullable: false })
|
|
84
|
+
is_replaced: boolean;
|
|
85
|
+
|
|
86
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
87
|
+
replacement_employee_name: string | null;
|
|
88
|
+
|
|
89
|
+
@Column({ type: "varchar", length: 100, nullable: true })
|
|
90
|
+
replacement_employee_id: string | null;
|
|
91
|
+
|
|
92
|
+
@Column({ type: "varchar", length: 50, nullable: true })
|
|
93
|
+
replacement_civil_id_card_number: string | null;
|
|
94
|
+
|
|
95
|
+
@Column({ type: "text", nullable: true })
|
|
96
|
+
replacement_reason: string | null;
|
|
97
|
+
|
|
98
|
+
@Column({ type: "integer", nullable: true })
|
|
99
|
+
replaced_by_user_id: number | null;
|
|
100
|
+
|
|
101
|
+
@Column({ type: "timestamp", nullable: true })
|
|
102
|
+
replaced_at: Date | null;
|
|
103
|
+
|
|
104
|
+
constructor(
|
|
105
|
+
user_id: number,
|
|
106
|
+
status: HrServiceRequestStatus = HrServiceRequestStatus.PENDING,
|
|
107
|
+
service_id?: number | null,
|
|
108
|
+
sub_service_id?: number | null,
|
|
109
|
+
req_user_department_id?: number | null,
|
|
110
|
+
req_user_section_id?: number | null,
|
|
111
|
+
req_user_position_id?: number | null,
|
|
112
|
+
description?: string | null,
|
|
113
|
+
reviewer_user_id?: number | null,
|
|
114
|
+
assigned_to_user_id?: number | null,
|
|
115
|
+
assigned_at?: Date | null,
|
|
116
|
+
workflow_execution_id?: string | null,
|
|
117
|
+
assigned_employee_name?: string,
|
|
118
|
+
civil_id_card_number?: string | null,
|
|
119
|
+
employee_id?: string,
|
|
120
|
+
current_job_position?: string,
|
|
121
|
+
assigned_job_position?: string,
|
|
122
|
+
start_date?: Date,
|
|
123
|
+
end_date?: Date,
|
|
124
|
+
assignment_allowance?: number | null,
|
|
125
|
+
phone_number?: string,
|
|
126
|
+
reason_for_request?: string,
|
|
127
|
+
is_replaced?: boolean,
|
|
128
|
+
replacement_employee_name?: string | null,
|
|
129
|
+
replacement_employee_id?: string | null,
|
|
130
|
+
replacement_civil_id_card_number?: string | null,
|
|
131
|
+
replacement_reason?: string | null,
|
|
132
|
+
replaced_by_user_id?: number | null,
|
|
133
|
+
replaced_at?: Date | null
|
|
134
|
+
) {
|
|
135
|
+
super();
|
|
136
|
+
this.user_id = user_id;
|
|
137
|
+
this.status = status;
|
|
138
|
+
this.service_id = service_id || null;
|
|
139
|
+
this.sub_service_id = sub_service_id || null;
|
|
140
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
141
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
142
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
143
|
+
this.description = description || null;
|
|
144
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
145
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
146
|
+
this.assigned_at = assigned_at || null;
|
|
147
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
148
|
+
this.assigned_employee_name = assigned_employee_name || "";
|
|
149
|
+
this.civil_id_card_number = civil_id_card_number || null;
|
|
150
|
+
this.employee_id = employee_id || "";
|
|
151
|
+
this.current_job_position = current_job_position || "";
|
|
152
|
+
this.assigned_job_position = assigned_job_position || "";
|
|
153
|
+
this.start_date = start_date || new Date();
|
|
154
|
+
this.end_date = end_date || new Date();
|
|
155
|
+
this.assignment_allowance = assignment_allowance || null;
|
|
156
|
+
this.phone_number = phone_number || "";
|
|
157
|
+
this.reason_for_request = reason_for_request || "";
|
|
158
|
+
this.is_replaced = is_replaced || false;
|
|
159
|
+
this.replacement_employee_name = replacement_employee_name || null;
|
|
160
|
+
this.replacement_employee_id = replacement_employee_id || null;
|
|
161
|
+
this.replacement_civil_id_card_number = replacement_civil_id_card_number || null;
|
|
162
|
+
this.replacement_reason = replacement_reason || null;
|
|
163
|
+
this.replaced_by_user_id = replaced_by_user_id || null;
|
|
164
|
+
this.replaced_at = replaced_at || null;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
@@ -0,0 +1,194 @@
|
|
|
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
|
+
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
import { DutyMissionRequests } from './DutyMissionRequestModel';
|
|
3
|
-
export declare class DutyMissionAirTicketDetails extends BaseModel {
|
|
4
|
-
request_id: number;
|
|
5
|
-
service_id: number | null;
|
|
6
|
-
sub_service_id: number | null;
|
|
7
|
-
employee_id: string;
|
|
8
|
-
employee_name: string;
|
|
9
|
-
ticket_type: string | null;
|
|
10
|
-
decision_date: Date | null;
|
|
11
|
-
departure_date: Date | null;
|
|
12
|
-
return_date: Date | null;
|
|
13
|
-
decision_number: string | null;
|
|
14
|
-
mission_number: string | null;
|
|
15
|
-
passport_no: string;
|
|
16
|
-
passport_issue_date: Date | null;
|
|
17
|
-
passport_expiry_date: Date | null;
|
|
18
|
-
request: DutyMissionRequests;
|
|
19
|
-
constructor(request_id: number, employee_id: string, employee_name: string, passport_no: string, service_id?: number | null, sub_service_id?: number | null, ticket_type?: string | null, decision_date?: Date | null, departure_date?: Date | null, return_date?: Date | null, decision_number?: string | null, mission_number?: string | null, passport_issue_date?: Date | null, passport_expiry_date?: Date | null);
|
|
20
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.DutyMissionAirTicketDetails = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
const DutyMissionRequestModel_1 = require("./DutyMissionRequestModel");
|
|
16
|
-
let DutyMissionAirTicketDetails = class DutyMissionAirTicketDetails extends BaseModel_1.BaseModel {
|
|
17
|
-
constructor(request_id, employee_id, employee_name, passport_no, service_id, sub_service_id, ticket_type, decision_date, departure_date, return_date, decision_number, mission_number, passport_issue_date, passport_expiry_date) {
|
|
18
|
-
super();
|
|
19
|
-
this.request_id = request_id;
|
|
20
|
-
this.service_id = service_id ?? null;
|
|
21
|
-
this.sub_service_id = sub_service_id ?? null;
|
|
22
|
-
this.employee_id = employee_id;
|
|
23
|
-
this.employee_name = employee_name;
|
|
24
|
-
this.passport_no = passport_no;
|
|
25
|
-
this.ticket_type = ticket_type ?? null;
|
|
26
|
-
this.decision_date = decision_date ?? null;
|
|
27
|
-
this.departure_date = departure_date ?? null;
|
|
28
|
-
this.return_date = return_date ?? null;
|
|
29
|
-
this.decision_number = decision_number ?? null;
|
|
30
|
-
this.mission_number = mission_number ?? null;
|
|
31
|
-
this.passport_issue_date = passport_issue_date ?? null;
|
|
32
|
-
this.passport_expiry_date = passport_expiry_date ?? null;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
exports.DutyMissionAirTicketDetails = DutyMissionAirTicketDetails;
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
38
|
-
__metadata("design:type", Number)
|
|
39
|
-
], DutyMissionAirTicketDetails.prototype, "request_id", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
42
|
-
__metadata("design:type", Object)
|
|
43
|
-
], DutyMissionAirTicketDetails.prototype, "service_id", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
46
|
-
__metadata("design:type", Object)
|
|
47
|
-
], DutyMissionAirTicketDetails.prototype, "sub_service_id", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
|
|
50
|
-
__metadata("design:type", String)
|
|
51
|
-
], DutyMissionAirTicketDetails.prototype, "employee_id", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
54
|
-
__metadata("design:type", String)
|
|
55
|
-
], DutyMissionAirTicketDetails.prototype, "employee_name", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
58
|
-
__metadata("design:type", Object)
|
|
59
|
-
], DutyMissionAirTicketDetails.prototype, "ticket_type", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
62
|
-
__metadata("design:type", Object)
|
|
63
|
-
], DutyMissionAirTicketDetails.prototype, "decision_date", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
66
|
-
__metadata("design:type", Object)
|
|
67
|
-
], DutyMissionAirTicketDetails.prototype, "departure_date", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
70
|
-
__metadata("design:type", Object)
|
|
71
|
-
], DutyMissionAirTicketDetails.prototype, "return_date", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
74
|
-
__metadata("design:type", Object)
|
|
75
|
-
], DutyMissionAirTicketDetails.prototype, "decision_number", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
78
|
-
__metadata("design:type", Object)
|
|
79
|
-
], DutyMissionAirTicketDetails.prototype, "mission_number", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
|
|
82
|
-
__metadata("design:type", String)
|
|
83
|
-
], DutyMissionAirTicketDetails.prototype, "passport_no", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
86
|
-
__metadata("design:type", Object)
|
|
87
|
-
], DutyMissionAirTicketDetails.prototype, "passport_issue_date", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
90
|
-
__metadata("design:type", Object)
|
|
91
|
-
], DutyMissionAirTicketDetails.prototype, "passport_expiry_date", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, typeorm_1.ManyToOne)(() => DutyMissionRequestModel_1.DutyMissionRequests, { onDelete: 'CASCADE' }),
|
|
94
|
-
(0, typeorm_1.JoinColumn)({ name: 'request_id', referencedColumnName: 'id' }),
|
|
95
|
-
__metadata("design:type", DutyMissionRequestModel_1.DutyMissionRequests)
|
|
96
|
-
], DutyMissionAirTicketDetails.prototype, "request", void 0);
|
|
97
|
-
exports.DutyMissionAirTicketDetails = DutyMissionAirTicketDetails = __decorate([
|
|
98
|
-
(0, typeorm_1.Entity)({ name: 'duty_mission_air_ticket_details' }),
|
|
99
|
-
__metadata("design:paramtypes", [Number, String, String, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])
|
|
100
|
-
], DutyMissionAirTicketDetails);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare enum DutyMissionApprovalStatus {
|
|
3
|
-
PENDING = "Pending",
|
|
4
|
-
IN_PROGRESS = "In Progress",
|
|
5
|
-
APPROVED = "Approved",
|
|
6
|
-
REJECTED = "Rejected"
|
|
7
|
-
}
|
|
8
|
-
export declare class DutyMissionApprovalDetails extends BaseModel {
|
|
9
|
-
request_id: number;
|
|
10
|
-
service_id: number | null;
|
|
11
|
-
sub_service_id: number | null;
|
|
12
|
-
level: number;
|
|
13
|
-
approver_role_id: number;
|
|
14
|
-
department_id: number | null;
|
|
15
|
-
section_id: number | null;
|
|
16
|
-
approver_user_id: number | null;
|
|
17
|
-
delegate_user_id: number | null;
|
|
18
|
-
approved_by: number | null;
|
|
19
|
-
comment: string;
|
|
20
|
-
approval_status: DutyMissionApprovalStatus;
|
|
21
|
-
is_allowed: boolean;
|
|
22
|
-
constructor(request_id: number, approver_role_id: number, comment: string, approval_status: DutyMissionApprovalStatus, level: number, department_id?: number | null, section_id?: number | null, approver_user_id?: number | null, delegate_user_id?: number | null, approved_by?: number | null, service_id?: number, sub_service_id?: number, is_allowed?: boolean);
|
|
23
|
-
}
|