@platform-modules/civil-aviation-authority 2.3.10 → 2.3.12
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 +10 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +25 -1
- package/dist/models/ServiceTransferRequestModel.d.ts +46 -0
- package/dist/models/ServiceTransferRequestModel.js +174 -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 +10 -0
- package/src/index.ts +14 -0
- package/src/models/ServiceTransferRequestModel.ts +164 -0
- 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
|
@@ -0,0 +1,89 @@
|
|
|
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.StudyLeaveRequestChat = exports.StudyLeaveChatStatus = exports.StudyLeaveMessageType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var StudyLeaveMessageType;
|
|
16
|
+
(function (StudyLeaveMessageType) {
|
|
17
|
+
StudyLeaveMessageType["TEXT"] = "text";
|
|
18
|
+
StudyLeaveMessageType["IMAGE"] = "image";
|
|
19
|
+
StudyLeaveMessageType["VIDEO"] = "video";
|
|
20
|
+
StudyLeaveMessageType["FILE"] = "file";
|
|
21
|
+
StudyLeaveMessageType["LINK"] = "link";
|
|
22
|
+
})(StudyLeaveMessageType || (exports.StudyLeaveMessageType = StudyLeaveMessageType = {}));
|
|
23
|
+
var StudyLeaveChatStatus;
|
|
24
|
+
(function (StudyLeaveChatStatus) {
|
|
25
|
+
StudyLeaveChatStatus["PENDING"] = "Pending";
|
|
26
|
+
StudyLeaveChatStatus["APPROVED"] = "Approved";
|
|
27
|
+
StudyLeaveChatStatus["REJECTED"] = "Rejected";
|
|
28
|
+
StudyLeaveChatStatus["IN_PROGRESS"] = "In Progress";
|
|
29
|
+
})(StudyLeaveChatStatus || (exports.StudyLeaveChatStatus = StudyLeaveChatStatus = {}));
|
|
30
|
+
let StudyLeaveRequestChat = class StudyLeaveRequestChat extends BaseModel_1.BaseModel {
|
|
31
|
+
constructor(request_id, user_id, message, service_id, sub_service_id, messageType, is_internal, status, approver_role_id) {
|
|
32
|
+
super();
|
|
33
|
+
this.request_id = request_id;
|
|
34
|
+
this.service_id = service_id || null;
|
|
35
|
+
this.sub_service_id = sub_service_id || null;
|
|
36
|
+
this.user_id = user_id;
|
|
37
|
+
this.message = message;
|
|
38
|
+
this.messageType = messageType || StudyLeaveMessageType.TEXT;
|
|
39
|
+
this.is_internal = is_internal || false;
|
|
40
|
+
this.status = status || 'Pending';
|
|
41
|
+
this.approver_role_id = approver_role_id || null;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
exports.StudyLeaveRequestChat = StudyLeaveRequestChat;
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
47
|
+
__metadata("design:type", Number)
|
|
48
|
+
], StudyLeaveRequestChat.prototype, "request_id", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], StudyLeaveRequestChat.prototype, "service_id", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], StudyLeaveRequestChat.prototype, "sub_service_id", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
59
|
+
__metadata("design:type", Number)
|
|
60
|
+
], StudyLeaveRequestChat.prototype, "user_id", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], StudyLeaveRequestChat.prototype, "message", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], StudyLeaveRequestChat.prototype, "approver_role_id", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({
|
|
71
|
+
type: "enum",
|
|
72
|
+
enum: StudyLeaveMessageType,
|
|
73
|
+
default: StudyLeaveMessageType.TEXT,
|
|
74
|
+
nullable: false
|
|
75
|
+
}),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], StudyLeaveRequestChat.prototype, "messageType", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false }),
|
|
80
|
+
__metadata("design:type", Boolean)
|
|
81
|
+
], StudyLeaveRequestChat.prototype, "is_internal", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], StudyLeaveRequestChat.prototype, "status", void 0);
|
|
86
|
+
exports.StudyLeaveRequestChat = StudyLeaveRequestChat = __decorate([
|
|
87
|
+
(0, typeorm_1.Entity)({ name: "study_leave_request_chat" }),
|
|
88
|
+
__metadata("design:paramtypes", [Number, Number, String, Object, Object, String, Boolean, String, Number])
|
|
89
|
+
], StudyLeaveRequestChat);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
export declare enum StudyLeaveRequestStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
IN_PROGRESS = "In Progress",
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
APPROVED = "Approved",
|
|
7
|
+
REJECTED = "Rejected"
|
|
8
|
+
}
|
|
9
|
+
export declare class StudyLeaveRequest extends BaseModel {
|
|
10
|
+
req_user_department_id: number | null;
|
|
11
|
+
req_user_section_id: number | null;
|
|
12
|
+
req_user_position_id: number | null;
|
|
13
|
+
service_id: number | null;
|
|
14
|
+
sub_service_id: number | null;
|
|
15
|
+
user_id: number;
|
|
16
|
+
course_name: string;
|
|
17
|
+
institute_name: string;
|
|
18
|
+
duration_of_course: string | null;
|
|
19
|
+
course_start_date: Date;
|
|
20
|
+
course_end_date: Date;
|
|
21
|
+
location: string;
|
|
22
|
+
description: string;
|
|
23
|
+
status: StudyLeaveRequestStatus;
|
|
24
|
+
reviewer_user_id: number | null;
|
|
25
|
+
assigned_to_user_id: number | null;
|
|
26
|
+
assigned_at: Date | null;
|
|
27
|
+
workflow_execution_id: string | null;
|
|
28
|
+
constructor(user_id: number, course_name: string, institute_name: string, course_start_date: Date, course_end_date: Date, location: string, description: string, status?: StudyLeaveRequestStatus, 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, duration_of_course?: string | null, reviewer_user_id?: number | null, assigned_to_user_id?: number | null, assigned_at?: Date | null, workflow_execution_id?: string | null);
|
|
29
|
+
}
|
|
@@ -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,11 @@ 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';
|
|
94
99
|
import { SecondmentRequest } from './models/SecondmentRequestModel';
|
|
95
100
|
|
|
96
101
|
export const AppDataSource = new DataSource({
|
|
@@ -183,6 +188,11 @@ export const AppDataSource = new DataSource({
|
|
|
183
188
|
TrainingApprovalDetails,
|
|
184
189
|
TrainingRequestChat,
|
|
185
190
|
TrainingRequestAttachment,
|
|
191
|
+
StudyLeaveRequest,
|
|
192
|
+
StudyLeaveWorkFlow,
|
|
193
|
+
StudyLeaveApprovalDetails,
|
|
194
|
+
StudyLeaveRequestChat,
|
|
195
|
+
StudyLeaveRequestAttachment,
|
|
186
196
|
SecondmentRequest,
|
|
187
197
|
DutyMissionRequests,
|
|
188
198
|
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,10 +97,19 @@ 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';
|
|
95
107
|
export * from './models/SecondmentRequestModel';
|
|
96
108
|
export {SecondmentRequestStatus} from './models/SecondmentRequestModel';
|
|
97
109
|
export * from './models/TemporaryAssignmentRequestModel';
|
|
98
110
|
export {TemporaryAssignmentRequestStatus, SalaryPaymentSource} from './models/TemporaryAssignmentRequestModel';
|
|
111
|
+
export * from './models/ServiceTransferRequestModel';
|
|
112
|
+
export {ServiceTransferRequestStatus, SalaryDetailsType, ServiceTransferRequestType} from './models/ServiceTransferRequestModel';
|
|
99
113
|
export * from './models/DutyMissionRequestModel';
|
|
100
114
|
export * from './models/DutyMissionApprovalModel';
|
|
101
115
|
export * from './models/DutyMissionWorkflowModel';
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum ServiceTransferRequestStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
ASSIGNED = "Assigned",
|
|
7
|
+
IN_PROGRESS = "In Progress",
|
|
8
|
+
COMPLETED = "Completed",
|
|
9
|
+
APPROVED = "Approved",
|
|
10
|
+
REJECTED = "Rejected"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum SalaryDetailsType {
|
|
14
|
+
RETAINED = "Retained with Same Financial Allocations and Grade",
|
|
15
|
+
NEW = "New Financial Allocations and Grade"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export enum ServiceTransferRequestType {
|
|
19
|
+
INTERNAL = "Internal",
|
|
20
|
+
EXTERNAL = "External"
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@Entity({ name: "service_transfer_requests" })
|
|
24
|
+
export class ServiceTransferRequest extends BaseModel {
|
|
25
|
+
@Column({ type: "integer", nullable: true })
|
|
26
|
+
req_user_department_id: number | null;
|
|
27
|
+
|
|
28
|
+
@Column({ type: "integer", nullable: true })
|
|
29
|
+
req_user_section_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: "integer", nullable: true })
|
|
32
|
+
req_user_position_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: "integer", nullable: true })
|
|
35
|
+
service_id: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: "integer", nullable: true })
|
|
38
|
+
sub_service_id: number | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: "integer", nullable: false })
|
|
41
|
+
user_id: number;
|
|
42
|
+
|
|
43
|
+
@Column({ type: "text", nullable: true })
|
|
44
|
+
description: string | null;
|
|
45
|
+
|
|
46
|
+
@Column({ type: "enum", enum: ServiceTransferRequestStatus, default: ServiceTransferRequestStatus.PENDING, nullable: false })
|
|
47
|
+
status: ServiceTransferRequestStatus;
|
|
48
|
+
|
|
49
|
+
@Column({ type: "integer", nullable: true })
|
|
50
|
+
reviewer_user_id: number | null;
|
|
51
|
+
|
|
52
|
+
@Column({ type: "integer", nullable: true })
|
|
53
|
+
assigned_to_user_id: number | null;
|
|
54
|
+
|
|
55
|
+
@Column({ type: "timestamp", nullable: true })
|
|
56
|
+
assigned_at: Date | null;
|
|
57
|
+
|
|
58
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
59
|
+
workflow_execution_id: string | null;
|
|
60
|
+
|
|
61
|
+
// Service Transfer specific fields
|
|
62
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
63
|
+
assigned_employee_name: string;
|
|
64
|
+
|
|
65
|
+
@Column({ type: "varchar", length: 50, nullable: true })
|
|
66
|
+
civil_id_card_number: string | null;
|
|
67
|
+
|
|
68
|
+
@Column({ type: "varchar", length: 100, nullable: false })
|
|
69
|
+
employee_id: string;
|
|
70
|
+
|
|
71
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
72
|
+
current_job_position: string;
|
|
73
|
+
|
|
74
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
75
|
+
assigned_job_position: string;
|
|
76
|
+
|
|
77
|
+
@Column({ type: "varchar", length: 500, nullable: false })
|
|
78
|
+
current_entity: string;
|
|
79
|
+
|
|
80
|
+
@Column({ type: "varchar", length: 500, nullable: false })
|
|
81
|
+
transferred_to_entity: string;
|
|
82
|
+
|
|
83
|
+
@Column({ type: "date", nullable: false })
|
|
84
|
+
start_date: Date;
|
|
85
|
+
|
|
86
|
+
@Column({ type: "date", nullable: false })
|
|
87
|
+
end_date: Date;
|
|
88
|
+
|
|
89
|
+
@Column({ type: "varchar", length: 20, nullable: false })
|
|
90
|
+
phone_number: string;
|
|
91
|
+
|
|
92
|
+
@Column({ type: "text", nullable: false })
|
|
93
|
+
reason_for_request: string;
|
|
94
|
+
|
|
95
|
+
// Request type - Internal or External transfer
|
|
96
|
+
@Column({ type: "enum", enum: ServiceTransferRequestType, nullable: false })
|
|
97
|
+
request_type: ServiceTransferRequestType;
|
|
98
|
+
|
|
99
|
+
// Salary details
|
|
100
|
+
@Column({ type: "enum", enum: SalaryDetailsType, nullable: false })
|
|
101
|
+
salary_details: SalaryDetailsType;
|
|
102
|
+
|
|
103
|
+
@Column({ type: "varchar", length: 500, nullable: true })
|
|
104
|
+
salary_details_description: string | null;
|
|
105
|
+
|
|
106
|
+
constructor(
|
|
107
|
+
user_id: number,
|
|
108
|
+
status: ServiceTransferRequestStatus = ServiceTransferRequestStatus.PENDING,
|
|
109
|
+
service_id?: number | null,
|
|
110
|
+
sub_service_id?: number | null,
|
|
111
|
+
req_user_department_id?: number | null,
|
|
112
|
+
req_user_section_id?: number | null,
|
|
113
|
+
req_user_position_id?: number | null,
|
|
114
|
+
description?: string | null,
|
|
115
|
+
reviewer_user_id?: number | null,
|
|
116
|
+
assigned_to_user_id?: number | null,
|
|
117
|
+
assigned_at?: Date | null,
|
|
118
|
+
workflow_execution_id?: string | null,
|
|
119
|
+
assigned_employee_name?: string,
|
|
120
|
+
civil_id_card_number?: string | null,
|
|
121
|
+
employee_id?: string,
|
|
122
|
+
current_job_position?: string,
|
|
123
|
+
assigned_job_position?: string,
|
|
124
|
+
current_entity?: string,
|
|
125
|
+
transferred_to_entity?: string,
|
|
126
|
+
start_date?: Date,
|
|
127
|
+
end_date?: Date,
|
|
128
|
+
phone_number?: string,
|
|
129
|
+
reason_for_request?: string,
|
|
130
|
+
request_type?: ServiceTransferRequestType,
|
|
131
|
+
salary_details?: SalaryDetailsType,
|
|
132
|
+
salary_details_description?: string | null
|
|
133
|
+
) {
|
|
134
|
+
super();
|
|
135
|
+
this.user_id = user_id;
|
|
136
|
+
this.status = status;
|
|
137
|
+
this.service_id = service_id || null;
|
|
138
|
+
this.sub_service_id = sub_service_id || null;
|
|
139
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
140
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
141
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
142
|
+
this.description = description || null;
|
|
143
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
144
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
145
|
+
this.assigned_at = assigned_at || null;
|
|
146
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
147
|
+
this.assigned_employee_name = assigned_employee_name || "";
|
|
148
|
+
this.civil_id_card_number = civil_id_card_number || null;
|
|
149
|
+
this.employee_id = employee_id || "";
|
|
150
|
+
this.current_job_position = current_job_position || "";
|
|
151
|
+
this.assigned_job_position = assigned_job_position || "";
|
|
152
|
+
this.current_entity = current_entity || "";
|
|
153
|
+
this.transferred_to_entity = transferred_to_entity || "";
|
|
154
|
+
this.start_date = start_date || new Date();
|
|
155
|
+
this.end_date = end_date || new Date();
|
|
156
|
+
this.phone_number = phone_number || "";
|
|
157
|
+
this.reason_for_request = reason_for_request || "";
|
|
158
|
+
this.request_type = request_type || ServiceTransferRequestType.INTERNAL;
|
|
159
|
+
this.salary_details = salary_details || SalaryDetailsType.RETAINED;
|
|
160
|
+
this.salary_details_description = salary_details_description || null;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum StudyLeaveApprovalStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
IN_PROGRESS = "In Progress",
|
|
7
|
+
APPROVED = "Approved",
|
|
8
|
+
REJECTED = "Rejected",
|
|
9
|
+
ASSIGNED = "Assigned"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Entity({ name: "study_leave_approvals" })
|
|
13
|
+
export class StudyLeaveApprovalDetails 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: StudyLeaveApprovalStatus,
|
|
50
|
+
default: StudyLeaveApprovalStatus.PENDING,
|
|
51
|
+
nullable: false
|
|
52
|
+
})
|
|
53
|
+
approval_status: StudyLeaveApprovalStatus;
|
|
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: StudyLeaveApprovalStatus,
|
|
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
|
+
|