@platform-modules/civil-aviation-authority 2.3.334 → 2.3.336
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 +3 -0
- package/dist/index.js +3 -0
- package/dist/models/AnnualTrainingPlanDepartmentPlanDecisionModel.d.ts +10 -0
- package/dist/models/AnnualTrainingPlanDepartmentPlanDecisionModel.js +51 -0
- package/dist/models/AnnualTrainingPlanDepartmentPlanModel.d.ts +13 -0
- package/dist/models/AnnualTrainingPlanDepartmentPlanModel.js +50 -0
- package/dist/models/AnnualTrainingPlanItemModel.d.ts +22 -0
- package/dist/models/AnnualTrainingPlanItemModel.js +101 -0
- package/dist/models/AnnualTrainingPlanRequestModel.d.ts +21 -12
- package/dist/models/AnnualTrainingPlanRequestModel.js +75 -60
- package/dist/models/CyberSecurityRiskManagementRiskModel.d.ts +3 -0
- package/dist/models/CyberSecurityRiskManagementRiskModel.js +12 -0
- package/package.json +1 -1
- package/sql/add_csrm_risk_tracking_fields.sql +4 -1
- package/src/models/CyberSecurityRiskManagementRiskModel.ts +9 -0
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,23 @@ 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
|
-
|
|
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
|
+
reference_number: string | null;
|
|
47
|
+
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
48
|
}
|
|
@@ -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,44 @@ 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,
|
|
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.
|
|
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;
|
|
65
|
+
this.reference_number = null;
|
|
55
66
|
}
|
|
56
67
|
};
|
|
57
68
|
exports.AnnualTrainingPlanRequest = AnnualTrainingPlanRequest;
|
|
@@ -80,49 +91,9 @@ __decorate([
|
|
|
80
91
|
__metadata("design:type", Number)
|
|
81
92
|
], AnnualTrainingPlanRequest.prototype, "user_id", void 0);
|
|
82
93
|
__decorate([
|
|
83
|
-
(0, typeorm_1.Column)({ type: "
|
|
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 }),
|
|
94
|
+
(0, typeorm_1.Column)({ type: "decimal", precision: 14, scale: 2, nullable: false, default: 0 }),
|
|
96
95
|
__metadata("design:type", Number)
|
|
97
96
|
], 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
97
|
__decorate([
|
|
127
98
|
(0, typeorm_1.Column)({
|
|
128
99
|
type: "enum",
|
|
@@ -151,16 +122,60 @@ __decorate([
|
|
|
151
122
|
__decorate([
|
|
152
123
|
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
153
124
|
__metadata("design:type", Object)
|
|
154
|
-
], AnnualTrainingPlanRequest.prototype, "
|
|
125
|
+
], AnnualTrainingPlanRequest.prototype, "directarate", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
128
|
+
__metadata("design:type", Object)
|
|
129
|
+
], AnnualTrainingPlanRequest.prototype, "plan_name", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 30, nullable: true, unique: true }),
|
|
132
|
+
__metadata("design:type", Object)
|
|
133
|
+
], AnnualTrainingPlanRequest.prototype, "plan_number", void 0);
|
|
155
134
|
__decorate([
|
|
156
|
-
(0, typeorm_1.Column)({ type: "
|
|
135
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
157
136
|
__metadata("design:type", Object)
|
|
158
|
-
], AnnualTrainingPlanRequest.prototype, "
|
|
137
|
+
], AnnualTrainingPlanRequest.prototype, "plan_year", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 1000, nullable: true }),
|
|
140
|
+
__metadata("design:type", Object)
|
|
141
|
+
], AnnualTrainingPlanRequest.prototype, "source_file_url", void 0);
|
|
159
142
|
__decorate([
|
|
160
143
|
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
161
144
|
__metadata("design:type", Object)
|
|
162
|
-
], AnnualTrainingPlanRequest.prototype, "
|
|
145
|
+
], AnnualTrainingPlanRequest.prototype, "source_file_name", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false, default: 0 }),
|
|
148
|
+
__metadata("design:type", Number)
|
|
149
|
+
], AnnualTrainingPlanRequest.prototype, "total_departments", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false, default: 0 }),
|
|
152
|
+
__metadata("design:type", Number)
|
|
153
|
+
], AnnualTrainingPlanRequest.prototype, "total_courses", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false, default: 0 }),
|
|
156
|
+
__metadata("design:type", Number)
|
|
157
|
+
], AnnualTrainingPlanRequest.prototype, "total_participants", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
(0, typeorm_1.Column)({
|
|
160
|
+
type: "enum",
|
|
161
|
+
enum: AnnualTrainingPlanImportStatus,
|
|
162
|
+
nullable: true
|
|
163
|
+
}),
|
|
164
|
+
__metadata("design:type", Object)
|
|
165
|
+
], AnnualTrainingPlanRequest.prototype, "import_status", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, typeorm_1.Column)({
|
|
168
|
+
type: "enum",
|
|
169
|
+
enum: AnnualTrainingPlanSubmissionSource,
|
|
170
|
+
nullable: true
|
|
171
|
+
}),
|
|
172
|
+
__metadata("design:type", Object)
|
|
173
|
+
], AnnualTrainingPlanRequest.prototype, "submission_source", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true, unique: true }),
|
|
176
|
+
__metadata("design:type", Object)
|
|
177
|
+
], AnnualTrainingPlanRequest.prototype, "reference_number", void 0);
|
|
163
178
|
exports.AnnualTrainingPlanRequest = AnnualTrainingPlanRequest = __decorate([
|
|
164
179
|
(0, typeorm_1.Entity)({ name: "annual_training_plan_requests" }),
|
|
165
|
-
__metadata("design:paramtypes", [Number, String,
|
|
180
|
+
__metadata("design:paramtypes", [Number, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])
|
|
166
181
|
], AnnualTrainingPlanRequest);
|
|
@@ -23,6 +23,9 @@ export declare class CyberSecurityRiskManagementRisk extends BaseModel {
|
|
|
23
23
|
likelihood: number;
|
|
24
24
|
business_impact: number;
|
|
25
25
|
risk_value: number;
|
|
26
|
+
new_likelihood: number | null;
|
|
27
|
+
new_business_impact: number | null;
|
|
28
|
+
new_risk_value: number | null;
|
|
26
29
|
existing_controls: string;
|
|
27
30
|
start_date: Date;
|
|
28
31
|
end_date: Date;
|
|
@@ -78,6 +78,18 @@ __decorate([
|
|
|
78
78
|
(0, typeorm_1.Column)({ type: "decimal", precision: 18, scale: 4, nullable: false }),
|
|
79
79
|
__metadata("design:type", Number)
|
|
80
80
|
], CyberSecurityRiskManagementRisk.prototype, "risk_value", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
83
|
+
__metadata("design:type", Object)
|
|
84
|
+
], CyberSecurityRiskManagementRisk.prototype, "new_likelihood", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
87
|
+
__metadata("design:type", Object)
|
|
88
|
+
], CyberSecurityRiskManagementRisk.prototype, "new_business_impact", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.Column)({ type: "decimal", precision: 18, scale: 4, nullable: true }),
|
|
91
|
+
__metadata("design:type", Object)
|
|
92
|
+
], CyberSecurityRiskManagementRisk.prototype, "new_risk_value", void 0);
|
|
81
93
|
__decorate([
|
|
82
94
|
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
83
95
|
__metadata("design:type", String)
|
package/package.json
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
-- Cyber security risk management risks: tracking / closure fields
|
|
1
|
+
-- Cyber security risk management risks: tracking / closure / residual risk fields
|
|
2
2
|
ALTER TABLE cyber_security_risk_management_risks
|
|
3
|
+
ADD COLUMN IF NOT EXISTS new_likelihood INTEGER,
|
|
4
|
+
ADD COLUMN IF NOT EXISTS new_business_impact INTEGER,
|
|
5
|
+
ADD COLUMN IF NOT EXISTS new_risk_value NUMERIC(18, 4),
|
|
3
6
|
ADD COLUMN IF NOT EXISTS new_control TEXT,
|
|
4
7
|
ADD COLUMN IF NOT EXISTS actual_end_date DATE,
|
|
5
8
|
ADD COLUMN IF NOT EXISTS notes TEXT,
|
|
@@ -53,6 +53,15 @@ export class CyberSecurityRiskManagementRisk extends BaseModel {
|
|
|
53
53
|
@Column({ type: "decimal", precision: 18, scale: 4, nullable: false })
|
|
54
54
|
risk_value: number;
|
|
55
55
|
|
|
56
|
+
@Column({ type: "integer", nullable: true })
|
|
57
|
+
new_likelihood: number | null;
|
|
58
|
+
|
|
59
|
+
@Column({ type: "integer", nullable: true })
|
|
60
|
+
new_business_impact: number | null;
|
|
61
|
+
|
|
62
|
+
@Column({ type: "decimal", precision: 18, scale: 4, nullable: true })
|
|
63
|
+
new_risk_value: number | null;
|
|
64
|
+
|
|
56
65
|
@Column({ type: "text", nullable: false })
|
|
57
66
|
existing_controls: string;
|
|
58
67
|
|