@platform-modules/civil-aviation-authority 2.2.999 → 2.2.1000
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 +11 -1
- package/dist/index.d.ts +18 -0
- package/dist/index.js +32 -1
- 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/dist/data-source.js
CHANGED
|
@@ -86,6 +86,11 @@ const TrainingWorkflowModel_1 = require("./models/TrainingWorkflowModel");
|
|
|
86
86
|
const TrainingApprovalModel_1 = require("./models/TrainingApprovalModel");
|
|
87
87
|
const TrainingChatModel_1 = require("./models/TrainingChatModel");
|
|
88
88
|
const TrainingAttachmentModel_1 = require("./models/TrainingAttachmentModel");
|
|
89
|
+
const StudyLeaveRequestModel_1 = require("./models/StudyLeaveRequestModel");
|
|
90
|
+
const StudyLeaveWorkflowModel_1 = require("./models/StudyLeaveWorkflowModel");
|
|
91
|
+
const StudyLeaveApprovalModel_1 = require("./models/StudyLeaveApprovalModel");
|
|
92
|
+
const StudyLeaveChatModel_1 = require("./models/StudyLeaveChatModel");
|
|
93
|
+
const StudyLeaveAttachmentModel_1 = require("./models/StudyLeaveAttachmentModel");
|
|
89
94
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
90
95
|
type: 'postgres',
|
|
91
96
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -175,6 +180,11 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
175
180
|
TrainingWorkflowModel_1.TrainingWorkFlow,
|
|
176
181
|
TrainingApprovalModel_1.TrainingApprovalDetails,
|
|
177
182
|
TrainingChatModel_1.TrainingRequestChat,
|
|
178
|
-
TrainingAttachmentModel_1.TrainingRequestAttachment
|
|
183
|
+
TrainingAttachmentModel_1.TrainingRequestAttachment,
|
|
184
|
+
StudyLeaveRequestModel_1.StudyLeaveRequest,
|
|
185
|
+
StudyLeaveWorkflowModel_1.StudyLeaveWorkFlow,
|
|
186
|
+
StudyLeaveApprovalModel_1.StudyLeaveApprovalDetails,
|
|
187
|
+
StudyLeaveChatModel_1.StudyLeaveRequestChat,
|
|
188
|
+
StudyLeaveAttachmentModel_1.StudyLeaveRequestAttachment
|
|
179
189
|
],
|
|
180
190
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -75,6 +75,11 @@ export * from './models/TrainingWorkflowModel';
|
|
|
75
75
|
export * from './models/TrainingApprovalModel';
|
|
76
76
|
export * from './models/TrainingChatModel';
|
|
77
77
|
export * from './models/TrainingAttachmentModel';
|
|
78
|
+
export * from './models/StudyLeaveRequestModel';
|
|
79
|
+
export * from './models/StudyLeaveWorkflowModel';
|
|
80
|
+
export * from './models/StudyLeaveApprovalModel';
|
|
81
|
+
export * from './models/StudyLeaveChatModel';
|
|
82
|
+
export * from './models/StudyLeaveAttachmentModel';
|
|
78
83
|
export { HrServiceRequestStatus } from './models/HrServiceRequestModel';
|
|
79
84
|
export { HrServiceApprovalStatus } from './models/HrServiceApprovalModel';
|
|
80
85
|
export { HrServiceWorkFlowStatus } from './models/HrServiceWorkflowModel';
|
|
@@ -82,3 +87,16 @@ export { HrServiceRequestAttachment } from './models/HrServiceAttachmentModel';
|
|
|
82
87
|
export { HrServiceRequestChat } from './models/HrServiceChatModel';
|
|
83
88
|
export { HrServiceMessageType } from './models/HrServiceChatModel';
|
|
84
89
|
export { HrServiceChatStatus } from './models/HrServiceChatModel';
|
|
90
|
+
export { TrainingRequestStatus } from './models/TrainingRequestModel';
|
|
91
|
+
export { TrainingApprovalStatus } from './models/TrainingApprovalModel';
|
|
92
|
+
export { TrainingWorkFlowStatus } from './models/TrainingWorkflowModel';
|
|
93
|
+
export { TrainingRequestAttachment } from './models/TrainingAttachmentModel';
|
|
94
|
+
export { TrainingRequestChat } from './models/TrainingChatModel';
|
|
95
|
+
export { TrainingMessageType } from './models/TrainingChatModel';
|
|
96
|
+
export { StudyLeaveRequestStatus } from './models/StudyLeaveRequestModel';
|
|
97
|
+
export { StudyLeaveApprovalStatus } from './models/StudyLeaveApprovalModel';
|
|
98
|
+
export { StudyLeaveWorkFlowStatus } from './models/StudyLeaveWorkflowModel';
|
|
99
|
+
export { StudyLeaveRequestAttachment } from './models/StudyLeaveAttachmentModel';
|
|
100
|
+
export { StudyLeaveRequestChat } from './models/StudyLeaveChatModel';
|
|
101
|
+
export { StudyLeaveMessageType } from './models/StudyLeaveChatModel';
|
|
102
|
+
export { StudyLeaveChatStatus } from './models/StudyLeaveChatModel';
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.HrServiceChatStatus = exports.HrServiceMessageType = exports.HrServiceRequestChat = exports.HrServiceRequestAttachment = exports.HrServiceWorkFlowStatus = exports.HrServiceApprovalStatus = exports.HrServiceRequestStatus = void 0;
|
|
17
|
+
exports.StudyLeaveChatStatus = exports.StudyLeaveMessageType = exports.StudyLeaveRequestChat = exports.StudyLeaveRequestAttachment = exports.StudyLeaveWorkFlowStatus = exports.StudyLeaveApprovalStatus = exports.StudyLeaveRequestStatus = exports.TrainingMessageType = exports.TrainingRequestChat = exports.TrainingRequestAttachment = exports.TrainingWorkFlowStatus = exports.TrainingApprovalStatus = exports.TrainingRequestStatus = exports.HrServiceChatStatus = exports.HrServiceMessageType = exports.HrServiceRequestChat = exports.HrServiceRequestAttachment = exports.HrServiceWorkFlowStatus = exports.HrServiceApprovalStatus = exports.HrServiceRequestStatus = void 0;
|
|
18
18
|
__exportStar(require("./models/user"), exports);
|
|
19
19
|
__exportStar(require("./models/role"), exports);
|
|
20
20
|
__exportStar(require("./models/user-sessions"), exports);
|
|
@@ -96,6 +96,11 @@ __exportStar(require("./models/TrainingWorkflowModel"), exports);
|
|
|
96
96
|
__exportStar(require("./models/TrainingApprovalModel"), exports);
|
|
97
97
|
__exportStar(require("./models/TrainingChatModel"), exports);
|
|
98
98
|
__exportStar(require("./models/TrainingAttachmentModel"), exports);
|
|
99
|
+
__exportStar(require("./models/StudyLeaveRequestModel"), exports);
|
|
100
|
+
__exportStar(require("./models/StudyLeaveWorkflowModel"), exports);
|
|
101
|
+
__exportStar(require("./models/StudyLeaveApprovalModel"), exports);
|
|
102
|
+
__exportStar(require("./models/StudyLeaveChatModel"), exports);
|
|
103
|
+
__exportStar(require("./models/StudyLeaveAttachmentModel"), exports);
|
|
99
104
|
var HrServiceRequestModel_1 = require("./models/HrServiceRequestModel");
|
|
100
105
|
Object.defineProperty(exports, "HrServiceRequestStatus", { enumerable: true, get: function () { return HrServiceRequestModel_1.HrServiceRequestStatus; } });
|
|
101
106
|
var HrServiceApprovalModel_1 = require("./models/HrServiceApprovalModel");
|
|
@@ -110,3 +115,29 @@ var HrServiceChatModel_2 = require("./models/HrServiceChatModel");
|
|
|
110
115
|
Object.defineProperty(exports, "HrServiceMessageType", { enumerable: true, get: function () { return HrServiceChatModel_2.HrServiceMessageType; } });
|
|
111
116
|
var HrServiceChatModel_3 = require("./models/HrServiceChatModel");
|
|
112
117
|
Object.defineProperty(exports, "HrServiceChatStatus", { enumerable: true, get: function () { return HrServiceChatModel_3.HrServiceChatStatus; } });
|
|
118
|
+
var TrainingRequestModel_1 = require("./models/TrainingRequestModel");
|
|
119
|
+
Object.defineProperty(exports, "TrainingRequestStatus", { enumerable: true, get: function () { return TrainingRequestModel_1.TrainingRequestStatus; } });
|
|
120
|
+
var TrainingApprovalModel_1 = require("./models/TrainingApprovalModel");
|
|
121
|
+
Object.defineProperty(exports, "TrainingApprovalStatus", { enumerable: true, get: function () { return TrainingApprovalModel_1.TrainingApprovalStatus; } });
|
|
122
|
+
var TrainingWorkflowModel_1 = require("./models/TrainingWorkflowModel");
|
|
123
|
+
Object.defineProperty(exports, "TrainingWorkFlowStatus", { enumerable: true, get: function () { return TrainingWorkflowModel_1.TrainingWorkFlowStatus; } });
|
|
124
|
+
var TrainingAttachmentModel_1 = require("./models/TrainingAttachmentModel");
|
|
125
|
+
Object.defineProperty(exports, "TrainingRequestAttachment", { enumerable: true, get: function () { return TrainingAttachmentModel_1.TrainingRequestAttachment; } });
|
|
126
|
+
var TrainingChatModel_1 = require("./models/TrainingChatModel");
|
|
127
|
+
Object.defineProperty(exports, "TrainingRequestChat", { enumerable: true, get: function () { return TrainingChatModel_1.TrainingRequestChat; } });
|
|
128
|
+
var TrainingChatModel_2 = require("./models/TrainingChatModel");
|
|
129
|
+
Object.defineProperty(exports, "TrainingMessageType", { enumerable: true, get: function () { return TrainingChatModel_2.TrainingMessageType; } });
|
|
130
|
+
var StudyLeaveRequestModel_1 = require("./models/StudyLeaveRequestModel");
|
|
131
|
+
Object.defineProperty(exports, "StudyLeaveRequestStatus", { enumerable: true, get: function () { return StudyLeaveRequestModel_1.StudyLeaveRequestStatus; } });
|
|
132
|
+
var StudyLeaveApprovalModel_1 = require("./models/StudyLeaveApprovalModel");
|
|
133
|
+
Object.defineProperty(exports, "StudyLeaveApprovalStatus", { enumerable: true, get: function () { return StudyLeaveApprovalModel_1.StudyLeaveApprovalStatus; } });
|
|
134
|
+
var StudyLeaveWorkflowModel_1 = require("./models/StudyLeaveWorkflowModel");
|
|
135
|
+
Object.defineProperty(exports, "StudyLeaveWorkFlowStatus", { enumerable: true, get: function () { return StudyLeaveWorkflowModel_1.StudyLeaveWorkFlowStatus; } });
|
|
136
|
+
var StudyLeaveAttachmentModel_1 = require("./models/StudyLeaveAttachmentModel");
|
|
137
|
+
Object.defineProperty(exports, "StudyLeaveRequestAttachment", { enumerable: true, get: function () { return StudyLeaveAttachmentModel_1.StudyLeaveRequestAttachment; } });
|
|
138
|
+
var StudyLeaveChatModel_1 = require("./models/StudyLeaveChatModel");
|
|
139
|
+
Object.defineProperty(exports, "StudyLeaveRequestChat", { enumerable: true, get: function () { return StudyLeaveChatModel_1.StudyLeaveRequestChat; } });
|
|
140
|
+
var StudyLeaveChatModel_2 = require("./models/StudyLeaveChatModel");
|
|
141
|
+
Object.defineProperty(exports, "StudyLeaveMessageType", { enumerable: true, get: function () { return StudyLeaveChatModel_2.StudyLeaveMessageType; } });
|
|
142
|
+
var StudyLeaveChatModel_3 = require("./models/StudyLeaveChatModel");
|
|
143
|
+
Object.defineProperty(exports, "StudyLeaveChatStatus", { enumerable: true, get: function () { return StudyLeaveChatModel_3.StudyLeaveChatStatus; } });
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
export declare enum StudyLeaveApprovalStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
IN_PROGRESS = "In Progress",
|
|
5
|
+
APPROVED = "Approved",
|
|
6
|
+
REJECTED = "Rejected",
|
|
7
|
+
ASSIGNED = "Assigned"
|
|
8
|
+
}
|
|
9
|
+
export declare class StudyLeaveApprovalDetails extends BaseModel {
|
|
10
|
+
request_id: number;
|
|
11
|
+
service_id: number | null;
|
|
12
|
+
sub_service_id: number | null;
|
|
13
|
+
level: number;
|
|
14
|
+
approver_user_id: number | null;
|
|
15
|
+
approver_role_id: number | null;
|
|
16
|
+
department_id: number | null;
|
|
17
|
+
section_id: number | null;
|
|
18
|
+
delegate_user_id: number | null;
|
|
19
|
+
approved_by: number | null;
|
|
20
|
+
comment: string;
|
|
21
|
+
approval_status: StudyLeaveApprovalStatus;
|
|
22
|
+
is_manager: boolean;
|
|
23
|
+
is_allowed: boolean;
|
|
24
|
+
constructor(request_id: number, approver_user_id: number | null, approver_role_id: number | null, comment: string, approval_status: StudyLeaveApprovalStatus, level: number, service_id?: number | null, sub_service_id?: number | null, department_id?: number | null, section_id?: number | null, delegate_user_id?: number | null, approved_by?: number | null, is_manager?: boolean, is_allowed?: boolean);
|
|
25
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
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.StudyLeaveApprovalDetails = exports.StudyLeaveApprovalStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var StudyLeaveApprovalStatus;
|
|
16
|
+
(function (StudyLeaveApprovalStatus) {
|
|
17
|
+
StudyLeaveApprovalStatus["PENDING"] = "Pending";
|
|
18
|
+
StudyLeaveApprovalStatus["IN_PROGRESS"] = "In Progress";
|
|
19
|
+
StudyLeaveApprovalStatus["APPROVED"] = "Approved";
|
|
20
|
+
StudyLeaveApprovalStatus["REJECTED"] = "Rejected";
|
|
21
|
+
StudyLeaveApprovalStatus["ASSIGNED"] = "Assigned";
|
|
22
|
+
})(StudyLeaveApprovalStatus || (exports.StudyLeaveApprovalStatus = StudyLeaveApprovalStatus = {}));
|
|
23
|
+
let StudyLeaveApprovalDetails = class StudyLeaveApprovalDetails extends BaseModel_1.BaseModel {
|
|
24
|
+
constructor(request_id, approver_user_id, approver_role_id, comment, approval_status, level, service_id, sub_service_id, department_id, section_id, delegate_user_id, approved_by, is_manager, is_allowed) {
|
|
25
|
+
super();
|
|
26
|
+
this.request_id = request_id;
|
|
27
|
+
this.service_id = service_id || null;
|
|
28
|
+
this.sub_service_id = sub_service_id || null;
|
|
29
|
+
this.approver_user_id = approver_user_id;
|
|
30
|
+
this.approver_role_id = approver_role_id;
|
|
31
|
+
this.comment = comment;
|
|
32
|
+
this.approval_status = approval_status;
|
|
33
|
+
this.level = level;
|
|
34
|
+
this.department_id = department_id || null;
|
|
35
|
+
this.section_id = section_id || null;
|
|
36
|
+
this.delegate_user_id = delegate_user_id || null;
|
|
37
|
+
this.approved_by = approved_by || null;
|
|
38
|
+
this.is_manager = is_manager ?? false;
|
|
39
|
+
this.is_allowed = is_allowed !== undefined ? is_allowed : true;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.StudyLeaveApprovalDetails = StudyLeaveApprovalDetails;
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], StudyLeaveApprovalDetails.prototype, "request_id", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], StudyLeaveApprovalDetails.prototype, "service_id", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], StudyLeaveApprovalDetails.prototype, "sub_service_id", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], StudyLeaveApprovalDetails.prototype, "level", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], StudyLeaveApprovalDetails.prototype, "approver_user_id", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], StudyLeaveApprovalDetails.prototype, "approver_role_id", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
69
|
+
__metadata("design:type", Object)
|
|
70
|
+
], StudyLeaveApprovalDetails.prototype, "department_id", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], StudyLeaveApprovalDetails.prototype, "section_id", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], StudyLeaveApprovalDetails.prototype, "delegate_user_id", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
81
|
+
__metadata("design:type", Object)
|
|
82
|
+
], StudyLeaveApprovalDetails.prototype, "approved_by", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true, default: "" }),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], StudyLeaveApprovalDetails.prototype, "comment", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({
|
|
89
|
+
type: "enum",
|
|
90
|
+
enum: StudyLeaveApprovalStatus,
|
|
91
|
+
default: StudyLeaveApprovalStatus.PENDING,
|
|
92
|
+
nullable: false
|
|
93
|
+
}),
|
|
94
|
+
__metadata("design:type", String)
|
|
95
|
+
], StudyLeaveApprovalDetails.prototype, "approval_status", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false, nullable: false }),
|
|
98
|
+
__metadata("design:type", Boolean)
|
|
99
|
+
], StudyLeaveApprovalDetails.prototype, "is_manager", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true, nullable: false }),
|
|
102
|
+
__metadata("design:type", Boolean)
|
|
103
|
+
], StudyLeaveApprovalDetails.prototype, "is_allowed", void 0);
|
|
104
|
+
exports.StudyLeaveApprovalDetails = StudyLeaveApprovalDetails = __decorate([
|
|
105
|
+
(0, typeorm_1.Entity)({ name: "study_leave_approvals" }),
|
|
106
|
+
__metadata("design:paramtypes", [Number, Object, Object, String, String, Number, Object, Object, Object, Object, Object, Object, Boolean, Boolean])
|
|
107
|
+
], StudyLeaveApprovalDetails);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
export declare class StudyLeaveRequestAttachment extends BaseModel {
|
|
3
|
+
request_id: number;
|
|
4
|
+
service_id: number | null;
|
|
5
|
+
sub_service_id: number | null;
|
|
6
|
+
uploaded_by: number;
|
|
7
|
+
file_url: string;
|
|
8
|
+
file_name: string;
|
|
9
|
+
file_type: string;
|
|
10
|
+
file_size: number | null;
|
|
11
|
+
description: string;
|
|
12
|
+
constructor(request_id: number, uploaded_by: number, file_url: string, service_id?: number | null, sub_service_id?: number | null, file_name?: string, file_type?: string, file_size?: number, description?: string);
|
|
13
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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.StudyLeaveRequestAttachment = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let StudyLeaveRequestAttachment = class StudyLeaveRequestAttachment extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(request_id, uploaded_by, file_url, service_id, sub_service_id, file_name, file_type, file_size, description) {
|
|
17
|
+
super();
|
|
18
|
+
this.request_id = request_id;
|
|
19
|
+
this.service_id = service_id || null;
|
|
20
|
+
this.sub_service_id = sub_service_id || null;
|
|
21
|
+
this.uploaded_by = uploaded_by;
|
|
22
|
+
this.file_url = file_url;
|
|
23
|
+
this.file_name = file_name || "";
|
|
24
|
+
this.file_type = file_type || "";
|
|
25
|
+
this.file_size = file_size || null;
|
|
26
|
+
this.description = description || "";
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.StudyLeaveRequestAttachment = StudyLeaveRequestAttachment;
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], StudyLeaveRequestAttachment.prototype, "request_id", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
36
|
+
__metadata("design:type", Object)
|
|
37
|
+
], StudyLeaveRequestAttachment.prototype, "service_id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], StudyLeaveRequestAttachment.prototype, "sub_service_id", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], StudyLeaveRequestAttachment.prototype, "uploaded_by", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: false }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], StudyLeaveRequestAttachment.prototype, "file_url", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], StudyLeaveRequestAttachment.prototype, "file_name", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], StudyLeaveRequestAttachment.prototype, "file_type", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: "bigint", nullable: true }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], StudyLeaveRequestAttachment.prototype, "file_size", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], StudyLeaveRequestAttachment.prototype, "description", void 0);
|
|
66
|
+
exports.StudyLeaveRequestAttachment = StudyLeaveRequestAttachment = __decorate([
|
|
67
|
+
(0, typeorm_1.Entity)({ name: "study_leave_request_attachments" }),
|
|
68
|
+
__metadata("design:paramtypes", [Number, Number, String, Object, Object, String, String, Number, String])
|
|
69
|
+
], StudyLeaveRequestAttachment);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
export declare enum StudyLeaveMessageType {
|
|
3
|
+
TEXT = "text",
|
|
4
|
+
IMAGE = "image",
|
|
5
|
+
VIDEO = "video",
|
|
6
|
+
FILE = "file",
|
|
7
|
+
LINK = "link"
|
|
8
|
+
}
|
|
9
|
+
export declare enum StudyLeaveChatStatus {
|
|
10
|
+
PENDING = "Pending",
|
|
11
|
+
APPROVED = "Approved",
|
|
12
|
+
REJECTED = "Rejected",
|
|
13
|
+
IN_PROGRESS = "In Progress"
|
|
14
|
+
}
|
|
15
|
+
export declare class StudyLeaveRequestChat extends BaseModel {
|
|
16
|
+
request_id: number;
|
|
17
|
+
service_id: number | null;
|
|
18
|
+
sub_service_id: number | null;
|
|
19
|
+
user_id: number;
|
|
20
|
+
message: string;
|
|
21
|
+
approver_role_id: number | null;
|
|
22
|
+
messageType: StudyLeaveMessageType;
|
|
23
|
+
is_internal: boolean;
|
|
24
|
+
status: string;
|
|
25
|
+
constructor(request_id: number, user_id: number, message: string, service_id?: number | null, sub_service_id?: number | null, messageType?: StudyLeaveMessageType, is_internal?: boolean, status?: string, approver_role_id?: number);
|
|
26
|
+
}
|
|
@@ -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);
|