@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,72 +0,0 @@
|
|
|
1
|
-
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
import { DutyMissionRequests } from './DutyMissionRequestModel';
|
|
4
|
-
|
|
5
|
-
@Entity({ name: 'duty_mission_employee_details' })
|
|
6
|
-
export class DutyMissionEmployeeDetails extends BaseModel {
|
|
7
|
-
|
|
8
|
-
@Column({ type: 'int', nullable: false })
|
|
9
|
-
request_id: number;
|
|
10
|
-
|
|
11
|
-
@Column({ type: 'int', nullable: true })
|
|
12
|
-
service_id: number | null;
|
|
13
|
-
|
|
14
|
-
@Column({ type: 'int', nullable: true })
|
|
15
|
-
sub_service_id: number | null;
|
|
16
|
-
|
|
17
|
-
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
18
|
-
employee_id: string;
|
|
19
|
-
|
|
20
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
21
|
-
employee_name: string;
|
|
22
|
-
|
|
23
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
24
|
-
department: string | null;
|
|
25
|
-
|
|
26
|
-
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
27
|
-
grade: string | null;
|
|
28
|
-
|
|
29
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
30
|
-
position: string | null;
|
|
31
|
-
|
|
32
|
-
@Column({ type: 'decimal', precision: 5, scale: 2, nullable: true, default: 100 })
|
|
33
|
-
percentage: number | null;
|
|
34
|
-
|
|
35
|
-
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
36
|
-
allowance_per_day: number | null;
|
|
37
|
-
|
|
38
|
-
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
39
|
-
total_allowance: number | null;
|
|
40
|
-
|
|
41
|
-
@ManyToOne(() => DutyMissionRequests, { onDelete: 'CASCADE' })
|
|
42
|
-
@JoinColumn({ name: 'request_id', referencedColumnName: 'id' })
|
|
43
|
-
request: DutyMissionRequests;
|
|
44
|
-
|
|
45
|
-
constructor(
|
|
46
|
-
request_id: number,
|
|
47
|
-
employee_id: string,
|
|
48
|
-
employee_name: string,
|
|
49
|
-
service_id?: number | null,
|
|
50
|
-
sub_service_id?: number | null,
|
|
51
|
-
department?: string | null,
|
|
52
|
-
grade?: string | null,
|
|
53
|
-
position?: string | null,
|
|
54
|
-
percentage?: number | null,
|
|
55
|
-
allowance_per_day?: number | null,
|
|
56
|
-
total_allowance?: number | null
|
|
57
|
-
) {
|
|
58
|
-
super();
|
|
59
|
-
this.request_id = request_id;
|
|
60
|
-
this.service_id = service_id ?? null;
|
|
61
|
-
this.sub_service_id = sub_service_id ?? null;
|
|
62
|
-
this.employee_id = employee_id;
|
|
63
|
-
this.employee_name = employee_name;
|
|
64
|
-
this.department = department ?? null;
|
|
65
|
-
this.grade = grade ?? null;
|
|
66
|
-
this.position = position ?? null;
|
|
67
|
-
this.percentage = percentage ?? 100;
|
|
68
|
-
this.allowance_per_day = allowance_per_day ?? null;
|
|
69
|
-
this.total_allowance = total_allowance ?? null;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
export enum TripType {
|
|
5
|
-
ANNUAL = "Annual",
|
|
6
|
-
PLANNED = "Planned",
|
|
7
|
-
UNPLANNED = "Unplanned"
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export enum ChooseType {
|
|
11
|
-
INSIDE = "Inside",
|
|
12
|
-
OUTSIDE = "Outside"
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export enum MissionSponsoredBy {
|
|
16
|
-
CAA = "CAA",
|
|
17
|
-
LISTED = "Listed Companies",
|
|
18
|
-
NON_LISTED = "Non-listed Companies"
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export enum AirTicketRequired {
|
|
22
|
-
YES = "Yes",
|
|
23
|
-
NO = "No",
|
|
24
|
-
CASH_COMPONENT = "Cash Component"
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export enum VehicleRequired {
|
|
28
|
-
YES = "Yes",
|
|
29
|
-
NO = "No"
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export enum DutyMissionStatus {
|
|
33
|
-
PENDING = "Pending",
|
|
34
|
-
ASSIGNED = "Assigned",
|
|
35
|
-
IN_PROGRESS = "In Progress",
|
|
36
|
-
APPROVED = "Approved",
|
|
37
|
-
REJECTED = "Rejected"
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@Entity({ name: 'duty_mission_requests' })
|
|
41
|
-
export class DutyMissionRequests extends BaseModel {
|
|
42
|
-
|
|
43
|
-
// Common columns from logistics_request table
|
|
44
|
-
@Column({ type: 'int', nullable: true })
|
|
45
|
-
req_user_department_id: number | null;
|
|
46
|
-
|
|
47
|
-
@Column({ type: 'int', nullable: true })
|
|
48
|
-
req_user_section_id: number | null;
|
|
49
|
-
|
|
50
|
-
@Column({ nullable: true })
|
|
51
|
-
service_id: number;
|
|
52
|
-
|
|
53
|
-
@Column({ nullable: true })
|
|
54
|
-
sub_service_id: number;
|
|
55
|
-
|
|
56
|
-
@Column({ nullable: false })
|
|
57
|
-
user_id: number;
|
|
58
|
-
|
|
59
|
-
@Column({
|
|
60
|
-
type: "enum",
|
|
61
|
-
enum: DutyMissionStatus,
|
|
62
|
-
default: DutyMissionStatus.PENDING,
|
|
63
|
-
nullable: false,
|
|
64
|
-
})
|
|
65
|
-
status: DutyMissionStatus;
|
|
66
|
-
|
|
67
|
-
@Column({ type: "varchar", nullable: true })
|
|
68
|
-
workflow_execution_id: string | null;
|
|
69
|
-
|
|
70
|
-
// New columns
|
|
71
|
-
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
72
|
-
request_id: string | null; // Auto generated
|
|
73
|
-
|
|
74
|
-
@Column({
|
|
75
|
-
type: "enum",
|
|
76
|
-
enum: TripType,
|
|
77
|
-
nullable: false,
|
|
78
|
-
})
|
|
79
|
-
trip_type: TripType;
|
|
80
|
-
|
|
81
|
-
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
82
|
-
mission_id: string | null;
|
|
83
|
-
|
|
84
|
-
@Column({
|
|
85
|
-
type: "enum",
|
|
86
|
-
enum: ChooseType,
|
|
87
|
-
nullable: false,
|
|
88
|
-
})
|
|
89
|
-
choose_type: ChooseType;
|
|
90
|
-
|
|
91
|
-
@Column({
|
|
92
|
-
type: "enum",
|
|
93
|
-
enum: MissionSponsoredBy,
|
|
94
|
-
nullable: false,
|
|
95
|
-
})
|
|
96
|
-
mission_sponsored_by: MissionSponsoredBy;
|
|
97
|
-
|
|
98
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
99
|
-
if_sponsored: string | null; // Company name if sponsored
|
|
100
|
-
|
|
101
|
-
@Column({ type: 'text', nullable: false })
|
|
102
|
-
mission_purpose: string;
|
|
103
|
-
|
|
104
|
-
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
105
|
-
mission_number: string;
|
|
106
|
-
|
|
107
|
-
@Column({ type: "date", nullable: false })
|
|
108
|
-
mission_start_date: Date;
|
|
109
|
-
|
|
110
|
-
@Column({ type: "date", nullable: false })
|
|
111
|
-
mission_end_date: Date;
|
|
112
|
-
|
|
113
|
-
@Column({ type: 'int', nullable: true })
|
|
114
|
-
mission_days: number | null;
|
|
115
|
-
|
|
116
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
117
|
-
travelling_area_from: string;
|
|
118
|
-
|
|
119
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
120
|
-
travelling_area_to: string;
|
|
121
|
-
|
|
122
|
-
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
123
|
-
distance: string | null;
|
|
124
|
-
|
|
125
|
-
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
126
|
-
from_country: string;
|
|
127
|
-
|
|
128
|
-
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
129
|
-
to_country: string;
|
|
130
|
-
|
|
131
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
132
|
-
travel_place: string;
|
|
133
|
-
|
|
134
|
-
@Column({ type: "date", nullable: false })
|
|
135
|
-
travel_start_date: Date;
|
|
136
|
-
|
|
137
|
-
@Column({ type: "date", nullable: false })
|
|
138
|
-
travel_return_date: Date;
|
|
139
|
-
|
|
140
|
-
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
141
|
-
allowance_percentage: string | null; // Inside: 0%, 50%, 100%; Outside: 0%, 75%, 100%
|
|
142
|
-
|
|
143
|
-
@Column({
|
|
144
|
-
type: "enum",
|
|
145
|
-
enum: AirTicketRequired,
|
|
146
|
-
nullable: true,
|
|
147
|
-
})
|
|
148
|
-
air_ticket_required: AirTicketRequired | null;
|
|
149
|
-
|
|
150
|
-
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
151
|
-
passport_no: string;
|
|
152
|
-
|
|
153
|
-
@Column({ type: "date", nullable: true })
|
|
154
|
-
passport_issue_date: Date | null;
|
|
155
|
-
|
|
156
|
-
@Column({ type: "date", nullable: true })
|
|
157
|
-
passport_expiry_date: Date | null;
|
|
158
|
-
|
|
159
|
-
@Column({
|
|
160
|
-
type: "enum",
|
|
161
|
-
enum: VehicleRequired,
|
|
162
|
-
nullable: true,
|
|
163
|
-
})
|
|
164
|
-
vehicle_required: VehicleRequired | null;
|
|
165
|
-
|
|
166
|
-
@Column({ type: 'text', nullable: true })
|
|
167
|
-
remarks: string | null;
|
|
168
|
-
|
|
169
|
-
constructor(
|
|
170
|
-
req_user_department_id: number | null,
|
|
171
|
-
req_user_section_id: number | null,
|
|
172
|
-
service_id: number,
|
|
173
|
-
sub_service_id: number,
|
|
174
|
-
user_id: number,
|
|
175
|
-
trip_type: TripType,
|
|
176
|
-
choose_type: ChooseType,
|
|
177
|
-
mission_sponsored_by: MissionSponsoredBy,
|
|
178
|
-
mission_purpose: string,
|
|
179
|
-
mission_number: string,
|
|
180
|
-
mission_start_date: Date,
|
|
181
|
-
mission_end_date: Date,
|
|
182
|
-
travelling_area_from: string,
|
|
183
|
-
travelling_area_to: string,
|
|
184
|
-
from_country: string,
|
|
185
|
-
to_country: string,
|
|
186
|
-
travel_place: string,
|
|
187
|
-
travel_start_date: Date,
|
|
188
|
-
travel_return_date: Date,
|
|
189
|
-
passport_no: string,
|
|
190
|
-
status: DutyMissionStatus,
|
|
191
|
-
request_id?: string | null,
|
|
192
|
-
mission_id?: string | null,
|
|
193
|
-
mission_days?: number | null,
|
|
194
|
-
distance?: string | null,
|
|
195
|
-
if_sponsored?: string | null,
|
|
196
|
-
allowance_percentage?: string | null,
|
|
197
|
-
air_ticket_required?: AirTicketRequired | null,
|
|
198
|
-
passport_issue_date?: Date | null,
|
|
199
|
-
passport_expiry_date?: Date | null,
|
|
200
|
-
vehicle_required?: VehicleRequired | null,
|
|
201
|
-
remarks?: string | null,
|
|
202
|
-
workflow_execution_id?: string | null,
|
|
203
|
-
) {
|
|
204
|
-
super();
|
|
205
|
-
this.req_user_department_id = req_user_department_id ?? null;
|
|
206
|
-
this.req_user_section_id = req_user_section_id ?? null;
|
|
207
|
-
this.service_id = service_id;
|
|
208
|
-
this.sub_service_id = sub_service_id;
|
|
209
|
-
this.user_id = user_id;
|
|
210
|
-
this.trip_type = trip_type;
|
|
211
|
-
this.choose_type = choose_type;
|
|
212
|
-
this.mission_sponsored_by = mission_sponsored_by;
|
|
213
|
-
this.mission_purpose = mission_purpose;
|
|
214
|
-
this.mission_number = mission_number;
|
|
215
|
-
this.mission_start_date = mission_start_date;
|
|
216
|
-
this.mission_end_date = mission_end_date;
|
|
217
|
-
this.travelling_area_from = travelling_area_from;
|
|
218
|
-
this.travelling_area_to = travelling_area_to;
|
|
219
|
-
this.from_country = from_country;
|
|
220
|
-
this.to_country = to_country;
|
|
221
|
-
this.travel_place = travel_place;
|
|
222
|
-
this.travel_start_date = travel_start_date;
|
|
223
|
-
this.travel_return_date = travel_return_date;
|
|
224
|
-
this.passport_no = passport_no;
|
|
225
|
-
this.status = status;
|
|
226
|
-
this.request_id = request_id ?? null;
|
|
227
|
-
this.mission_id = mission_id ?? null;
|
|
228
|
-
this.mission_days = mission_days ?? null;
|
|
229
|
-
this.distance = distance ?? null;
|
|
230
|
-
this.if_sponsored = if_sponsored ?? null;
|
|
231
|
-
this.allowance_percentage = allowance_percentage ?? null;
|
|
232
|
-
this.air_ticket_required = air_ticket_required ?? null;
|
|
233
|
-
this.passport_issue_date = passport_issue_date ?? null;
|
|
234
|
-
this.passport_expiry_date = passport_expiry_date ?? null;
|
|
235
|
-
this.vehicle_required = vehicle_required ?? null;
|
|
236
|
-
this.remarks = remarks ?? null;
|
|
237
|
-
this.workflow_execution_id = workflow_execution_id ?? null;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
export enum DutyMissionWorkFlowStatus {
|
|
5
|
-
COMPLETED = "Completed",
|
|
6
|
-
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
-
PENDING = "Pending"
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//This model is used to store the duty mission workflow status and activity logs
|
|
11
|
-
@Entity({ name: 'duty_mission_workflows' })
|
|
12
|
-
export class DutyMissionWorkFlow extends BaseModel {
|
|
13
|
-
@Column({ type: 'integer', nullable: false })
|
|
14
|
-
request_id: number;
|
|
15
|
-
|
|
16
|
-
@Column({ type: 'integer', nullable: true })
|
|
17
|
-
service_id: number | null;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'integer', nullable: true })
|
|
20
|
-
sub_service_id: number | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
23
|
-
content: string;
|
|
24
|
-
|
|
25
|
-
@Column({ type: 'enum', enum: DutyMissionWorkFlowStatus, default: DutyMissionWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
26
|
-
status: DutyMissionWorkFlowStatus;
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'integer', nullable: true })
|
|
29
|
-
user_id: number | null;
|
|
30
|
-
|
|
31
|
-
@Column({ type: 'integer', nullable: true })
|
|
32
|
-
role_id: number | null;
|
|
33
|
-
|
|
34
|
-
@Column({ type: 'integer', nullable: true })
|
|
35
|
-
department_id: number | null;
|
|
36
|
-
|
|
37
|
-
@Column({ type: 'integer', nullable: true })
|
|
38
|
-
section_id: number | null;
|
|
39
|
-
|
|
40
|
-
constructor(
|
|
41
|
-
request_id: number,
|
|
42
|
-
content: string,
|
|
43
|
-
status: DutyMissionWorkFlowStatus,
|
|
44
|
-
service_id?: number,
|
|
45
|
-
sub_service_id?: number,
|
|
46
|
-
user_id?: number,
|
|
47
|
-
role_id?: number,
|
|
48
|
-
department_id?: number,
|
|
49
|
-
section_id?: number
|
|
50
|
-
) {
|
|
51
|
-
super();
|
|
52
|
-
this.request_id = request_id;
|
|
53
|
-
this.service_id = service_id || null;
|
|
54
|
-
this.sub_service_id = sub_service_id || null;
|
|
55
|
-
this.content = content;
|
|
56
|
-
this.status = status;
|
|
57
|
-
this.user_id = user_id || null;
|
|
58
|
-
this.role_id = role_id || null;
|
|
59
|
-
this.department_id = department_id || null;
|
|
60
|
-
this.section_id = section_id || null;
|
|
61
|
-
}
|
|
62
|
-
}
|