@platform-modules/civil-aviation-authority 2.3.327 → 2.3.330
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/models/StudyLeaveRequestModel.d.ts +15 -0
- package/dist/models/StudyLeaveRequestModel.js +33 -1
- package/dist/models/TrainingRequestModel.d.ts +2 -0
- package/dist/models/TrainingRequestModel.js +5 -0
- package/dist/models/TrainingRoomBookingRequestModel.d.ts +18 -3
- package/dist/models/TrainingRoomBookingRequestModel.js +42 -5
- package/dist/models/TrainingRoomBookingWorkflowModel.d.ts +3 -0
- package/dist/models/TrainingRoomBookingWorkflowModel.js +9 -0
- package/package.json +1 -1
- package/sql/add_training_room_booking_records_reference.sql +19 -0
- package/sql/update_training_room_booking_options.sql +43 -0
- package/src/models/TrainingRoomBookingRequestModel.ts +39 -3
- package/src/models/TrainingRoomBookingWorkflowModel.ts +7 -0
|
@@ -6,6 +6,16 @@ export declare enum StudyLeaveRequestStatus {
|
|
|
6
6
|
APPROVED = "Approved",
|
|
7
7
|
REJECTED = "Rejected"
|
|
8
8
|
}
|
|
9
|
+
export declare enum TypeOfStudy {
|
|
10
|
+
SCHOLARSHIP = "Scholarship",
|
|
11
|
+
SELF_FUNDED = "Self-funded",
|
|
12
|
+
OTHER = "Other"
|
|
13
|
+
}
|
|
14
|
+
export declare enum TypeOfLeave {
|
|
15
|
+
PARTIAL = "Partial",
|
|
16
|
+
FULL = "Full",
|
|
17
|
+
OTHER = "Other"
|
|
18
|
+
}
|
|
9
19
|
export declare class StudyLeaveRequest extends BaseModel {
|
|
10
20
|
req_user_department_id: number | null;
|
|
11
21
|
req_user_section_id: number | null;
|
|
@@ -31,5 +41,10 @@ export declare class StudyLeaveRequest extends BaseModel {
|
|
|
31
41
|
qualification_required: string | null;
|
|
32
42
|
have_you_ever_received_authority: boolean | null;
|
|
33
43
|
scholarship: string | null;
|
|
44
|
+
type_of_study: TypeOfStudy | null;
|
|
45
|
+
type_of_study_other: string | null;
|
|
46
|
+
type_of_leave: TypeOfLeave | null;
|
|
47
|
+
/** Assigned when the request reaches Records approval, e.g. SL00001. */
|
|
48
|
+
reference_number: string | null;
|
|
34
49
|
constructor(user_id: number, course_name: string, institute_name: string, course_start_date: Date, course_end_date: Date, location: string, description: string, status?: StudyLeaveRequestStatus, 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, duration_of_course?: string | null, reviewer_user_id?: number | null, assigned_to_user_id?: number | null, assigned_at?: Date | null, workflow_execution_id?: string | null, already_submitted_in_ministry_of_education_system?: boolean | null, area_name?: string | null, country_name?: string | null, qualification_required?: string | null, have_you_ever_received_authority?: boolean | null, scholarship?: string | null);
|
|
35
50
|
}
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.StudyLeaveRequest = exports.StudyLeaveRequestStatus = void 0;
|
|
12
|
+
exports.StudyLeaveRequest = exports.TypeOfLeave = exports.TypeOfStudy = exports.StudyLeaveRequestStatus = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
var StudyLeaveRequestStatus;
|
|
@@ -20,6 +20,18 @@ var StudyLeaveRequestStatus;
|
|
|
20
20
|
StudyLeaveRequestStatus["APPROVED"] = "Approved";
|
|
21
21
|
StudyLeaveRequestStatus["REJECTED"] = "Rejected";
|
|
22
22
|
})(StudyLeaveRequestStatus || (exports.StudyLeaveRequestStatus = StudyLeaveRequestStatus = {}));
|
|
23
|
+
var TypeOfStudy;
|
|
24
|
+
(function (TypeOfStudy) {
|
|
25
|
+
TypeOfStudy["SCHOLARSHIP"] = "Scholarship";
|
|
26
|
+
TypeOfStudy["SELF_FUNDED"] = "Self-funded";
|
|
27
|
+
TypeOfStudy["OTHER"] = "Other";
|
|
28
|
+
})(TypeOfStudy || (exports.TypeOfStudy = TypeOfStudy = {}));
|
|
29
|
+
var TypeOfLeave;
|
|
30
|
+
(function (TypeOfLeave) {
|
|
31
|
+
TypeOfLeave["PARTIAL"] = "Partial";
|
|
32
|
+
TypeOfLeave["FULL"] = "Full";
|
|
33
|
+
TypeOfLeave["OTHER"] = "Other";
|
|
34
|
+
})(TypeOfLeave || (exports.TypeOfLeave = TypeOfLeave = {}));
|
|
23
35
|
let StudyLeaveRequest = class StudyLeaveRequest extends BaseModel_1.BaseModel {
|
|
24
36
|
constructor(user_id, course_name, institute_name, course_start_date, course_end_date, location, description, status = StudyLeaveRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, duration_of_course, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id, already_submitted_in_ministry_of_education_system, area_name, country_name, qualification_required, have_you_ever_received_authority, scholarship) {
|
|
25
37
|
super();
|
|
@@ -47,6 +59,10 @@ let StudyLeaveRequest = class StudyLeaveRequest extends BaseModel_1.BaseModel {
|
|
|
47
59
|
this.qualification_required = qualification_required ?? null;
|
|
48
60
|
this.have_you_ever_received_authority = have_you_ever_received_authority ?? null;
|
|
49
61
|
this.scholarship = scholarship ?? null;
|
|
62
|
+
this.type_of_study = null;
|
|
63
|
+
this.type_of_study_other = null;
|
|
64
|
+
this.type_of_leave = null;
|
|
65
|
+
this.reference_number = null;
|
|
50
66
|
}
|
|
51
67
|
};
|
|
52
68
|
exports.StudyLeaveRequest = StudyLeaveRequest;
|
|
@@ -151,6 +167,22 @@ __decorate([
|
|
|
151
167
|
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
152
168
|
__metadata("design:type", Object)
|
|
153
169
|
], StudyLeaveRequest.prototype, "scholarship", void 0);
|
|
170
|
+
__decorate([
|
|
171
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
172
|
+
__metadata("design:type", Object)
|
|
173
|
+
], StudyLeaveRequest.prototype, "type_of_study", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
176
|
+
__metadata("design:type", Object)
|
|
177
|
+
], StudyLeaveRequest.prototype, "type_of_study_other", void 0);
|
|
178
|
+
__decorate([
|
|
179
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
180
|
+
__metadata("design:type", Object)
|
|
181
|
+
], StudyLeaveRequest.prototype, "type_of_leave", void 0);
|
|
182
|
+
__decorate([
|
|
183
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true, unique: true }),
|
|
184
|
+
__metadata("design:type", Object)
|
|
185
|
+
], StudyLeaveRequest.prototype, "reference_number", void 0);
|
|
154
186
|
exports.StudyLeaveRequest = StudyLeaveRequest = __decorate([
|
|
155
187
|
(0, typeorm_1.Entity)({ name: "study_leave_requests" }),
|
|
156
188
|
__metadata("design:paramtypes", [Number, String, String, Date,
|
|
@@ -46,6 +46,8 @@ export declare class TrainingRequest extends BaseModel {
|
|
|
46
46
|
assigned_to_user_id: number | null;
|
|
47
47
|
assigned_at: Date | null;
|
|
48
48
|
workflow_execution_id: string | null;
|
|
49
|
+
/** Assigned when the request reaches Records Department approval, e.g. RT00001. */
|
|
50
|
+
reference_number: string | null;
|
|
49
51
|
constructor(user_id: number, type_of_training: TypeOfTraining | null, description: string, place: string | null, no_of_attendees: number, media_coverage_required: TrainingMediaCoverageRequired, status?: TrainingRequestStatus, 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, type_of_category?: TypeOfCategory | null, course_name?: string | null, course_id?: string | null, name_of_attendees_selection?: Array<{
|
|
50
52
|
user_id: number;
|
|
51
53
|
name?: string;
|
|
@@ -61,6 +61,7 @@ let TrainingRequest = class TrainingRequest extends BaseModel_1.BaseModel {
|
|
|
61
61
|
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
62
62
|
this.assigned_at = assigned_at || null;
|
|
63
63
|
this.workflow_execution_id = workflow_execution_id || null;
|
|
64
|
+
this.reference_number = null;
|
|
64
65
|
}
|
|
65
66
|
};
|
|
66
67
|
exports.TrainingRequest = TrainingRequest;
|
|
@@ -170,6 +171,10 @@ __decorate([
|
|
|
170
171
|
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
171
172
|
__metadata("design:type", Object)
|
|
172
173
|
], TrainingRequest.prototype, "workflow_execution_id", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true, unique: true }),
|
|
176
|
+
__metadata("design:type", Object)
|
|
177
|
+
], TrainingRequest.prototype, "reference_number", void 0);
|
|
173
178
|
exports.TrainingRequest = TrainingRequest = __decorate([
|
|
174
179
|
(0, typeorm_1.Entity)({ name: "training_requests" }),
|
|
175
180
|
__metadata("design:paramtypes", [Number, Object, String, Object, Number, String, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])
|
|
@@ -8,11 +8,23 @@ export declare enum TrainingRoomBookingRequestStatus {
|
|
|
8
8
|
}
|
|
9
9
|
export declare enum TrainingRoomBookingRoomType {
|
|
10
10
|
TRAINING_ROOMS_A = "Training Rooms (A1, A2)",
|
|
11
|
+
TRAINING_ROOM_A1 = "Training Room A1",
|
|
12
|
+
TRAINING_ROOM_A2 = "Training Room A2",
|
|
11
13
|
TRAINING_ROOMS_B = "Training Rooms (B1, B2)",
|
|
12
14
|
TRAINING_ROOMS_C = "Training Rooms (C1, C2)",
|
|
13
15
|
TRAINING_ROOMS_D = "Training Rooms (D1, D2)",
|
|
14
|
-
LECTURE_HALL = "Lecture Hall",
|
|
15
|
-
LABORATORY = "Laboratory"
|
|
16
|
+
LECTURE_HALL = "Lecture Hall (Al Masarat)",
|
|
17
|
+
LABORATORY = "computers Laboratory",
|
|
18
|
+
LECTURE_HALL_LEGACY = "Lecture Hall",
|
|
19
|
+
LABORATORY_LEGACY = "Laboratory"
|
|
20
|
+
}
|
|
21
|
+
export declare enum TrainingRoomBookingProviderEntity {
|
|
22
|
+
INSIDE = "Inside",
|
|
23
|
+
OUTSIDE = "Outside"
|
|
24
|
+
}
|
|
25
|
+
export declare enum TrainingRoomBookingSector {
|
|
26
|
+
GOVERNMENT = "Government",
|
|
27
|
+
PRIVATE = "Private"
|
|
16
28
|
}
|
|
17
29
|
export declare class TrainingRoomBookingRequest extends BaseModel {
|
|
18
30
|
req_user_department_id: number | null;
|
|
@@ -26,6 +38,8 @@ export declare class TrainingRoomBookingRequest extends BaseModel {
|
|
|
26
38
|
start_time: string;
|
|
27
39
|
end_time: string;
|
|
28
40
|
room_type: TrainingRoomBookingRoomType;
|
|
41
|
+
booking_provider_entity: TrainingRoomBookingProviderEntity | null;
|
|
42
|
+
sector: TrainingRoomBookingSector | null;
|
|
29
43
|
network_support_required: boolean;
|
|
30
44
|
meals_required: boolean;
|
|
31
45
|
number_of_attendees: number;
|
|
@@ -36,5 +50,6 @@ export declare class TrainingRoomBookingRequest extends BaseModel {
|
|
|
36
50
|
assigned_to_user_id: number | null;
|
|
37
51
|
assigned_at: Date | null;
|
|
38
52
|
workflow_execution_id: string | null;
|
|
39
|
-
|
|
53
|
+
reference_number: string | null;
|
|
54
|
+
constructor(user_id: number, purpose_of_training: string, date_of_event: Date, start_time: string, end_time: string, room_type: TrainingRoomBookingRoomType, number_of_attendees: number, network_support_required?: boolean, meals_required?: boolean, status?: TrainingRoomBookingRequestStatus, 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, name_of_participants?: string[] | null, remarks?: string | null, reviewer_user_id?: number | null, assigned_to_user_id?: number | null, assigned_at?: Date | null, workflow_execution_id?: string | null, booking_provider_entity?: TrainingRoomBookingProviderEntity | null, sector?: TrainingRoomBookingSector | null);
|
|
40
55
|
}
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.TrainingRoomBookingRequest = exports.TrainingRoomBookingRoomType = exports.TrainingRoomBookingRequestStatus = void 0;
|
|
12
|
+
exports.TrainingRoomBookingRequest = exports.TrainingRoomBookingSector = exports.TrainingRoomBookingProviderEntity = exports.TrainingRoomBookingRoomType = exports.TrainingRoomBookingRequestStatus = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
var TrainingRoomBookingRequestStatus;
|
|
@@ -23,14 +23,28 @@ var TrainingRoomBookingRequestStatus;
|
|
|
23
23
|
var TrainingRoomBookingRoomType;
|
|
24
24
|
(function (TrainingRoomBookingRoomType) {
|
|
25
25
|
TrainingRoomBookingRoomType["TRAINING_ROOMS_A"] = "Training Rooms (A1, A2)";
|
|
26
|
+
TrainingRoomBookingRoomType["TRAINING_ROOM_A1"] = "Training Room A1";
|
|
27
|
+
TrainingRoomBookingRoomType["TRAINING_ROOM_A2"] = "Training Room A2";
|
|
26
28
|
TrainingRoomBookingRoomType["TRAINING_ROOMS_B"] = "Training Rooms (B1, B2)";
|
|
27
29
|
TrainingRoomBookingRoomType["TRAINING_ROOMS_C"] = "Training Rooms (C1, C2)";
|
|
28
30
|
TrainingRoomBookingRoomType["TRAINING_ROOMS_D"] = "Training Rooms (D1, D2)";
|
|
29
|
-
TrainingRoomBookingRoomType["LECTURE_HALL"] = "Lecture Hall";
|
|
30
|
-
TrainingRoomBookingRoomType["LABORATORY"] = "Laboratory";
|
|
31
|
+
TrainingRoomBookingRoomType["LECTURE_HALL"] = "Lecture Hall (Al Masarat)";
|
|
32
|
+
TrainingRoomBookingRoomType["LABORATORY"] = "computers Laboratory";
|
|
33
|
+
TrainingRoomBookingRoomType["LECTURE_HALL_LEGACY"] = "Lecture Hall";
|
|
34
|
+
TrainingRoomBookingRoomType["LABORATORY_LEGACY"] = "Laboratory";
|
|
31
35
|
})(TrainingRoomBookingRoomType || (exports.TrainingRoomBookingRoomType = TrainingRoomBookingRoomType = {}));
|
|
36
|
+
var TrainingRoomBookingProviderEntity;
|
|
37
|
+
(function (TrainingRoomBookingProviderEntity) {
|
|
38
|
+
TrainingRoomBookingProviderEntity["INSIDE"] = "Inside";
|
|
39
|
+
TrainingRoomBookingProviderEntity["OUTSIDE"] = "Outside";
|
|
40
|
+
})(TrainingRoomBookingProviderEntity || (exports.TrainingRoomBookingProviderEntity = TrainingRoomBookingProviderEntity = {}));
|
|
41
|
+
var TrainingRoomBookingSector;
|
|
42
|
+
(function (TrainingRoomBookingSector) {
|
|
43
|
+
TrainingRoomBookingSector["GOVERNMENT"] = "Government";
|
|
44
|
+
TrainingRoomBookingSector["PRIVATE"] = "Private";
|
|
45
|
+
})(TrainingRoomBookingSector || (exports.TrainingRoomBookingSector = TrainingRoomBookingSector = {}));
|
|
32
46
|
let TrainingRoomBookingRequest = class TrainingRoomBookingRequest extends BaseModel_1.BaseModel {
|
|
33
|
-
constructor(user_id, purpose_of_training, date_of_event, start_time, end_time, room_type, number_of_attendees, network_support_required = false, meals_required = false, status = TrainingRoomBookingRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, name_of_participants, remarks, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id) {
|
|
47
|
+
constructor(user_id, purpose_of_training, date_of_event, start_time, end_time, room_type, number_of_attendees, network_support_required = false, meals_required = false, status = TrainingRoomBookingRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, name_of_participants, remarks, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id, booking_provider_entity, sector) {
|
|
34
48
|
super();
|
|
35
49
|
this.user_id = user_id;
|
|
36
50
|
this.purpose_of_training = purpose_of_training;
|
|
@@ -38,6 +52,8 @@ let TrainingRoomBookingRequest = class TrainingRoomBookingRequest extends BaseMo
|
|
|
38
52
|
this.start_time = start_time;
|
|
39
53
|
this.end_time = end_time;
|
|
40
54
|
this.room_type = room_type;
|
|
55
|
+
this.booking_provider_entity = booking_provider_entity ?? null;
|
|
56
|
+
this.sector = sector ?? null;
|
|
41
57
|
this.number_of_attendees = number_of_attendees;
|
|
42
58
|
this.network_support_required = network_support_required;
|
|
43
59
|
this.meals_required = meals_required;
|
|
@@ -53,6 +69,7 @@ let TrainingRoomBookingRequest = class TrainingRoomBookingRequest extends BaseMo
|
|
|
53
69
|
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
54
70
|
this.assigned_at = assigned_at || null;
|
|
55
71
|
this.workflow_execution_id = workflow_execution_id || null;
|
|
72
|
+
this.reference_number = null;
|
|
56
73
|
}
|
|
57
74
|
};
|
|
58
75
|
exports.TrainingRoomBookingRequest = TrainingRoomBookingRequest;
|
|
@@ -104,6 +121,22 @@ __decorate([
|
|
|
104
121
|
}),
|
|
105
122
|
__metadata("design:type", String)
|
|
106
123
|
], TrainingRoomBookingRequest.prototype, "room_type", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, typeorm_1.Column)({
|
|
126
|
+
type: "enum",
|
|
127
|
+
enum: TrainingRoomBookingProviderEntity,
|
|
128
|
+
nullable: true
|
|
129
|
+
}),
|
|
130
|
+
__metadata("design:type", Object)
|
|
131
|
+
], TrainingRoomBookingRequest.prototype, "booking_provider_entity", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, typeorm_1.Column)({
|
|
134
|
+
type: "enum",
|
|
135
|
+
enum: TrainingRoomBookingSector,
|
|
136
|
+
nullable: true
|
|
137
|
+
}),
|
|
138
|
+
__metadata("design:type", Object)
|
|
139
|
+
], TrainingRoomBookingRequest.prototype, "sector", void 0);
|
|
107
140
|
__decorate([
|
|
108
141
|
(0, typeorm_1.Column)({ type: "boolean", default: false, nullable: false }),
|
|
109
142
|
__metadata("design:type", Boolean)
|
|
@@ -149,7 +182,11 @@ __decorate([
|
|
|
149
182
|
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
150
183
|
__metadata("design:type", Object)
|
|
151
184
|
], TrainingRoomBookingRequest.prototype, "workflow_execution_id", void 0);
|
|
185
|
+
__decorate([
|
|
186
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true }),
|
|
187
|
+
__metadata("design:type", Object)
|
|
188
|
+
], TrainingRoomBookingRequest.prototype, "reference_number", void 0);
|
|
152
189
|
exports.TrainingRoomBookingRequest = TrainingRoomBookingRequest = __decorate([
|
|
153
190
|
(0, typeorm_1.Entity)({ name: "training_room_booking_requests" }),
|
|
154
|
-
__metadata("design:paramtypes", [Number, String, Date, String, String, String, Number, Boolean, Boolean, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])
|
|
191
|
+
__metadata("design:paramtypes", [Number, String, Date, String, String, String, Number, Boolean, Boolean, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])
|
|
155
192
|
], TrainingRoomBookingRequest);
|
|
@@ -3,6 +3,7 @@ export declare enum TrainingRoomBookingWorkFlowStatus {
|
|
|
3
3
|
COMPLETED = "Completed",
|
|
4
4
|
NOT_YET_STARTED = "Not Yet Started",
|
|
5
5
|
PENDING = "Pending",
|
|
6
|
+
IN_PROGRESS = "In Progress",
|
|
6
7
|
REJECTED = "Rejected"
|
|
7
8
|
}
|
|
8
9
|
export declare class TrainingRoomBookingWorkFlow extends BaseModel {
|
|
@@ -15,6 +16,8 @@ export declare class TrainingRoomBookingWorkFlow extends BaseModel {
|
|
|
15
16
|
approver_role_id: number | null;
|
|
16
17
|
approver_user_id: number | null;
|
|
17
18
|
approved_by: number | null;
|
|
19
|
+
department_id: number | null;
|
|
20
|
+
section_id: number | null;
|
|
18
21
|
status: TrainingRoomBookingWorkFlowStatus;
|
|
19
22
|
status_ar: string | null;
|
|
20
23
|
constructor(request_id: number, content: string, status: TrainingRoomBookingWorkFlowStatus, service_id?: number | null, sub_service_id?: number | null, order?: number, approver_role_id?: number | null, approver_user_id?: number | null, approved_by?: number | null);
|
|
@@ -17,6 +17,7 @@ var TrainingRoomBookingWorkFlowStatus;
|
|
|
17
17
|
TrainingRoomBookingWorkFlowStatus["COMPLETED"] = "Completed";
|
|
18
18
|
TrainingRoomBookingWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
19
19
|
TrainingRoomBookingWorkFlowStatus["PENDING"] = "Pending";
|
|
20
|
+
TrainingRoomBookingWorkFlowStatus["IN_PROGRESS"] = "In Progress";
|
|
20
21
|
TrainingRoomBookingWorkFlowStatus["REJECTED"] = "Rejected";
|
|
21
22
|
})(TrainingRoomBookingWorkFlowStatus || (exports.TrainingRoomBookingWorkFlowStatus = TrainingRoomBookingWorkFlowStatus = {}));
|
|
22
23
|
let TrainingRoomBookingWorkFlow = class TrainingRoomBookingWorkFlow extends BaseModel_1.BaseModel {
|
|
@@ -70,6 +71,14 @@ __decorate([
|
|
|
70
71
|
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
71
72
|
__metadata("design:type", Object)
|
|
72
73
|
], TrainingRoomBookingWorkFlow.prototype, "approved_by", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
76
|
+
__metadata("design:type", Object)
|
|
77
|
+
], TrainingRoomBookingWorkFlow.prototype, "department_id", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
80
|
+
__metadata("design:type", Object)
|
|
81
|
+
], TrainingRoomBookingWorkFlow.prototype, "section_id", void 0);
|
|
73
82
|
__decorate([
|
|
74
83
|
(0, typeorm_1.Column)({
|
|
75
84
|
type: "enum",
|
package/package.json
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
-- Training room booking parallel approvals: workflow log status, log department
|
|
2
|
+
-- columns, and the Records reference number.
|
|
3
|
+
-- Run once per environment. HR and Conductor use synchronize: false.
|
|
4
|
+
|
|
5
|
+
ALTER TYPE training_room_booking_workflows_status_enum
|
|
6
|
+
ADD VALUE IF NOT EXISTS 'In Progress';
|
|
7
|
+
|
|
8
|
+
ALTER TABLE IF EXISTS training_room_booking_workflows
|
|
9
|
+
ADD COLUMN IF NOT EXISTS department_id INTEGER NULL;
|
|
10
|
+
|
|
11
|
+
ALTER TABLE IF EXISTS training_room_booking_workflows
|
|
12
|
+
ADD COLUMN IF NOT EXISTS section_id INTEGER NULL;
|
|
13
|
+
|
|
14
|
+
ALTER TABLE IF EXISTS training_room_booking_requests
|
|
15
|
+
ADD COLUMN IF NOT EXISTS reference_number VARCHAR(20) NULL;
|
|
16
|
+
|
|
17
|
+
CREATE UNIQUE INDEX IF NOT EXISTS uq_training_room_booking_requests_reference_number
|
|
18
|
+
ON training_room_booking_requests (reference_number)
|
|
19
|
+
WHERE reference_number IS NOT NULL;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
-- Training room booking room choices and booking-provider details.
|
|
2
|
+
-- Run once per environment. HR and Conductor use synchronize: false.
|
|
3
|
+
|
|
4
|
+
ALTER TYPE training_room_booking_requests_room_type_enum
|
|
5
|
+
ADD VALUE IF NOT EXISTS 'Training Room A1';
|
|
6
|
+
ALTER TYPE training_room_booking_requests_room_type_enum
|
|
7
|
+
ADD VALUE IF NOT EXISTS 'Training Room A2';
|
|
8
|
+
ALTER TYPE training_room_booking_requests_room_type_enum
|
|
9
|
+
ADD VALUE IF NOT EXISTS 'Lecture Hall (Al Masarat)';
|
|
10
|
+
ALTER TYPE training_room_booking_requests_room_type_enum
|
|
11
|
+
ADD VALUE IF NOT EXISTS 'computers Laboratory';
|
|
12
|
+
|
|
13
|
+
DO $$
|
|
14
|
+
BEGIN
|
|
15
|
+
IF NOT EXISTS (
|
|
16
|
+
SELECT 1 FROM pg_type
|
|
17
|
+
WHERE typname = 'training_room_booking_requests_booking_provider_entity_enum'
|
|
18
|
+
) THEN
|
|
19
|
+
CREATE TYPE training_room_booking_requests_booking_provider_entity_enum
|
|
20
|
+
AS ENUM ('Inside', 'Outside');
|
|
21
|
+
END IF;
|
|
22
|
+
END
|
|
23
|
+
$$;
|
|
24
|
+
|
|
25
|
+
DO $$
|
|
26
|
+
BEGIN
|
|
27
|
+
IF NOT EXISTS (
|
|
28
|
+
SELECT 1 FROM pg_type
|
|
29
|
+
WHERE typname = 'training_room_booking_requests_sector_enum'
|
|
30
|
+
) THEN
|
|
31
|
+
CREATE TYPE training_room_booking_requests_sector_enum
|
|
32
|
+
AS ENUM ('Government', 'Private');
|
|
33
|
+
END IF;
|
|
34
|
+
END
|
|
35
|
+
$$;
|
|
36
|
+
|
|
37
|
+
ALTER TABLE IF EXISTS training_room_booking_requests
|
|
38
|
+
ADD COLUMN IF NOT EXISTS booking_provider_entity
|
|
39
|
+
training_room_booking_requests_booking_provider_entity_enum NULL;
|
|
40
|
+
|
|
41
|
+
ALTER TABLE IF EXISTS training_room_booking_requests
|
|
42
|
+
ADD COLUMN IF NOT EXISTS sector
|
|
43
|
+
training_room_booking_requests_sector_enum NULL;
|
|
@@ -11,11 +11,25 @@ export enum TrainingRoomBookingRequestStatus {
|
|
|
11
11
|
|
|
12
12
|
export enum TrainingRoomBookingRoomType {
|
|
13
13
|
TRAINING_ROOMS_A = "Training Rooms (A1, A2)",
|
|
14
|
+
TRAINING_ROOM_A1 = "Training Room A1",
|
|
15
|
+
TRAINING_ROOM_A2 = "Training Room A2",
|
|
14
16
|
TRAINING_ROOMS_B = "Training Rooms (B1, B2)",
|
|
15
17
|
TRAINING_ROOMS_C = "Training Rooms (C1, C2)",
|
|
16
18
|
TRAINING_ROOMS_D = "Training Rooms (D1, D2)",
|
|
17
|
-
LECTURE_HALL = "Lecture Hall",
|
|
18
|
-
LABORATORY = "Laboratory"
|
|
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"
|
|
19
33
|
}
|
|
20
34
|
|
|
21
35
|
@Entity({ name: "training_room_booking_requests" })
|
|
@@ -57,6 +71,20 @@ export class TrainingRoomBookingRequest extends BaseModel {
|
|
|
57
71
|
})
|
|
58
72
|
room_type: TrainingRoomBookingRoomType;
|
|
59
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
|
+
|
|
60
88
|
@Column({ type: "boolean", default: false, nullable: false })
|
|
61
89
|
network_support_required: boolean;
|
|
62
90
|
|
|
@@ -92,6 +120,9 @@ export class TrainingRoomBookingRequest extends BaseModel {
|
|
|
92
120
|
@Column({ type: "varchar", length: 255, nullable: true })
|
|
93
121
|
workflow_execution_id: string | null;
|
|
94
122
|
|
|
123
|
+
@Column({ type: "varchar", length: 20, nullable: true })
|
|
124
|
+
reference_number: string | null;
|
|
125
|
+
|
|
95
126
|
constructor(
|
|
96
127
|
user_id: number,
|
|
97
128
|
purpose_of_training: string,
|
|
@@ -113,7 +144,9 @@ export class TrainingRoomBookingRequest extends BaseModel {
|
|
|
113
144
|
reviewer_user_id?: number | null,
|
|
114
145
|
assigned_to_user_id?: number | null,
|
|
115
146
|
assigned_at?: Date | null,
|
|
116
|
-
workflow_execution_id?: string | null
|
|
147
|
+
workflow_execution_id?: string | null,
|
|
148
|
+
booking_provider_entity?: TrainingRoomBookingProviderEntity | null,
|
|
149
|
+
sector?: TrainingRoomBookingSector | null
|
|
117
150
|
) {
|
|
118
151
|
super();
|
|
119
152
|
this.user_id = user_id;
|
|
@@ -122,6 +155,8 @@ export class TrainingRoomBookingRequest extends BaseModel {
|
|
|
122
155
|
this.start_time = start_time;
|
|
123
156
|
this.end_time = end_time;
|
|
124
157
|
this.room_type = room_type;
|
|
158
|
+
this.booking_provider_entity = booking_provider_entity ?? null;
|
|
159
|
+
this.sector = sector ?? null;
|
|
125
160
|
this.number_of_attendees = number_of_attendees;
|
|
126
161
|
this.network_support_required = network_support_required;
|
|
127
162
|
this.meals_required = meals_required;
|
|
@@ -137,6 +172,7 @@ export class TrainingRoomBookingRequest extends BaseModel {
|
|
|
137
172
|
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
138
173
|
this.assigned_at = assigned_at || null;
|
|
139
174
|
this.workflow_execution_id = workflow_execution_id || null;
|
|
175
|
+
this.reference_number = null;
|
|
140
176
|
}
|
|
141
177
|
}
|
|
142
178
|
|
|
@@ -5,6 +5,7 @@ export enum TrainingRoomBookingWorkFlowStatus {
|
|
|
5
5
|
COMPLETED = "Completed",
|
|
6
6
|
NOT_YET_STARTED = "Not Yet Started",
|
|
7
7
|
PENDING = "Pending",
|
|
8
|
+
IN_PROGRESS = "In Progress",
|
|
8
9
|
REJECTED = "Rejected"
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -37,6 +38,12 @@ export class TrainingRoomBookingWorkFlow extends BaseModel {
|
|
|
37
38
|
@Column({ type: "integer", nullable: true })
|
|
38
39
|
approved_by: number | null;
|
|
39
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
|
+
|
|
40
47
|
@Column({
|
|
41
48
|
type: "enum",
|
|
42
49
|
enum: TrainingRoomBookingWorkFlowStatus,
|