@platform-modules/civil-aviation-authority 2.3.33 → 2.3.40
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 +0 -4
- package/dist/index.js +1 -9
- package/dist/models/LogisticsForeignVehicleModel.js +0 -1
- package/dist/models/LogisticsVehicleMaintenanceRequestModel.js +0 -2
- package/dist/models/RequestForCoverageRequestModel.d.ts +2 -1
- package/dist/models/RequestForCoverageRequestModel.js +7 -2
- package/package.json +1 -1
- package/src/index.ts +0 -7
- package/src/models/HrServiceRequestModel.ts +167 -167
- package/src/models/ITRequestChatModel.ts +62 -62
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/src/models/LogisticsForeignVehicleModel.ts +0 -1
- package/src/models/LogisticsVehicleMaintenanceRequestModel.ts +0 -2
- package/src/models/RequestForCoverageRequestModel.ts +174 -169
- 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/JobTransferRequestModel.d.ts +0 -31
- package/dist/models/JobTransferRequestModel.js +0 -128
- package/dist/models/ShiftAllowanceRequestModel.d.ts +0 -37
- package/dist/models/ShiftAllowanceRequestModel.js +0 -140
- package/dist/models/Workflows.d.ts +0 -9
- package/dist/models/Workflows.js +0 -31
- package/src/models/JobTransferRequestModel.ts +0 -115
- package/src/models/ShiftAllowanceRequestModel.ts +0 -126
package/dist/index.d.ts
CHANGED
|
@@ -181,7 +181,3 @@ export { AssignTasksEmpWorkFlowStatus } from './models/AssignTasksEmpWorkflowMod
|
|
|
181
181
|
export { AssignTasksEmpRequestAttachment } from './models/AssignTasksEmpAttachmentModel';
|
|
182
182
|
export { AssignTasksEmpRequestChat } from './models/AssignTasksEmpChatModel';
|
|
183
183
|
export { AssignTasksEmpMessageType } from './models/AssignTasksEmpChatModel';
|
|
184
|
-
export * from './models/ShiftAllowanceRequestModel';
|
|
185
|
-
export { ShiftAllowanceRequestStatus, ShiftAllowanceValue } from './models/ShiftAllowanceRequestModel';
|
|
186
|
-
export * from './models/JobTransferRequestModel';
|
|
187
|
-
export { JobTransferRequestStatus } from './models/JobTransferRequestModel';
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.RequestForCoverageWorkFlowStatus = exports.RequestForCoverageNewsSize = exports.RequestForCoverageRequestStatus = exports.ServiceTransferRequestType = exports.SalaryDetailsType = exports.ServiceTransferRequestStatus = exports.TemporaryAssignmentRequestType = exports.TemporaryAssignmentRequestStatus = exports.SecondmentRequestStatus = exports.TrainingRoomBookingChatStatus = exports.TrainingRoomBookingMessageType = exports.TrainingRoomBookingRequestChat = exports.TrainingRoomBookingRequestAttachment = exports.TrainingRoomBookingWorkFlowStatus = exports.TrainingRoomBookingApprovalStatus = exports.TrainingRoomBookingRoomType = exports.TrainingRoomBookingRequestStatus = exports.AnnualTrainingPlanChatStatus = exports.AnnualTrainingPlanMessageType = exports.AnnualTrainingPlanRequestChat = exports.AnnualTrainingPlanRequestAttachment = exports.AnnualTrainingPlanWorkFlowStatus = exports.AnnualTrainingPlanApprovalStatus = exports.AnnualTrainingPlanPlace = exports.AnnualTrainingPlanRequestStatus = exports.StudyLeaveChatStatus = exports.StudyLeaveMessageType = exports.StudyLeaveRequestChat = exports.StudyLeaveRequestAttachment = exports.StudyLeaveWorkFlowStatus = exports.StudyLeaveApprovalStatus = exports.StudyLeaveRequestStatus = 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 = exports.LogisticsVehicleMaintenanceWorkFlowStatus = exports.LogisticsVehicleMaintenanceMessageType = exports.LogisticsVehicleMaintenanceApprovalStatus = exports.VehicleMaintenanceStatus = exports.VehicleMaintenanceType = void 0;
|
|
18
|
-
exports.
|
|
18
|
+
exports.AssignTasksEmpMessageType = exports.AssignTasksEmpRequestChat = exports.AssignTasksEmpRequestAttachment = exports.AssignTasksEmpWorkFlowStatus = exports.AssignTasksEmpApprovalStatus = exports.AssignTasksEmpPriority = exports.AssignTasksEmpStatus = exports.RequestForCoverageRequestAttachment = exports.RequestForCoverageChatStatus = exports.RequestForCoverageMessageType = exports.RequestForCoverageRequestChat = exports.RequestForCoverageApprovalStatus = void 0;
|
|
19
19
|
__exportStar(require("./models/user"), exports);
|
|
20
20
|
__exportStar(require("./models/role"), exports);
|
|
21
21
|
__exportStar(require("./models/user-sessions"), exports);
|
|
@@ -265,11 +265,3 @@ var AssignTasksEmpChatModel_1 = require("./models/AssignTasksEmpChatModel");
|
|
|
265
265
|
Object.defineProperty(exports, "AssignTasksEmpRequestChat", { enumerable: true, get: function () { return AssignTasksEmpChatModel_1.AssignTasksEmpRequestChat; } });
|
|
266
266
|
var AssignTasksEmpChatModel_2 = require("./models/AssignTasksEmpChatModel");
|
|
267
267
|
Object.defineProperty(exports, "AssignTasksEmpMessageType", { enumerable: true, get: function () { return AssignTasksEmpChatModel_2.AssignTasksEmpMessageType; } });
|
|
268
|
-
__exportStar(require("./models/ShiftAllowanceRequestModel"), exports);
|
|
269
|
-
var ShiftAllowanceRequestModel_1 = require("./models/ShiftAllowanceRequestModel");
|
|
270
|
-
Object.defineProperty(exports, "ShiftAllowanceRequestStatus", { enumerable: true, get: function () { return ShiftAllowanceRequestModel_1.ShiftAllowanceRequestStatus; } });
|
|
271
|
-
Object.defineProperty(exports, "ShiftAllowanceValue", { enumerable: true, get: function () { return ShiftAllowanceRequestModel_1.ShiftAllowanceValue; } });
|
|
272
|
-
// Job Transfer (Transfer from One Job to Another Job Nature) Service
|
|
273
|
-
__exportStar(require("./models/JobTransferRequestModel"), exports);
|
|
274
|
-
var JobTransferRequestModel_1 = require("./models/JobTransferRequestModel");
|
|
275
|
-
Object.defineProperty(exports, "JobTransferRequestStatus", { enumerable: true, get: function () { return JobTransferRequestModel_1.JobTransferRequestStatus; } });
|
|
@@ -73,8 +73,6 @@ __decorate([
|
|
|
73
73
|
type: "enum",
|
|
74
74
|
enum: VehicleMaintenanceType,
|
|
75
75
|
nullable: false,
|
|
76
|
-
enumName: 'logistics_vehicle_maintenance_requests_en',
|
|
77
|
-
default: VehicleMaintenanceType.CORRECTIVE
|
|
78
76
|
}),
|
|
79
77
|
__metadata("design:type", String)
|
|
80
78
|
], LogisticsVehicleMaintenanceRequests.prototype, "type_of_maintenance_required", void 0);
|
|
@@ -33,11 +33,12 @@ export declare class RequestForCoverageRequest extends BaseModel {
|
|
|
33
33
|
audience: string | null;
|
|
34
34
|
event_details: string;
|
|
35
35
|
importance_of_publishing: string;
|
|
36
|
+
document_event: string | null;
|
|
36
37
|
status: RequestForCoverageRequestStatus;
|
|
37
38
|
reviewer_user_id: number | null;
|
|
38
39
|
assigned_to_user_id: number | null;
|
|
39
40
|
assigned_at: Date | null;
|
|
40
41
|
workflow_execution_id: string | null;
|
|
41
42
|
rejection_reason: string | null;
|
|
42
|
-
constructor(user_id: number, event_date: Date, event_time: string, event_location: string, event_details: string, importance_of_publishing: string, directorate_name: string, required_for_president?: boolean, status?: RequestForCoverageRequestStatus, 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, department_id?: number | null, extension_number?: string | null, suggested_photography?: string | null, news_size?: RequestForCoverageNewsSize | null, event_objective?: string | null, organizing_entity?: string | null, hosted_person?: string | null, audience?: string | null, reviewer_user_id?: number | null, assigned_to_user_id?: number | null, assigned_at?: Date | null, workflow_execution_id?: string | null, rejection_reason?: string | null);
|
|
43
|
+
constructor(user_id: number, event_date: Date, event_time: string, event_location: string, event_details: string, importance_of_publishing: string, directorate_name: string, required_for_president?: boolean, status?: RequestForCoverageRequestStatus, 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, department_id?: number | null, extension_number?: string | null, suggested_photography?: string | null, news_size?: RequestForCoverageNewsSize | null, event_objective?: string | null, organizing_entity?: string | null, hosted_person?: string | null, audience?: string | null, document_event?: string | null, reviewer_user_id?: number | null, assigned_to_user_id?: number | null, assigned_at?: Date | null, workflow_execution_id?: string | null, rejection_reason?: string | null);
|
|
43
44
|
}
|
|
@@ -27,7 +27,7 @@ var RequestForCoverageNewsSize;
|
|
|
27
27
|
RequestForCoverageNewsSize["LARGE"] = "Large";
|
|
28
28
|
})(RequestForCoverageNewsSize || (exports.RequestForCoverageNewsSize = RequestForCoverageNewsSize = {}));
|
|
29
29
|
let RequestForCoverageRequest = class RequestForCoverageRequest extends BaseModel_1.BaseModel {
|
|
30
|
-
constructor(user_id, event_date, event_time, event_location, event_details, importance_of_publishing, directorate_name, required_for_president = false, status = RequestForCoverageRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, department_id, extension_number, suggested_photography, news_size, event_objective, organizing_entity, hosted_person, audience, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id, rejection_reason) {
|
|
30
|
+
constructor(user_id, event_date, event_time, event_location, event_details, importance_of_publishing, directorate_name, required_for_president = false, status = RequestForCoverageRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, department_id, extension_number, suggested_photography, news_size, event_objective, organizing_entity, hosted_person, audience, document_event, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id, rejection_reason) {
|
|
31
31
|
super();
|
|
32
32
|
this.user_id = user_id;
|
|
33
33
|
this.event_date = event_date;
|
|
@@ -51,6 +51,7 @@ let RequestForCoverageRequest = class RequestForCoverageRequest extends BaseMode
|
|
|
51
51
|
this.organizing_entity = organizing_entity || null;
|
|
52
52
|
this.hosted_person = hosted_person || null;
|
|
53
53
|
this.audience = audience || null;
|
|
54
|
+
this.document_event = document_event || null;
|
|
54
55
|
this.reviewer_user_id = reviewer_user_id || null;
|
|
55
56
|
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
56
57
|
this.assigned_at = assigned_at || null;
|
|
@@ -147,6 +148,10 @@ __decorate([
|
|
|
147
148
|
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
148
149
|
__metadata("design:type", String)
|
|
149
150
|
], RequestForCoverageRequest.prototype, "importance_of_publishing", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
153
|
+
__metadata("design:type", Object)
|
|
154
|
+
], RequestForCoverageRequest.prototype, "document_event", void 0);
|
|
150
155
|
__decorate([
|
|
151
156
|
(0, typeorm_1.Column)({
|
|
152
157
|
type: "enum",
|
|
@@ -178,5 +183,5 @@ __decorate([
|
|
|
178
183
|
], RequestForCoverageRequest.prototype, "rejection_reason", void 0);
|
|
179
184
|
exports.RequestForCoverageRequest = RequestForCoverageRequest = __decorate([
|
|
180
185
|
(0, typeorm_1.Entity)({ name: "request_for_coverage_requests" }),
|
|
181
|
-
__metadata("design:paramtypes", [Number, Date, String, String, String, String, String, Boolean, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])
|
|
186
|
+
__metadata("design:paramtypes", [Number, Date, String, String, String, String, String, Boolean, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])
|
|
182
187
|
], RequestForCoverageRequest);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -185,10 +185,3 @@ export {AssignTasksEmpWorkFlowStatus} from './models/AssignTasksEmpWorkflowModel
|
|
|
185
185
|
export {AssignTasksEmpRequestAttachment} from './models/AssignTasksEmpAttachmentModel';
|
|
186
186
|
export {AssignTasksEmpRequestChat} from './models/AssignTasksEmpChatModel';
|
|
187
187
|
export {AssignTasksEmpMessageType} from './models/AssignTasksEmpChatModel';
|
|
188
|
-
|
|
189
|
-
export * from './models/ShiftAllowanceRequestModel';
|
|
190
|
-
export {ShiftAllowanceRequestStatus, ShiftAllowanceValue} from './models/ShiftAllowanceRequestModel';
|
|
191
|
-
|
|
192
|
-
// Job Transfer (Transfer from One Job to Another Job Nature) Service
|
|
193
|
-
export * from './models/JobTransferRequestModel';
|
|
194
|
-
export {JobTransferRequestStatus} from './models/JobTransferRequestModel';
|
|
@@ -1,167 +1,167 @@
|
|
|
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
|
|
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: "text", nullable: true })
|
|
96
|
-
replacement_reason: string | null;
|
|
97
|
-
|
|
98
|
-
@Column({ type: "integer", nullable: true })
|
|
99
|
-
replaced_by_user_id: number | null;
|
|
100
|
-
|
|
101
|
-
@Column({ type: "timestamp", nullable: true })
|
|
102
|
-
replaced_at: Date | null;
|
|
103
|
-
|
|
104
|
-
constructor(
|
|
105
|
-
user_id: number,
|
|
106
|
-
status: HrServiceRequestStatus = HrServiceRequestStatus.PENDING,
|
|
107
|
-
service_id?: number | null,
|
|
108
|
-
sub_service_id?: number | null,
|
|
109
|
-
req_user_department_id?: number | null,
|
|
110
|
-
req_user_section_id?: number | null,
|
|
111
|
-
req_user_position_id?: number | null,
|
|
112
|
-
description?: string | null,
|
|
113
|
-
reviewer_user_id?: number | null,
|
|
114
|
-
assigned_to_user_id?: number | null,
|
|
115
|
-
assigned_at?: Date | null,
|
|
116
|
-
workflow_execution_id?: string | null,
|
|
117
|
-
assigned_employee_name?: string,
|
|
118
|
-
civil_id_card_number?: string | null,
|
|
119
|
-
employee_id?: string,
|
|
120
|
-
current_job_position?: string,
|
|
121
|
-
assigned_job_position?: string,
|
|
122
|
-
start_date?: Date,
|
|
123
|
-
end_date?: Date,
|
|
124
|
-
assignment_allowance?: number | null,
|
|
125
|
-
phone_number?: string,
|
|
126
|
-
reason_for_request?: string,
|
|
127
|
-
is_replaced?: boolean,
|
|
128
|
-
replacement_employee_name?: string | null,
|
|
129
|
-
replacement_employee_id?: string | null,
|
|
130
|
-
replacement_civil_id_card_number?: string | null,
|
|
131
|
-
replacement_reason?: string | null,
|
|
132
|
-
replaced_by_user_id?: number | null,
|
|
133
|
-
replaced_at?: Date | null
|
|
134
|
-
) {
|
|
135
|
-
super();
|
|
136
|
-
this.user_id = user_id;
|
|
137
|
-
this.status = status;
|
|
138
|
-
this.service_id = service_id || null;
|
|
139
|
-
this.sub_service_id = sub_service_id || null;
|
|
140
|
-
this.req_user_department_id = req_user_department_id || null;
|
|
141
|
-
this.req_user_section_id = req_user_section_id || null;
|
|
142
|
-
this.req_user_position_id = req_user_position_id || null;
|
|
143
|
-
this.description = description || null;
|
|
144
|
-
this.reviewer_user_id = reviewer_user_id || null;
|
|
145
|
-
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
146
|
-
this.assigned_at = assigned_at || null;
|
|
147
|
-
this.workflow_execution_id = workflow_execution_id || null;
|
|
148
|
-
this.assigned_employee_name = assigned_employee_name || "";
|
|
149
|
-
this.civil_id_card_number = civil_id_card_number || null;
|
|
150
|
-
this.employee_id = employee_id || "";
|
|
151
|
-
this.current_job_position = current_job_position || "";
|
|
152
|
-
this.assigned_job_position = assigned_job_position || "";
|
|
153
|
-
this.start_date = start_date || new Date();
|
|
154
|
-
this.end_date = end_date || new Date();
|
|
155
|
-
this.assignment_allowance = assignment_allowance || null;
|
|
156
|
-
this.phone_number = phone_number || "";
|
|
157
|
-
this.reason_for_request = reason_for_request || "";
|
|
158
|
-
this.is_replaced = is_replaced || false;
|
|
159
|
-
this.replacement_employee_name = replacement_employee_name || null;
|
|
160
|
-
this.replacement_employee_id = replacement_employee_id || null;
|
|
161
|
-
this.replacement_civil_id_card_number = replacement_civil_id_card_number || null;
|
|
162
|
-
this.replacement_reason = replacement_reason || null;
|
|
163
|
-
this.replaced_by_user_id = replaced_by_user_id || null;
|
|
164
|
-
this.replaced_at = replaced_at || null;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
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
|
|
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: "text", nullable: true })
|
|
96
|
+
replacement_reason: string | null;
|
|
97
|
+
|
|
98
|
+
@Column({ type: "integer", nullable: true })
|
|
99
|
+
replaced_by_user_id: number | null;
|
|
100
|
+
|
|
101
|
+
@Column({ type: "timestamp", nullable: true })
|
|
102
|
+
replaced_at: Date | null;
|
|
103
|
+
|
|
104
|
+
constructor(
|
|
105
|
+
user_id: number,
|
|
106
|
+
status: HrServiceRequestStatus = HrServiceRequestStatus.PENDING,
|
|
107
|
+
service_id?: number | null,
|
|
108
|
+
sub_service_id?: number | null,
|
|
109
|
+
req_user_department_id?: number | null,
|
|
110
|
+
req_user_section_id?: number | null,
|
|
111
|
+
req_user_position_id?: number | null,
|
|
112
|
+
description?: string | null,
|
|
113
|
+
reviewer_user_id?: number | null,
|
|
114
|
+
assigned_to_user_id?: number | null,
|
|
115
|
+
assigned_at?: Date | null,
|
|
116
|
+
workflow_execution_id?: string | null,
|
|
117
|
+
assigned_employee_name?: string,
|
|
118
|
+
civil_id_card_number?: string | null,
|
|
119
|
+
employee_id?: string,
|
|
120
|
+
current_job_position?: string,
|
|
121
|
+
assigned_job_position?: string,
|
|
122
|
+
start_date?: Date,
|
|
123
|
+
end_date?: Date,
|
|
124
|
+
assignment_allowance?: number | null,
|
|
125
|
+
phone_number?: string,
|
|
126
|
+
reason_for_request?: string,
|
|
127
|
+
is_replaced?: boolean,
|
|
128
|
+
replacement_employee_name?: string | null,
|
|
129
|
+
replacement_employee_id?: string | null,
|
|
130
|
+
replacement_civil_id_card_number?: string | null,
|
|
131
|
+
replacement_reason?: string | null,
|
|
132
|
+
replaced_by_user_id?: number | null,
|
|
133
|
+
replaced_at?: Date | null
|
|
134
|
+
) {
|
|
135
|
+
super();
|
|
136
|
+
this.user_id = user_id;
|
|
137
|
+
this.status = status;
|
|
138
|
+
this.service_id = service_id || null;
|
|
139
|
+
this.sub_service_id = sub_service_id || null;
|
|
140
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
141
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
142
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
143
|
+
this.description = description || null;
|
|
144
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
145
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
146
|
+
this.assigned_at = assigned_at || null;
|
|
147
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
148
|
+
this.assigned_employee_name = assigned_employee_name || "";
|
|
149
|
+
this.civil_id_card_number = civil_id_card_number || null;
|
|
150
|
+
this.employee_id = employee_id || "";
|
|
151
|
+
this.current_job_position = current_job_position || "";
|
|
152
|
+
this.assigned_job_position = assigned_job_position || "";
|
|
153
|
+
this.start_date = start_date || new Date();
|
|
154
|
+
this.end_date = end_date || new Date();
|
|
155
|
+
this.assignment_allowance = assignment_allowance || null;
|
|
156
|
+
this.phone_number = phone_number || "";
|
|
157
|
+
this.reason_for_request = reason_for_request || "";
|
|
158
|
+
this.is_replaced = is_replaced || false;
|
|
159
|
+
this.replacement_employee_name = replacement_employee_name || null;
|
|
160
|
+
this.replacement_employee_id = replacement_employee_id || null;
|
|
161
|
+
this.replacement_civil_id_card_number = replacement_civil_id_card_number || null;
|
|
162
|
+
this.replacement_reason = replacement_reason || null;
|
|
163
|
+
this.replaced_by_user_id = replaced_by_user_id || null;
|
|
164
|
+
this.replaced_at = replaced_at || null;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
import { ITHelpDeskRequests } from './ITHelpDeskModel';
|
|
4
|
-
import { User } from './user';
|
|
5
|
-
|
|
6
|
-
@Entity({ name: 'it_request_chat' })
|
|
7
|
-
export class ITRequestChat extends BaseModel {
|
|
8
|
-
|
|
9
|
-
@Column({ type: 'integer', nullable: false })
|
|
10
|
-
request_id: number;
|
|
11
|
-
|
|
12
|
-
@ManyToOne(() => ITHelpDeskRequests)
|
|
13
|
-
@JoinColumn({ name: 'request_id' })
|
|
14
|
-
request: ITHelpDeskRequests;
|
|
15
|
-
|
|
16
|
-
@Column({ type: 'integer', nullable: true })
|
|
17
|
-
service_id: number | null;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'integer', nullable: true })
|
|
20
|
-
sub_service_id: number | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'integer', nullable: false })
|
|
23
|
-
user_id: number;
|
|
24
|
-
|
|
25
|
-
@ManyToOne(() => User)
|
|
26
|
-
@JoinColumn({ name: 'user_id' })
|
|
27
|
-
user: User;
|
|
28
|
-
|
|
29
|
-
@Column({ type: 'integer', nullable: true })
|
|
30
|
-
role_id: number | null;
|
|
31
|
-
|
|
32
|
-
@Column({ type: 'text', nullable: false })
|
|
33
|
-
message: string;
|
|
34
|
-
|
|
35
|
-
@Column({ type: 'text', nullable: true })
|
|
36
|
-
status: string | null;
|
|
37
|
-
|
|
38
|
-
@Column({ type: 'boolean', default: false })
|
|
39
|
-
is_internal: boolean;
|
|
40
|
-
|
|
41
|
-
constructor(
|
|
42
|
-
request_id: number,
|
|
43
|
-
user_id: number,
|
|
44
|
-
message: string,
|
|
45
|
-
is_internal?: boolean,
|
|
46
|
-
service_id?: number | null,
|
|
47
|
-
sub_service_id?: number | null,
|
|
48
|
-
role_id?: number | null,
|
|
49
|
-
status?: string | null
|
|
50
|
-
) {
|
|
51
|
-
super();
|
|
52
|
-
this.request_id = request_id;
|
|
53
|
-
this.service_id = service_id || null;
|
|
54
|
-
this.sub_service_id = sub_service_id || null;
|
|
55
|
-
this.user_id = user_id;
|
|
56
|
-
this.role_id = role_id || null;
|
|
57
|
-
this.message = message;
|
|
58
|
-
this.status = status || null;
|
|
59
|
-
this.is_internal = is_internal || false;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { ITHelpDeskRequests } from './ITHelpDeskModel';
|
|
4
|
+
import { User } from './user';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'it_request_chat' })
|
|
7
|
+
export class ITRequestChat extends BaseModel {
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'integer', nullable: false })
|
|
10
|
+
request_id: number;
|
|
11
|
+
|
|
12
|
+
@ManyToOne(() => ITHelpDeskRequests)
|
|
13
|
+
@JoinColumn({ name: 'request_id' })
|
|
14
|
+
request: ITHelpDeskRequests;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'integer', nullable: true })
|
|
17
|
+
service_id: number | null;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
sub_service_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'integer', nullable: false })
|
|
23
|
+
user_id: number;
|
|
24
|
+
|
|
25
|
+
@ManyToOne(() => User)
|
|
26
|
+
@JoinColumn({ name: 'user_id' })
|
|
27
|
+
user: User;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'integer', nullable: true })
|
|
30
|
+
role_id: number | null;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'text', nullable: false })
|
|
33
|
+
message: string;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'text', nullable: true })
|
|
36
|
+
status: string | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'boolean', default: false })
|
|
39
|
+
is_internal: boolean;
|
|
40
|
+
|
|
41
|
+
constructor(
|
|
42
|
+
request_id: number,
|
|
43
|
+
user_id: number,
|
|
44
|
+
message: string,
|
|
45
|
+
is_internal?: boolean,
|
|
46
|
+
service_id?: number | null,
|
|
47
|
+
sub_service_id?: number | null,
|
|
48
|
+
role_id?: number | null,
|
|
49
|
+
status?: string | null
|
|
50
|
+
) {
|
|
51
|
+
super();
|
|
52
|
+
this.request_id = request_id;
|
|
53
|
+
this.service_id = service_id || null;
|
|
54
|
+
this.sub_service_id = sub_service_id || null;
|
|
55
|
+
this.user_id = user_id;
|
|
56
|
+
this.role_id = role_id || null;
|
|
57
|
+
this.message = message;
|
|
58
|
+
this.status = status || null;
|
|
59
|
+
this.is_internal = is_internal || false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|