@platform-modules/civil-aviation-authority 2.3.330 → 2.3.331

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 CHANGED
@@ -174,6 +174,9 @@ export { StudyLeaveRequestChat } from './models/StudyLeaveChatModel';
174
174
  export { StudyLeaveMessageType } from './models/StudyLeaveChatModel';
175
175
  export { StudyLeaveChatStatus } from './models/StudyLeaveChatModel';
176
176
  export * from './models/AnnualTrainingPlanRequestModel';
177
+ export * from './models/AnnualTrainingPlanItemModel';
178
+ export * from './models/AnnualTrainingPlanDepartmentPlanModel';
179
+ export * from './models/AnnualTrainingPlanDepartmentPlanDecisionModel';
177
180
  export * from './models/AnnualTrainingPlanWorkflowModel';
178
181
  export * from './models/AnnualTrainingPlanApprovalModel';
179
182
  export * from './models/AnnualTrainingPlanChatModel';
package/dist/index.js CHANGED
@@ -235,6 +235,9 @@ Object.defineProperty(exports, "StudyLeaveMessageType", { enumerable: true, get:
235
235
  var StudyLeaveChatModel_3 = require("./models/StudyLeaveChatModel");
236
236
  Object.defineProperty(exports, "StudyLeaveChatStatus", { enumerable: true, get: function () { return StudyLeaveChatModel_3.StudyLeaveChatStatus; } });
237
237
  __exportStar(require("./models/AnnualTrainingPlanRequestModel"), exports);
238
+ __exportStar(require("./models/AnnualTrainingPlanItemModel"), exports);
239
+ __exportStar(require("./models/AnnualTrainingPlanDepartmentPlanModel"), exports);
240
+ __exportStar(require("./models/AnnualTrainingPlanDepartmentPlanDecisionModel"), exports);
238
241
  __exportStar(require("./models/AnnualTrainingPlanWorkflowModel"), exports);
239
242
  __exportStar(require("./models/AnnualTrainingPlanApprovalModel"), exports);
240
243
  __exportStar(require("./models/AnnualTrainingPlanChatModel"), exports);
@@ -0,0 +1,10 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ import { AnnualTrainingPlanDepartmentPlan, AnnualTrainingPlanDepartmentPlanStatus } from "./AnnualTrainingPlanDepartmentPlanModel";
3
+ export declare class AnnualTrainingPlanDepartmentPlanDecision extends BaseModel {
4
+ department_plan_id: number;
5
+ approval_level: number;
6
+ status: AnnualTrainingPlanDepartmentPlanStatus;
7
+ comment: string | null;
8
+ decided_by: number | null;
9
+ department_plan: AnnualTrainingPlanDepartmentPlan;
10
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.AnnualTrainingPlanDepartmentPlanDecision = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ const AnnualTrainingPlanDepartmentPlanModel_1 = require("./AnnualTrainingPlanDepartmentPlanModel");
16
+ let AnnualTrainingPlanDepartmentPlanDecision = class AnnualTrainingPlanDepartmentPlanDecision extends BaseModel_1.BaseModel {
17
+ };
18
+ exports.AnnualTrainingPlanDepartmentPlanDecision = AnnualTrainingPlanDepartmentPlanDecision;
19
+ __decorate([
20
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
21
+ __metadata("design:type", Number)
22
+ ], AnnualTrainingPlanDepartmentPlanDecision.prototype, "department_plan_id", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
25
+ __metadata("design:type", Number)
26
+ ], AnnualTrainingPlanDepartmentPlanDecision.prototype, "approval_level", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.Column)({
29
+ type: "enum",
30
+ enum: AnnualTrainingPlanDepartmentPlanModel_1.AnnualTrainingPlanDepartmentPlanStatus,
31
+ nullable: false
32
+ }),
33
+ __metadata("design:type", String)
34
+ ], AnnualTrainingPlanDepartmentPlanDecision.prototype, "status", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)({ type: "text", nullable: true }),
37
+ __metadata("design:type", Object)
38
+ ], AnnualTrainingPlanDepartmentPlanDecision.prototype, "comment", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
41
+ __metadata("design:type", Object)
42
+ ], AnnualTrainingPlanDepartmentPlanDecision.prototype, "decided_by", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.ManyToOne)(() => AnnualTrainingPlanDepartmentPlanModel_1.AnnualTrainingPlanDepartmentPlan, { onDelete: "CASCADE" }),
45
+ (0, typeorm_1.JoinColumn)({ name: "department_plan_id" }),
46
+ __metadata("design:type", AnnualTrainingPlanDepartmentPlanModel_1.AnnualTrainingPlanDepartmentPlan)
47
+ ], AnnualTrainingPlanDepartmentPlanDecision.prototype, "department_plan", void 0);
48
+ exports.AnnualTrainingPlanDepartmentPlanDecision = AnnualTrainingPlanDepartmentPlanDecision = __decorate([
49
+ (0, typeorm_1.Entity)({ name: "annual_training_plan_department_plan_decisions" }),
50
+ (0, typeorm_1.Index)(["department_plan_id", "approval_level"])
51
+ ], AnnualTrainingPlanDepartmentPlanDecision);
@@ -0,0 +1,13 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ import { AnnualTrainingPlanRequest } from "./AnnualTrainingPlanRequestModel";
3
+ export declare enum AnnualTrainingPlanDepartmentPlanStatus {
4
+ PENDING = "Pending",
5
+ APPROVED = "Approved",
6
+ REJECTED = "Rejected"
7
+ }
8
+ export declare class AnnualTrainingPlanDepartmentPlan extends BaseModel {
9
+ request_id: number;
10
+ department_id: number;
11
+ status: AnnualTrainingPlanDepartmentPlanStatus;
12
+ request: AnnualTrainingPlanRequest;
13
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.AnnualTrainingPlanDepartmentPlan = exports.AnnualTrainingPlanDepartmentPlanStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ const AnnualTrainingPlanRequestModel_1 = require("./AnnualTrainingPlanRequestModel");
16
+ var AnnualTrainingPlanDepartmentPlanStatus;
17
+ (function (AnnualTrainingPlanDepartmentPlanStatus) {
18
+ AnnualTrainingPlanDepartmentPlanStatus["PENDING"] = "Pending";
19
+ AnnualTrainingPlanDepartmentPlanStatus["APPROVED"] = "Approved";
20
+ AnnualTrainingPlanDepartmentPlanStatus["REJECTED"] = "Rejected";
21
+ })(AnnualTrainingPlanDepartmentPlanStatus || (exports.AnnualTrainingPlanDepartmentPlanStatus = AnnualTrainingPlanDepartmentPlanStatus = {}));
22
+ let AnnualTrainingPlanDepartmentPlan = class AnnualTrainingPlanDepartmentPlan extends BaseModel_1.BaseModel {
23
+ };
24
+ exports.AnnualTrainingPlanDepartmentPlan = AnnualTrainingPlanDepartmentPlan;
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
27
+ __metadata("design:type", Number)
28
+ ], AnnualTrainingPlanDepartmentPlan.prototype, "request_id", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
31
+ __metadata("design:type", Number)
32
+ ], AnnualTrainingPlanDepartmentPlan.prototype, "department_id", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({
35
+ type: "enum",
36
+ enum: AnnualTrainingPlanDepartmentPlanStatus,
37
+ default: AnnualTrainingPlanDepartmentPlanStatus.PENDING,
38
+ nullable: false
39
+ }),
40
+ __metadata("design:type", String)
41
+ ], AnnualTrainingPlanDepartmentPlan.prototype, "status", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.ManyToOne)(() => AnnualTrainingPlanRequestModel_1.AnnualTrainingPlanRequest, { onDelete: "CASCADE" }),
44
+ (0, typeorm_1.JoinColumn)({ name: "request_id" }),
45
+ __metadata("design:type", AnnualTrainingPlanRequestModel_1.AnnualTrainingPlanRequest)
46
+ ], AnnualTrainingPlanDepartmentPlan.prototype, "request", void 0);
47
+ exports.AnnualTrainingPlanDepartmentPlan = AnnualTrainingPlanDepartmentPlan = __decorate([
48
+ (0, typeorm_1.Entity)({ name: "annual_training_plan_department_plans" }),
49
+ (0, typeorm_1.Index)(["request_id"])
50
+ ], AnnualTrainingPlanDepartmentPlan);
@@ -0,0 +1,22 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ import { AnnualTrainingPlanPlace, AnnualTrainingPlanRequest } from "./AnnualTrainingPlanRequestModel";
3
+ export declare class AnnualTrainingPlanItem extends BaseModel {
4
+ request_id: number;
5
+ department_plan_id: number | null;
6
+ row_number: number;
7
+ department_id: number;
8
+ section_id: number | null;
9
+ course_name: string;
10
+ no_of_participants: number;
11
+ course_cost: number;
12
+ total_cost: number;
13
+ proposed_implementation_date: string;
14
+ description: string;
15
+ reason: string;
16
+ job_competency: string | null;
17
+ place: AnnualTrainingPlanPlace | null;
18
+ location: string | null;
19
+ name_of_participants: string[] | null;
20
+ employee_list: any[] | null;
21
+ request: AnnualTrainingPlanRequest;
22
+ }
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.AnnualTrainingPlanItem = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ const AnnualTrainingPlanRequestModel_1 = require("./AnnualTrainingPlanRequestModel");
16
+ let AnnualTrainingPlanItem = class AnnualTrainingPlanItem extends BaseModel_1.BaseModel {
17
+ };
18
+ exports.AnnualTrainingPlanItem = AnnualTrainingPlanItem;
19
+ __decorate([
20
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
21
+ __metadata("design:type", Number)
22
+ ], AnnualTrainingPlanItem.prototype, "request_id", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
25
+ __metadata("design:type", Object)
26
+ ], AnnualTrainingPlanItem.prototype, "department_plan_id", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
29
+ __metadata("design:type", Number)
30
+ ], AnnualTrainingPlanItem.prototype, "row_number", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
33
+ __metadata("design:type", Number)
34
+ ], AnnualTrainingPlanItem.prototype, "department_id", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
37
+ __metadata("design:type", Object)
38
+ ], AnnualTrainingPlanItem.prototype, "section_id", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
41
+ __metadata("design:type", String)
42
+ ], AnnualTrainingPlanItem.prototype, "course_name", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
45
+ __metadata("design:type", Number)
46
+ ], AnnualTrainingPlanItem.prototype, "no_of_participants", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 2, nullable: false }),
49
+ __metadata("design:type", Number)
50
+ ], AnnualTrainingPlanItem.prototype, "course_cost", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({ type: "decimal", precision: 14, scale: 2, nullable: false }),
53
+ __metadata("design:type", Number)
54
+ ], AnnualTrainingPlanItem.prototype, "total_cost", void 0);
55
+ __decorate([
56
+ (0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: false }),
57
+ __metadata("design:type", String)
58
+ ], AnnualTrainingPlanItem.prototype, "proposed_implementation_date", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)({ type: "text", nullable: false }),
61
+ __metadata("design:type", String)
62
+ ], AnnualTrainingPlanItem.prototype, "description", void 0);
63
+ __decorate([
64
+ (0, typeorm_1.Column)({ type: "text", nullable: false }),
65
+ __metadata("design:type", String)
66
+ ], AnnualTrainingPlanItem.prototype, "reason", void 0);
67
+ __decorate([
68
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
69
+ __metadata("design:type", Object)
70
+ ], AnnualTrainingPlanItem.prototype, "job_competency", void 0);
71
+ __decorate([
72
+ (0, typeorm_1.Column)({
73
+ type: "enum",
74
+ enum: AnnualTrainingPlanRequestModel_1.AnnualTrainingPlanPlace,
75
+ nullable: true
76
+ }),
77
+ __metadata("design:type", Object)
78
+ ], AnnualTrainingPlanItem.prototype, "place", void 0);
79
+ __decorate([
80
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
81
+ __metadata("design:type", Object)
82
+ ], AnnualTrainingPlanItem.prototype, "location", void 0);
83
+ __decorate([
84
+ (0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
85
+ __metadata("design:type", Object)
86
+ ], AnnualTrainingPlanItem.prototype, "name_of_participants", void 0);
87
+ __decorate([
88
+ (0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
89
+ __metadata("design:type", Object)
90
+ ], AnnualTrainingPlanItem.prototype, "employee_list", void 0);
91
+ __decorate([
92
+ (0, typeorm_1.ManyToOne)(() => AnnualTrainingPlanRequestModel_1.AnnualTrainingPlanRequest, { onDelete: "CASCADE" }),
93
+ (0, typeorm_1.JoinColumn)({ name: "request_id" }),
94
+ __metadata("design:type", AnnualTrainingPlanRequestModel_1.AnnualTrainingPlanRequest)
95
+ ], AnnualTrainingPlanItem.prototype, "request", void 0);
96
+ exports.AnnualTrainingPlanItem = AnnualTrainingPlanItem = __decorate([
97
+ (0, typeorm_1.Entity)({ name: "annual_training_plan_items" }),
98
+ (0, typeorm_1.Unique)(["request_id", "row_number"]),
99
+ (0, typeorm_1.Index)(["request_id"]),
100
+ (0, typeorm_1.Index)(["department_id"])
101
+ ], AnnualTrainingPlanItem);
@@ -10,6 +10,15 @@ export declare enum AnnualTrainingPlanPlace {
10
10
  INSIDE = "Inside",
11
11
  OUTSIDE = "Outside"
12
12
  }
13
+ export declare enum AnnualTrainingPlanImportStatus {
14
+ VALIDATED = "Validated",
15
+ IMPORTED = "Imported",
16
+ FAILED = "Failed"
17
+ }
18
+ export declare enum AnnualTrainingPlanSubmissionSource {
19
+ EXCEL = "Excel",
20
+ DIRECT = "Direct"
21
+ }
13
22
  export declare class AnnualTrainingPlanRequest extends BaseModel {
14
23
  req_user_department_id: number | null;
15
24
  req_user_section_id: number | null;
@@ -17,23 +26,22 @@ export declare class AnnualTrainingPlanRequest extends BaseModel {
17
26
  service_id: number | null;
18
27
  sub_service_id: number | null;
19
28
  user_id: number;
20
- course_name: string;
21
- no_of_participants: number;
22
- course_cost: number;
23
29
  total_cost: number;
24
- proposed_implementation_date: string;
25
- description: string;
26
- place: AnnualTrainingPlanPlace | null;
27
- location: string | null;
28
- reason: string;
29
- employee_list: any[] | null;
30
30
  status: AnnualTrainingPlanRequestStatus;
31
31
  reviewer_user_id: number | null;
32
32
  assigned_to_user_id: number | null;
33
33
  assigned_at: Date | null;
34
34
  workflow_execution_id: string | null;
35
- job_competency: string | null;
36
- name_of_participants: string[] | null;
37
35
  directarate: string | null;
38
- constructor(user_id: number, course_name: string, no_of_participants: number, course_cost: number, total_cost: number, proposed_implementation_date: string, description: string, place: AnnualTrainingPlanPlace | null, reason: string, status?: AnnualTrainingPlanRequestStatus, 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, location?: string | null, employee_list?: any[] | null, reviewer_user_id?: number | null, assigned_to_user_id?: number | null, assigned_at?: Date | null, workflow_execution_id?: string | null, job_competency?: string | null, name_of_participants?: string[] | null, directarate?: string | null);
36
+ plan_name: string | null;
37
+ plan_number: string | null;
38
+ plan_year: number | null;
39
+ source_file_url: string | null;
40
+ source_file_name: string | null;
41
+ total_departments: number;
42
+ total_courses: number;
43
+ total_participants: number;
44
+ import_status: AnnualTrainingPlanImportStatus | null;
45
+ submission_source: AnnualTrainingPlanSubmissionSource | null;
46
+ constructor(user_id: number, status?: AnnualTrainingPlanRequestStatus, 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, reviewer_user_id?: number | null, assigned_to_user_id?: number | null, assigned_at?: Date | null, workflow_execution_id?: string | null, directarate?: string | null);
39
47
  }
@@ -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.AnnualTrainingPlanRequest = exports.AnnualTrainingPlanPlace = exports.AnnualTrainingPlanRequestStatus = void 0;
12
+ exports.AnnualTrainingPlanRequest = exports.AnnualTrainingPlanSubmissionSource = exports.AnnualTrainingPlanImportStatus = exports.AnnualTrainingPlanPlace = exports.AnnualTrainingPlanRequestStatus = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
15
  var AnnualTrainingPlanRequestStatus;
@@ -25,33 +25,43 @@ var AnnualTrainingPlanPlace;
25
25
  AnnualTrainingPlanPlace["INSIDE"] = "Inside";
26
26
  AnnualTrainingPlanPlace["OUTSIDE"] = "Outside";
27
27
  })(AnnualTrainingPlanPlace || (exports.AnnualTrainingPlanPlace = AnnualTrainingPlanPlace = {}));
28
+ var AnnualTrainingPlanImportStatus;
29
+ (function (AnnualTrainingPlanImportStatus) {
30
+ AnnualTrainingPlanImportStatus["VALIDATED"] = "Validated";
31
+ AnnualTrainingPlanImportStatus["IMPORTED"] = "Imported";
32
+ AnnualTrainingPlanImportStatus["FAILED"] = "Failed";
33
+ })(AnnualTrainingPlanImportStatus || (exports.AnnualTrainingPlanImportStatus = AnnualTrainingPlanImportStatus = {}));
34
+ var AnnualTrainingPlanSubmissionSource;
35
+ (function (AnnualTrainingPlanSubmissionSource) {
36
+ AnnualTrainingPlanSubmissionSource["EXCEL"] = "Excel";
37
+ AnnualTrainingPlanSubmissionSource["DIRECT"] = "Direct";
38
+ })(AnnualTrainingPlanSubmissionSource || (exports.AnnualTrainingPlanSubmissionSource = AnnualTrainingPlanSubmissionSource = {}));
28
39
  let AnnualTrainingPlanRequest = class AnnualTrainingPlanRequest extends BaseModel_1.BaseModel {
29
- constructor(user_id, course_name, no_of_participants, course_cost, total_cost, proposed_implementation_date, description, place, reason, status = AnnualTrainingPlanRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, location, employee_list, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id, job_competency, name_of_participants, directarate) {
40
+ constructor(user_id, status = AnnualTrainingPlanRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id, directarate) {
30
41
  super();
31
42
  this.user_id = user_id;
32
- this.course_name = course_name;
33
- this.no_of_participants = no_of_participants;
34
- this.course_cost = course_cost;
35
- this.total_cost = total_cost;
36
- this.proposed_implementation_date = proposed_implementation_date;
37
- this.description = description;
38
- this.place = place;
39
- this.reason = reason;
43
+ this.total_cost = 0;
40
44
  this.status = status;
41
45
  this.service_id = service_id || null;
42
46
  this.sub_service_id = sub_service_id || null;
43
47
  this.req_user_department_id = req_user_department_id || null;
44
48
  this.req_user_section_id = req_user_section_id || null;
45
49
  this.req_user_position_id = req_user_position_id || null;
46
- this.location = location || null;
47
- this.employee_list = employee_list || null;
48
50
  this.reviewer_user_id = reviewer_user_id || null;
49
51
  this.assigned_to_user_id = assigned_to_user_id || null;
50
52
  this.assigned_at = assigned_at || null;
51
53
  this.workflow_execution_id = workflow_execution_id || null;
52
- this.job_competency = job_competency ?? null;
53
- this.name_of_participants = name_of_participants ?? null;
54
54
  this.directarate = directarate ?? null;
55
+ this.plan_name = null;
56
+ this.plan_number = null;
57
+ this.plan_year = null;
58
+ this.source_file_url = null;
59
+ this.source_file_name = null;
60
+ this.total_departments = 0;
61
+ this.total_courses = 0;
62
+ this.total_participants = 0;
63
+ this.import_status = null;
64
+ this.submission_source = null;
55
65
  }
56
66
  };
57
67
  exports.AnnualTrainingPlanRequest = AnnualTrainingPlanRequest;
@@ -80,49 +90,9 @@ __decorate([
80
90
  __metadata("design:type", Number)
81
91
  ], AnnualTrainingPlanRequest.prototype, "user_id", void 0);
82
92
  __decorate([
83
- (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
84
- __metadata("design:type", String)
85
- ], AnnualTrainingPlanRequest.prototype, "course_name", void 0);
86
- __decorate([
87
- (0, typeorm_1.Column)({ type: "integer", nullable: false }),
88
- __metadata("design:type", Number)
89
- ], AnnualTrainingPlanRequest.prototype, "no_of_participants", void 0);
90
- __decorate([
91
- (0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 2, nullable: false }),
92
- __metadata("design:type", Number)
93
- ], AnnualTrainingPlanRequest.prototype, "course_cost", void 0);
94
- __decorate([
95
- (0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 2, nullable: false }),
93
+ (0, typeorm_1.Column)({ type: "decimal", precision: 14, scale: 2, nullable: false, default: 0 }),
96
94
  __metadata("design:type", Number)
97
95
  ], AnnualTrainingPlanRequest.prototype, "total_cost", void 0);
98
- __decorate([
99
- (0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: false, default: "" }),
100
- __metadata("design:type", String)
101
- ], AnnualTrainingPlanRequest.prototype, "proposed_implementation_date", void 0);
102
- __decorate([
103
- (0, typeorm_1.Column)({ type: "text", nullable: false }),
104
- __metadata("design:type", String)
105
- ], AnnualTrainingPlanRequest.prototype, "description", void 0);
106
- __decorate([
107
- (0, typeorm_1.Column)({
108
- type: "enum",
109
- enum: AnnualTrainingPlanPlace,
110
- nullable: true
111
- }),
112
- __metadata("design:type", Object)
113
- ], AnnualTrainingPlanRequest.prototype, "place", void 0);
114
- __decorate([
115
- (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
116
- __metadata("design:type", Object)
117
- ], AnnualTrainingPlanRequest.prototype, "location", void 0);
118
- __decorate([
119
- (0, typeorm_1.Column)({ type: "text", nullable: false }),
120
- __metadata("design:type", String)
121
- ], AnnualTrainingPlanRequest.prototype, "reason", void 0);
122
- __decorate([
123
- (0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
124
- __metadata("design:type", Object)
125
- ], AnnualTrainingPlanRequest.prototype, "employee_list", void 0);
126
96
  __decorate([
127
97
  (0, typeorm_1.Column)({
128
98
  type: "enum",
@@ -151,16 +121,56 @@ __decorate([
151
121
  __decorate([
152
122
  (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
153
123
  __metadata("design:type", Object)
154
- ], AnnualTrainingPlanRequest.prototype, "job_competency", void 0);
124
+ ], AnnualTrainingPlanRequest.prototype, "directarate", void 0);
125
+ __decorate([
126
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
127
+ __metadata("design:type", Object)
128
+ ], AnnualTrainingPlanRequest.prototype, "plan_name", void 0);
129
+ __decorate([
130
+ (0, typeorm_1.Column)({ type: "varchar", length: 30, nullable: true, unique: true }),
131
+ __metadata("design:type", Object)
132
+ ], AnnualTrainingPlanRequest.prototype, "plan_number", void 0);
133
+ __decorate([
134
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
135
+ __metadata("design:type", Object)
136
+ ], AnnualTrainingPlanRequest.prototype, "plan_year", void 0);
155
137
  __decorate([
156
- (0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
138
+ (0, typeorm_1.Column)({ type: "varchar", length: 1000, nullable: true }),
157
139
  __metadata("design:type", Object)
158
- ], AnnualTrainingPlanRequest.prototype, "name_of_participants", void 0);
140
+ ], AnnualTrainingPlanRequest.prototype, "source_file_url", void 0);
159
141
  __decorate([
160
142
  (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
161
143
  __metadata("design:type", Object)
162
- ], AnnualTrainingPlanRequest.prototype, "directarate", void 0);
144
+ ], AnnualTrainingPlanRequest.prototype, "source_file_name", void 0);
145
+ __decorate([
146
+ (0, typeorm_1.Column)({ type: "integer", nullable: false, default: 0 }),
147
+ __metadata("design:type", Number)
148
+ ], AnnualTrainingPlanRequest.prototype, "total_departments", void 0);
149
+ __decorate([
150
+ (0, typeorm_1.Column)({ type: "integer", nullable: false, default: 0 }),
151
+ __metadata("design:type", Number)
152
+ ], AnnualTrainingPlanRequest.prototype, "total_courses", void 0);
153
+ __decorate([
154
+ (0, typeorm_1.Column)({ type: "integer", nullable: false, default: 0 }),
155
+ __metadata("design:type", Number)
156
+ ], AnnualTrainingPlanRequest.prototype, "total_participants", void 0);
157
+ __decorate([
158
+ (0, typeorm_1.Column)({
159
+ type: "enum",
160
+ enum: AnnualTrainingPlanImportStatus,
161
+ nullable: true
162
+ }),
163
+ __metadata("design:type", Object)
164
+ ], AnnualTrainingPlanRequest.prototype, "import_status", void 0);
165
+ __decorate([
166
+ (0, typeorm_1.Column)({
167
+ type: "enum",
168
+ enum: AnnualTrainingPlanSubmissionSource,
169
+ nullable: true
170
+ }),
171
+ __metadata("design:type", Object)
172
+ ], AnnualTrainingPlanRequest.prototype, "submission_source", void 0);
163
173
  exports.AnnualTrainingPlanRequest = AnnualTrainingPlanRequest = __decorate([
164
174
  (0, typeorm_1.Entity)({ name: "annual_training_plan_requests" }),
165
- __metadata("design:paramtypes", [Number, String, Number, Number, Number, String, String, Object, String, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])
175
+ __metadata("design:paramtypes", [Number, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])
166
176
  ], AnnualTrainingPlanRequest);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.3.330",
3
+ "version": "2.3.331",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -1,19 +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;
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;