@platform-modules/civil-aviation-authority 2.3.80 → 2.3.81
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 +14 -9
- package/dist/models/DutyMissionRequestModel.js +10 -10
- package/dist/models/Workflows.d.ts +0 -9
- package/package.json +1 -1
- package/src/models/DutyMissionRequestModel.ts +10 -10
- package/src/models/HrServiceRequestModel.ts +193 -193
package/.env
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
# DB_HOST=
|
|
2
|
-
# DB_PORT=
|
|
3
|
-
# DB_USER=
|
|
4
|
-
# DB_PASS=
|
|
1
|
+
# DB_HOST=localhost
|
|
2
|
+
# DB_PORT=5433
|
|
3
|
+
# DB_USER=postgres
|
|
4
|
+
# DB_PASS=123
|
|
5
5
|
# DB_NAME=CAA
|
|
6
6
|
|
|
7
|
+
DB_HOST=164.52.222.169
|
|
8
|
+
DB_PORT=5432
|
|
9
|
+
DB_USER=postgres_admin_user
|
|
10
|
+
DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
|
|
11
|
+
DB_NAME=CAA
|
|
7
12
|
|
|
8
|
-
DB_HOST=
|
|
9
|
-
DB_PORT=5432
|
|
10
|
-
DB_USER=
|
|
11
|
-
DB_PASS=
|
|
12
|
-
DB_NAME=
|
|
13
|
+
# DB_HOST=216.48.187.46
|
|
14
|
+
# DB_PORT=5432
|
|
15
|
+
# DB_USER=adminuser
|
|
16
|
+
# DB_PASS=postgres_caa_fm_qa_34567
|
|
17
|
+
# DB_NAME=CAA_QA
|
|
@@ -127,7 +127,7 @@ __decorate([
|
|
|
127
127
|
(0, typeorm_1.Column)({
|
|
128
128
|
type: "enum",
|
|
129
129
|
enum: TripType,
|
|
130
|
-
nullable:
|
|
130
|
+
nullable: true,
|
|
131
131
|
}),
|
|
132
132
|
__metadata("design:type", String)
|
|
133
133
|
], DutyMissionRequests.prototype, "trip_type", void 0);
|
|
@@ -139,7 +139,7 @@ __decorate([
|
|
|
139
139
|
(0, typeorm_1.Column)({
|
|
140
140
|
type: "enum",
|
|
141
141
|
enum: ChooseType,
|
|
142
|
-
nullable:
|
|
142
|
+
nullable: true,
|
|
143
143
|
}),
|
|
144
144
|
__metadata("design:type", String)
|
|
145
145
|
], DutyMissionRequests.prototype, "choose_type", void 0);
|
|
@@ -160,7 +160,7 @@ __decorate([
|
|
|
160
160
|
__metadata("design:type", String)
|
|
161
161
|
], DutyMissionRequests.prototype, "mission_purpose", void 0);
|
|
162
162
|
__decorate([
|
|
163
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable:
|
|
163
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
164
164
|
__metadata("design:type", String)
|
|
165
165
|
], DutyMissionRequests.prototype, "mission_number", void 0);
|
|
166
166
|
__decorate([
|
|
@@ -176,11 +176,11 @@ __decorate([
|
|
|
176
176
|
__metadata("design:type", Object)
|
|
177
177
|
], DutyMissionRequests.prototype, "mission_days", void 0);
|
|
178
178
|
__decorate([
|
|
179
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable:
|
|
179
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
180
180
|
__metadata("design:type", String)
|
|
181
181
|
], DutyMissionRequests.prototype, "travelling_area_from", void 0);
|
|
182
182
|
__decorate([
|
|
183
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable:
|
|
183
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
184
184
|
__metadata("design:type", String)
|
|
185
185
|
], DutyMissionRequests.prototype, "travelling_area_to", void 0);
|
|
186
186
|
__decorate([
|
|
@@ -188,23 +188,23 @@ __decorate([
|
|
|
188
188
|
__metadata("design:type", Object)
|
|
189
189
|
], DutyMissionRequests.prototype, "distance", void 0);
|
|
190
190
|
__decorate([
|
|
191
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable:
|
|
191
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
192
192
|
__metadata("design:type", String)
|
|
193
193
|
], DutyMissionRequests.prototype, "from_country", void 0);
|
|
194
194
|
__decorate([
|
|
195
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable:
|
|
195
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
196
196
|
__metadata("design:type", String)
|
|
197
197
|
], DutyMissionRequests.prototype, "to_country", void 0);
|
|
198
198
|
__decorate([
|
|
199
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable:
|
|
199
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
200
200
|
__metadata("design:type", String)
|
|
201
201
|
], DutyMissionRequests.prototype, "travel_place", void 0);
|
|
202
202
|
__decorate([
|
|
203
|
-
(0, typeorm_1.Column)({ type: "date", nullable:
|
|
203
|
+
(0, typeorm_1.Column)({ type: "date", nullable: true }),
|
|
204
204
|
__metadata("design:type", Date)
|
|
205
205
|
], DutyMissionRequests.prototype, "travel_start_date", void 0);
|
|
206
206
|
__decorate([
|
|
207
|
-
(0, typeorm_1.Column)({ type: "date", nullable:
|
|
207
|
+
(0, typeorm_1.Column)({ type: "date", nullable: true }),
|
|
208
208
|
__metadata("design:type", Date)
|
|
209
209
|
], DutyMissionRequests.prototype, "travel_return_date", void 0);
|
|
210
210
|
__decorate([
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare class Workflows extends BaseModel {
|
|
3
|
-
name: string;
|
|
4
|
-
service_id: number;
|
|
5
|
-
sub_service_id: number;
|
|
6
|
-
request_for: string;
|
|
7
|
-
levels: number;
|
|
8
|
-
constructor(name: string, service_id: number, sub_service_id: number, request_for: string, levels: number);
|
|
9
|
-
}
|
package/package.json
CHANGED
|
@@ -74,7 +74,7 @@ export class DutyMissionRequests extends BaseModel {
|
|
|
74
74
|
@Column({
|
|
75
75
|
type: "enum",
|
|
76
76
|
enum: TripType,
|
|
77
|
-
nullable:
|
|
77
|
+
nullable: true,
|
|
78
78
|
})
|
|
79
79
|
trip_type: TripType;
|
|
80
80
|
|
|
@@ -84,7 +84,7 @@ export class DutyMissionRequests extends BaseModel {
|
|
|
84
84
|
@Column({
|
|
85
85
|
type: "enum",
|
|
86
86
|
enum: ChooseType,
|
|
87
|
-
nullable:
|
|
87
|
+
nullable: true,
|
|
88
88
|
})
|
|
89
89
|
choose_type: ChooseType;
|
|
90
90
|
|
|
@@ -101,7 +101,7 @@ export class DutyMissionRequests extends BaseModel {
|
|
|
101
101
|
@Column({ type: 'text', nullable: false })
|
|
102
102
|
mission_purpose: string;
|
|
103
103
|
|
|
104
|
-
@Column({ type: 'varchar', length: 100, nullable:
|
|
104
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
105
105
|
mission_number: string;
|
|
106
106
|
|
|
107
107
|
@Column({ type: "date", nullable: false })
|
|
@@ -113,28 +113,28 @@ export class DutyMissionRequests extends BaseModel {
|
|
|
113
113
|
@Column({ type: 'int', nullable: true })
|
|
114
114
|
mission_days: number | null;
|
|
115
115
|
|
|
116
|
-
@Column({ type: 'varchar', length: 255, nullable:
|
|
116
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
117
117
|
travelling_area_from: string;
|
|
118
118
|
|
|
119
|
-
@Column({ type: 'varchar', length: 255, nullable:
|
|
119
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
120
120
|
travelling_area_to: string;
|
|
121
121
|
|
|
122
122
|
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
123
123
|
distance: string | null;
|
|
124
124
|
|
|
125
|
-
@Column({ type: 'varchar', length: 100, nullable:
|
|
125
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
126
126
|
from_country: string;
|
|
127
127
|
|
|
128
|
-
@Column({ type: 'varchar', length: 100, nullable:
|
|
128
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
129
129
|
to_country: string;
|
|
130
130
|
|
|
131
|
-
@Column({ type: 'varchar', length: 255, nullable:
|
|
131
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
132
132
|
travel_place: string;
|
|
133
133
|
|
|
134
|
-
@Column({ type: "date", nullable:
|
|
134
|
+
@Column({ type: "date", nullable: true })
|
|
135
135
|
travel_start_date: Date;
|
|
136
136
|
|
|
137
|
-
@Column({ type: "date", nullable:
|
|
137
|
+
@Column({ type: "date", nullable: true })
|
|
138
138
|
travel_return_date: Date;
|
|
139
139
|
|
|
140
140
|
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
@@ -1,193 +1,193 @@
|
|
|
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 - Store REPLACEMENT details (ORIGINAL details above remain unchanged)
|
|
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: "varchar", length: 255, nullable: true })
|
|
96
|
-
replacement_current_job_position: string | null;
|
|
97
|
-
|
|
98
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
99
|
-
replacement_assigned_job_position: string | null;
|
|
100
|
-
|
|
101
|
-
@Column({ type: "date", nullable: true })
|
|
102
|
-
replacement_start_date: Date | null;
|
|
103
|
-
|
|
104
|
-
@Column({ type: "date", nullable: true })
|
|
105
|
-
replacement_end_date: Date | null;
|
|
106
|
-
|
|
107
|
-
@Column({ type: "decimal", precision: 5, scale: 2, nullable: true })
|
|
108
|
-
replacement_assignment_allowance: number | null;
|
|
109
|
-
|
|
110
|
-
@Column({ type: "text", nullable: true })
|
|
111
|
-
replacement_reason: string | null;
|
|
112
|
-
|
|
113
|
-
@Column({ type: "integer", nullable: true })
|
|
114
|
-
replaced_by_user_id: number | null;
|
|
115
|
-
|
|
116
|
-
@Column({ type: "timestamp", nullable: true })
|
|
117
|
-
replaced_at: Date | null;
|
|
118
|
-
|
|
119
|
-
constructor(
|
|
120
|
-
user_id: number,
|
|
121
|
-
status: HrServiceRequestStatus = HrServiceRequestStatus.PENDING,
|
|
122
|
-
service_id?: number | null,
|
|
123
|
-
sub_service_id?: number | null,
|
|
124
|
-
req_user_department_id?: number | null,
|
|
125
|
-
req_user_section_id?: number | null,
|
|
126
|
-
req_user_position_id?: number | null,
|
|
127
|
-
description?: string | null,
|
|
128
|
-
reviewer_user_id?: number | null,
|
|
129
|
-
assigned_to_user_id?: number | null,
|
|
130
|
-
assigned_at?: Date | null,
|
|
131
|
-
workflow_execution_id?: string | null,
|
|
132
|
-
assigned_employee_name?: string,
|
|
133
|
-
civil_id_card_number?: string | null,
|
|
134
|
-
employee_id?: string,
|
|
135
|
-
current_job_position?: string,
|
|
136
|
-
assigned_job_position?: string,
|
|
137
|
-
start_date?: Date,
|
|
138
|
-
end_date?: Date,
|
|
139
|
-
assignment_allowance?: number | null,
|
|
140
|
-
phone_number?: string,
|
|
141
|
-
reason_for_request?: string,
|
|
142
|
-
is_replaced?: boolean,
|
|
143
|
-
replacement_employee_name?: string | null,
|
|
144
|
-
replacement_employee_id?: string | null,
|
|
145
|
-
replacement_civil_id_card_number?: string | null,
|
|
146
|
-
replacement_current_job_position?: string | null,
|
|
147
|
-
replacement_assigned_job_position?: string | null,
|
|
148
|
-
replacement_start_date?: Date | null,
|
|
149
|
-
replacement_end_date?: Date | null,
|
|
150
|
-
replacement_assignment_allowance?: number | null,
|
|
151
|
-
replacement_reason?: string | null,
|
|
152
|
-
replaced_by_user_id?: number | null,
|
|
153
|
-
replaced_at?: Date | null
|
|
154
|
-
) {
|
|
155
|
-
super();
|
|
156
|
-
this.user_id = user_id;
|
|
157
|
-
this.status = status;
|
|
158
|
-
this.service_id = service_id || null;
|
|
159
|
-
this.sub_service_id = sub_service_id || null;
|
|
160
|
-
this.req_user_department_id = req_user_department_id || null;
|
|
161
|
-
this.req_user_section_id = req_user_section_id || null;
|
|
162
|
-
this.req_user_position_id = req_user_position_id || null;
|
|
163
|
-
this.description = description || null;
|
|
164
|
-
this.reviewer_user_id = reviewer_user_id || null;
|
|
165
|
-
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
166
|
-
this.assigned_at = assigned_at || null;
|
|
167
|
-
this.workflow_execution_id = workflow_execution_id || null;
|
|
168
|
-
this.assigned_employee_name = assigned_employee_name || "";
|
|
169
|
-
this.civil_id_card_number = civil_id_card_number || null;
|
|
170
|
-
this.employee_id = employee_id || "";
|
|
171
|
-
this.current_job_position = current_job_position || "";
|
|
172
|
-
this.assigned_job_position = assigned_job_position || "";
|
|
173
|
-
this.start_date = start_date || new Date();
|
|
174
|
-
this.end_date = end_date || new Date();
|
|
175
|
-
this.assignment_allowance = assignment_allowance || null;
|
|
176
|
-
this.phone_number = phone_number || "";
|
|
177
|
-
this.reason_for_request = reason_for_request || "";
|
|
178
|
-
// Replacement fields initialization
|
|
179
|
-
this.is_replaced = is_replaced || false;
|
|
180
|
-
this.replacement_employee_name = replacement_employee_name || null;
|
|
181
|
-
this.replacement_employee_id = replacement_employee_id || null;
|
|
182
|
-
this.replacement_civil_id_card_number = replacement_civil_id_card_number || null;
|
|
183
|
-
this.replacement_current_job_position = replacement_current_job_position || null;
|
|
184
|
-
this.replacement_assigned_job_position = replacement_assigned_job_position || null;
|
|
185
|
-
this.replacement_start_date = replacement_start_date || null;
|
|
186
|
-
this.replacement_end_date = replacement_end_date || null;
|
|
187
|
-
this.replacement_assignment_allowance = replacement_assignment_allowance || 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
|
-
|
|
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 - Store REPLACEMENT details (ORIGINAL details above remain unchanged)
|
|
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: "varchar", length: 255, nullable: true })
|
|
96
|
+
replacement_current_job_position: string | null;
|
|
97
|
+
|
|
98
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
99
|
+
replacement_assigned_job_position: string | null;
|
|
100
|
+
|
|
101
|
+
@Column({ type: "date", nullable: true })
|
|
102
|
+
replacement_start_date: Date | null;
|
|
103
|
+
|
|
104
|
+
@Column({ type: "date", nullable: true })
|
|
105
|
+
replacement_end_date: Date | null;
|
|
106
|
+
|
|
107
|
+
@Column({ type: "decimal", precision: 5, scale: 2, nullable: true })
|
|
108
|
+
replacement_assignment_allowance: number | null;
|
|
109
|
+
|
|
110
|
+
@Column({ type: "text", nullable: true })
|
|
111
|
+
replacement_reason: string | null;
|
|
112
|
+
|
|
113
|
+
@Column({ type: "integer", nullable: true })
|
|
114
|
+
replaced_by_user_id: number | null;
|
|
115
|
+
|
|
116
|
+
@Column({ type: "timestamp", nullable: true })
|
|
117
|
+
replaced_at: Date | null;
|
|
118
|
+
|
|
119
|
+
constructor(
|
|
120
|
+
user_id: number,
|
|
121
|
+
status: HrServiceRequestStatus = HrServiceRequestStatus.PENDING,
|
|
122
|
+
service_id?: number | null,
|
|
123
|
+
sub_service_id?: number | null,
|
|
124
|
+
req_user_department_id?: number | null,
|
|
125
|
+
req_user_section_id?: number | null,
|
|
126
|
+
req_user_position_id?: number | null,
|
|
127
|
+
description?: string | null,
|
|
128
|
+
reviewer_user_id?: number | null,
|
|
129
|
+
assigned_to_user_id?: number | null,
|
|
130
|
+
assigned_at?: Date | null,
|
|
131
|
+
workflow_execution_id?: string | null,
|
|
132
|
+
assigned_employee_name?: string,
|
|
133
|
+
civil_id_card_number?: string | null,
|
|
134
|
+
employee_id?: string,
|
|
135
|
+
current_job_position?: string,
|
|
136
|
+
assigned_job_position?: string,
|
|
137
|
+
start_date?: Date,
|
|
138
|
+
end_date?: Date,
|
|
139
|
+
assignment_allowance?: number | null,
|
|
140
|
+
phone_number?: string,
|
|
141
|
+
reason_for_request?: string,
|
|
142
|
+
is_replaced?: boolean,
|
|
143
|
+
replacement_employee_name?: string | null,
|
|
144
|
+
replacement_employee_id?: string | null,
|
|
145
|
+
replacement_civil_id_card_number?: string | null,
|
|
146
|
+
replacement_current_job_position?: string | null,
|
|
147
|
+
replacement_assigned_job_position?: string | null,
|
|
148
|
+
replacement_start_date?: Date | null,
|
|
149
|
+
replacement_end_date?: Date | null,
|
|
150
|
+
replacement_assignment_allowance?: number | null,
|
|
151
|
+
replacement_reason?: string | null,
|
|
152
|
+
replaced_by_user_id?: number | null,
|
|
153
|
+
replaced_at?: Date | null
|
|
154
|
+
) {
|
|
155
|
+
super();
|
|
156
|
+
this.user_id = user_id;
|
|
157
|
+
this.status = status;
|
|
158
|
+
this.service_id = service_id || null;
|
|
159
|
+
this.sub_service_id = sub_service_id || null;
|
|
160
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
161
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
162
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
163
|
+
this.description = description || null;
|
|
164
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
165
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
166
|
+
this.assigned_at = assigned_at || null;
|
|
167
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
168
|
+
this.assigned_employee_name = assigned_employee_name || "";
|
|
169
|
+
this.civil_id_card_number = civil_id_card_number || null;
|
|
170
|
+
this.employee_id = employee_id || "";
|
|
171
|
+
this.current_job_position = current_job_position || "";
|
|
172
|
+
this.assigned_job_position = assigned_job_position || "";
|
|
173
|
+
this.start_date = start_date || new Date();
|
|
174
|
+
this.end_date = end_date || new Date();
|
|
175
|
+
this.assignment_allowance = assignment_allowance || null;
|
|
176
|
+
this.phone_number = phone_number || "";
|
|
177
|
+
this.reason_for_request = reason_for_request || "";
|
|
178
|
+
// Replacement fields initialization
|
|
179
|
+
this.is_replaced = is_replaced || false;
|
|
180
|
+
this.replacement_employee_name = replacement_employee_name || null;
|
|
181
|
+
this.replacement_employee_id = replacement_employee_id || null;
|
|
182
|
+
this.replacement_civil_id_card_number = replacement_civil_id_card_number || null;
|
|
183
|
+
this.replacement_current_job_position = replacement_current_job_position || null;
|
|
184
|
+
this.replacement_assigned_job_position = replacement_assigned_job_position || null;
|
|
185
|
+
this.replacement_start_date = replacement_start_date || null;
|
|
186
|
+
this.replacement_end_date = replacement_end_date || null;
|
|
187
|
+
this.replacement_assignment_allowance = replacement_assignment_allowance || 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
|
+
|