@platform-modules/civil-aviation-authority 2.3.329 → 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.
@@ -50,5 +50,6 @@ export declare class TrainingRoomBookingRequest extends BaseModel {
50
50
  assigned_to_user_id: number | null;
51
51
  assigned_at: Date | null;
52
52
  workflow_execution_id: string | null;
53
+ reference_number: string | null;
53
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);
54
55
  }
@@ -69,6 +69,7 @@ let TrainingRoomBookingRequest = class TrainingRoomBookingRequest extends BaseMo
69
69
  this.assigned_to_user_id = assigned_to_user_id || null;
70
70
  this.assigned_at = assigned_at || null;
71
71
  this.workflow_execution_id = workflow_execution_id || null;
72
+ this.reference_number = null;
72
73
  }
73
74
  };
74
75
  exports.TrainingRoomBookingRequest = TrainingRoomBookingRequest;
@@ -181,6 +182,10 @@ __decorate([
181
182
  (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
182
183
  __metadata("design:type", Object)
183
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);
184
189
  exports.TrainingRoomBookingRequest = TrainingRoomBookingRequest = __decorate([
185
190
  (0, typeorm_1.Entity)({ name: "training_room_booking_requests" }),
186
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])
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.3.329",
3
+ "version": "2.3.330",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -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;
@@ -120,6 +120,9 @@ export class TrainingRoomBookingRequest extends BaseModel {
120
120
  @Column({ type: "varchar", length: 255, nullable: true })
121
121
  workflow_execution_id: string | null;
122
122
 
123
+ @Column({ type: "varchar", length: 20, nullable: true })
124
+ reference_number: string | null;
125
+
123
126
  constructor(
124
127
  user_id: number,
125
128
  purpose_of_training: string,
@@ -169,6 +172,7 @@ export class TrainingRoomBookingRequest extends BaseModel {
169
172
  this.assigned_to_user_id = assigned_to_user_id || null;
170
173
  this.assigned_at = assigned_at || null;
171
174
  this.workflow_execution_id = workflow_execution_id || null;
175
+ this.reference_number = null;
172
176
  }
173
177
  }
174
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,