@platform-modules/civil-aviation-authority 2.3.2 → 2.3.3
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/dist/index.d.ts +2 -0
- package/dist/index.js +5 -1
- package/dist/models/TemporaryAssignmentRequestModel.d.ts +49 -0
- package/dist/models/TemporaryAssignmentRequestModel.js +204 -0
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/models/TemporaryAssignmentRequestModel.ts +194 -0
package/dist/index.d.ts
CHANGED
|
@@ -90,3 +90,5 @@ export { TrainingRequestChat } from './models/TrainingChatModel';
|
|
|
90
90
|
export { TrainingMessageType } from './models/TrainingChatModel';
|
|
91
91
|
export * from './models/SecondmentRequestModel';
|
|
92
92
|
export { SecondmentRequestStatus } from './models/SecondmentRequestModel';
|
|
93
|
+
export * from './models/TemporaryAssignmentRequestModel';
|
|
94
|
+
export { TemporaryAssignmentRequestStatus, SalaryPaymentSource } from './models/TemporaryAssignmentRequestModel';
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.SecondmentRequestStatus = exports.TrainingMessageType = exports.TrainingRequestChat = exports.TrainingRequestAttachment = exports.TrainingWorkFlowStatus = exports.TrainingApprovalStatus = exports.TrainingRequestStatus = exports.HrServiceChatStatus = exports.HrServiceMessageType = exports.HrServiceRequestChat = exports.HrServiceRequestAttachment = exports.HrServiceWorkFlowStatus = exports.HrServiceApprovalStatus = exports.HrServiceRequestStatus = void 0;
|
|
17
|
+
exports.SalaryPaymentSource = exports.TemporaryAssignmentRequestStatus = exports.SecondmentRequestStatus = exports.TrainingMessageType = exports.TrainingRequestChat = exports.TrainingRequestAttachment = exports.TrainingWorkFlowStatus = exports.TrainingApprovalStatus = exports.TrainingRequestStatus = exports.HrServiceChatStatus = exports.HrServiceMessageType = exports.HrServiceRequestChat = exports.HrServiceRequestAttachment = exports.HrServiceWorkFlowStatus = exports.HrServiceApprovalStatus = exports.HrServiceRequestStatus = void 0;
|
|
18
18
|
__exportStar(require("./models/user"), exports);
|
|
19
19
|
__exportStar(require("./models/role"), exports);
|
|
20
20
|
__exportStar(require("./models/user-sessions"), exports);
|
|
@@ -125,3 +125,7 @@ Object.defineProperty(exports, "TrainingMessageType", { enumerable: true, get: f
|
|
|
125
125
|
__exportStar(require("./models/SecondmentRequestModel"), exports);
|
|
126
126
|
var SecondmentRequestModel_1 = require("./models/SecondmentRequestModel");
|
|
127
127
|
Object.defineProperty(exports, "SecondmentRequestStatus", { enumerable: true, get: function () { return SecondmentRequestModel_1.SecondmentRequestStatus; } });
|
|
128
|
+
__exportStar(require("./models/TemporaryAssignmentRequestModel"), exports);
|
|
129
|
+
var TemporaryAssignmentRequestModel_1 = require("./models/TemporaryAssignmentRequestModel");
|
|
130
|
+
Object.defineProperty(exports, "TemporaryAssignmentRequestStatus", { enumerable: true, get: function () { return TemporaryAssignmentRequestModel_1.TemporaryAssignmentRequestStatus; } });
|
|
131
|
+
Object.defineProperty(exports, "SalaryPaymentSource", { enumerable: true, get: function () { return TemporaryAssignmentRequestModel_1.SalaryPaymentSource; } });
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
export declare enum TemporaryAssignmentRequestStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
ASSIGNED = "Assigned",
|
|
5
|
+
IN_PROGRESS = "In Progress",
|
|
6
|
+
COMPLETED = "Completed",
|
|
7
|
+
APPROVED = "Approved",
|
|
8
|
+
REJECTED = "Rejected"
|
|
9
|
+
}
|
|
10
|
+
export declare enum SalaryPaymentSource {
|
|
11
|
+
AUTHORITY = "Authority",
|
|
12
|
+
OTHER_ENTITY = "Other Entity"
|
|
13
|
+
}
|
|
14
|
+
export declare class TemporaryAssignmentRequest extends BaseModel {
|
|
15
|
+
req_user_department_id: number | null;
|
|
16
|
+
req_user_section_id: number | null;
|
|
17
|
+
req_user_position_id: number | null;
|
|
18
|
+
service_id: number | null;
|
|
19
|
+
sub_service_id: number | null;
|
|
20
|
+
user_id: number;
|
|
21
|
+
description: string | null;
|
|
22
|
+
status: TemporaryAssignmentRequestStatus;
|
|
23
|
+
reviewer_user_id: number | null;
|
|
24
|
+
assigned_to_user_id: number | null;
|
|
25
|
+
assigned_at: Date | null;
|
|
26
|
+
workflow_execution_id: string | null;
|
|
27
|
+
assigned_employee_name: string;
|
|
28
|
+
civil_id_card_number: string | null;
|
|
29
|
+
employee_id: string;
|
|
30
|
+
current_job_position: string;
|
|
31
|
+
assigned_job_position: string;
|
|
32
|
+
original_department_id: number;
|
|
33
|
+
assigned_department_id: number;
|
|
34
|
+
entity: string | null;
|
|
35
|
+
start_date: Date;
|
|
36
|
+
end_date: Date;
|
|
37
|
+
phone_number: string;
|
|
38
|
+
reason_for_request: string;
|
|
39
|
+
salary_payment_source: SalaryPaymentSource;
|
|
40
|
+
social_service_fund_contribution: string | null;
|
|
41
|
+
is_replaced: boolean;
|
|
42
|
+
replacement_employee_name: string | null;
|
|
43
|
+
replacement_employee_id: string | null;
|
|
44
|
+
replacement_civil_id_card_number: string | null;
|
|
45
|
+
replacement_reason: string | null;
|
|
46
|
+
replaced_by_user_id: number | null;
|
|
47
|
+
replaced_at: Date | null;
|
|
48
|
+
constructor(user_id: number, status?: TemporaryAssignmentRequestStatus, service_id?: number | null, sub_service_id?: number | null, req_user_department_id?: number | null, req_user_section_id?: number | null, req_user_position_id?: number | null, description?: string | null, reviewer_user_id?: number | null, assigned_to_user_id?: number | null, assigned_at?: Date | null, workflow_execution_id?: string | null, assigned_employee_name?: string, civil_id_card_number?: string | null, employee_id?: string, current_job_position?: string, assigned_job_position?: string, original_department_id?: number, assigned_department_id?: number, entity?: string | null, start_date?: Date, end_date?: Date, phone_number?: string, reason_for_request?: string, salary_payment_source?: SalaryPaymentSource, social_service_fund_contribution?: string | null, is_replaced?: boolean, replacement_employee_name?: string | null, replacement_employee_id?: string | null, replacement_civil_id_card_number?: string | null, replacement_reason?: string | null, replaced_by_user_id?: number | null, replaced_at?: Date | null);
|
|
49
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
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.TemporaryAssignmentRequest = exports.SalaryPaymentSource = exports.TemporaryAssignmentRequestStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var TemporaryAssignmentRequestStatus;
|
|
16
|
+
(function (TemporaryAssignmentRequestStatus) {
|
|
17
|
+
TemporaryAssignmentRequestStatus["PENDING"] = "Pending";
|
|
18
|
+
TemporaryAssignmentRequestStatus["ASSIGNED"] = "Assigned";
|
|
19
|
+
TemporaryAssignmentRequestStatus["IN_PROGRESS"] = "In Progress";
|
|
20
|
+
TemporaryAssignmentRequestStatus["COMPLETED"] = "Completed";
|
|
21
|
+
TemporaryAssignmentRequestStatus["APPROVED"] = "Approved";
|
|
22
|
+
TemporaryAssignmentRequestStatus["REJECTED"] = "Rejected";
|
|
23
|
+
})(TemporaryAssignmentRequestStatus || (exports.TemporaryAssignmentRequestStatus = TemporaryAssignmentRequestStatus = {}));
|
|
24
|
+
var SalaryPaymentSource;
|
|
25
|
+
(function (SalaryPaymentSource) {
|
|
26
|
+
SalaryPaymentSource["AUTHORITY"] = "Authority";
|
|
27
|
+
SalaryPaymentSource["OTHER_ENTITY"] = "Other Entity";
|
|
28
|
+
})(SalaryPaymentSource || (exports.SalaryPaymentSource = SalaryPaymentSource = {}));
|
|
29
|
+
let TemporaryAssignmentRequest = class TemporaryAssignmentRequest extends BaseModel_1.BaseModel {
|
|
30
|
+
constructor(user_id, status = TemporaryAssignmentRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, description, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id, assigned_employee_name, civil_id_card_number, employee_id, current_job_position, assigned_job_position, original_department_id, assigned_department_id, entity, start_date, end_date, phone_number, reason_for_request, salary_payment_source, social_service_fund_contribution, is_replaced, replacement_employee_name, replacement_employee_id, replacement_civil_id_card_number, replacement_reason, replaced_by_user_id, replaced_at) {
|
|
31
|
+
super();
|
|
32
|
+
this.user_id = user_id;
|
|
33
|
+
this.status = status;
|
|
34
|
+
this.service_id = service_id || null;
|
|
35
|
+
this.sub_service_id = sub_service_id || null;
|
|
36
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
37
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
38
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
39
|
+
this.description = description || null;
|
|
40
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
41
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
42
|
+
this.assigned_at = assigned_at || null;
|
|
43
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
44
|
+
this.assigned_employee_name = assigned_employee_name || "";
|
|
45
|
+
this.civil_id_card_number = civil_id_card_number || null;
|
|
46
|
+
this.employee_id = employee_id || "";
|
|
47
|
+
this.current_job_position = current_job_position || "";
|
|
48
|
+
this.assigned_job_position = assigned_job_position || "";
|
|
49
|
+
this.original_department_id = original_department_id || 0;
|
|
50
|
+
this.assigned_department_id = assigned_department_id || 0;
|
|
51
|
+
this.entity = entity || null;
|
|
52
|
+
this.start_date = start_date || new Date();
|
|
53
|
+
this.end_date = end_date || new Date();
|
|
54
|
+
this.phone_number = phone_number || "";
|
|
55
|
+
this.reason_for_request = reason_for_request || "";
|
|
56
|
+
this.salary_payment_source = salary_payment_source || SalaryPaymentSource.AUTHORITY;
|
|
57
|
+
this.social_service_fund_contribution = social_service_fund_contribution || null;
|
|
58
|
+
this.is_replaced = is_replaced || false;
|
|
59
|
+
this.replacement_employee_name = replacement_employee_name || null;
|
|
60
|
+
this.replacement_employee_id = replacement_employee_id || null;
|
|
61
|
+
this.replacement_civil_id_card_number = replacement_civil_id_card_number || null;
|
|
62
|
+
this.replacement_reason = replacement_reason || null;
|
|
63
|
+
this.replaced_by_user_id = replaced_by_user_id || null;
|
|
64
|
+
this.replaced_at = replaced_at || null;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
exports.TemporaryAssignmentRequest = TemporaryAssignmentRequest;
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
70
|
+
__metadata("design:type", Object)
|
|
71
|
+
], TemporaryAssignmentRequest.prototype, "req_user_department_id", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], TemporaryAssignmentRequest.prototype, "req_user_section_id", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], TemporaryAssignmentRequest.prototype, "req_user_position_id", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], TemporaryAssignmentRequest.prototype, "service_id", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
86
|
+
__metadata("design:type", Object)
|
|
87
|
+
], TemporaryAssignmentRequest.prototype, "sub_service_id", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
90
|
+
__metadata("design:type", Number)
|
|
91
|
+
], TemporaryAssignmentRequest.prototype, "user_id", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
94
|
+
__metadata("design:type", Object)
|
|
95
|
+
], TemporaryAssignmentRequest.prototype, "description", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.Column)({ type: "enum", enum: TemporaryAssignmentRequestStatus, default: TemporaryAssignmentRequestStatus.PENDING, nullable: false }),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], TemporaryAssignmentRequest.prototype, "status", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
102
|
+
__metadata("design:type", Object)
|
|
103
|
+
], TemporaryAssignmentRequest.prototype, "reviewer_user_id", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
106
|
+
__metadata("design:type", Object)
|
|
107
|
+
], TemporaryAssignmentRequest.prototype, "assigned_to_user_id", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
110
|
+
__metadata("design:type", Object)
|
|
111
|
+
], TemporaryAssignmentRequest.prototype, "assigned_at", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
114
|
+
__metadata("design:type", Object)
|
|
115
|
+
], TemporaryAssignmentRequest.prototype, "workflow_execution_id", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
118
|
+
__metadata("design:type", String)
|
|
119
|
+
], TemporaryAssignmentRequest.prototype, "assigned_employee_name", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
122
|
+
__metadata("design:type", Object)
|
|
123
|
+
], TemporaryAssignmentRequest.prototype, "civil_id_card_number", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: false }),
|
|
126
|
+
__metadata("design:type", String)
|
|
127
|
+
], TemporaryAssignmentRequest.prototype, "employee_id", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
130
|
+
__metadata("design:type", String)
|
|
131
|
+
], TemporaryAssignmentRequest.prototype, "current_job_position", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
134
|
+
__metadata("design:type", String)
|
|
135
|
+
], TemporaryAssignmentRequest.prototype, "assigned_job_position", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
138
|
+
__metadata("design:type", Number)
|
|
139
|
+
], TemporaryAssignmentRequest.prototype, "original_department_id", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
142
|
+
__metadata("design:type", Number)
|
|
143
|
+
], TemporaryAssignmentRequest.prototype, "assigned_department_id", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
|
|
146
|
+
__metadata("design:type", Object)
|
|
147
|
+
], TemporaryAssignmentRequest.prototype, "entity", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
150
|
+
__metadata("design:type", Date)
|
|
151
|
+
], TemporaryAssignmentRequest.prototype, "start_date", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
154
|
+
__metadata("design:type", Date)
|
|
155
|
+
], TemporaryAssignmentRequest.prototype, "end_date", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: false }),
|
|
158
|
+
__metadata("design:type", String)
|
|
159
|
+
], TemporaryAssignmentRequest.prototype, "phone_number", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
162
|
+
__metadata("design:type", String)
|
|
163
|
+
], TemporaryAssignmentRequest.prototype, "reason_for_request", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
(0, typeorm_1.Column)({ type: "enum", enum: SalaryPaymentSource, nullable: false }),
|
|
166
|
+
__metadata("design:type", String)
|
|
167
|
+
], TemporaryAssignmentRequest.prototype, "salary_payment_source", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
|
|
170
|
+
__metadata("design:type", Object)
|
|
171
|
+
], TemporaryAssignmentRequest.prototype, "social_service_fund_contribution", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false, nullable: false }),
|
|
174
|
+
__metadata("design:type", Boolean)
|
|
175
|
+
], TemporaryAssignmentRequest.prototype, "is_replaced", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
178
|
+
__metadata("design:type", Object)
|
|
179
|
+
], TemporaryAssignmentRequest.prototype, "replacement_employee_name", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
|
|
182
|
+
__metadata("design:type", Object)
|
|
183
|
+
], TemporaryAssignmentRequest.prototype, "replacement_employee_id", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
186
|
+
__metadata("design:type", Object)
|
|
187
|
+
], TemporaryAssignmentRequest.prototype, "replacement_civil_id_card_number", void 0);
|
|
188
|
+
__decorate([
|
|
189
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
190
|
+
__metadata("design:type", Object)
|
|
191
|
+
], TemporaryAssignmentRequest.prototype, "replacement_reason", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
194
|
+
__metadata("design:type", Object)
|
|
195
|
+
], TemporaryAssignmentRequest.prototype, "replaced_by_user_id", void 0);
|
|
196
|
+
__decorate([
|
|
197
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
198
|
+
__metadata("design:type", Object)
|
|
199
|
+
], TemporaryAssignmentRequest.prototype, "replaced_at", void 0);
|
|
200
|
+
exports.TemporaryAssignmentRequest = TemporaryAssignmentRequest = __decorate([
|
|
201
|
+
(0, typeorm_1.Entity)({ name: "temporary_assignment_requests" }),
|
|
202
|
+
__metadata("design:paramtypes", [Number, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, String, Object, String, String, String, Number, Number, Object, Date,
|
|
203
|
+
Date, String, String, String, Object, Boolean, Object, Object, Object, Object, Object, Object])
|
|
204
|
+
], TemporaryAssignmentRequest);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -94,3 +94,5 @@ export {TrainingRequestChat} from './models/TrainingChatModel';
|
|
|
94
94
|
export {TrainingMessageType} from './models/TrainingChatModel';
|
|
95
95
|
export * from './models/SecondmentRequestModel';
|
|
96
96
|
export {SecondmentRequestStatus} from './models/SecondmentRequestModel';
|
|
97
|
+
export * from './models/TemporaryAssignmentRequestModel';
|
|
98
|
+
export {TemporaryAssignmentRequestStatus, SalaryPaymentSource} from './models/TemporaryAssignmentRequestModel';
|
|
@@ -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
|
+
|