@platform-modules/civil-aviation-authority 2.3.333 → 2.3.335
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/data-source.js +2 -0
- package/dist/helpers/cancellation-bilingual-persist.helper.d.ts +37 -0
- package/dist/helpers/cancellation-bilingual-persist.helper.js +77 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.js +2 -3
- package/dist/models/AnnualPlanSubmissionRestrictionModel.d.ts +9 -0
- package/dist/models/AnnualPlanSubmissionRestrictionModel.js +47 -0
- package/dist/models/AnnualTrainingPlanRequestModel.d.ts +12 -21
- package/dist/models/AnnualTrainingPlanRequestModel.js +60 -75
- package/dist/models/CyberSecurityRiskManagementRiskModel.d.ts +4 -0
- package/dist/models/CyberSecurityRiskManagementRiskModel.js +16 -0
- package/dist/models/SlaApprovalsViewModel.js +54 -54
- package/package.json +1 -1
- package/scripts/sync-sla-reports-sql.js +92 -92
- package/sql/README.md +21 -21
- package/sql/add_csrm_risk_tracking_fields.sql +6 -0
- package/sql/add_training_request_reference_number.sql +9 -9
- package/sql/add_training_room_booking_records_reference.sql +19 -19
- package/sql/annual_training_plan_bulk_upload.sql +140 -140
- package/sql/annual_training_plan_department_plans.sql +80 -80
- package/sql/create_annual_plan_submission_restriction.sql +27 -0
- package/sql/sla_reports_admin_procedures.sql +322 -322
- package/sql/sla_reports_approvals_workbook.sql +427 -427
- package/sql/sla_reports_procedures.sql +883 -883
- package/sql/vw_sla_approvals.sql +115 -115
- package/sql/vw_sla_my_requests.sql +58 -58
- package/src/data-source.ts +2 -0
- package/src/index.ts +521 -518
- package/src/models/AccessCardRequestModel.ts +135 -135
- package/src/models/AirportEntryPermitModel.ts +276 -276
- package/src/models/AnnualPlanSubmissionRestrictionModel.ts +27 -0
- package/src/models/AnnualTrainingPlanDepartmentPlanDecisionModel.ts +33 -33
- package/src/models/AnnualTrainingPlanDepartmentPlanModel.ts +31 -31
- package/src/models/AnnualTrainingPlanItemModel.ts +71 -71
- package/src/models/AnnualTrainingPlanRequestModel.ts +156 -156
- package/src/models/CyberSecurityRiskManagementRiskModel.ts +12 -0
- package/src/models/DocumentDriveModel.ts +28 -28
- package/src/models/DocumentFolderModel.ts +45 -45
- package/src/models/HotelApprovalModel.ts +83 -83
- package/src/models/HousingContractCancelApprovalModel.ts +64 -64
- package/src/models/HousingContractRenewalApprovalModel.ts +64 -64
- package/src/models/ITRequestAttachmentModel.ts +73 -73
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/LegalConsultationApprovalModel.ts +65 -65
- package/src/models/MissionTravelPassportExpiryNotificationConfigModel.ts +36 -36
- package/src/models/NotificationModel.ts +89 -89
- package/src/models/ResidentialUnitRentalApprovalModel.ts +143 -143
- package/src/models/ServiceExtensionAfter60ApprovalModel.ts +87 -87
- package/src/models/ServiceSlaApprovalModel.ts +64 -64
- package/src/models/ServicesNotificationConfigModel.ts +55 -55
- package/src/models/SlaApprovalsViewModel.ts +142 -142
- package/src/models/StudyLeaveRequestModel.ts +173 -173
- package/src/models/TrainingRequestModel.ts +169 -169
- package/src/models/TrainingRoomBookingRequestModel.ts +178 -178
- package/src/models/TrainingRoomBookingWorkflowModel.ts +81 -81
- package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
- package/src/models/role.ts +34 -34
- package/src/scripts.ts +20 -20
- package/src/sla/sla-table-sync.service.ts +90 -90
- package/dist/models/AnnualTrainingPlanDepartmentPlanDecisionModel.d.ts +0 -10
- package/dist/models/AnnualTrainingPlanDepartmentPlanDecisionModel.js +0 -51
- package/dist/models/AnnualTrainingPlanDepartmentPlanModel.d.ts +0 -13
- package/dist/models/AnnualTrainingPlanDepartmentPlanModel.js +0 -50
- package/dist/models/AnnualTrainingPlanItemModel.d.ts +0 -22
- package/dist/models/AnnualTrainingPlanItemModel.js +0 -101
- package/dist/models/DocumentMetadataModel.d.ts +0 -45
- package/dist/models/DocumentMetadataModel.js +0 -171
- package/dist/models/DocumentationDepartmentsModel.d.ts +0 -13
- package/dist/models/DocumentationDepartmentsModel.js +0 -53
- package/dist/models/FolderModel.d.ts +0 -16
- package/dist/models/FolderModel.js +0 -85
- package/dist/models/ImportExportMaterialModels.d.ts +0 -92
- package/dist/models/ImportExportMaterialModels.js +0 -307
- package/dist/models/PermissionModel.d.ts +0 -18
- package/dist/models/PermissionModel.js +0 -68
- package/dist/models/SecurityAccessApprovalModel.d.ts +0 -23
- package/dist/models/SecurityAccessApprovalModel.js +0 -82
- package/dist/models/SecurityAccessAttachmentModel.d.ts +0 -12
- package/dist/models/SecurityAccessAttachmentModel.js +0 -56
- package/dist/models/SecurityAccessChatModel.d.ts +0 -12
- package/dist/models/SecurityAccessChatModel.js +0 -56
- package/dist/models/SecurityAccessRequestModel.d.ts +0 -25
- package/dist/models/SecurityAccessRequestModel.js +0 -80
- package/dist/models/SecurityAccessWorkflowModel.d.ts +0 -24
- package/dist/models/SecurityAccessWorkflowModel.js +0 -84
- package/dist/models/ServiceExtensionAfterAge60Models.d.ts +0 -93
- package/dist/models/ServiceExtensionAfterAge60Models.js +0 -312
- package/dist/models/UUIDBaseModel.d.ts +0 -14
- package/dist/models/UUIDBaseModel.js +0 -66
- package/dist/models/WorkingHoursExtensionModels.d.ts +0 -88
- package/dist/models/WorkingHoursExtensionModels.js +0 -295
|
@@ -1,178 +1,178 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
export enum TrainingRoomBookingRequestStatus {
|
|
5
|
-
PENDING = "Pending",
|
|
6
|
-
IN_PROGRESS = "In Progress",
|
|
7
|
-
COMPLETED = "Completed",
|
|
8
|
-
APPROVED = "Approved",
|
|
9
|
-
REJECTED = "Rejected"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export enum TrainingRoomBookingRoomType {
|
|
13
|
-
TRAINING_ROOMS_A = "Training Rooms (A1, A2)",
|
|
14
|
-
TRAINING_ROOM_A1 = "Training Room A1",
|
|
15
|
-
TRAINING_ROOM_A2 = "Training Room A2",
|
|
16
|
-
TRAINING_ROOMS_B = "Training Rooms (B1, B2)",
|
|
17
|
-
TRAINING_ROOMS_C = "Training Rooms (C1, C2)",
|
|
18
|
-
TRAINING_ROOMS_D = "Training Rooms (D1, D2)",
|
|
19
|
-
LECTURE_HALL = "Lecture Hall (Al Masarat)",
|
|
20
|
-
LABORATORY = "computers Laboratory",
|
|
21
|
-
LECTURE_HALL_LEGACY = "Lecture Hall",
|
|
22
|
-
LABORATORY_LEGACY = "Laboratory"
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export enum TrainingRoomBookingProviderEntity {
|
|
26
|
-
INSIDE = "Inside",
|
|
27
|
-
OUTSIDE = "Outside"
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export enum TrainingRoomBookingSector {
|
|
31
|
-
GOVERNMENT = "Government",
|
|
32
|
-
PRIVATE = "Private"
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@Entity({ name: "training_room_booking_requests" })
|
|
36
|
-
export class TrainingRoomBookingRequest extends BaseModel {
|
|
37
|
-
@Column({ type: "integer", nullable: true })
|
|
38
|
-
req_user_department_id: number | null;
|
|
39
|
-
|
|
40
|
-
@Column({ type: "integer", nullable: true })
|
|
41
|
-
req_user_section_id: number | null;
|
|
42
|
-
|
|
43
|
-
@Column({ type: "integer", nullable: true })
|
|
44
|
-
req_user_position_id: number | null;
|
|
45
|
-
|
|
46
|
-
@Column({ type: "integer", nullable: true })
|
|
47
|
-
service_id: number | null;
|
|
48
|
-
|
|
49
|
-
@Column({ type: "integer", nullable: true })
|
|
50
|
-
sub_service_id: number | null;
|
|
51
|
-
|
|
52
|
-
@Column({ type: "integer", nullable: false })
|
|
53
|
-
user_id: number;
|
|
54
|
-
|
|
55
|
-
@Column({ type: "text", nullable: false })
|
|
56
|
-
purpose_of_training: string;
|
|
57
|
-
|
|
58
|
-
@Column({ type: "date", nullable: false })
|
|
59
|
-
date_of_event: Date;
|
|
60
|
-
|
|
61
|
-
@Column({ type: "time", nullable: false })
|
|
62
|
-
start_time: string;
|
|
63
|
-
|
|
64
|
-
@Column({ type: "time", nullable: false })
|
|
65
|
-
end_time: string;
|
|
66
|
-
|
|
67
|
-
@Column({
|
|
68
|
-
type: "enum",
|
|
69
|
-
enum: TrainingRoomBookingRoomType,
|
|
70
|
-
nullable: false
|
|
71
|
-
})
|
|
72
|
-
room_type: TrainingRoomBookingRoomType;
|
|
73
|
-
|
|
74
|
-
@Column({
|
|
75
|
-
type: "enum",
|
|
76
|
-
enum: TrainingRoomBookingProviderEntity,
|
|
77
|
-
nullable: true
|
|
78
|
-
})
|
|
79
|
-
booking_provider_entity: TrainingRoomBookingProviderEntity | null;
|
|
80
|
-
|
|
81
|
-
@Column({
|
|
82
|
-
type: "enum",
|
|
83
|
-
enum: TrainingRoomBookingSector,
|
|
84
|
-
nullable: true
|
|
85
|
-
})
|
|
86
|
-
sector: TrainingRoomBookingSector | null;
|
|
87
|
-
|
|
88
|
-
@Column({ type: "boolean", default: false, nullable: false })
|
|
89
|
-
network_support_required: boolean;
|
|
90
|
-
|
|
91
|
-
@Column({ type: "boolean", default: false, nullable: false })
|
|
92
|
-
meals_required: boolean;
|
|
93
|
-
|
|
94
|
-
@Column({ type: "integer", nullable: false })
|
|
95
|
-
number_of_attendees: number;
|
|
96
|
-
|
|
97
|
-
@Column({ type: "json", nullable: true })
|
|
98
|
-
name_of_participants: string[] | null;
|
|
99
|
-
|
|
100
|
-
@Column({ type: "text", nullable: true })
|
|
101
|
-
remarks: string | null;
|
|
102
|
-
|
|
103
|
-
@Column({
|
|
104
|
-
type: "enum",
|
|
105
|
-
enum: TrainingRoomBookingRequestStatus,
|
|
106
|
-
default: TrainingRoomBookingRequestStatus.PENDING,
|
|
107
|
-
nullable: false
|
|
108
|
-
})
|
|
109
|
-
status: TrainingRoomBookingRequestStatus;
|
|
110
|
-
|
|
111
|
-
@Column({ type: "integer", nullable: true })
|
|
112
|
-
reviewer_user_id: number | null;
|
|
113
|
-
|
|
114
|
-
@Column({ type: "integer", nullable: true })
|
|
115
|
-
assigned_to_user_id: number | null;
|
|
116
|
-
|
|
117
|
-
@Column({ type: "timestamp", nullable: true })
|
|
118
|
-
assigned_at: Date | null;
|
|
119
|
-
|
|
120
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
121
|
-
workflow_execution_id: string | null;
|
|
122
|
-
|
|
123
|
-
@Column({ type: "varchar", length: 20, nullable: true })
|
|
124
|
-
reference_number: string | null;
|
|
125
|
-
|
|
126
|
-
constructor(
|
|
127
|
-
user_id: number,
|
|
128
|
-
purpose_of_training: string,
|
|
129
|
-
date_of_event: Date,
|
|
130
|
-
start_time: string,
|
|
131
|
-
end_time: string,
|
|
132
|
-
room_type: TrainingRoomBookingRoomType,
|
|
133
|
-
number_of_attendees: number,
|
|
134
|
-
network_support_required: boolean = false,
|
|
135
|
-
meals_required: boolean = false,
|
|
136
|
-
status: TrainingRoomBookingRequestStatus = TrainingRoomBookingRequestStatus.PENDING,
|
|
137
|
-
service_id?: number | null,
|
|
138
|
-
sub_service_id?: number | null,
|
|
139
|
-
req_user_department_id?: number | null,
|
|
140
|
-
req_user_section_id?: number | null,
|
|
141
|
-
req_user_position_id?: number | null,
|
|
142
|
-
name_of_participants?: string[] | null,
|
|
143
|
-
remarks?: string | null,
|
|
144
|
-
reviewer_user_id?: number | null,
|
|
145
|
-
assigned_to_user_id?: number | null,
|
|
146
|
-
assigned_at?: Date | null,
|
|
147
|
-
workflow_execution_id?: string | null,
|
|
148
|
-
booking_provider_entity?: TrainingRoomBookingProviderEntity | null,
|
|
149
|
-
sector?: TrainingRoomBookingSector | null
|
|
150
|
-
) {
|
|
151
|
-
super();
|
|
152
|
-
this.user_id = user_id;
|
|
153
|
-
this.purpose_of_training = purpose_of_training;
|
|
154
|
-
this.date_of_event = date_of_event;
|
|
155
|
-
this.start_time = start_time;
|
|
156
|
-
this.end_time = end_time;
|
|
157
|
-
this.room_type = room_type;
|
|
158
|
-
this.booking_provider_entity = booking_provider_entity ?? null;
|
|
159
|
-
this.sector = sector ?? null;
|
|
160
|
-
this.number_of_attendees = number_of_attendees;
|
|
161
|
-
this.network_support_required = network_support_required;
|
|
162
|
-
this.meals_required = meals_required;
|
|
163
|
-
this.status = status;
|
|
164
|
-
this.service_id = service_id || null;
|
|
165
|
-
this.sub_service_id = sub_service_id || null;
|
|
166
|
-
this.req_user_department_id = req_user_department_id || null;
|
|
167
|
-
this.req_user_section_id = req_user_section_id || null;
|
|
168
|
-
this.req_user_position_id = req_user_position_id || null;
|
|
169
|
-
this.name_of_participants = name_of_participants ?? null;
|
|
170
|
-
this.remarks = remarks || null;
|
|
171
|
-
this.reviewer_user_id = reviewer_user_id || null;
|
|
172
|
-
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
173
|
-
this.assigned_at = assigned_at || null;
|
|
174
|
-
this.workflow_execution_id = workflow_execution_id || null;
|
|
175
|
-
this.reference_number = null;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum TrainingRoomBookingRequestStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
IN_PROGRESS = "In Progress",
|
|
7
|
+
COMPLETED = "Completed",
|
|
8
|
+
APPROVED = "Approved",
|
|
9
|
+
REJECTED = "Rejected"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum TrainingRoomBookingRoomType {
|
|
13
|
+
TRAINING_ROOMS_A = "Training Rooms (A1, A2)",
|
|
14
|
+
TRAINING_ROOM_A1 = "Training Room A1",
|
|
15
|
+
TRAINING_ROOM_A2 = "Training Room A2",
|
|
16
|
+
TRAINING_ROOMS_B = "Training Rooms (B1, B2)",
|
|
17
|
+
TRAINING_ROOMS_C = "Training Rooms (C1, C2)",
|
|
18
|
+
TRAINING_ROOMS_D = "Training Rooms (D1, D2)",
|
|
19
|
+
LECTURE_HALL = "Lecture Hall (Al Masarat)",
|
|
20
|
+
LABORATORY = "computers Laboratory",
|
|
21
|
+
LECTURE_HALL_LEGACY = "Lecture Hall",
|
|
22
|
+
LABORATORY_LEGACY = "Laboratory"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export enum TrainingRoomBookingProviderEntity {
|
|
26
|
+
INSIDE = "Inside",
|
|
27
|
+
OUTSIDE = "Outside"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export enum TrainingRoomBookingSector {
|
|
31
|
+
GOVERNMENT = "Government",
|
|
32
|
+
PRIVATE = "Private"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@Entity({ name: "training_room_booking_requests" })
|
|
36
|
+
export class TrainingRoomBookingRequest extends BaseModel {
|
|
37
|
+
@Column({ type: "integer", nullable: true })
|
|
38
|
+
req_user_department_id: number | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: "integer", nullable: true })
|
|
41
|
+
req_user_section_id: number | null;
|
|
42
|
+
|
|
43
|
+
@Column({ type: "integer", nullable: true })
|
|
44
|
+
req_user_position_id: number | null;
|
|
45
|
+
|
|
46
|
+
@Column({ type: "integer", nullable: true })
|
|
47
|
+
service_id: number | null;
|
|
48
|
+
|
|
49
|
+
@Column({ type: "integer", nullable: true })
|
|
50
|
+
sub_service_id: number | null;
|
|
51
|
+
|
|
52
|
+
@Column({ type: "integer", nullable: false })
|
|
53
|
+
user_id: number;
|
|
54
|
+
|
|
55
|
+
@Column({ type: "text", nullable: false })
|
|
56
|
+
purpose_of_training: string;
|
|
57
|
+
|
|
58
|
+
@Column({ type: "date", nullable: false })
|
|
59
|
+
date_of_event: Date;
|
|
60
|
+
|
|
61
|
+
@Column({ type: "time", nullable: false })
|
|
62
|
+
start_time: string;
|
|
63
|
+
|
|
64
|
+
@Column({ type: "time", nullable: false })
|
|
65
|
+
end_time: string;
|
|
66
|
+
|
|
67
|
+
@Column({
|
|
68
|
+
type: "enum",
|
|
69
|
+
enum: TrainingRoomBookingRoomType,
|
|
70
|
+
nullable: false
|
|
71
|
+
})
|
|
72
|
+
room_type: TrainingRoomBookingRoomType;
|
|
73
|
+
|
|
74
|
+
@Column({
|
|
75
|
+
type: "enum",
|
|
76
|
+
enum: TrainingRoomBookingProviderEntity,
|
|
77
|
+
nullable: true
|
|
78
|
+
})
|
|
79
|
+
booking_provider_entity: TrainingRoomBookingProviderEntity | null;
|
|
80
|
+
|
|
81
|
+
@Column({
|
|
82
|
+
type: "enum",
|
|
83
|
+
enum: TrainingRoomBookingSector,
|
|
84
|
+
nullable: true
|
|
85
|
+
})
|
|
86
|
+
sector: TrainingRoomBookingSector | null;
|
|
87
|
+
|
|
88
|
+
@Column({ type: "boolean", default: false, nullable: false })
|
|
89
|
+
network_support_required: boolean;
|
|
90
|
+
|
|
91
|
+
@Column({ type: "boolean", default: false, nullable: false })
|
|
92
|
+
meals_required: boolean;
|
|
93
|
+
|
|
94
|
+
@Column({ type: "integer", nullable: false })
|
|
95
|
+
number_of_attendees: number;
|
|
96
|
+
|
|
97
|
+
@Column({ type: "json", nullable: true })
|
|
98
|
+
name_of_participants: string[] | null;
|
|
99
|
+
|
|
100
|
+
@Column({ type: "text", nullable: true })
|
|
101
|
+
remarks: string | null;
|
|
102
|
+
|
|
103
|
+
@Column({
|
|
104
|
+
type: "enum",
|
|
105
|
+
enum: TrainingRoomBookingRequestStatus,
|
|
106
|
+
default: TrainingRoomBookingRequestStatus.PENDING,
|
|
107
|
+
nullable: false
|
|
108
|
+
})
|
|
109
|
+
status: TrainingRoomBookingRequestStatus;
|
|
110
|
+
|
|
111
|
+
@Column({ type: "integer", nullable: true })
|
|
112
|
+
reviewer_user_id: number | null;
|
|
113
|
+
|
|
114
|
+
@Column({ type: "integer", nullable: true })
|
|
115
|
+
assigned_to_user_id: number | null;
|
|
116
|
+
|
|
117
|
+
@Column({ type: "timestamp", nullable: true })
|
|
118
|
+
assigned_at: Date | null;
|
|
119
|
+
|
|
120
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
121
|
+
workflow_execution_id: string | null;
|
|
122
|
+
|
|
123
|
+
@Column({ type: "varchar", length: 20, nullable: true })
|
|
124
|
+
reference_number: string | null;
|
|
125
|
+
|
|
126
|
+
constructor(
|
|
127
|
+
user_id: number,
|
|
128
|
+
purpose_of_training: string,
|
|
129
|
+
date_of_event: Date,
|
|
130
|
+
start_time: string,
|
|
131
|
+
end_time: string,
|
|
132
|
+
room_type: TrainingRoomBookingRoomType,
|
|
133
|
+
number_of_attendees: number,
|
|
134
|
+
network_support_required: boolean = false,
|
|
135
|
+
meals_required: boolean = false,
|
|
136
|
+
status: TrainingRoomBookingRequestStatus = TrainingRoomBookingRequestStatus.PENDING,
|
|
137
|
+
service_id?: number | null,
|
|
138
|
+
sub_service_id?: number | null,
|
|
139
|
+
req_user_department_id?: number | null,
|
|
140
|
+
req_user_section_id?: number | null,
|
|
141
|
+
req_user_position_id?: number | null,
|
|
142
|
+
name_of_participants?: string[] | null,
|
|
143
|
+
remarks?: string | null,
|
|
144
|
+
reviewer_user_id?: number | null,
|
|
145
|
+
assigned_to_user_id?: number | null,
|
|
146
|
+
assigned_at?: Date | null,
|
|
147
|
+
workflow_execution_id?: string | null,
|
|
148
|
+
booking_provider_entity?: TrainingRoomBookingProviderEntity | null,
|
|
149
|
+
sector?: TrainingRoomBookingSector | null
|
|
150
|
+
) {
|
|
151
|
+
super();
|
|
152
|
+
this.user_id = user_id;
|
|
153
|
+
this.purpose_of_training = purpose_of_training;
|
|
154
|
+
this.date_of_event = date_of_event;
|
|
155
|
+
this.start_time = start_time;
|
|
156
|
+
this.end_time = end_time;
|
|
157
|
+
this.room_type = room_type;
|
|
158
|
+
this.booking_provider_entity = booking_provider_entity ?? null;
|
|
159
|
+
this.sector = sector ?? null;
|
|
160
|
+
this.number_of_attendees = number_of_attendees;
|
|
161
|
+
this.network_support_required = network_support_required;
|
|
162
|
+
this.meals_required = meals_required;
|
|
163
|
+
this.status = status;
|
|
164
|
+
this.service_id = service_id || null;
|
|
165
|
+
this.sub_service_id = sub_service_id || null;
|
|
166
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
167
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
168
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
169
|
+
this.name_of_participants = name_of_participants ?? null;
|
|
170
|
+
this.remarks = remarks || null;
|
|
171
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
172
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
173
|
+
this.assigned_at = assigned_at || null;
|
|
174
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
175
|
+
this.reference_number = null;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
export enum TrainingRoomBookingWorkFlowStatus {
|
|
5
|
-
COMPLETED = "Completed",
|
|
6
|
-
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
-
PENDING = "Pending",
|
|
8
|
-
IN_PROGRESS = "In Progress",
|
|
9
|
-
REJECTED = "Rejected"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@Entity({ name: "training_room_booking_workflows" })
|
|
13
|
-
export class TrainingRoomBookingWorkFlow extends BaseModel {
|
|
14
|
-
@Column({ type: "int", nullable: false })
|
|
15
|
-
request_id: number;
|
|
16
|
-
|
|
17
|
-
@Column({ type: "integer", nullable: true })
|
|
18
|
-
service_id: number | null;
|
|
19
|
-
|
|
20
|
-
@Column({ type: "integer", nullable: true })
|
|
21
|
-
sub_service_id: number | null;
|
|
22
|
-
|
|
23
|
-
@Column({ type: "int", nullable: true })
|
|
24
|
-
order: number | null;
|
|
25
|
-
|
|
26
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
27
|
-
content: string;
|
|
28
|
-
@Column({ type: "varchar", length: 500, nullable: true })
|
|
29
|
-
content_ar: string | null;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
@Column({ type: "integer", nullable: true })
|
|
33
|
-
approver_role_id: number | null;
|
|
34
|
-
|
|
35
|
-
@Column({ type: "integer", nullable: true })
|
|
36
|
-
approver_user_id: number | null;
|
|
37
|
-
|
|
38
|
-
@Column({ type: "integer", nullable: true })
|
|
39
|
-
approved_by: number | null;
|
|
40
|
-
|
|
41
|
-
@Column({ type: "integer", nullable: true })
|
|
42
|
-
department_id: number | null;
|
|
43
|
-
|
|
44
|
-
@Column({ type: "integer", nullable: true })
|
|
45
|
-
section_id: number | null;
|
|
46
|
-
|
|
47
|
-
@Column({
|
|
48
|
-
type: "enum",
|
|
49
|
-
enum: TrainingRoomBookingWorkFlowStatus,
|
|
50
|
-
default: TrainingRoomBookingWorkFlowStatus.PENDING,
|
|
51
|
-
nullable: false
|
|
52
|
-
})
|
|
53
|
-
status: TrainingRoomBookingWorkFlowStatus;
|
|
54
|
-
@Column({ type: "varchar", length: 100, nullable: true })
|
|
55
|
-
status_ar: string | null;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
constructor(
|
|
59
|
-
request_id: number,
|
|
60
|
-
content: string,
|
|
61
|
-
status: TrainingRoomBookingWorkFlowStatus,
|
|
62
|
-
service_id?: number | null,
|
|
63
|
-
sub_service_id?: number | null,
|
|
64
|
-
order?: number,
|
|
65
|
-
approver_role_id?: number | null,
|
|
66
|
-
approver_user_id?: number | null,
|
|
67
|
-
approved_by?: number | null
|
|
68
|
-
) {
|
|
69
|
-
super();
|
|
70
|
-
this.request_id = request_id;
|
|
71
|
-
this.service_id = service_id || null;
|
|
72
|
-
this.sub_service_id = sub_service_id || null;
|
|
73
|
-
this.content = content;
|
|
74
|
-
this.status = status;
|
|
75
|
-
this.order = order || null;
|
|
76
|
-
this.approver_role_id = approver_role_id || null;
|
|
77
|
-
this.approver_user_id = approver_user_id || null;
|
|
78
|
-
this.approved_by = approved_by || null;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum TrainingRoomBookingWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending",
|
|
8
|
+
IN_PROGRESS = "In Progress",
|
|
9
|
+
REJECTED = "Rejected"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Entity({ name: "training_room_booking_workflows" })
|
|
13
|
+
export class TrainingRoomBookingWorkFlow extends BaseModel {
|
|
14
|
+
@Column({ type: "int", nullable: false })
|
|
15
|
+
request_id: number;
|
|
16
|
+
|
|
17
|
+
@Column({ type: "integer", nullable: true })
|
|
18
|
+
service_id: number | null;
|
|
19
|
+
|
|
20
|
+
@Column({ type: "integer", nullable: true })
|
|
21
|
+
sub_service_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: "int", nullable: true })
|
|
24
|
+
order: number | null;
|
|
25
|
+
|
|
26
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
27
|
+
content: string;
|
|
28
|
+
@Column({ type: "varchar", length: 500, nullable: true })
|
|
29
|
+
content_ar: string | null;
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@Column({ type: "integer", nullable: true })
|
|
33
|
+
approver_role_id: number | null;
|
|
34
|
+
|
|
35
|
+
@Column({ type: "integer", nullable: true })
|
|
36
|
+
approver_user_id: number | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: "integer", nullable: true })
|
|
39
|
+
approved_by: number | null;
|
|
40
|
+
|
|
41
|
+
@Column({ type: "integer", nullable: true })
|
|
42
|
+
department_id: number | null;
|
|
43
|
+
|
|
44
|
+
@Column({ type: "integer", nullable: true })
|
|
45
|
+
section_id: number | null;
|
|
46
|
+
|
|
47
|
+
@Column({
|
|
48
|
+
type: "enum",
|
|
49
|
+
enum: TrainingRoomBookingWorkFlowStatus,
|
|
50
|
+
default: TrainingRoomBookingWorkFlowStatus.PENDING,
|
|
51
|
+
nullable: false
|
|
52
|
+
})
|
|
53
|
+
status: TrainingRoomBookingWorkFlowStatus;
|
|
54
|
+
@Column({ type: "varchar", length: 100, nullable: true })
|
|
55
|
+
status_ar: string | null;
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
constructor(
|
|
59
|
+
request_id: number,
|
|
60
|
+
content: string,
|
|
61
|
+
status: TrainingRoomBookingWorkFlowStatus,
|
|
62
|
+
service_id?: number | null,
|
|
63
|
+
sub_service_id?: number | null,
|
|
64
|
+
order?: number,
|
|
65
|
+
approver_role_id?: number | null,
|
|
66
|
+
approver_user_id?: number | null,
|
|
67
|
+
approved_by?: number | null
|
|
68
|
+
) {
|
|
69
|
+
super();
|
|
70
|
+
this.request_id = request_id;
|
|
71
|
+
this.service_id = service_id || null;
|
|
72
|
+
this.sub_service_id = sub_service_id || null;
|
|
73
|
+
this.content = content;
|
|
74
|
+
this.status = status;
|
|
75
|
+
this.order = order || null;
|
|
76
|
+
this.approver_role_id = approver_role_id || null;
|
|
77
|
+
this.approver_user_id = approver_user_id || null;
|
|
78
|
+
this.approved_by = approved_by || null;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
export enum NotificationFrequency {
|
|
5
|
-
YEARLY = "yearly",
|
|
6
|
-
SIX_MONTHS_BEFORE = "6_months_before"
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@Entity({ name: "training_room_notification_configs" })
|
|
10
|
-
export class TrainingRoomNotificationConfig extends BaseModel {
|
|
11
|
-
@Column({ type: "integer", nullable: false })
|
|
12
|
-
department_id: number;
|
|
13
|
-
|
|
14
|
-
@Column({ type: "integer", nullable: true })
|
|
15
|
-
section_id: number | null;
|
|
16
|
-
|
|
17
|
-
@Column({ type: "boolean", nullable: false, default: true })
|
|
18
|
-
is_active: boolean;
|
|
19
|
-
|
|
20
|
-
constructor(
|
|
21
|
-
department_id: number,
|
|
22
|
-
section_id: number | null = null,
|
|
23
|
-
is_active: boolean = true
|
|
24
|
-
) {
|
|
25
|
-
super();
|
|
26
|
-
this.department_id = department_id;
|
|
27
|
-
this.section_id = section_id;
|
|
28
|
-
this.is_active = is_active;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum NotificationFrequency {
|
|
5
|
+
YEARLY = "yearly",
|
|
6
|
+
SIX_MONTHS_BEFORE = "6_months_before"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@Entity({ name: "training_room_notification_configs" })
|
|
10
|
+
export class TrainingRoomNotificationConfig extends BaseModel {
|
|
11
|
+
@Column({ type: "integer", nullable: false })
|
|
12
|
+
department_id: number;
|
|
13
|
+
|
|
14
|
+
@Column({ type: "integer", nullable: true })
|
|
15
|
+
section_id: number | null;
|
|
16
|
+
|
|
17
|
+
@Column({ type: "boolean", nullable: false, default: true })
|
|
18
|
+
is_active: boolean;
|
|
19
|
+
|
|
20
|
+
constructor(
|
|
21
|
+
department_id: number,
|
|
22
|
+
section_id: number | null = null,
|
|
23
|
+
is_active: boolean = true
|
|
24
|
+
) {
|
|
25
|
+
super();
|
|
26
|
+
this.department_id = department_id;
|
|
27
|
+
this.section_id = section_id;
|
|
28
|
+
this.is_active = is_active;
|
|
29
|
+
}
|
|
30
|
+
}
|
package/src/models/role.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
/** *
|
|
2
|
-
@author
|
|
3
|
-
Amnet Digital
|
|
4
|
-
@date
|
|
5
|
-
2024-05-20
|
|
6
|
-
@Model
|
|
7
|
-
Role
|
|
8
|
-
@usage
|
|
9
|
-
Userrole Information will store
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { Column, Entity } from "typeorm";
|
|
13
|
-
import { BaseModel } from './BaseModel';
|
|
14
|
-
|
|
15
|
-
@Entity({ name: 'role' })
|
|
16
|
-
export class Role extends BaseModel {
|
|
17
|
-
|
|
18
|
-
@Column({ nullable: true })
|
|
19
|
-
name: string;
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
22
|
-
arabic_name: string | null;
|
|
23
|
-
|
|
24
|
-
@Column({ nullable: true })
|
|
25
|
-
is_deleted?: boolean;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
constructor(name: string, is_deleted: boolean, arabic_name: string | null = null) {
|
|
29
|
-
super();
|
|
30
|
-
this.name = name;
|
|
31
|
-
this.is_deleted = is_deleted;
|
|
32
|
-
this.arabic_name = arabic_name;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
/** *
|
|
2
|
+
@author
|
|
3
|
+
Amnet Digital
|
|
4
|
+
@date
|
|
5
|
+
2024-05-20
|
|
6
|
+
@Model
|
|
7
|
+
Role
|
|
8
|
+
@usage
|
|
9
|
+
Userrole Information will store
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { Column, Entity } from "typeorm";
|
|
13
|
+
import { BaseModel } from './BaseModel';
|
|
14
|
+
|
|
15
|
+
@Entity({ name: 'role' })
|
|
16
|
+
export class Role extends BaseModel {
|
|
17
|
+
|
|
18
|
+
@Column({ nullable: true })
|
|
19
|
+
name: string;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
22
|
+
arabic_name: string | null;
|
|
23
|
+
|
|
24
|
+
@Column({ nullable: true })
|
|
25
|
+
is_deleted?: boolean;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
constructor(name: string, is_deleted: boolean, arabic_name: string | null = null) {
|
|
29
|
+
super();
|
|
30
|
+
this.name = name;
|
|
31
|
+
this.is_deleted = is_deleted;
|
|
32
|
+
this.arabic_name = arabic_name;
|
|
33
|
+
}
|
|
34
|
+
}
|