@platform-modules/civil-aviation-authority 2.3.211 → 2.3.213
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 +10 -10
- package/dist/data-source.js +15 -5
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/models/FollowUpReportApprovalModel.d.ts +24 -0
- package/dist/models/FollowUpReportApprovalModel.js +85 -0
- package/dist/models/FollowUpReportAttachmentModel.d.ts +12 -0
- package/dist/models/FollowUpReportAttachmentModel.js +53 -0
- package/dist/models/FollowUpReportChatModel.d.ts +20 -0
- package/dist/models/FollowUpReportChatModel.js +66 -0
- package/dist/models/FollowUpReportRequestModel.d.ts +46 -0
- package/dist/models/FollowUpReportRequestModel.js +126 -0
- package/dist/models/FollowUpReportWorkflowModel.d.ts +19 -0
- package/dist/models/FollowUpReportWorkflowModel.js +68 -0
- package/dist/models/MaintenanceApprovalModel.d.ts +4 -4
- package/dist/models/MaintenanceApprovalModel.js +28 -28
- package/dist/models/MaintenanceAttachmentModel.d.ts +1 -1
- package/dist/models/MaintenanceAttachmentModel.js +13 -13
- package/dist/models/MaintenanceChatModel.d.ts +5 -5
- package/dist/models/MaintenanceChatModel.js +25 -25
- package/dist/models/MaintenanceRequestModel.d.ts +23 -28
- package/dist/models/MaintenanceRequestModel.js +65 -76
- package/dist/models/MaintenanceWorkflowModel.d.ts +3 -3
- package/dist/models/MaintenanceWorkflowModel.js +22 -22
- package/package.json +1 -1
- package/src/data-source.ts +20 -10
- package/src/index.ts +5 -0
- package/src/models/AccommodationApprovalModel.ts +8 -8
- package/src/models/AccommodationRequestModel.ts +8 -8
- package/src/models/AnnualIncrementRequestEmployeeModel.ts +65 -65
- package/src/models/AnnualIncrementRequestModel.ts +25 -25
- package/src/models/AppealAgainstAdministrativeDecisionRequestModel.ts +23 -23
- package/src/models/CAAServices.ts +33 -33
- package/src/models/CAASubServices.ts +33 -33
- package/src/models/CAIRatingMasterModel.ts +39 -39
- package/src/models/CSRMBusinessImpactRatingMasterModel.ts +25 -25
- package/src/models/CSRMLikelihoodMasterModel.ts +25 -25
- package/src/models/CashAllowanceLeaveRequestModel.ts +11 -11
- package/src/models/FollowUpReportApprovalModel.ts +60 -0
- package/src/models/FollowUpReportAttachmentModel.ts +32 -0
- package/src/models/FollowUpReportChatModel.ts +46 -0
- package/src/models/FollowUpReportRequestModel.ts +100 -0
- package/src/models/FollowUpReportWorkflowModel.ts +47 -0
- package/src/models/HrServiceRequestModel.ts +193 -193
- package/src/models/MaintenanceApprovalModel.ts +6 -6
- package/src/models/MaintenanceAttachmentModel.ts +1 -1
- package/src/models/MaintenanceChatModel.ts +7 -7
- package/src/models/MaintenanceRequestModel.ts +39 -48
- package/src/models/MaintenanceWorkflowModel.ts +5 -5
- package/src/models/PerformanceCyclePeriodModel.ts +26 -26
- package/src/models/PerformanceGoalMasterModel.ts +27 -27
- package/src/models/PerformanceManagementRequestGoalModel.ts +46 -46
- package/src/models/PerformanceManagementRequestModel.ts +14 -14
- package/src/models/PromotionRequestModel.ts +11 -11
- package/src/models/RespondToEnquiriesRequestModel.ts +31 -31
- package/src/models/SkillsEnhancementRequestModel.ts +17 -17
- package/src/models/UserSkillModel.ts +56 -56
- package/dist/models/ITApprovalSettings.d.ts +0 -7
- package/dist/models/ITApprovalSettings.js +0 -40
- package/dist/models/ITServicesTypesMuscatModel.d.ts +0 -6
- package/dist/models/ITServicesTypesMuscatModel.js +0 -34
- package/dist/models/ITServicesTypesSalalahModel.d.ts +0 -6
- package/dist/models/ITServicesTypesSalalahModel.js +0 -34
- package/dist/models/Workflows.d.ts +0 -9
- package/dist/models/Workflows.js +0 -31
|
@@ -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
|
+
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Column, Entity } from 'typeorm';
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
-
export enum
|
|
4
|
+
export enum AssetMaintenanceApprovalStatus {
|
|
5
5
|
PENDING = 'Pending',
|
|
6
6
|
IN_PROGRESS = 'In Progress',
|
|
7
7
|
APPROVED = 'Approved',
|
|
@@ -9,7 +9,7 @@ export enum MaintenanceApprovalStatus {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
@Entity({ name: 'maintenance_approvals' })
|
|
12
|
-
export class
|
|
12
|
+
export class AssetMaintenanceApprovalDetails extends BaseModel {
|
|
13
13
|
@Column({ type: 'integer', nullable: false })
|
|
14
14
|
request_id: number;
|
|
15
15
|
|
|
@@ -23,7 +23,7 @@ export class MaintenanceApprovalDetails extends BaseModel {
|
|
|
23
23
|
level: number;
|
|
24
24
|
|
|
25
25
|
@Column({ type: 'integer', nullable: true })
|
|
26
|
-
approver_role_id: number;
|
|
26
|
+
approver_role_id: number | null;
|
|
27
27
|
|
|
28
28
|
@Column({ type: 'integer', nullable: true })
|
|
29
29
|
department_id: number | null;
|
|
@@ -45,11 +45,11 @@ export class MaintenanceApprovalDetails extends BaseModel {
|
|
|
45
45
|
|
|
46
46
|
@Column({
|
|
47
47
|
type: 'enum',
|
|
48
|
-
enum:
|
|
49
|
-
default:
|
|
48
|
+
enum: AssetMaintenanceApprovalStatus,
|
|
49
|
+
default: AssetMaintenanceApprovalStatus.PENDING,
|
|
50
50
|
nullable: false,
|
|
51
51
|
})
|
|
52
|
-
approval_status:
|
|
52
|
+
approval_status: AssetMaintenanceApprovalStatus;
|
|
53
53
|
|
|
54
54
|
@Column({ type: 'boolean', default: true, nullable: false })
|
|
55
55
|
is_allowed: boolean;
|
|
@@ -2,7 +2,7 @@ import { Column, Entity } from 'typeorm';
|
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
4
|
@Entity({ name: 'maintenance_attachments' })
|
|
5
|
-
export class
|
|
5
|
+
export class AssetMaintenanceAttachment extends BaseModel {
|
|
6
6
|
@Column({ type: 'integer', nullable: false })
|
|
7
7
|
request_id: number;
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Column, Entity } from 'typeorm';
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
-
export enum
|
|
4
|
+
export enum AssetMaintenanceMessageType {
|
|
5
5
|
TEXT = 'text',
|
|
6
6
|
IMAGE = 'image',
|
|
7
7
|
VIDEO = 'video',
|
|
@@ -10,7 +10,7 @@ export enum MaintenanceMessageType {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
@Entity({ name: 'maintenance_chats' })
|
|
13
|
-
export class
|
|
13
|
+
export class AssetMaintenanceChat extends BaseModel {
|
|
14
14
|
@Column({ type: 'integer', nullable: false })
|
|
15
15
|
request_id: number;
|
|
16
16
|
|
|
@@ -24,19 +24,19 @@ export class MaintenanceChat extends BaseModel {
|
|
|
24
24
|
user_id: number;
|
|
25
25
|
|
|
26
26
|
@Column({ type: 'integer', nullable: true })
|
|
27
|
-
role_id: number;
|
|
27
|
+
role_id: number | null;
|
|
28
28
|
|
|
29
29
|
@Column({ type: 'text', nullable: false })
|
|
30
30
|
message: string;
|
|
31
31
|
|
|
32
32
|
@Column({
|
|
33
33
|
type: 'enum',
|
|
34
|
-
enum:
|
|
35
|
-
default:
|
|
34
|
+
enum: AssetMaintenanceMessageType,
|
|
35
|
+
default: AssetMaintenanceMessageType.TEXT,
|
|
36
36
|
nullable: false,
|
|
37
37
|
})
|
|
38
|
-
messageType:
|
|
38
|
+
messageType: AssetMaintenanceMessageType;
|
|
39
39
|
|
|
40
40
|
@Column({ type: 'text', nullable: true })
|
|
41
|
-
status: string;
|
|
41
|
+
status: string | null;
|
|
42
42
|
}
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import { Column, Entity } from 'typeorm';
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
CONFIDENTIAL = 'Confidential',
|
|
9
|
-
INFORMATIONAL = 'Informational',
|
|
10
|
-
NORMAL = 'Normal',
|
|
4
|
+
export enum AssetMaintenanceCategory {
|
|
5
|
+
BUILDING = 'Building',
|
|
6
|
+
EQUIPMENT = 'Equipment',
|
|
7
|
+
RESIDENTIAL = 'Residential',
|
|
11
8
|
}
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
export enum AssetMaintenanceSubCategory {
|
|
11
|
+
ELECTRICAL = 'Electrical',
|
|
12
|
+
PLUMBING = 'Plumbing',
|
|
13
|
+
HVAC = 'HVAC',
|
|
14
|
+
CIVIL = 'Civil',
|
|
15
|
+
CLEANING = 'Cleaning',
|
|
16
|
+
OTHER = 'Other',
|
|
20
17
|
}
|
|
21
18
|
|
|
22
|
-
export enum
|
|
19
|
+
export enum AssetMaintenanceRequestStatus {
|
|
23
20
|
PENDING = 'Pending',
|
|
24
21
|
ASSIGNED = 'Assigned',
|
|
25
22
|
IN_PROGRESS = 'In Progress',
|
|
@@ -28,66 +25,60 @@ export enum MaintenanceRequestStatus {
|
|
|
28
25
|
}
|
|
29
26
|
|
|
30
27
|
@Entity({ name: 'maintenance_requests' })
|
|
31
|
-
export class
|
|
28
|
+
export class AssetMaintenanceRequests extends BaseModel {
|
|
32
29
|
@Column({ type: 'int', nullable: true })
|
|
33
30
|
req_user_department_id: number | null;
|
|
34
31
|
|
|
35
32
|
@Column({ type: 'int', nullable: true })
|
|
36
33
|
req_user_section_id: number | null;
|
|
37
34
|
|
|
38
|
-
@Column({ nullable: true })
|
|
39
|
-
service_id: number;
|
|
35
|
+
@Column({ type: 'integer', nullable: true })
|
|
36
|
+
service_id: number | null;
|
|
40
37
|
|
|
41
|
-
@Column({ nullable: true })
|
|
42
|
-
sub_service_id: number;
|
|
38
|
+
@Column({ type: 'integer', nullable: true })
|
|
39
|
+
sub_service_id: number | null;
|
|
43
40
|
|
|
44
|
-
@Column({ nullable: false })
|
|
41
|
+
@Column({ type: 'integer', nullable: false })
|
|
45
42
|
user_id: number;
|
|
46
43
|
|
|
47
|
-
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
48
|
-
sent_by: string;
|
|
49
|
-
|
|
50
|
-
@Column({ type: 'date', nullable: false })
|
|
51
|
-
letter_date: Date;
|
|
52
|
-
|
|
53
|
-
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
54
|
-
subject: string;
|
|
55
|
-
|
|
56
44
|
@Column({
|
|
57
45
|
type: 'enum',
|
|
58
|
-
enum:
|
|
59
|
-
enumName: '
|
|
46
|
+
enum: AssetMaintenanceCategory,
|
|
47
|
+
enumName: 'asset_maintenance_category_en',
|
|
60
48
|
nullable: false,
|
|
61
49
|
})
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
@Column({ type: 'text', nullable: false })
|
|
65
|
-
topic: string;
|
|
50
|
+
category: AssetMaintenanceCategory;
|
|
66
51
|
|
|
67
52
|
@Column({
|
|
68
53
|
type: 'enum',
|
|
69
|
-
enum:
|
|
70
|
-
enumName: '
|
|
54
|
+
enum: AssetMaintenanceSubCategory,
|
|
55
|
+
enumName: 'asset_maintenance_sub_category_en',
|
|
71
56
|
nullable: false,
|
|
72
57
|
})
|
|
73
|
-
|
|
58
|
+
sub_category: AssetMaintenanceSubCategory;
|
|
59
|
+
|
|
60
|
+
@Column({ type: 'boolean', nullable: false, default: false })
|
|
61
|
+
emergency_maintenance_support: boolean;
|
|
74
62
|
|
|
75
|
-
@Column({ type: '
|
|
76
|
-
|
|
63
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
64
|
+
location: string;
|
|
65
|
+
|
|
66
|
+
@Column({ type: 'text', nullable: false })
|
|
67
|
+
reason_for_maintenance: string;
|
|
77
68
|
|
|
78
|
-
@Column({ type: '
|
|
79
|
-
|
|
69
|
+
@Column({ type: 'text', nullable: true })
|
|
70
|
+
description: string | null;
|
|
80
71
|
|
|
81
|
-
@Column({ type: 'date', nullable:
|
|
82
|
-
|
|
72
|
+
@Column({ type: 'date', nullable: true })
|
|
73
|
+
completion_date: Date | null;
|
|
83
74
|
|
|
84
75
|
@Column({
|
|
85
76
|
type: 'enum',
|
|
86
|
-
enum:
|
|
87
|
-
default:
|
|
77
|
+
enum: AssetMaintenanceRequestStatus,
|
|
78
|
+
default: AssetMaintenanceRequestStatus.PENDING,
|
|
88
79
|
nullable: false,
|
|
89
80
|
})
|
|
90
|
-
status:
|
|
81
|
+
status: AssetMaintenanceRequestStatus;
|
|
91
82
|
|
|
92
83
|
@Column({ type: 'varchar', nullable: true })
|
|
93
84
|
workflow_execution_id: string | null;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Column, Entity } from 'typeorm';
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
-
export enum
|
|
4
|
+
export enum AssetMaintenanceWorkflowStatus {
|
|
5
5
|
COMPLETED = 'Completed',
|
|
6
6
|
NOT_YET_STARTED = 'Not Yet Started',
|
|
7
7
|
PENDING = 'Pending',
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
@Entity({ name: 'maintenance_workflows' })
|
|
11
|
-
export class
|
|
11
|
+
export class AssetMaintenanceWorkflow extends BaseModel {
|
|
12
12
|
@Column({ type: 'integer', nullable: false })
|
|
13
13
|
request_id: number;
|
|
14
14
|
|
|
@@ -23,11 +23,11 @@ export class MaintenanceWorkFlow extends BaseModel {
|
|
|
23
23
|
|
|
24
24
|
@Column({
|
|
25
25
|
type: 'enum',
|
|
26
|
-
enum:
|
|
27
|
-
default:
|
|
26
|
+
enum: AssetMaintenanceWorkflowStatus,
|
|
27
|
+
default: AssetMaintenanceWorkflowStatus.NOT_YET_STARTED,
|
|
28
28
|
nullable: false,
|
|
29
29
|
})
|
|
30
|
-
status:
|
|
30
|
+
status: AssetMaintenanceWorkflowStatus;
|
|
31
31
|
|
|
32
32
|
@Column({ type: 'integer', nullable: true })
|
|
33
33
|
user_id: number | null;
|