@platform-modules/civil-aviation-authority 2.3.9 → 2.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data-source.js +0 -10
- package/dist/index.d.ts +0 -12
- package/dist/index.js +1 -21
- package/dist/models/ITApprovalSettings.d.ts +7 -0
- package/dist/models/ITApprovalSettings.js +40 -0
- package/dist/models/ITServicesTypesMuscatModel.d.ts +6 -0
- package/dist/models/ITServicesTypesMuscatModel.js +34 -0
- package/dist/models/ITServicesTypesSalalahModel.d.ts +6 -0
- package/dist/models/ITServicesTypesSalalahModel.js +34 -0
- package/dist/models/SecondmentRequestModel.d.ts +3 -2
- package/dist/models/SecondmentRequestModel.js +9 -4
- package/dist/models/TemporaryAssignmentRequestModel.d.ts +3 -2
- package/dist/models/TemporaryAssignmentRequestModel.js +9 -4
- package/dist/models/Workflows.d.ts +9 -0
- package/dist/models/Workflows.js +31 -0
- package/package.json +1 -1
- package/src/data-source.ts +0 -10
- package/src/index.ts +0 -12
- package/src/models/HrServiceRequestModel.ts +167 -167
- package/src/models/ITRequestChatModel.ts +62 -62
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/src/models/SecondmentRequestModel.ts +8 -3
- package/src/models/TemporaryAssignmentRequestModel.ts +8 -3
- package/dist/models/AnnualTrainingPlanApprovalModel.d.ts +0 -25
- package/dist/models/AnnualTrainingPlanApprovalModel.js +0 -107
- package/dist/models/AnnualTrainingPlanAttachmentModel.d.ts +0 -13
- package/dist/models/AnnualTrainingPlanAttachmentModel.js +0 -69
- package/dist/models/AnnualTrainingPlanChatModel.d.ts +0 -26
- package/dist/models/AnnualTrainingPlanChatModel.js +0 -89
- package/dist/models/AnnualTrainingPlanRequestModel.d.ts +0 -36
- package/dist/models/AnnualTrainingPlanRequestModel.js +0 -151
- package/dist/models/AnnualTrainingPlanWorkflowModel.d.ts +0 -19
- package/dist/models/AnnualTrainingPlanWorkflowModel.js +0 -81
- package/src/models/AnnualTrainingPlanApprovalModel.ts +0 -94
- package/src/models/AnnualTrainingPlanAttachmentModel.ts +0 -56
- package/src/models/AnnualTrainingPlanChatModel.ts +0 -76
- package/src/models/AnnualTrainingPlanRequestModel.ts +0 -138
- package/src/models/AnnualTrainingPlanWorkflowModel.ts +0 -68
|
@@ -1,151 +0,0 @@
|
|
|
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.AnnualTrainingPlanRequest = exports.AnnualTrainingPlanPlace = exports.AnnualTrainingPlanRequestStatus = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
var AnnualTrainingPlanRequestStatus;
|
|
16
|
-
(function (AnnualTrainingPlanRequestStatus) {
|
|
17
|
-
AnnualTrainingPlanRequestStatus["PENDING"] = "Pending";
|
|
18
|
-
AnnualTrainingPlanRequestStatus["IN_PROGRESS"] = "In Progress";
|
|
19
|
-
AnnualTrainingPlanRequestStatus["COMPLETED"] = "Completed";
|
|
20
|
-
AnnualTrainingPlanRequestStatus["APPROVED"] = "Approved";
|
|
21
|
-
AnnualTrainingPlanRequestStatus["REJECTED"] = "Rejected";
|
|
22
|
-
})(AnnualTrainingPlanRequestStatus || (exports.AnnualTrainingPlanRequestStatus = AnnualTrainingPlanRequestStatus = {}));
|
|
23
|
-
var AnnualTrainingPlanPlace;
|
|
24
|
-
(function (AnnualTrainingPlanPlace) {
|
|
25
|
-
AnnualTrainingPlanPlace["INSIDE"] = "Inside";
|
|
26
|
-
AnnualTrainingPlanPlace["OUTSIDE"] = "Outside";
|
|
27
|
-
})(AnnualTrainingPlanPlace || (exports.AnnualTrainingPlanPlace = AnnualTrainingPlanPlace = {}));
|
|
28
|
-
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) {
|
|
30
|
-
super();
|
|
31
|
-
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;
|
|
40
|
-
this.status = status;
|
|
41
|
-
this.service_id = service_id || null;
|
|
42
|
-
this.sub_service_id = sub_service_id || null;
|
|
43
|
-
this.req_user_department_id = req_user_department_id || null;
|
|
44
|
-
this.req_user_section_id = req_user_section_id || null;
|
|
45
|
-
this.req_user_position_id = req_user_position_id || null;
|
|
46
|
-
this.location = location || null;
|
|
47
|
-
this.employee_list = employee_list || null;
|
|
48
|
-
this.reviewer_user_id = reviewer_user_id || null;
|
|
49
|
-
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
50
|
-
this.assigned_at = assigned_at || null;
|
|
51
|
-
this.workflow_execution_id = workflow_execution_id || null;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
exports.AnnualTrainingPlanRequest = AnnualTrainingPlanRequest;
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
57
|
-
__metadata("design:type", Object)
|
|
58
|
-
], AnnualTrainingPlanRequest.prototype, "req_user_department_id", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
61
|
-
__metadata("design:type", Object)
|
|
62
|
-
], AnnualTrainingPlanRequest.prototype, "req_user_section_id", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
65
|
-
__metadata("design:type", Object)
|
|
66
|
-
], AnnualTrainingPlanRequest.prototype, "req_user_position_id", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
69
|
-
__metadata("design:type", Object)
|
|
70
|
-
], AnnualTrainingPlanRequest.prototype, "service_id", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
73
|
-
__metadata("design:type", Object)
|
|
74
|
-
], AnnualTrainingPlanRequest.prototype, "sub_service_id", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
77
|
-
__metadata("design:type", Number)
|
|
78
|
-
], AnnualTrainingPlanRequest.prototype, "user_id", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
81
|
-
__metadata("design:type", String)
|
|
82
|
-
], AnnualTrainingPlanRequest.prototype, "course_name", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
85
|
-
__metadata("design:type", Number)
|
|
86
|
-
], AnnualTrainingPlanRequest.prototype, "no_of_participants", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
(0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 2, nullable: false }),
|
|
89
|
-
__metadata("design:type", Number)
|
|
90
|
-
], AnnualTrainingPlanRequest.prototype, "course_cost", void 0);
|
|
91
|
-
__decorate([
|
|
92
|
-
(0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 2, nullable: false }),
|
|
93
|
-
__metadata("design:type", Number)
|
|
94
|
-
], AnnualTrainingPlanRequest.prototype, "total_cost", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
97
|
-
__metadata("design:type", Date)
|
|
98
|
-
], AnnualTrainingPlanRequest.prototype, "proposed_implementation_date", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
101
|
-
__metadata("design:type", String)
|
|
102
|
-
], AnnualTrainingPlanRequest.prototype, "description", void 0);
|
|
103
|
-
__decorate([
|
|
104
|
-
(0, typeorm_1.Column)({
|
|
105
|
-
type: "enum",
|
|
106
|
-
enum: AnnualTrainingPlanPlace,
|
|
107
|
-
nullable: false
|
|
108
|
-
}),
|
|
109
|
-
__metadata("design:type", String)
|
|
110
|
-
], AnnualTrainingPlanRequest.prototype, "place", void 0);
|
|
111
|
-
__decorate([
|
|
112
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
113
|
-
__metadata("design:type", Object)
|
|
114
|
-
], AnnualTrainingPlanRequest.prototype, "location", void 0);
|
|
115
|
-
__decorate([
|
|
116
|
-
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
117
|
-
__metadata("design:type", String)
|
|
118
|
-
], AnnualTrainingPlanRequest.prototype, "reason", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
(0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
|
|
121
|
-
__metadata("design:type", Object)
|
|
122
|
-
], AnnualTrainingPlanRequest.prototype, "employee_list", void 0);
|
|
123
|
-
__decorate([
|
|
124
|
-
(0, typeorm_1.Column)({
|
|
125
|
-
type: "enum",
|
|
126
|
-
enum: AnnualTrainingPlanRequestStatus,
|
|
127
|
-
default: AnnualTrainingPlanRequestStatus.PENDING,
|
|
128
|
-
nullable: false
|
|
129
|
-
}),
|
|
130
|
-
__metadata("design:type", String)
|
|
131
|
-
], AnnualTrainingPlanRequest.prototype, "status", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
134
|
-
__metadata("design:type", Object)
|
|
135
|
-
], AnnualTrainingPlanRequest.prototype, "reviewer_user_id", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
138
|
-
__metadata("design:type", Object)
|
|
139
|
-
], AnnualTrainingPlanRequest.prototype, "assigned_to_user_id", void 0);
|
|
140
|
-
__decorate([
|
|
141
|
-
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
142
|
-
__metadata("design:type", Object)
|
|
143
|
-
], AnnualTrainingPlanRequest.prototype, "assigned_at", void 0);
|
|
144
|
-
__decorate([
|
|
145
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
146
|
-
__metadata("design:type", Object)
|
|
147
|
-
], AnnualTrainingPlanRequest.prototype, "workflow_execution_id", void 0);
|
|
148
|
-
exports.AnnualTrainingPlanRequest = AnnualTrainingPlanRequest = __decorate([
|
|
149
|
-
(0, typeorm_1.Entity)({ name: "annual_training_plan_requests" }),
|
|
150
|
-
__metadata("design:paramtypes", [Number, String, Number, Number, Number, Date, String, String, String, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])
|
|
151
|
-
], AnnualTrainingPlanRequest);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from "./BaseModel";
|
|
2
|
-
export declare enum AnnualTrainingPlanWorkFlowStatus {
|
|
3
|
-
COMPLETED = "Completed",
|
|
4
|
-
NOT_YET_STARTED = "Not Yet Started",
|
|
5
|
-
PENDING = "Pending",
|
|
6
|
-
REJECTED = "Rejected"
|
|
7
|
-
}
|
|
8
|
-
export declare class AnnualTrainingPlanWorkFlow extends BaseModel {
|
|
9
|
-
request_id: number;
|
|
10
|
-
service_id: number | null;
|
|
11
|
-
sub_service_id: number | null;
|
|
12
|
-
order: number | null;
|
|
13
|
-
content: string;
|
|
14
|
-
approver_role_id: number | null;
|
|
15
|
-
approver_user_id: number | null;
|
|
16
|
-
approved_by: number | null;
|
|
17
|
-
status: AnnualTrainingPlanWorkFlowStatus;
|
|
18
|
-
constructor(request_id: number, content: string, status: AnnualTrainingPlanWorkFlowStatus, 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);
|
|
19
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
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.AnnualTrainingPlanWorkFlow = exports.AnnualTrainingPlanWorkFlowStatus = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
var AnnualTrainingPlanWorkFlowStatus;
|
|
16
|
-
(function (AnnualTrainingPlanWorkFlowStatus) {
|
|
17
|
-
AnnualTrainingPlanWorkFlowStatus["COMPLETED"] = "Completed";
|
|
18
|
-
AnnualTrainingPlanWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
19
|
-
AnnualTrainingPlanWorkFlowStatus["PENDING"] = "Pending";
|
|
20
|
-
AnnualTrainingPlanWorkFlowStatus["REJECTED"] = "Rejected";
|
|
21
|
-
})(AnnualTrainingPlanWorkFlowStatus || (exports.AnnualTrainingPlanWorkFlowStatus = AnnualTrainingPlanWorkFlowStatus = {}));
|
|
22
|
-
let AnnualTrainingPlanWorkFlow = class AnnualTrainingPlanWorkFlow extends BaseModel_1.BaseModel {
|
|
23
|
-
constructor(request_id, content, status, service_id, sub_service_id, order, approver_role_id, approver_user_id, approved_by) {
|
|
24
|
-
super();
|
|
25
|
-
this.request_id = request_id;
|
|
26
|
-
this.service_id = service_id || null;
|
|
27
|
-
this.sub_service_id = sub_service_id || null;
|
|
28
|
-
this.content = content;
|
|
29
|
-
this.status = status;
|
|
30
|
-
this.order = order || null;
|
|
31
|
-
this.approver_role_id = approver_role_id || null;
|
|
32
|
-
this.approver_user_id = approver_user_id || null;
|
|
33
|
-
this.approved_by = approved_by || null;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
exports.AnnualTrainingPlanWorkFlow = AnnualTrainingPlanWorkFlow;
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({ type: "int", nullable: false }),
|
|
39
|
-
__metadata("design:type", Number)
|
|
40
|
-
], AnnualTrainingPlanWorkFlow.prototype, "request_id", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
43
|
-
__metadata("design:type", Object)
|
|
44
|
-
], AnnualTrainingPlanWorkFlow.prototype, "service_id", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
47
|
-
__metadata("design:type", Object)
|
|
48
|
-
], AnnualTrainingPlanWorkFlow.prototype, "sub_service_id", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
51
|
-
__metadata("design:type", Object)
|
|
52
|
-
], AnnualTrainingPlanWorkFlow.prototype, "order", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], AnnualTrainingPlanWorkFlow.prototype, "content", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
59
|
-
__metadata("design:type", Object)
|
|
60
|
-
], AnnualTrainingPlanWorkFlow.prototype, "approver_role_id", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
63
|
-
__metadata("design:type", Object)
|
|
64
|
-
], AnnualTrainingPlanWorkFlow.prototype, "approver_user_id", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
67
|
-
__metadata("design:type", Object)
|
|
68
|
-
], AnnualTrainingPlanWorkFlow.prototype, "approved_by", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, typeorm_1.Column)({
|
|
71
|
-
type: "enum",
|
|
72
|
-
enum: AnnualTrainingPlanWorkFlowStatus,
|
|
73
|
-
default: AnnualTrainingPlanWorkFlowStatus.PENDING,
|
|
74
|
-
nullable: false
|
|
75
|
-
}),
|
|
76
|
-
__metadata("design:type", String)
|
|
77
|
-
], AnnualTrainingPlanWorkFlow.prototype, "status", void 0);
|
|
78
|
-
exports.AnnualTrainingPlanWorkFlow = AnnualTrainingPlanWorkFlow = __decorate([
|
|
79
|
-
(0, typeorm_1.Entity)({ name: "annual_training_plan_workflows" }),
|
|
80
|
-
__metadata("design:paramtypes", [Number, String, String, Object, Object, Number, Object, Object, Object])
|
|
81
|
-
], AnnualTrainingPlanWorkFlow);
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
export enum AnnualTrainingPlanApprovalStatus {
|
|
5
|
-
PENDING = "Pending",
|
|
6
|
-
IN_PROGRESS = "In Progress",
|
|
7
|
-
APPROVED = "Approved",
|
|
8
|
-
REJECTED = "Rejected",
|
|
9
|
-
ASSIGNED = "Assigned"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@Entity({ name: "annual_training_plan_approvals" })
|
|
13
|
-
export class AnnualTrainingPlanApprovalDetails extends BaseModel {
|
|
14
|
-
@Column({ type: "integer", nullable: false })
|
|
15
|
-
request_id: number;
|
|
16
|
-
|
|
17
|
-
@Column({ type: "integer", nullable: true })
|
|
18
|
-
service_id: number | null;
|
|
19
|
-
|
|
20
|
-
@Column({ type: "integer", nullable: true })
|
|
21
|
-
sub_service_id: number | null;
|
|
22
|
-
|
|
23
|
-
@Column({ type: "integer", nullable: false })
|
|
24
|
-
level: number;
|
|
25
|
-
|
|
26
|
-
@Column({ type: "integer", nullable: true })
|
|
27
|
-
approver_user_id: number | null;
|
|
28
|
-
|
|
29
|
-
@Column({ type: "integer", nullable: true })
|
|
30
|
-
approver_role_id: number | null;
|
|
31
|
-
|
|
32
|
-
@Column({ type: "integer", nullable: true })
|
|
33
|
-
department_id: number | null;
|
|
34
|
-
|
|
35
|
-
@Column({ type: "integer", nullable: true })
|
|
36
|
-
section_id: number | null;
|
|
37
|
-
|
|
38
|
-
@Column({ type: "integer", nullable: true })
|
|
39
|
-
delegate_user_id: number | null;
|
|
40
|
-
|
|
41
|
-
@Column({ type: "integer", nullable: true })
|
|
42
|
-
approved_by: number | null;
|
|
43
|
-
|
|
44
|
-
@Column({ type: "varchar", length: 255, nullable: true, default: "" })
|
|
45
|
-
comment: string;
|
|
46
|
-
|
|
47
|
-
@Column({
|
|
48
|
-
type: "enum",
|
|
49
|
-
enum: AnnualTrainingPlanApprovalStatus,
|
|
50
|
-
default: AnnualTrainingPlanApprovalStatus.PENDING,
|
|
51
|
-
nullable: false
|
|
52
|
-
})
|
|
53
|
-
approval_status: AnnualTrainingPlanApprovalStatus;
|
|
54
|
-
|
|
55
|
-
@Column({ type: "boolean", default: false, nullable: false })
|
|
56
|
-
is_manager: boolean;
|
|
57
|
-
|
|
58
|
-
@Column({ type: "boolean", default: true, nullable: false })
|
|
59
|
-
is_allowed: boolean;
|
|
60
|
-
|
|
61
|
-
constructor(
|
|
62
|
-
request_id: number,
|
|
63
|
-
approver_user_id: number | null,
|
|
64
|
-
approver_role_id: number | null,
|
|
65
|
-
comment: string,
|
|
66
|
-
approval_status: AnnualTrainingPlanApprovalStatus,
|
|
67
|
-
level: number,
|
|
68
|
-
service_id?: number | null,
|
|
69
|
-
sub_service_id?: number | null,
|
|
70
|
-
department_id?: number | null,
|
|
71
|
-
section_id?: number | null,
|
|
72
|
-
delegate_user_id?: number | null,
|
|
73
|
-
approved_by?: number | null,
|
|
74
|
-
is_manager?: boolean,
|
|
75
|
-
is_allowed?: boolean
|
|
76
|
-
) {
|
|
77
|
-
super();
|
|
78
|
-
this.request_id = request_id;
|
|
79
|
-
this.service_id = service_id || null;
|
|
80
|
-
this.sub_service_id = sub_service_id || null;
|
|
81
|
-
this.approver_user_id = approver_user_id;
|
|
82
|
-
this.approver_role_id = approver_role_id;
|
|
83
|
-
this.comment = comment;
|
|
84
|
-
this.approval_status = approval_status;
|
|
85
|
-
this.level = level;
|
|
86
|
-
this.department_id = department_id || null;
|
|
87
|
-
this.section_id = section_id || null;
|
|
88
|
-
this.delegate_user_id = delegate_user_id || null;
|
|
89
|
-
this.approved_by = approved_by || null;
|
|
90
|
-
this.is_manager = is_manager ?? false;
|
|
91
|
-
this.is_allowed = is_allowed !== undefined ? is_allowed : true;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
@Entity({ name: "annual_training_plan_request_attachments" })
|
|
5
|
-
export class AnnualTrainingPlanRequestAttachment extends BaseModel {
|
|
6
|
-
@Column({ type: "integer", nullable: false })
|
|
7
|
-
request_id: number;
|
|
8
|
-
|
|
9
|
-
@Column({ type: "integer", nullable: true })
|
|
10
|
-
service_id: number | null;
|
|
11
|
-
|
|
12
|
-
@Column({ type: "integer", nullable: true })
|
|
13
|
-
sub_service_id: number | null;
|
|
14
|
-
|
|
15
|
-
@Column({ type: "integer", nullable: false })
|
|
16
|
-
uploaded_by: number;
|
|
17
|
-
|
|
18
|
-
@Column({ type: "varchar", length: 500, nullable: false })
|
|
19
|
-
file_url: string;
|
|
20
|
-
|
|
21
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
22
|
-
file_name: string;
|
|
23
|
-
|
|
24
|
-
@Column({ type: "varchar", length: 100, nullable: true })
|
|
25
|
-
file_type: string;
|
|
26
|
-
|
|
27
|
-
@Column({ type: "bigint", nullable: true })
|
|
28
|
-
file_size: number | null;
|
|
29
|
-
|
|
30
|
-
@Column({ type: "text", nullable: true })
|
|
31
|
-
description: string;
|
|
32
|
-
|
|
33
|
-
constructor(
|
|
34
|
-
request_id: number,
|
|
35
|
-
uploaded_by: number,
|
|
36
|
-
file_url: string,
|
|
37
|
-
service_id?: number | null,
|
|
38
|
-
sub_service_id?: number | null,
|
|
39
|
-
file_name?: string,
|
|
40
|
-
file_type?: string,
|
|
41
|
-
file_size?: number,
|
|
42
|
-
description?: string
|
|
43
|
-
) {
|
|
44
|
-
super();
|
|
45
|
-
this.request_id = request_id;
|
|
46
|
-
this.service_id = service_id || null;
|
|
47
|
-
this.sub_service_id = sub_service_id || null;
|
|
48
|
-
this.uploaded_by = uploaded_by;
|
|
49
|
-
this.file_url = file_url;
|
|
50
|
-
this.file_name = file_name || "";
|
|
51
|
-
this.file_type = file_type || "";
|
|
52
|
-
this.file_size = file_size || null;
|
|
53
|
-
this.description = description || "";
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
export enum AnnualTrainingPlanMessageType {
|
|
5
|
-
TEXT = "text",
|
|
6
|
-
IMAGE = "image",
|
|
7
|
-
VIDEO = "video",
|
|
8
|
-
FILE = "file",
|
|
9
|
-
LINK = "link"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export enum AnnualTrainingPlanChatStatus {
|
|
13
|
-
PENDING = "Pending",
|
|
14
|
-
APPROVED = "Approved",
|
|
15
|
-
REJECTED = "Rejected",
|
|
16
|
-
IN_PROGRESS = "In Progress"
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@Entity({ name: "annual_training_plan_request_chat" })
|
|
20
|
-
export class AnnualTrainingPlanRequestChat extends BaseModel {
|
|
21
|
-
@Column({ type: "integer", nullable: false })
|
|
22
|
-
request_id: number;
|
|
23
|
-
|
|
24
|
-
@Column({ type: "integer", nullable: true })
|
|
25
|
-
service_id: number | null;
|
|
26
|
-
|
|
27
|
-
@Column({ type: "integer", nullable: true })
|
|
28
|
-
sub_service_id: number | null;
|
|
29
|
-
|
|
30
|
-
@Column({ type: "integer", nullable: false })
|
|
31
|
-
user_id: number;
|
|
32
|
-
|
|
33
|
-
@Column({ type: "text", nullable: false })
|
|
34
|
-
message: string;
|
|
35
|
-
|
|
36
|
-
@Column({ type: "integer", nullable: true })
|
|
37
|
-
approver_role_id: number | null;
|
|
38
|
-
|
|
39
|
-
@Column({
|
|
40
|
-
type: "enum",
|
|
41
|
-
enum: AnnualTrainingPlanMessageType,
|
|
42
|
-
default: AnnualTrainingPlanMessageType.TEXT,
|
|
43
|
-
nullable: false
|
|
44
|
-
})
|
|
45
|
-
messageType: AnnualTrainingPlanMessageType;
|
|
46
|
-
|
|
47
|
-
@Column({ type: "boolean", default: false })
|
|
48
|
-
is_internal: boolean;
|
|
49
|
-
|
|
50
|
-
@Column({ type: "text", nullable: false })
|
|
51
|
-
status: string;
|
|
52
|
-
|
|
53
|
-
constructor(
|
|
54
|
-
request_id: number,
|
|
55
|
-
user_id: number,
|
|
56
|
-
message: string,
|
|
57
|
-
service_id?: number | null,
|
|
58
|
-
sub_service_id?: number | null,
|
|
59
|
-
messageType?: AnnualTrainingPlanMessageType,
|
|
60
|
-
is_internal?: boolean,
|
|
61
|
-
status?: string,
|
|
62
|
-
approver_role_id?: number
|
|
63
|
-
) {
|
|
64
|
-
super();
|
|
65
|
-
this.request_id = request_id;
|
|
66
|
-
this.service_id = service_id || null;
|
|
67
|
-
this.sub_service_id = sub_service_id || null;
|
|
68
|
-
this.user_id = user_id;
|
|
69
|
-
this.message = message;
|
|
70
|
-
this.messageType = messageType || AnnualTrainingPlanMessageType.TEXT;
|
|
71
|
-
this.is_internal = is_internal || false;
|
|
72
|
-
this.status = status || 'Pending';
|
|
73
|
-
this.approver_role_id = approver_role_id || null;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
export enum AnnualTrainingPlanRequestStatus {
|
|
5
|
-
PENDING = "Pending",
|
|
6
|
-
IN_PROGRESS = "In Progress",
|
|
7
|
-
COMPLETED = "Completed",
|
|
8
|
-
APPROVED = "Approved",
|
|
9
|
-
REJECTED = "Rejected"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export enum AnnualTrainingPlanPlace {
|
|
13
|
-
INSIDE = "Inside",
|
|
14
|
-
OUTSIDE = "Outside"
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@Entity({ name: "annual_training_plan_requests" })
|
|
18
|
-
export class AnnualTrainingPlanRequest extends BaseModel {
|
|
19
|
-
@Column({ type: "integer", nullable: true })
|
|
20
|
-
req_user_department_id: number | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: "integer", nullable: true })
|
|
23
|
-
req_user_section_id: number | null;
|
|
24
|
-
|
|
25
|
-
@Column({ type: "integer", nullable: true })
|
|
26
|
-
req_user_position_id: number | null;
|
|
27
|
-
|
|
28
|
-
@Column({ type: "integer", nullable: true })
|
|
29
|
-
service_id: number | null;
|
|
30
|
-
|
|
31
|
-
@Column({ type: "integer", nullable: true })
|
|
32
|
-
sub_service_id: number | null;
|
|
33
|
-
|
|
34
|
-
@Column({ type: "integer", nullable: false })
|
|
35
|
-
user_id: number;
|
|
36
|
-
|
|
37
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
38
|
-
course_name: string;
|
|
39
|
-
|
|
40
|
-
@Column({ type: "integer", nullable: false })
|
|
41
|
-
no_of_participants: number;
|
|
42
|
-
|
|
43
|
-
@Column({ type: "decimal", precision: 10, scale: 2, nullable: false })
|
|
44
|
-
course_cost: number;
|
|
45
|
-
|
|
46
|
-
@Column({ type: "decimal", precision: 10, scale: 2, nullable: false })
|
|
47
|
-
total_cost: number;
|
|
48
|
-
|
|
49
|
-
@Column({ type: "date", nullable: false })
|
|
50
|
-
proposed_implementation_date: Date;
|
|
51
|
-
|
|
52
|
-
@Column({ type: "text", nullable: false })
|
|
53
|
-
description: string;
|
|
54
|
-
|
|
55
|
-
@Column({
|
|
56
|
-
type: "enum",
|
|
57
|
-
enum: AnnualTrainingPlanPlace,
|
|
58
|
-
nullable: false
|
|
59
|
-
})
|
|
60
|
-
place: AnnualTrainingPlanPlace;
|
|
61
|
-
|
|
62
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
63
|
-
location: string | null;
|
|
64
|
-
|
|
65
|
-
@Column({ type: "text", nullable: false })
|
|
66
|
-
reason: string;
|
|
67
|
-
|
|
68
|
-
@Column({ type: "jsonb", nullable: true })
|
|
69
|
-
employee_list: any[] | null; // List of employees for training attendance
|
|
70
|
-
|
|
71
|
-
@Column({
|
|
72
|
-
type: "enum",
|
|
73
|
-
enum: AnnualTrainingPlanRequestStatus,
|
|
74
|
-
default: AnnualTrainingPlanRequestStatus.PENDING,
|
|
75
|
-
nullable: false
|
|
76
|
-
})
|
|
77
|
-
status: AnnualTrainingPlanRequestStatus;
|
|
78
|
-
|
|
79
|
-
@Column({ type: "integer", nullable: true })
|
|
80
|
-
reviewer_user_id: number | null;
|
|
81
|
-
|
|
82
|
-
@Column({ type: "integer", nullable: true })
|
|
83
|
-
assigned_to_user_id: number | null;
|
|
84
|
-
|
|
85
|
-
@Column({ type: "timestamp", nullable: true })
|
|
86
|
-
assigned_at: Date | null;
|
|
87
|
-
|
|
88
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
89
|
-
workflow_execution_id: string | null;
|
|
90
|
-
|
|
91
|
-
constructor(
|
|
92
|
-
user_id: number,
|
|
93
|
-
course_name: string,
|
|
94
|
-
no_of_participants: number,
|
|
95
|
-
course_cost: number,
|
|
96
|
-
total_cost: number,
|
|
97
|
-
proposed_implementation_date: Date,
|
|
98
|
-
description: string,
|
|
99
|
-
place: AnnualTrainingPlanPlace,
|
|
100
|
-
reason: string,
|
|
101
|
-
status: AnnualTrainingPlanRequestStatus = AnnualTrainingPlanRequestStatus.PENDING,
|
|
102
|
-
service_id?: number | null,
|
|
103
|
-
sub_service_id?: number | null,
|
|
104
|
-
req_user_department_id?: number | null,
|
|
105
|
-
req_user_section_id?: number | null,
|
|
106
|
-
req_user_position_id?: number | null,
|
|
107
|
-
location?: string | null,
|
|
108
|
-
employee_list?: any[] | null,
|
|
109
|
-
reviewer_user_id?: number | null,
|
|
110
|
-
assigned_to_user_id?: number | null,
|
|
111
|
-
assigned_at?: Date | null,
|
|
112
|
-
workflow_execution_id?: string | null
|
|
113
|
-
) {
|
|
114
|
-
super();
|
|
115
|
-
this.user_id = user_id;
|
|
116
|
-
this.course_name = course_name;
|
|
117
|
-
this.no_of_participants = no_of_participants;
|
|
118
|
-
this.course_cost = course_cost;
|
|
119
|
-
this.total_cost = total_cost;
|
|
120
|
-
this.proposed_implementation_date = proposed_implementation_date;
|
|
121
|
-
this.description = description;
|
|
122
|
-
this.place = place;
|
|
123
|
-
this.reason = reason;
|
|
124
|
-
this.status = status;
|
|
125
|
-
this.service_id = service_id || null;
|
|
126
|
-
this.sub_service_id = sub_service_id || null;
|
|
127
|
-
this.req_user_department_id = req_user_department_id || null;
|
|
128
|
-
this.req_user_section_id = req_user_section_id || null;
|
|
129
|
-
this.req_user_position_id = req_user_position_id || null;
|
|
130
|
-
this.location = location || null;
|
|
131
|
-
this.employee_list = employee_list || null;
|
|
132
|
-
this.reviewer_user_id = reviewer_user_id || null;
|
|
133
|
-
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
134
|
-
this.assigned_at = assigned_at || null;
|
|
135
|
-
this.workflow_execution_id = workflow_execution_id || null;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
export enum AnnualTrainingPlanWorkFlowStatus {
|
|
5
|
-
COMPLETED = "Completed",
|
|
6
|
-
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
-
PENDING = "Pending",
|
|
8
|
-
REJECTED = "Rejected"
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@Entity({ name: "annual_training_plan_workflows" })
|
|
12
|
-
export class AnnualTrainingPlanWorkFlow extends BaseModel {
|
|
13
|
-
@Column({ type: "int", nullable: false })
|
|
14
|
-
request_id: number;
|
|
15
|
-
|
|
16
|
-
@Column({ type: "integer", nullable: true })
|
|
17
|
-
service_id: number | null;
|
|
18
|
-
|
|
19
|
-
@Column({ type: "integer", nullable: true })
|
|
20
|
-
sub_service_id: number | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: "int", nullable: true })
|
|
23
|
-
order: number | null;
|
|
24
|
-
|
|
25
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
26
|
-
content: string;
|
|
27
|
-
|
|
28
|
-
@Column({ type: "integer", nullable: true })
|
|
29
|
-
approver_role_id: number | null;
|
|
30
|
-
|
|
31
|
-
@Column({ type: "integer", nullable: true })
|
|
32
|
-
approver_user_id: number | null;
|
|
33
|
-
|
|
34
|
-
@Column({ type: "integer", nullable: true })
|
|
35
|
-
approved_by: number | null;
|
|
36
|
-
|
|
37
|
-
@Column({
|
|
38
|
-
type: "enum",
|
|
39
|
-
enum: AnnualTrainingPlanWorkFlowStatus,
|
|
40
|
-
default: AnnualTrainingPlanWorkFlowStatus.PENDING,
|
|
41
|
-
nullable: false
|
|
42
|
-
})
|
|
43
|
-
status: AnnualTrainingPlanWorkFlowStatus;
|
|
44
|
-
|
|
45
|
-
constructor(
|
|
46
|
-
request_id: number,
|
|
47
|
-
content: string,
|
|
48
|
-
status: AnnualTrainingPlanWorkFlowStatus,
|
|
49
|
-
service_id?: number | null,
|
|
50
|
-
sub_service_id?: number | null,
|
|
51
|
-
order?: number,
|
|
52
|
-
approver_role_id?: number | null,
|
|
53
|
-
approver_user_id?: number | null,
|
|
54
|
-
approved_by?: number | null
|
|
55
|
-
) {
|
|
56
|
-
super();
|
|
57
|
-
this.request_id = request_id;
|
|
58
|
-
this.service_id = service_id || null;
|
|
59
|
-
this.sub_service_id = sub_service_id || null;
|
|
60
|
-
this.content = content;
|
|
61
|
-
this.status = status;
|
|
62
|
-
this.order = order || null;
|
|
63
|
-
this.approver_role_id = approver_role_id || null;
|
|
64
|
-
this.approver_user_id = approver_user_id || null;
|
|
65
|
-
this.approved_by = approved_by || null;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|