@platform-modules/civil-aviation-authority 2.2.312 → 2.2.320
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 -2
- package/dist/data-source.js +9 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/models/TrainingApprovalModel.d.ts +25 -0
- package/dist/models/TrainingApprovalModel.js +107 -0
- package/dist/models/TrainingAttachmentModel.d.ts +13 -0
- package/dist/models/TrainingAttachmentModel.js +69 -0
- package/dist/models/TrainingChatModel.d.ts +20 -0
- package/dist/models/TrainingChatModel.js +82 -0
- package/dist/models/TrainingWorkflowModel.d.ts +19 -0
- package/dist/models/TrainingWorkflowModel.js +81 -0
- package/package.json +1 -1
- package/src/data-source.ts +9 -1
- package/src/index.ts +4 -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/TrainingApprovalModel.ts +94 -0
- package/src/models/TrainingAttachmentModel.ts +56 -0
- package/src/models/TrainingChatModel.ts +70 -0
- package/src/models/TrainingWorkflowModel.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 -9
- package/dist/models/Workflows.js +0 -31
package/.env
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
# DB_HOST=164.52.222.169
|
|
2
|
+
# DB_PORT=5432
|
|
3
|
+
# DB_USER=postgres_admin_user
|
|
4
|
+
# DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
|
|
5
|
+
# DB_NAME=CAA
|
|
6
|
+
|
|
7
|
+
|
|
1
8
|
DB_HOST=localhost
|
|
2
|
-
DB_PORT=
|
|
9
|
+
DB_PORT=5432
|
|
3
10
|
DB_USER=postgres
|
|
4
|
-
DB_PASS=
|
|
11
|
+
DB_PASS=stevejobs
|
|
5
12
|
DB_NAME=CAA
|
package/dist/data-source.js
CHANGED
|
@@ -82,6 +82,10 @@ const HrServiceWorkflowModel_1 = require("./models/HrServiceWorkflowModel");
|
|
|
82
82
|
const HrServiceAttachmentModel_1 = require("./models/HrServiceAttachmentModel");
|
|
83
83
|
const HrServiceChatModel_1 = require("./models/HrServiceChatModel");
|
|
84
84
|
const TrainingRequestModel_1 = require("./models/TrainingRequestModel");
|
|
85
|
+
const TrainingWorkflowModel_1 = require("./models/TrainingWorkflowModel");
|
|
86
|
+
const TrainingApprovalModel_1 = require("./models/TrainingApprovalModel");
|
|
87
|
+
const TrainingChatModel_1 = require("./models/TrainingChatModel");
|
|
88
|
+
const TrainingAttachmentModel_1 = require("./models/TrainingAttachmentModel");
|
|
85
89
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
86
90
|
type: 'postgres',
|
|
87
91
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -167,6 +171,10 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
167
171
|
HrServiceWorkflowModel_1.HrServiceWorkFlow,
|
|
168
172
|
HrServiceAttachmentModel_1.HrServiceRequestAttachment,
|
|
169
173
|
HrServiceChatModel_1.HrServiceRequestChat,
|
|
170
|
-
TrainingRequestModel_1.TrainingRequest
|
|
174
|
+
TrainingRequestModel_1.TrainingRequest,
|
|
175
|
+
TrainingWorkflowModel_1.TrainingWorkFlow,
|
|
176
|
+
TrainingApprovalModel_1.TrainingApprovalDetails,
|
|
177
|
+
TrainingChatModel_1.TrainingRequestChat,
|
|
178
|
+
TrainingAttachmentModel_1.TrainingRequestAttachment
|
|
171
179
|
],
|
|
172
180
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -71,6 +71,10 @@ export * from './models/HrServiceWorkflowModel';
|
|
|
71
71
|
export * from './models/HrServiceAttachmentModel';
|
|
72
72
|
export * from './models/HrServiceChatModel';
|
|
73
73
|
export * from './models/TrainingRequestModel';
|
|
74
|
+
export * from './models/TrainingWorkflowModel';
|
|
75
|
+
export * from './models/TrainingApprovalModel';
|
|
76
|
+
export * from './models/TrainingChatModel';
|
|
77
|
+
export * from './models/TrainingAttachmentModel';
|
|
74
78
|
export { HrServiceRequestStatus } from './models/HrServiceRequestModel';
|
|
75
79
|
export { HrServiceApprovalStatus } from './models/HrServiceApprovalModel';
|
|
76
80
|
export { HrServiceWorkFlowStatus } from './models/HrServiceWorkflowModel';
|
package/dist/index.js
CHANGED
|
@@ -92,6 +92,10 @@ __exportStar(require("./models/HrServiceWorkflowModel"), exports);
|
|
|
92
92
|
__exportStar(require("./models/HrServiceAttachmentModel"), exports);
|
|
93
93
|
__exportStar(require("./models/HrServiceChatModel"), exports);
|
|
94
94
|
__exportStar(require("./models/TrainingRequestModel"), exports);
|
|
95
|
+
__exportStar(require("./models/TrainingWorkflowModel"), exports);
|
|
96
|
+
__exportStar(require("./models/TrainingApprovalModel"), exports);
|
|
97
|
+
__exportStar(require("./models/TrainingChatModel"), exports);
|
|
98
|
+
__exportStar(require("./models/TrainingAttachmentModel"), exports);
|
|
95
99
|
var HrServiceRequestModel_1 = require("./models/HrServiceRequestModel");
|
|
96
100
|
Object.defineProperty(exports, "HrServiceRequestStatus", { enumerable: true, get: function () { return HrServiceRequestModel_1.HrServiceRequestStatus; } });
|
|
97
101
|
var HrServiceApprovalModel_1 = require("./models/HrServiceApprovalModel");
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
export declare enum TrainingApprovalStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
IN_PROGRESS = "In Progress",
|
|
5
|
+
APPROVED = "Approved",
|
|
6
|
+
REJECTED = "Rejected",
|
|
7
|
+
ASSIGNED = "Assigned"
|
|
8
|
+
}
|
|
9
|
+
export declare class TrainingApprovalDetails 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: TrainingApprovalStatus;
|
|
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: TrainingApprovalStatus, 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.TrainingApprovalDetails = exports.TrainingApprovalStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var TrainingApprovalStatus;
|
|
16
|
+
(function (TrainingApprovalStatus) {
|
|
17
|
+
TrainingApprovalStatus["PENDING"] = "Pending";
|
|
18
|
+
TrainingApprovalStatus["IN_PROGRESS"] = "In Progress";
|
|
19
|
+
TrainingApprovalStatus["APPROVED"] = "Approved";
|
|
20
|
+
TrainingApprovalStatus["REJECTED"] = "Rejected";
|
|
21
|
+
TrainingApprovalStatus["ASSIGNED"] = "Assigned";
|
|
22
|
+
})(TrainingApprovalStatus || (exports.TrainingApprovalStatus = TrainingApprovalStatus = {}));
|
|
23
|
+
let TrainingApprovalDetails = class TrainingApprovalDetails 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.TrainingApprovalDetails = TrainingApprovalDetails;
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], TrainingApprovalDetails.prototype, "request_id", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], TrainingApprovalDetails.prototype, "service_id", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], TrainingApprovalDetails.prototype, "sub_service_id", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], TrainingApprovalDetails.prototype, "level", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], TrainingApprovalDetails.prototype, "approver_user_id", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], TrainingApprovalDetails.prototype, "approver_role_id", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
69
|
+
__metadata("design:type", Object)
|
|
70
|
+
], TrainingApprovalDetails.prototype, "department_id", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], TrainingApprovalDetails.prototype, "section_id", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], TrainingApprovalDetails.prototype, "delegate_user_id", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
81
|
+
__metadata("design:type", Object)
|
|
82
|
+
], TrainingApprovalDetails.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
|
+
], TrainingApprovalDetails.prototype, "comment", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({
|
|
89
|
+
type: "enum",
|
|
90
|
+
enum: TrainingApprovalStatus,
|
|
91
|
+
default: TrainingApprovalStatus.PENDING,
|
|
92
|
+
nullable: false
|
|
93
|
+
}),
|
|
94
|
+
__metadata("design:type", String)
|
|
95
|
+
], TrainingApprovalDetails.prototype, "approval_status", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false, nullable: false }),
|
|
98
|
+
__metadata("design:type", Boolean)
|
|
99
|
+
], TrainingApprovalDetails.prototype, "is_manager", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true, nullable: false }),
|
|
102
|
+
__metadata("design:type", Boolean)
|
|
103
|
+
], TrainingApprovalDetails.prototype, "is_allowed", void 0);
|
|
104
|
+
exports.TrainingApprovalDetails = TrainingApprovalDetails = __decorate([
|
|
105
|
+
(0, typeorm_1.Entity)({ name: "training_approvals" }),
|
|
106
|
+
__metadata("design:paramtypes", [Number, Object, Object, String, String, Number, Object, Object, Object, Object, Object, Object, Boolean, Boolean])
|
|
107
|
+
], TrainingApprovalDetails);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
export declare class TrainingRequestAttachment 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.TrainingRequestAttachment = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let TrainingRequestAttachment = class TrainingRequestAttachment 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.TrainingRequestAttachment = TrainingRequestAttachment;
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], TrainingRequestAttachment.prototype, "request_id", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
36
|
+
__metadata("design:type", Object)
|
|
37
|
+
], TrainingRequestAttachment.prototype, "service_id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], TrainingRequestAttachment.prototype, "sub_service_id", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], TrainingRequestAttachment.prototype, "uploaded_by", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: false }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], TrainingRequestAttachment.prototype, "file_url", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], TrainingRequestAttachment.prototype, "file_name", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], TrainingRequestAttachment.prototype, "file_type", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: "bigint", nullable: true }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], TrainingRequestAttachment.prototype, "file_size", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], TrainingRequestAttachment.prototype, "description", void 0);
|
|
66
|
+
exports.TrainingRequestAttachment = TrainingRequestAttachment = __decorate([
|
|
67
|
+
(0, typeorm_1.Entity)({ name: "training_request_attachments" }),
|
|
68
|
+
__metadata("design:paramtypes", [Number, Number, String, Object, Object, String, String, Number, String])
|
|
69
|
+
], TrainingRequestAttachment);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
export declare enum TrainingMessageType {
|
|
3
|
+
TEXT = "text",
|
|
4
|
+
IMAGE = "image",
|
|
5
|
+
VIDEO = "video",
|
|
6
|
+
FILE = "file",
|
|
7
|
+
LINK = "link"
|
|
8
|
+
}
|
|
9
|
+
export declare class TrainingRequestChat extends BaseModel {
|
|
10
|
+
request_id: number;
|
|
11
|
+
service_id: number | null;
|
|
12
|
+
sub_service_id: number | null;
|
|
13
|
+
user_id: number;
|
|
14
|
+
message: string;
|
|
15
|
+
approver_role_id: number | null;
|
|
16
|
+
messageType: TrainingMessageType;
|
|
17
|
+
is_internal: boolean;
|
|
18
|
+
status: string;
|
|
19
|
+
constructor(request_id: number, user_id: number, message: string, service_id?: number | null, sub_service_id?: number | null, messageType?: TrainingMessageType, is_internal?: boolean, status?: string, approver_role_id?: number);
|
|
20
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
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.TrainingRequestChat = exports.TrainingMessageType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var TrainingMessageType;
|
|
16
|
+
(function (TrainingMessageType) {
|
|
17
|
+
TrainingMessageType["TEXT"] = "text";
|
|
18
|
+
TrainingMessageType["IMAGE"] = "image";
|
|
19
|
+
TrainingMessageType["VIDEO"] = "video";
|
|
20
|
+
TrainingMessageType["FILE"] = "file";
|
|
21
|
+
TrainingMessageType["LINK"] = "link";
|
|
22
|
+
})(TrainingMessageType || (exports.TrainingMessageType = TrainingMessageType = {}));
|
|
23
|
+
let TrainingRequestChat = class TrainingRequestChat extends BaseModel_1.BaseModel {
|
|
24
|
+
constructor(request_id, user_id, message, service_id, sub_service_id, messageType, is_internal, status, approver_role_id) {
|
|
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.user_id = user_id;
|
|
30
|
+
this.message = message;
|
|
31
|
+
this.messageType = messageType || TrainingMessageType.TEXT;
|
|
32
|
+
this.is_internal = is_internal || false;
|
|
33
|
+
this.status = status || 'Pending';
|
|
34
|
+
this.approver_role_id = approver_role_id || null;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.TrainingRequestChat = TrainingRequestChat;
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], TrainingRequestChat.prototype, "request_id", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], TrainingRequestChat.prototype, "service_id", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], TrainingRequestChat.prototype, "sub_service_id", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], TrainingRequestChat.prototype, "user_id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], TrainingRequestChat.prototype, "message", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], TrainingRequestChat.prototype, "approver_role_id", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({
|
|
64
|
+
type: "enum",
|
|
65
|
+
enum: TrainingMessageType,
|
|
66
|
+
default: TrainingMessageType.TEXT,
|
|
67
|
+
nullable: false
|
|
68
|
+
}),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], TrainingRequestChat.prototype, "messageType", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false }),
|
|
73
|
+
__metadata("design:type", Boolean)
|
|
74
|
+
], TrainingRequestChat.prototype, "is_internal", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], TrainingRequestChat.prototype, "status", void 0);
|
|
79
|
+
exports.TrainingRequestChat = TrainingRequestChat = __decorate([
|
|
80
|
+
(0, typeorm_1.Entity)({ name: "training_request_chat" }),
|
|
81
|
+
__metadata("design:paramtypes", [Number, Number, String, Object, Object, String, Boolean, String, Number])
|
|
82
|
+
], TrainingRequestChat);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
export declare enum TrainingWorkFlowStatus {
|
|
3
|
+
COMPLETED = "Completed",
|
|
4
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
REJECTED = "Rejected"
|
|
7
|
+
}
|
|
8
|
+
export declare class TrainingWorkFlow 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: TrainingWorkFlowStatus;
|
|
18
|
+
constructor(request_id: number, content: string, status: TrainingWorkFlowStatus, 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.TrainingWorkFlow = exports.TrainingWorkFlowStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var TrainingWorkFlowStatus;
|
|
16
|
+
(function (TrainingWorkFlowStatus) {
|
|
17
|
+
TrainingWorkFlowStatus["COMPLETED"] = "Completed";
|
|
18
|
+
TrainingWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
19
|
+
TrainingWorkFlowStatus["PENDING"] = "Pending";
|
|
20
|
+
TrainingWorkFlowStatus["REJECTED"] = "Rejected";
|
|
21
|
+
})(TrainingWorkFlowStatus || (exports.TrainingWorkFlowStatus = TrainingWorkFlowStatus = {}));
|
|
22
|
+
let TrainingWorkFlow = class TrainingWorkFlow 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.TrainingWorkFlow = TrainingWorkFlow;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: "int", nullable: false }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], TrainingWorkFlow.prototype, "request_id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], TrainingWorkFlow.prototype, "service_id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], TrainingWorkFlow.prototype, "sub_service_id", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], TrainingWorkFlow.prototype, "order", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], TrainingWorkFlow.prototype, "content", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], TrainingWorkFlow.prototype, "approver_role_id", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], TrainingWorkFlow.prototype, "approver_user_id", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], TrainingWorkFlow.prototype, "approved_by", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({
|
|
71
|
+
type: "enum",
|
|
72
|
+
enum: TrainingWorkFlowStatus,
|
|
73
|
+
default: TrainingWorkFlowStatus.PENDING,
|
|
74
|
+
nullable: false
|
|
75
|
+
}),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], TrainingWorkFlow.prototype, "status", void 0);
|
|
78
|
+
exports.TrainingWorkFlow = TrainingWorkFlow = __decorate([
|
|
79
|
+
(0, typeorm_1.Entity)({ name: "training_workflows" }),
|
|
80
|
+
__metadata("design:paramtypes", [Number, String, String, Object, Object, Number, Object, Object, Object])
|
|
81
|
+
], TrainingWorkFlow);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -80,6 +80,10 @@ import { HrServiceWorkFlow } from './models/HrServiceWorkflowModel';
|
|
|
80
80
|
import { HrServiceRequestAttachment } from './models/HrServiceAttachmentModel';
|
|
81
81
|
import { HrServiceRequestChat } from './models/HrServiceChatModel';
|
|
82
82
|
import { TrainingRequest } from './models/TrainingRequestModel';
|
|
83
|
+
import { TrainingWorkFlow } from './models/TrainingWorkflowModel';
|
|
84
|
+
import { TrainingApprovalDetails } from './models/TrainingApprovalModel';
|
|
85
|
+
import { TrainingRequestChat } from './models/TrainingChatModel';
|
|
86
|
+
import { TrainingRequestAttachment } from './models/TrainingAttachmentModel';
|
|
83
87
|
|
|
84
88
|
export const AppDataSource = new DataSource({
|
|
85
89
|
type: 'postgres',
|
|
@@ -166,6 +170,10 @@ export const AppDataSource = new DataSource({
|
|
|
166
170
|
HrServiceWorkFlow,
|
|
167
171
|
HrServiceRequestAttachment,
|
|
168
172
|
HrServiceRequestChat,
|
|
169
|
-
TrainingRequest
|
|
173
|
+
TrainingRequest,
|
|
174
|
+
TrainingWorkFlow,
|
|
175
|
+
TrainingApprovalDetails,
|
|
176
|
+
TrainingRequestChat,
|
|
177
|
+
TrainingRequestAttachment
|
|
170
178
|
],
|
|
171
179
|
});
|
package/src/index.ts
CHANGED
|
@@ -75,6 +75,10 @@ export * from './models/HrServiceWorkflowModel';
|
|
|
75
75
|
export * from './models/HrServiceAttachmentModel';
|
|
76
76
|
export * from './models/HrServiceChatModel';
|
|
77
77
|
export * from './models/TrainingRequestModel';
|
|
78
|
+
export * from './models/TrainingWorkflowModel';
|
|
79
|
+
export * from './models/TrainingApprovalModel';
|
|
80
|
+
export * from './models/TrainingChatModel';
|
|
81
|
+
export * from './models/TrainingAttachmentModel';
|
|
78
82
|
export {HrServiceRequestStatus} from './models/HrServiceRequestModel';
|
|
79
83
|
export {HrServiceApprovalStatus} from './models/HrServiceApprovalModel';
|
|
80
84
|
export {HrServiceWorkFlowStatus} from './models/HrServiceWorkflowModel';
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
import { ITHelpDeskRequests } from './ITHelpDeskModel';
|
|
4
|
-
import { User } from './user';
|
|
5
|
-
|
|
6
|
-
@Entity({ name: 'it_request_chat' })
|
|
7
|
-
export class ITRequestChat extends BaseModel {
|
|
8
|
-
|
|
9
|
-
@Column({ type: 'integer', nullable: false })
|
|
10
|
-
request_id: number;
|
|
11
|
-
|
|
12
|
-
@ManyToOne(() => ITHelpDeskRequests)
|
|
13
|
-
@JoinColumn({ name: 'request_id' })
|
|
14
|
-
request: ITHelpDeskRequests;
|
|
15
|
-
|
|
16
|
-
@Column({ type: 'integer', nullable: true })
|
|
17
|
-
service_id: number | null;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'integer', nullable: true })
|
|
20
|
-
sub_service_id: number | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'integer', nullable: false })
|
|
23
|
-
user_id: number;
|
|
24
|
-
|
|
25
|
-
@ManyToOne(() => User)
|
|
26
|
-
@JoinColumn({ name: 'user_id' })
|
|
27
|
-
user: User;
|
|
28
|
-
|
|
29
|
-
@Column({ type: 'integer', nullable: true })
|
|
30
|
-
role_id: number | null;
|
|
31
|
-
|
|
32
|
-
@Column({ type: 'text', nullable: false })
|
|
33
|
-
message: string;
|
|
34
|
-
|
|
35
|
-
@Column({ type: 'text', nullable: true })
|
|
36
|
-
status: string | null;
|
|
37
|
-
|
|
38
|
-
@Column({ type: 'boolean', default: false })
|
|
39
|
-
is_internal: boolean;
|
|
40
|
-
|
|
41
|
-
constructor(
|
|
42
|
-
request_id: number,
|
|
43
|
-
user_id: number,
|
|
44
|
-
message: string,
|
|
45
|
-
is_internal?: boolean,
|
|
46
|
-
service_id?: number | null,
|
|
47
|
-
sub_service_id?: number | null,
|
|
48
|
-
role_id?: number | null,
|
|
49
|
-
status?: string | null
|
|
50
|
-
) {
|
|
51
|
-
super();
|
|
52
|
-
this.request_id = request_id;
|
|
53
|
-
this.service_id = service_id || null;
|
|
54
|
-
this.sub_service_id = sub_service_id || null;
|
|
55
|
-
this.user_id = user_id;
|
|
56
|
-
this.role_id = role_id || null;
|
|
57
|
-
this.message = message;
|
|
58
|
-
this.status = status || null;
|
|
59
|
-
this.is_internal = is_internal || false;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { ITHelpDeskRequests } from './ITHelpDeskModel';
|
|
4
|
+
import { User } from './user';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'it_request_chat' })
|
|
7
|
+
export class ITRequestChat extends BaseModel {
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'integer', nullable: false })
|
|
10
|
+
request_id: number;
|
|
11
|
+
|
|
12
|
+
@ManyToOne(() => ITHelpDeskRequests)
|
|
13
|
+
@JoinColumn({ name: 'request_id' })
|
|
14
|
+
request: ITHelpDeskRequests;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'integer', nullable: true })
|
|
17
|
+
service_id: number | null;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
sub_service_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'integer', nullable: false })
|
|
23
|
+
user_id: number;
|
|
24
|
+
|
|
25
|
+
@ManyToOne(() => User)
|
|
26
|
+
@JoinColumn({ name: 'user_id' })
|
|
27
|
+
user: User;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'integer', nullable: true })
|
|
30
|
+
role_id: number | null;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'text', nullable: false })
|
|
33
|
+
message: string;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'text', nullable: true })
|
|
36
|
+
status: string | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'boolean', default: false })
|
|
39
|
+
is_internal: boolean;
|
|
40
|
+
|
|
41
|
+
constructor(
|
|
42
|
+
request_id: number,
|
|
43
|
+
user_id: number,
|
|
44
|
+
message: string,
|
|
45
|
+
is_internal?: boolean,
|
|
46
|
+
service_id?: number | null,
|
|
47
|
+
sub_service_id?: number | null,
|
|
48
|
+
role_id?: number | null,
|
|
49
|
+
status?: string | null
|
|
50
|
+
) {
|
|
51
|
+
super();
|
|
52
|
+
this.request_id = request_id;
|
|
53
|
+
this.service_id = service_id || null;
|
|
54
|
+
this.sub_service_id = sub_service_id || null;
|
|
55
|
+
this.user_id = user_id;
|
|
56
|
+
this.role_id = role_id || null;
|
|
57
|
+
this.message = message;
|
|
58
|
+
this.status = status || null;
|
|
59
|
+
this.is_internal = is_internal || false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|