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