@platform-modules/civil-aviation-authority 2.3.8 → 2.3.9
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/.env +9 -14
- package/dist/data-source.js +20 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +40 -1
- package/dist/models/AnnualTrainingPlanApprovalModel.d.ts +25 -0
- package/dist/models/AnnualTrainingPlanApprovalModel.js +107 -0
- package/dist/models/AnnualTrainingPlanAttachmentModel.d.ts +13 -0
- package/dist/models/AnnualTrainingPlanAttachmentModel.js +69 -0
- package/dist/models/AnnualTrainingPlanChatModel.d.ts +26 -0
- package/dist/models/AnnualTrainingPlanChatModel.js +89 -0
- package/dist/models/AnnualTrainingPlanRequestModel.d.ts +36 -0
- package/dist/models/AnnualTrainingPlanRequestModel.js +151 -0
- package/dist/models/AnnualTrainingPlanWorkflowModel.d.ts +19 -0
- package/dist/models/AnnualTrainingPlanWorkflowModel.js +81 -0
- package/dist/models/StudyLeaveApprovalModel.d.ts +25 -0
- package/dist/models/StudyLeaveApprovalModel.js +107 -0
- package/dist/models/StudyLeaveAttachmentModel.d.ts +13 -0
- package/dist/models/StudyLeaveAttachmentModel.js +69 -0
- package/dist/models/StudyLeaveChatModel.d.ts +26 -0
- package/dist/models/StudyLeaveChatModel.js +89 -0
- package/dist/models/StudyLeaveRequestModel.d.ts +29 -0
- package/dist/models/StudyLeaveRequestModel.js +128 -0
- package/dist/models/StudyLeaveWorkflowModel.d.ts +19 -0
- package/dist/models/StudyLeaveWorkflowModel.js +81 -0
- package/package.json +1 -1
- package/src/data-source.ts +20 -0
- package/src/index.ts +24 -0
- package/src/models/AnnualTrainingPlanApprovalModel.ts +94 -0
- package/src/models/AnnualTrainingPlanAttachmentModel.ts +56 -0
- package/src/models/AnnualTrainingPlanChatModel.ts +76 -0
- package/src/models/AnnualTrainingPlanRequestModel.ts +138 -0
- package/src/models/AnnualTrainingPlanWorkflowModel.ts +68 -0
- package/src/models/ITRequestChatModel.ts +62 -62
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/src/models/StudyLeaveApprovalModel.ts +94 -0
- package/src/models/StudyLeaveAttachmentModel.ts +56 -0
- package/src/models/StudyLeaveChatModel.ts +76 -0
- package/src/models/StudyLeaveRequestModel.ts +114 -0
- package/src/models/StudyLeaveWorkflowModel.ts +68 -0
- package/dist/models/ITApprovalSettings.d.ts +0 -7
- package/dist/models/ITApprovalSettings.js +0 -40
- package/dist/models/ITServicesTypesMuscatModel.d.ts +0 -6
- package/dist/models/ITServicesTypesMuscatModel.js +0 -34
- package/dist/models/ITServicesTypesSalalahModel.d.ts +0 -6
- package/dist/models/ITServicesTypesSalalahModel.js +0 -34
- package/dist/models/Workflows.d.ts +0 -0
- package/dist/models/Workflows.js +0 -31
|
@@ -0,0 +1,128 @@
|
|
|
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.StudyLeaveRequest = exports.StudyLeaveRequestStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var StudyLeaveRequestStatus;
|
|
16
|
+
(function (StudyLeaveRequestStatus) {
|
|
17
|
+
StudyLeaveRequestStatus["PENDING"] = "Pending";
|
|
18
|
+
StudyLeaveRequestStatus["IN_PROGRESS"] = "In Progress";
|
|
19
|
+
StudyLeaveRequestStatus["COMPLETED"] = "Completed";
|
|
20
|
+
StudyLeaveRequestStatus["APPROVED"] = "Approved";
|
|
21
|
+
StudyLeaveRequestStatus["REJECTED"] = "Rejected";
|
|
22
|
+
})(StudyLeaveRequestStatus || (exports.StudyLeaveRequestStatus = StudyLeaveRequestStatus = {}));
|
|
23
|
+
let StudyLeaveRequest = class StudyLeaveRequest extends BaseModel_1.BaseModel {
|
|
24
|
+
constructor(user_id, course_name, institute_name, course_start_date, course_end_date, location, description, status = StudyLeaveRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, duration_of_course, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id) {
|
|
25
|
+
super();
|
|
26
|
+
this.user_id = user_id;
|
|
27
|
+
this.course_name = course_name;
|
|
28
|
+
this.institute_name = institute_name;
|
|
29
|
+
this.course_start_date = course_start_date;
|
|
30
|
+
this.course_end_date = course_end_date;
|
|
31
|
+
this.location = location;
|
|
32
|
+
this.description = description;
|
|
33
|
+
this.status = status;
|
|
34
|
+
this.service_id = service_id || null;
|
|
35
|
+
this.sub_service_id = sub_service_id || null;
|
|
36
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
37
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
38
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
39
|
+
this.duration_of_course = duration_of_course || null;
|
|
40
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
41
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
42
|
+
this.assigned_at = assigned_at || null;
|
|
43
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
exports.StudyLeaveRequest = StudyLeaveRequest;
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], StudyLeaveRequest.prototype, "req_user_department_id", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], StudyLeaveRequest.prototype, "req_user_section_id", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
57
|
+
__metadata("design:type", Object)
|
|
58
|
+
], StudyLeaveRequest.prototype, "req_user_position_id", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], StudyLeaveRequest.prototype, "service_id", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], StudyLeaveRequest.prototype, "sub_service_id", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
69
|
+
__metadata("design:type", Number)
|
|
70
|
+
], StudyLeaveRequest.prototype, "user_id", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], StudyLeaveRequest.prototype, "course_name", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], StudyLeaveRequest.prototype, "institute_name", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
81
|
+
__metadata("design:type", Object)
|
|
82
|
+
], StudyLeaveRequest.prototype, "duration_of_course", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
85
|
+
__metadata("design:type", Date)
|
|
86
|
+
], StudyLeaveRequest.prototype, "course_start_date", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
89
|
+
__metadata("design:type", Date)
|
|
90
|
+
], StudyLeaveRequest.prototype, "course_end_date", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], StudyLeaveRequest.prototype, "location", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
97
|
+
__metadata("design:type", String)
|
|
98
|
+
], StudyLeaveRequest.prototype, "description", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, typeorm_1.Column)({
|
|
101
|
+
type: "enum",
|
|
102
|
+
enum: StudyLeaveRequestStatus,
|
|
103
|
+
default: StudyLeaveRequestStatus.PENDING,
|
|
104
|
+
nullable: false
|
|
105
|
+
}),
|
|
106
|
+
__metadata("design:type", String)
|
|
107
|
+
], StudyLeaveRequest.prototype, "status", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
110
|
+
__metadata("design:type", Object)
|
|
111
|
+
], StudyLeaveRequest.prototype, "reviewer_user_id", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
114
|
+
__metadata("design:type", Object)
|
|
115
|
+
], StudyLeaveRequest.prototype, "assigned_to_user_id", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
118
|
+
__metadata("design:type", Object)
|
|
119
|
+
], StudyLeaveRequest.prototype, "assigned_at", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
122
|
+
__metadata("design:type", Object)
|
|
123
|
+
], StudyLeaveRequest.prototype, "workflow_execution_id", void 0);
|
|
124
|
+
exports.StudyLeaveRequest = StudyLeaveRequest = __decorate([
|
|
125
|
+
(0, typeorm_1.Entity)({ name: "study_leave_requests" }),
|
|
126
|
+
__metadata("design:paramtypes", [Number, String, String, Date,
|
|
127
|
+
Date, String, String, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])
|
|
128
|
+
], StudyLeaveRequest);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
export declare enum StudyLeaveWorkFlowStatus {
|
|
3
|
+
COMPLETED = "Completed",
|
|
4
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
REJECTED = "Rejected"
|
|
7
|
+
}
|
|
8
|
+
export declare class StudyLeaveWorkFlow 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: StudyLeaveWorkFlowStatus;
|
|
18
|
+
constructor(request_id: number, content: string, status: StudyLeaveWorkFlowStatus, 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
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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.StudyLeaveWorkFlow = exports.StudyLeaveWorkFlowStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var StudyLeaveWorkFlowStatus;
|
|
16
|
+
(function (StudyLeaveWorkFlowStatus) {
|
|
17
|
+
StudyLeaveWorkFlowStatus["COMPLETED"] = "Completed";
|
|
18
|
+
StudyLeaveWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
19
|
+
StudyLeaveWorkFlowStatus["PENDING"] = "Pending";
|
|
20
|
+
StudyLeaveWorkFlowStatus["REJECTED"] = "Rejected";
|
|
21
|
+
})(StudyLeaveWorkFlowStatus || (exports.StudyLeaveWorkFlowStatus = StudyLeaveWorkFlowStatus = {}));
|
|
22
|
+
let StudyLeaveWorkFlow = class StudyLeaveWorkFlow 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.StudyLeaveWorkFlow = StudyLeaveWorkFlow;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: "int", nullable: false }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], StudyLeaveWorkFlow.prototype, "request_id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], StudyLeaveWorkFlow.prototype, "service_id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], StudyLeaveWorkFlow.prototype, "sub_service_id", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], StudyLeaveWorkFlow.prototype, "order", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], StudyLeaveWorkFlow.prototype, "content", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], StudyLeaveWorkFlow.prototype, "approver_role_id", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], StudyLeaveWorkFlow.prototype, "approver_user_id", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], StudyLeaveWorkFlow.prototype, "approved_by", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({
|
|
71
|
+
type: "enum",
|
|
72
|
+
enum: StudyLeaveWorkFlowStatus,
|
|
73
|
+
default: StudyLeaveWorkFlowStatus.PENDING,
|
|
74
|
+
nullable: false
|
|
75
|
+
}),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], StudyLeaveWorkFlow.prototype, "status", void 0);
|
|
78
|
+
exports.StudyLeaveWorkFlow = StudyLeaveWorkFlow = __decorate([
|
|
79
|
+
(0, typeorm_1.Entity)({ name: "study_leave_workflows" }),
|
|
80
|
+
__metadata("design:paramtypes", [Number, String, String, Object, Object, Number, Object, Object, Object])
|
|
81
|
+
], StudyLeaveWorkFlow);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -91,6 +91,16 @@ import { TrainingWorkFlow } from './models/TrainingWorkflowModel';
|
|
|
91
91
|
import { TrainingApprovalDetails } from './models/TrainingApprovalModel';
|
|
92
92
|
import { TrainingRequestChat } from './models/TrainingChatModel';
|
|
93
93
|
import { TrainingRequestAttachment } from './models/TrainingAttachmentModel';
|
|
94
|
+
import { StudyLeaveRequest } from './models/StudyLeaveRequestModel';
|
|
95
|
+
import { StudyLeaveWorkFlow } from './models/StudyLeaveWorkflowModel';
|
|
96
|
+
import { StudyLeaveApprovalDetails } from './models/StudyLeaveApprovalModel';
|
|
97
|
+
import { StudyLeaveRequestChat } from './models/StudyLeaveChatModel';
|
|
98
|
+
import { StudyLeaveRequestAttachment } from './models/StudyLeaveAttachmentModel';
|
|
99
|
+
import { AnnualTrainingPlanRequest } from './models/AnnualTrainingPlanRequestModel';
|
|
100
|
+
import { AnnualTrainingPlanWorkFlow } from './models/AnnualTrainingPlanWorkflowModel';
|
|
101
|
+
import { AnnualTrainingPlanApprovalDetails } from './models/AnnualTrainingPlanApprovalModel';
|
|
102
|
+
import { AnnualTrainingPlanRequestChat } from './models/AnnualTrainingPlanChatModel';
|
|
103
|
+
import { AnnualTrainingPlanRequestAttachment } from './models/AnnualTrainingPlanAttachmentModel';
|
|
94
104
|
import { SecondmentRequest } from './models/SecondmentRequestModel';
|
|
95
105
|
|
|
96
106
|
export const AppDataSource = new DataSource({
|
|
@@ -183,6 +193,16 @@ export const AppDataSource = new DataSource({
|
|
|
183
193
|
TrainingApprovalDetails,
|
|
184
194
|
TrainingRequestChat,
|
|
185
195
|
TrainingRequestAttachment,
|
|
196
|
+
StudyLeaveRequest,
|
|
197
|
+
StudyLeaveWorkFlow,
|
|
198
|
+
StudyLeaveApprovalDetails,
|
|
199
|
+
StudyLeaveRequestChat,
|
|
200
|
+
StudyLeaveRequestAttachment,
|
|
201
|
+
AnnualTrainingPlanRequest,
|
|
202
|
+
AnnualTrainingPlanWorkFlow,
|
|
203
|
+
AnnualTrainingPlanApprovalDetails,
|
|
204
|
+
AnnualTrainingPlanRequestChat,
|
|
205
|
+
AnnualTrainingPlanRequestAttachment,
|
|
186
206
|
SecondmentRequest,
|
|
187
207
|
DutyMissionRequests,
|
|
188
208
|
DutyMissionApprovalDetails,
|
package/src/index.ts
CHANGED
|
@@ -79,6 +79,11 @@ export * from './models/TrainingWorkflowModel';
|
|
|
79
79
|
export * from './models/TrainingApprovalModel';
|
|
80
80
|
export * from './models/TrainingChatModel';
|
|
81
81
|
export * from './models/TrainingAttachmentModel';
|
|
82
|
+
export * from './models/StudyLeaveRequestModel';
|
|
83
|
+
export * from './models/StudyLeaveWorkflowModel';
|
|
84
|
+
export * from './models/StudyLeaveApprovalModel';
|
|
85
|
+
export * from './models/StudyLeaveChatModel';
|
|
86
|
+
export * from './models/StudyLeaveAttachmentModel';
|
|
82
87
|
export {HrServiceRequestStatus} from './models/HrServiceRequestModel';
|
|
83
88
|
export {HrServiceApprovalStatus} from './models/HrServiceApprovalModel';
|
|
84
89
|
export {HrServiceWorkFlowStatus} from './models/HrServiceWorkflowModel';
|
|
@@ -92,6 +97,25 @@ export {TrainingWorkFlowStatus} from './models/TrainingWorkflowModel';
|
|
|
92
97
|
export {TrainingRequestAttachment} from './models/TrainingAttachmentModel';
|
|
93
98
|
export {TrainingRequestChat} from './models/TrainingChatModel';
|
|
94
99
|
export {TrainingMessageType} from './models/TrainingChatModel';
|
|
100
|
+
export {StudyLeaveRequestStatus} from './models/StudyLeaveRequestModel';
|
|
101
|
+
export {StudyLeaveApprovalStatus} from './models/StudyLeaveApprovalModel';
|
|
102
|
+
export {StudyLeaveWorkFlowStatus} from './models/StudyLeaveWorkflowModel';
|
|
103
|
+
export {StudyLeaveRequestAttachment} from './models/StudyLeaveAttachmentModel';
|
|
104
|
+
export {StudyLeaveRequestChat} from './models/StudyLeaveChatModel';
|
|
105
|
+
export {StudyLeaveMessageType} from './models/StudyLeaveChatModel';
|
|
106
|
+
export {StudyLeaveChatStatus} from './models/StudyLeaveChatModel';
|
|
107
|
+
export * from './models/AnnualTrainingPlanRequestModel';
|
|
108
|
+
export * from './models/AnnualTrainingPlanWorkflowModel';
|
|
109
|
+
export * from './models/AnnualTrainingPlanApprovalModel';
|
|
110
|
+
export * from './models/AnnualTrainingPlanChatModel';
|
|
111
|
+
export * from './models/AnnualTrainingPlanAttachmentModel';
|
|
112
|
+
export {AnnualTrainingPlanRequestStatus, AnnualTrainingPlanPlace} from './models/AnnualTrainingPlanRequestModel';
|
|
113
|
+
export {AnnualTrainingPlanApprovalStatus} from './models/AnnualTrainingPlanApprovalModel';
|
|
114
|
+
export {AnnualTrainingPlanWorkFlowStatus} from './models/AnnualTrainingPlanWorkflowModel';
|
|
115
|
+
export {AnnualTrainingPlanRequestAttachment} from './models/AnnualTrainingPlanAttachmentModel';
|
|
116
|
+
export {AnnualTrainingPlanRequestChat} from './models/AnnualTrainingPlanChatModel';
|
|
117
|
+
export {AnnualTrainingPlanMessageType} from './models/AnnualTrainingPlanChatModel';
|
|
118
|
+
export {AnnualTrainingPlanChatStatus} from './models/AnnualTrainingPlanChatModel';
|
|
95
119
|
export * from './models/SecondmentRequestModel';
|
|
96
120
|
export {SecondmentRequestStatus} from './models/SecondmentRequestModel';
|
|
97
121
|
export * from './models/TemporaryAssignmentRequestModel';
|
|
@@ -0,0 +1,94 @@
|
|
|
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
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
|
|
@@ -0,0 +1,138 @@
|
|
|
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
|
+
|