@platform-modules/civil-aviation-authority 2.2.1000 → 2.3.2
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 +10 -10
- package/dist/data-source.js +2 -10
- package/dist/index.d.ts +2 -12
- package/dist/index.js +4 -20
- package/dist/models/HrServiceApprovalModel.d.ts +3 -1
- package/dist/models/HrServiceApprovalModel.js +12 -2
- package/dist/models/ITApprovalSettings.d.ts +7 -0
- package/dist/models/ITApprovalSettings.js +40 -0
- package/dist/models/ITServicesTypesMuscatModel.d.ts +6 -0
- package/dist/models/ITServicesTypesMuscatModel.js +34 -0
- package/dist/models/ITServicesTypesSalalahModel.d.ts +6 -0
- package/dist/models/ITServicesTypesSalalahModel.js +34 -0
- package/dist/models/SecondmentRequestModel.d.ts +43 -0
- package/dist/models/SecondmentRequestModel.js +189 -0
- package/dist/models/Workflows.d.ts +9 -0
- package/dist/models/Workflows.js +31 -0
- package/package.json +1 -1
- package/src/data-source.ts +181 -189
- package/src/index.ts +96 -106
- package/src/models/HrServiceApprovalModel.ts +10 -0
- package/src/models/HrServiceRequestModel.ts +167 -167
- package/src/models/ITRequestChatModel.ts +62 -62
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/src/models/SecondmentRequestModel.ts +178 -0
- package/dist/models/StudyLeaveApprovalModel.d.ts +0 -25
- package/dist/models/StudyLeaveApprovalModel.js +0 -107
- package/dist/models/StudyLeaveAttachmentModel.d.ts +0 -13
- package/dist/models/StudyLeaveAttachmentModel.js +0 -69
- package/dist/models/StudyLeaveChatModel.d.ts +0 -26
- package/dist/models/StudyLeaveChatModel.js +0 -89
- package/dist/models/StudyLeaveRequestModel.d.ts +0 -29
- package/dist/models/StudyLeaveRequestModel.js +0 -128
- package/dist/models/StudyLeaveWorkflowModel.d.ts +0 -19
- package/dist/models/StudyLeaveWorkflowModel.js +0 -81
- package/src/models/StudyLeaveApprovalModel.ts +0 -94
- package/src/models/StudyLeaveAttachmentModel.ts +0 -56
- package/src/models/StudyLeaveChatModel.ts +0 -76
- package/src/models/StudyLeaveRequestModel.ts +0 -114
- package/src/models/StudyLeaveWorkflowModel.ts +0 -68
package/.env
CHANGED
|
@@ -1,12 +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
|
|
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
6
|
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
DB_HOST=localhost
|
|
9
|
+
DB_PORT=5432
|
|
10
|
+
DB_USER=postgres
|
|
11
|
+
DB_PASS=stevejobs
|
|
12
|
+
DB_NAME=CAA
|
package/dist/data-source.js
CHANGED
|
@@ -86,11 +86,7 @@ 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
|
|
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
|
+
const SecondmentRequestModel_1 = require("./models/SecondmentRequestModel");
|
|
94
90
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
95
91
|
type: 'postgres',
|
|
96
92
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -181,10 +177,6 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
181
177
|
TrainingApprovalModel_1.TrainingApprovalDetails,
|
|
182
178
|
TrainingChatModel_1.TrainingRequestChat,
|
|
183
179
|
TrainingAttachmentModel_1.TrainingRequestAttachment,
|
|
184
|
-
|
|
185
|
-
StudyLeaveWorkflowModel_1.StudyLeaveWorkFlow,
|
|
186
|
-
StudyLeaveApprovalModel_1.StudyLeaveApprovalDetails,
|
|
187
|
-
StudyLeaveChatModel_1.StudyLeaveRequestChat,
|
|
188
|
-
StudyLeaveAttachmentModel_1.StudyLeaveRequestAttachment
|
|
180
|
+
SecondmentRequestModel_1.SecondmentRequest
|
|
189
181
|
],
|
|
190
182
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -75,11 +75,6 @@ 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';
|
|
83
78
|
export { HrServiceRequestStatus } from './models/HrServiceRequestModel';
|
|
84
79
|
export { HrServiceApprovalStatus } from './models/HrServiceApprovalModel';
|
|
85
80
|
export { HrServiceWorkFlowStatus } from './models/HrServiceWorkflowModel';
|
|
@@ -93,10 +88,5 @@ export { TrainingWorkFlowStatus } from './models/TrainingWorkflowModel';
|
|
|
93
88
|
export { TrainingRequestAttachment } from './models/TrainingAttachmentModel';
|
|
94
89
|
export { TrainingRequestChat } from './models/TrainingChatModel';
|
|
95
90
|
export { TrainingMessageType } from './models/TrainingChatModel';
|
|
96
|
-
export
|
|
97
|
-
export {
|
|
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';
|
|
91
|
+
export * from './models/SecondmentRequestModel';
|
|
92
|
+
export { SecondmentRequestStatus } from './models/SecondmentRequestModel';
|
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.
|
|
17
|
+
exports.SecondmentRequestStatus = 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,11 +96,6 @@ __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);
|
|
104
99
|
var HrServiceRequestModel_1 = require("./models/HrServiceRequestModel");
|
|
105
100
|
Object.defineProperty(exports, "HrServiceRequestStatus", { enumerable: true, get: function () { return HrServiceRequestModel_1.HrServiceRequestStatus; } });
|
|
106
101
|
var HrServiceApprovalModel_1 = require("./models/HrServiceApprovalModel");
|
|
@@ -127,17 +122,6 @@ var TrainingChatModel_1 = require("./models/TrainingChatModel");
|
|
|
127
122
|
Object.defineProperty(exports, "TrainingRequestChat", { enumerable: true, get: function () { return TrainingChatModel_1.TrainingRequestChat; } });
|
|
128
123
|
var TrainingChatModel_2 = require("./models/TrainingChatModel");
|
|
129
124
|
Object.defineProperty(exports, "TrainingMessageType", { enumerable: true, get: function () { return TrainingChatModel_2.TrainingMessageType; } });
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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; } });
|
|
125
|
+
__exportStar(require("./models/SecondmentRequestModel"), exports);
|
|
126
|
+
var SecondmentRequestModel_1 = require("./models/SecondmentRequestModel");
|
|
127
|
+
Object.defineProperty(exports, "SecondmentRequestStatus", { enumerable: true, get: function () { return SecondmentRequestModel_1.SecondmentRequestStatus; } });
|
|
@@ -20,6 +20,8 @@ export declare class HrServiceApprovalDetails extends BaseModel {
|
|
|
20
20
|
comment: string;
|
|
21
21
|
approval_status: HrServiceApprovalStatus;
|
|
22
22
|
is_manager: boolean;
|
|
23
|
+
is_president: boolean;
|
|
24
|
+
is_replace: boolean;
|
|
23
25
|
is_allowed: boolean;
|
|
24
|
-
constructor(request_id: number, approver_user_id: number | null, approver_role_id: number | null, comment: string, approval_status: HrServiceApprovalStatus, 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);
|
|
26
|
+
constructor(request_id: number, approver_user_id: number | null, approver_role_id: number | null, comment: string, approval_status: HrServiceApprovalStatus, 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_president?: boolean, is_replace?: boolean, is_allowed?: boolean);
|
|
25
27
|
}
|
|
@@ -21,7 +21,7 @@ var HrServiceApprovalStatus;
|
|
|
21
21
|
HrServiceApprovalStatus["ASSIGNED"] = "Assigned";
|
|
22
22
|
})(HrServiceApprovalStatus || (exports.HrServiceApprovalStatus = HrServiceApprovalStatus = {}));
|
|
23
23
|
let HrServiceApprovalDetails = class HrServiceApprovalDetails 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) {
|
|
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_president, is_replace, is_allowed) {
|
|
25
25
|
super();
|
|
26
26
|
this.request_id = request_id;
|
|
27
27
|
this.service_id = service_id || null;
|
|
@@ -36,6 +36,8 @@ let HrServiceApprovalDetails = class HrServiceApprovalDetails extends BaseModel_
|
|
|
36
36
|
this.delegate_user_id = delegate_user_id || null;
|
|
37
37
|
this.approved_by = approved_by || null;
|
|
38
38
|
this.is_manager = is_manager ?? false;
|
|
39
|
+
this.is_president = is_president ?? false;
|
|
40
|
+
this.is_replace = is_replace ?? false;
|
|
39
41
|
this.is_allowed = is_allowed !== undefined ? is_allowed : true;
|
|
40
42
|
}
|
|
41
43
|
};
|
|
@@ -97,11 +99,19 @@ __decorate([
|
|
|
97
99
|
(0, typeorm_1.Column)({ type: "boolean", default: null, nullable: true }),
|
|
98
100
|
__metadata("design:type", Boolean)
|
|
99
101
|
], HrServiceApprovalDetails.prototype, "is_manager", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false, nullable: true }),
|
|
104
|
+
__metadata("design:type", Boolean)
|
|
105
|
+
], HrServiceApprovalDetails.prototype, "is_president", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false, nullable: true }),
|
|
108
|
+
__metadata("design:type", Boolean)
|
|
109
|
+
], HrServiceApprovalDetails.prototype, "is_replace", void 0);
|
|
100
110
|
__decorate([
|
|
101
111
|
(0, typeorm_1.Column)({ type: "boolean", default: true, nullable: false }),
|
|
102
112
|
__metadata("design:type", Boolean)
|
|
103
113
|
], HrServiceApprovalDetails.prototype, "is_allowed", void 0);
|
|
104
114
|
exports.HrServiceApprovalDetails = HrServiceApprovalDetails = __decorate([
|
|
105
115
|
(0, typeorm_1.Entity)({ name: "hr_service_approvals" }),
|
|
106
|
-
__metadata("design:paramtypes", [Number, Object, Object, String, String, Number, Object, Object, Object, Object, Object, Object, Boolean, Boolean])
|
|
116
|
+
__metadata("design:paramtypes", [Number, Object, Object, String, String, Number, Object, Object, Object, Object, Object, Object, Boolean, Boolean, Boolean, Boolean])
|
|
107
117
|
], HrServiceApprovalDetails);
|
|
@@ -0,0 +1,40 @@
|
|
|
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.ITApprovalSettings = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let ITApprovalSettings = class ITApprovalSettings extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(level, approval_role_id, workflow_id) {
|
|
17
|
+
super();
|
|
18
|
+
this.level = level;
|
|
19
|
+
this.approval_role_id = approval_role_id;
|
|
20
|
+
this.workflow_id = workflow_id;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.ITApprovalSettings = ITApprovalSettings;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], ITApprovalSettings.prototype, "level", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], ITApprovalSettings.prototype, "approval_role_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], ITApprovalSettings.prototype, "workflow_id", void 0);
|
|
36
|
+
exports.ITApprovalSettings = ITApprovalSettings = __decorate([
|
|
37
|
+
(0, typeorm_1.Entity)({ name: 'it_approval_settings' }),
|
|
38
|
+
(0, typeorm_1.Unique)(['workflow_id', 'level']),
|
|
39
|
+
__metadata("design:paramtypes", [Number, Number, Number])
|
|
40
|
+
], ITApprovalSettings);
|
|
@@ -0,0 +1,34 @@
|
|
|
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.ITServicesTypesMuscat = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let ITServicesTypesMuscat = class ITServicesTypesMuscat extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, name_in_arabic) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.name_in_arabic = name_in_arabic;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.ITServicesTypesMuscat = ITServicesTypesMuscat;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ITServicesTypesMuscat.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ITServicesTypesMuscat.prototype, "name_in_arabic", void 0);
|
|
31
|
+
exports.ITServicesTypesMuscat = ITServicesTypesMuscat = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'it_services_types_muscat' }),
|
|
33
|
+
__metadata("design:paramtypes", [String, String])
|
|
34
|
+
], ITServicesTypesMuscat);
|
|
@@ -0,0 +1,34 @@
|
|
|
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.ITServicesTypesSalalah = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let ITServicesTypesSalalah = class ITServicesTypesSalalah extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, name_in_arabic) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.name_in_arabic = name_in_arabic;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.ITServicesTypesSalalah = ITServicesTypesSalalah;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ITServicesTypesSalalah.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ITServicesTypesSalalah.prototype, "name_in_arabic", void 0);
|
|
31
|
+
exports.ITServicesTypesSalalah = ITServicesTypesSalalah = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'it_services_types_salalah' }),
|
|
33
|
+
__metadata("design:paramtypes", [String, String])
|
|
34
|
+
], ITServicesTypesSalalah);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
export declare enum SecondmentRequestStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
ASSIGNED = "Assigned",
|
|
5
|
+
IN_PROGRESS = "In Progress",
|
|
6
|
+
COMPLETED = "Completed",
|
|
7
|
+
APPROVED = "Approved",
|
|
8
|
+
REJECTED = "Rejected"
|
|
9
|
+
}
|
|
10
|
+
export declare class SecondmentRequest extends BaseModel {
|
|
11
|
+
req_user_department_id: number | null;
|
|
12
|
+
req_user_section_id: number | null;
|
|
13
|
+
req_user_position_id: number | null;
|
|
14
|
+
service_id: number | null;
|
|
15
|
+
sub_service_id: number | null;
|
|
16
|
+
user_id: number;
|
|
17
|
+
description: string | null;
|
|
18
|
+
status: SecondmentRequestStatus;
|
|
19
|
+
reviewer_user_id: number | null;
|
|
20
|
+
assigned_to_user_id: number | null;
|
|
21
|
+
assigned_at: Date | null;
|
|
22
|
+
workflow_execution_id: string | null;
|
|
23
|
+
assigned_employee_name: string;
|
|
24
|
+
civil_id_card_number: string | null;
|
|
25
|
+
employee_id: string;
|
|
26
|
+
current_job_position: string;
|
|
27
|
+
assigned_job_position: string;
|
|
28
|
+
original_department_id: number;
|
|
29
|
+
assigned_department_id: number;
|
|
30
|
+
entity: string | null;
|
|
31
|
+
start_date: Date;
|
|
32
|
+
end_date: Date;
|
|
33
|
+
phone_number: string;
|
|
34
|
+
reason_for_request: string;
|
|
35
|
+
is_replaced: boolean;
|
|
36
|
+
replacement_employee_name: string | null;
|
|
37
|
+
replacement_employee_id: string | null;
|
|
38
|
+
replacement_civil_id_card_number: string | null;
|
|
39
|
+
replacement_reason: string | null;
|
|
40
|
+
replaced_by_user_id: number | null;
|
|
41
|
+
replaced_at: Date | null;
|
|
42
|
+
constructor(user_id: number, status?: SecondmentRequestStatus, 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, description?: string | null, reviewer_user_id?: number | null, assigned_to_user_id?: number | null, assigned_at?: Date | null, workflow_execution_id?: string | null, assigned_employee_name?: string, civil_id_card_number?: string | null, employee_id?: string, current_job_position?: string, assigned_job_position?: string, original_department_id?: number, assigned_department_id?: number, entity?: string | null, start_date?: Date, end_date?: Date, phone_number?: string, reason_for_request?: string, is_replaced?: boolean, replacement_employee_name?: string | null, replacement_employee_id?: string | null, replacement_civil_id_card_number?: string | null, replacement_reason?: string | null, replaced_by_user_id?: number | null, replaced_at?: Date | null);
|
|
43
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
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.SecondmentRequest = exports.SecondmentRequestStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var SecondmentRequestStatus;
|
|
16
|
+
(function (SecondmentRequestStatus) {
|
|
17
|
+
SecondmentRequestStatus["PENDING"] = "Pending";
|
|
18
|
+
SecondmentRequestStatus["ASSIGNED"] = "Assigned";
|
|
19
|
+
SecondmentRequestStatus["IN_PROGRESS"] = "In Progress";
|
|
20
|
+
SecondmentRequestStatus["COMPLETED"] = "Completed";
|
|
21
|
+
SecondmentRequestStatus["APPROVED"] = "Approved";
|
|
22
|
+
SecondmentRequestStatus["REJECTED"] = "Rejected";
|
|
23
|
+
})(SecondmentRequestStatus || (exports.SecondmentRequestStatus = SecondmentRequestStatus = {}));
|
|
24
|
+
let SecondmentRequest = class SecondmentRequest extends BaseModel_1.BaseModel {
|
|
25
|
+
constructor(user_id, status = SecondmentRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, description, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id, assigned_employee_name, civil_id_card_number, employee_id, current_job_position, assigned_job_position, original_department_id, assigned_department_id, entity, start_date, end_date, phone_number, reason_for_request, is_replaced, replacement_employee_name, replacement_employee_id, replacement_civil_id_card_number, replacement_reason, replaced_by_user_id, replaced_at) {
|
|
26
|
+
super();
|
|
27
|
+
this.user_id = user_id;
|
|
28
|
+
this.status = status;
|
|
29
|
+
this.service_id = service_id || null;
|
|
30
|
+
this.sub_service_id = sub_service_id || null;
|
|
31
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
32
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
33
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
34
|
+
this.description = description || null;
|
|
35
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
36
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
37
|
+
this.assigned_at = assigned_at || null;
|
|
38
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
39
|
+
this.assigned_employee_name = assigned_employee_name || "";
|
|
40
|
+
this.civil_id_card_number = civil_id_card_number || null;
|
|
41
|
+
this.employee_id = employee_id || "";
|
|
42
|
+
this.current_job_position = current_job_position || "";
|
|
43
|
+
this.assigned_job_position = assigned_job_position || "";
|
|
44
|
+
this.original_department_id = original_department_id || 0;
|
|
45
|
+
this.assigned_department_id = assigned_department_id || 0;
|
|
46
|
+
this.entity = entity || null;
|
|
47
|
+
this.start_date = start_date || new Date();
|
|
48
|
+
this.end_date = end_date || new Date();
|
|
49
|
+
this.phone_number = phone_number || "";
|
|
50
|
+
this.reason_for_request = reason_for_request || "";
|
|
51
|
+
this.is_replaced = is_replaced || false;
|
|
52
|
+
this.replacement_employee_name = replacement_employee_name || null;
|
|
53
|
+
this.replacement_employee_id = replacement_employee_id || null;
|
|
54
|
+
this.replacement_civil_id_card_number = replacement_civil_id_card_number || null;
|
|
55
|
+
this.replacement_reason = replacement_reason || null;
|
|
56
|
+
this.replaced_by_user_id = replaced_by_user_id || null;
|
|
57
|
+
this.replaced_at = replaced_at || null;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
exports.SecondmentRequest = SecondmentRequest;
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], SecondmentRequest.prototype, "req_user_department_id", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], SecondmentRequest.prototype, "req_user_section_id", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
71
|
+
__metadata("design:type", Object)
|
|
72
|
+
], SecondmentRequest.prototype, "req_user_position_id", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
75
|
+
__metadata("design:type", Object)
|
|
76
|
+
], SecondmentRequest.prototype, "service_id", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
79
|
+
__metadata("design:type", Object)
|
|
80
|
+
], SecondmentRequest.prototype, "sub_service_id", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
83
|
+
__metadata("design:type", Number)
|
|
84
|
+
], SecondmentRequest.prototype, "user_id", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
87
|
+
__metadata("design:type", Object)
|
|
88
|
+
], SecondmentRequest.prototype, "description", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.Column)({ type: "enum", enum: SecondmentRequestStatus, default: SecondmentRequestStatus.PENDING, nullable: false }),
|
|
91
|
+
__metadata("design:type", String)
|
|
92
|
+
], SecondmentRequest.prototype, "status", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
95
|
+
__metadata("design:type", Object)
|
|
96
|
+
], SecondmentRequest.prototype, "reviewer_user_id", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
99
|
+
__metadata("design:type", Object)
|
|
100
|
+
], SecondmentRequest.prototype, "assigned_to_user_id", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
103
|
+
__metadata("design:type", Object)
|
|
104
|
+
], SecondmentRequest.prototype, "assigned_at", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
107
|
+
__metadata("design:type", Object)
|
|
108
|
+
], SecondmentRequest.prototype, "workflow_execution_id", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], SecondmentRequest.prototype, "assigned_employee_name", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
115
|
+
__metadata("design:type", Object)
|
|
116
|
+
], SecondmentRequest.prototype, "civil_id_card_number", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: false }),
|
|
119
|
+
__metadata("design:type", String)
|
|
120
|
+
], SecondmentRequest.prototype, "employee_id", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
123
|
+
__metadata("design:type", String)
|
|
124
|
+
], SecondmentRequest.prototype, "current_job_position", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
127
|
+
__metadata("design:type", String)
|
|
128
|
+
], SecondmentRequest.prototype, "assigned_job_position", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
131
|
+
__metadata("design:type", Number)
|
|
132
|
+
], SecondmentRequest.prototype, "original_department_id", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
135
|
+
__metadata("design:type", Number)
|
|
136
|
+
], SecondmentRequest.prototype, "assigned_department_id", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
|
|
139
|
+
__metadata("design:type", Object)
|
|
140
|
+
], SecondmentRequest.prototype, "entity", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
143
|
+
__metadata("design:type", Date)
|
|
144
|
+
], SecondmentRequest.prototype, "start_date", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
147
|
+
__metadata("design:type", Date)
|
|
148
|
+
], SecondmentRequest.prototype, "end_date", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: false }),
|
|
151
|
+
__metadata("design:type", String)
|
|
152
|
+
], SecondmentRequest.prototype, "phone_number", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
155
|
+
__metadata("design:type", String)
|
|
156
|
+
], SecondmentRequest.prototype, "reason_for_request", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false, nullable: false }),
|
|
159
|
+
__metadata("design:type", Boolean)
|
|
160
|
+
], SecondmentRequest.prototype, "is_replaced", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
163
|
+
__metadata("design:type", Object)
|
|
164
|
+
], SecondmentRequest.prototype, "replacement_employee_name", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
|
|
167
|
+
__metadata("design:type", Object)
|
|
168
|
+
], SecondmentRequest.prototype, "replacement_employee_id", void 0);
|
|
169
|
+
__decorate([
|
|
170
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
171
|
+
__metadata("design:type", Object)
|
|
172
|
+
], SecondmentRequest.prototype, "replacement_civil_id_card_number", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
175
|
+
__metadata("design:type", Object)
|
|
176
|
+
], SecondmentRequest.prototype, "replacement_reason", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
179
|
+
__metadata("design:type", Object)
|
|
180
|
+
], SecondmentRequest.prototype, "replaced_by_user_id", void 0);
|
|
181
|
+
__decorate([
|
|
182
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
183
|
+
__metadata("design:type", Object)
|
|
184
|
+
], SecondmentRequest.prototype, "replaced_at", void 0);
|
|
185
|
+
exports.SecondmentRequest = SecondmentRequest = __decorate([
|
|
186
|
+
(0, typeorm_1.Entity)({ name: "secondment_requests" }),
|
|
187
|
+
__metadata("design:paramtypes", [Number, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, String, Object, String, String, String, Number, Number, Object, Date,
|
|
188
|
+
Date, String, String, Boolean, Object, Object, Object, Object, Object, Object])
|
|
189
|
+
], SecondmentRequest);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class Workflows extends BaseModel {
|
|
3
|
+
name: string;
|
|
4
|
+
service_id: number;
|
|
5
|
+
sub_service_id: number;
|
|
6
|
+
request_for: string;
|
|
7
|
+
levels: number;
|
|
8
|
+
constructor(name: string, service_id: number, sub_service_id: number, request_for: string, levels: number);
|
|
9
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import { Column, Entity, Unique } from "typeorm";
|
|
3
|
+
// import { BaseModel } from './BaseModel';
|
|
4
|
+
// @Entity({ name: 'workflows' })
|
|
5
|
+
// @Unique(['service_id', 'sub_service_id', 'request_for'])
|
|
6
|
+
// export class Workflows extends BaseModel {
|
|
7
|
+
// @Column({ type: 'varchar', length: 100, nullable: false })
|
|
8
|
+
// name: string;
|
|
9
|
+
// @Column({ type: 'bigint', nullable: false })
|
|
10
|
+
// service_id: number;
|
|
11
|
+
// @Column({ type: 'bigint', nullable: false })
|
|
12
|
+
// sub_service_id: number;
|
|
13
|
+
// @Column({ type: 'varchar', length: 20, nullable: false })
|
|
14
|
+
// request_for: string; // 'Self' | 'Behalf of' | 'Internal'
|
|
15
|
+
// @Column({ type: 'int', nullable: false })
|
|
16
|
+
// levels: number;
|
|
17
|
+
// constructor(
|
|
18
|
+
// name: string,
|
|
19
|
+
// service_id: number,
|
|
20
|
+
// sub_service_id: number,
|
|
21
|
+
// request_for: string,
|
|
22
|
+
// levels: number,
|
|
23
|
+
// ) {
|
|
24
|
+
// super();
|
|
25
|
+
// this.name = name;
|
|
26
|
+
// this.service_id = service_id;
|
|
27
|
+
// this.sub_service_id = sub_service_id;
|
|
28
|
+
// this.request_for = request_for;
|
|
29
|
+
// this.levels = levels;
|
|
30
|
+
// }
|
|
31
|
+
// }
|