@platform-modules/civil-aviation-authority 2.0.25 → 2.0.27
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 -4
- package/dist/data-source.js +11 -7
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -4
- package/dist/models/ITHelpDeskModel.d.ts +4 -1
- package/dist/models/ITHelpDeskModel.js +17 -2
- package/dist/models/ItApprovalsModel.d.ts +2 -2
- package/dist/models/ItApprovalsModel.js +2 -2
- package/dist/models/ItWorkflowModel.d.ts +1 -2
- package/dist/models/ItWorkflowModel.js +2 -7
- package/dist/models/LogisticsApprovalModel.d.ts +1 -0
- package/dist/models/LogisticsApprovalModel.js +1 -0
- package/dist/models/LogisticsForeignVehicleModel.d.ts +5 -6
- package/dist/models/LogisticsForeignVehicleModel.js +5 -7
- package/dist/models/NotificationModel.d.ts +0 -3
- package/dist/models/NotificationModel.js +0 -3
- package/dist/models/PortalFeedbackModel.d.ts +8 -0
- package/dist/models/PortalFeedbackModel.js +44 -0
- package/dist/models/WorkflowTask.d.ts +1 -4
- package/dist/models/WorkflowTask.js +2 -17
- package/dist/models/WorkflowTaskNames.d.ts +12 -3
- package/dist/models/WorkflowTaskNames.js +28 -9
- package/dist/models/feedbackModel.d.ts +16 -0
- package/dist/models/feedbackModel.js +61 -0
- package/dist/models/user.d.ts +3 -2
- package/dist/models/user.js +9 -4
- package/package.json +1 -1
- package/src/data-source.ts +6 -6
- package/src/index.ts +4 -4
- package/src/models/ITApprovalSettings.ts +29 -0
- package/src/models/ITHelpDeskModel.ts +14 -0
- package/src/models/ITServicesTypesMuscatModel.ts +22 -0
- package/src/models/ITServicesTypesSalalahModel.ts +22 -0
- package/src/models/ItApprovalsModel.ts +2 -2
- package/src/models/ItWorkflowModel.ts +1 -5
- package/src/models/LogisticsForeignVehicleModel.ts +5 -6
- package/src/models/NotificationModel.ts +0 -3
- package/src/models/WorkflowTask.ts +1 -16
- package/src/models/WorkflowTaskNames.ts +27 -8
- package/src/models/Workflows.ts +40 -0
package/.env
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
DB_HOST=localhost
|
|
2
|
-
DB_PORT=5433
|
|
3
|
-
DB_USER=postgres
|
|
4
|
-
DB_PASS=123
|
|
1
|
+
# DB_HOST=localhost
|
|
2
|
+
# DB_PORT=5433
|
|
3
|
+
# DB_USER=postgres
|
|
4
|
+
# DB_PASS=123
|
|
5
|
+
# DB_NAME=CAA
|
|
6
|
+
|
|
7
|
+
DB_HOST=164.52.222.169
|
|
8
|
+
DB_PORT=5432
|
|
9
|
+
DB_USER=postgres_admin_user
|
|
10
|
+
DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
|
|
5
11
|
DB_NAME=CAA
|
package/dist/data-source.js
CHANGED
|
@@ -9,12 +9,12 @@ const user_1 = require("./models/user"); // import all entities here
|
|
|
9
9
|
const user_sessions_1 = require("./models/user-sessions");
|
|
10
10
|
const role_1 = require("./models/role");
|
|
11
11
|
const ITHelpDeskModel_1 = require("./models/ITHelpDeskModel");
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const ITServicesTypesSalalahModel_1 = require("./models/ITServicesTypesSalalahModel");
|
|
13
|
+
const ITServicesTypesMuscatModel_1 = require("./models/ITServicesTypesMuscatModel");
|
|
14
14
|
const ServiceTypeModel_1 = require("./models/ServiceTypeModel");
|
|
15
15
|
const CAAServices_1 = require("./models/CAAServices");
|
|
16
16
|
const CAASubServices_1 = require("./models/CAASubServices");
|
|
17
|
-
|
|
17
|
+
const ITApprovalSettings_1 = require("./models/ITApprovalSettings");
|
|
18
18
|
// import { Workflows } from './models/Workflows';
|
|
19
19
|
const ItApprovalsModel_1 = require("./models/ItApprovalsModel");
|
|
20
20
|
const ItWorkflowModel_1 = require("./models/ItWorkflowModel");
|
|
@@ -42,6 +42,8 @@ const LogisticsAttachmentModel_1 = require("./models/LogisticsAttachmentModel");
|
|
|
42
42
|
const LogisticsWorkflowModel_1 = require("./models/LogisticsWorkflowModel");
|
|
43
43
|
const importantLinksModel_1 = require("./models/importantLinksModel");
|
|
44
44
|
const DelegateSettingsModel_1 = require("./models/DelegateSettingsModel");
|
|
45
|
+
const feedbackModel_1 = require("./models/feedbackModel");
|
|
46
|
+
const PortalFeedbackModel_1 = require("./models/PortalFeedbackModel");
|
|
45
47
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
46
48
|
type: 'postgres',
|
|
47
49
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -55,12 +57,12 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
55
57
|
user_1.User, user_sessions_1.userSessions,
|
|
56
58
|
role_1.Role,
|
|
57
59
|
ITHelpDeskModel_1.ITHelpDeskRequests,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
ITServicesTypesSalalahModel_1.ITServicesTypesSalalah,
|
|
61
|
+
ITServicesTypesMuscatModel_1.ITServicesTypesMuscat,
|
|
60
62
|
ServiceTypeModel_1.ServiceType,
|
|
61
63
|
CAAServices_1.CAAServices,
|
|
62
64
|
CAASubServices_1.CAASubServices,
|
|
63
|
-
|
|
65
|
+
ITApprovalSettings_1.ITApprovalSettings,
|
|
64
66
|
// Workflows,
|
|
65
67
|
ItApprovalsModel_1.ItApprovalDetails,
|
|
66
68
|
ItWorkflowModel_1.ItWorkFlow,
|
|
@@ -87,6 +89,8 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
87
89
|
LogisticsAttachmentModel_1.LogisticsRequestAttachment,
|
|
88
90
|
LogisticsWorkflowModel_1.LogisticsWorkFlow,
|
|
89
91
|
importantLinksModel_1.ImportantLinks,
|
|
90
|
-
DelegateSettingsModel_1.DelegateSettings
|
|
92
|
+
DelegateSettingsModel_1.DelegateSettings,
|
|
93
|
+
feedbackModel_1.Feedback,
|
|
94
|
+
PortalFeedbackModel_1.PortalFeedback
|
|
91
95
|
],
|
|
92
96
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -2,9 +2,12 @@ export * from './models/user';
|
|
|
2
2
|
export * from './models/role';
|
|
3
3
|
export * from './models/user-sessions';
|
|
4
4
|
export * from './models/ITHelpDeskModel';
|
|
5
|
+
export * from './models/ITServicesTypesSalalahModel';
|
|
6
|
+
export * from './models/ITServicesTypesMuscatModel';
|
|
5
7
|
export * from './models/ServiceTypeModel';
|
|
6
8
|
export * from './models/CAAServices';
|
|
7
9
|
export * from './models/CAASubServices';
|
|
10
|
+
export * from './models/ITApprovalSettings';
|
|
8
11
|
export * from './models/ItApprovalsModel';
|
|
9
12
|
export * from './models/ItWorkflowModel';
|
|
10
13
|
export * from './models/WorkflowDefinitions';
|
|
@@ -31,3 +34,5 @@ export * from './models/LogisticsAttachmentModel';
|
|
|
31
34
|
export * from './models/importantLinksModel';
|
|
32
35
|
export * from './models/LogisticsWorkflowModel';
|
|
33
36
|
export * from './models/DelegateSettingsModel';
|
|
37
|
+
export * from './models/feedbackModel';
|
|
38
|
+
export * from './models/PortalFeedbackModel';
|
package/dist/index.js
CHANGED
|
@@ -18,13 +18,13 @@ __exportStar(require("./models/user"), exports);
|
|
|
18
18
|
__exportStar(require("./models/role"), exports);
|
|
19
19
|
__exportStar(require("./models/user-sessions"), exports);
|
|
20
20
|
__exportStar(require("./models/ITHelpDeskModel"), exports);
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
__exportStar(require("./models/ITServicesTypesSalalahModel"), exports);
|
|
22
|
+
__exportStar(require("./models/ITServicesTypesMuscatModel"), exports);
|
|
23
23
|
__exportStar(require("./models/ServiceTypeModel"), exports);
|
|
24
24
|
__exportStar(require("./models/CAAServices"), exports);
|
|
25
25
|
__exportStar(require("./models/CAASubServices"), exports);
|
|
26
|
-
|
|
27
|
-
// export * from './models/Workflows';
|
|
26
|
+
__exportStar(require("./models/ITApprovalSettings"), exports);
|
|
27
|
+
// export * from './models/Workflows';
|
|
28
28
|
__exportStar(require("./models/ItApprovalsModel"), exports);
|
|
29
29
|
__exportStar(require("./models/ItWorkflowModel"), exports);
|
|
30
30
|
__exportStar(require("./models/WorkflowDefinitions"), exports);
|
|
@@ -51,3 +51,5 @@ __exportStar(require("./models/LogisticsAttachmentModel"), exports);
|
|
|
51
51
|
__exportStar(require("./models/importantLinksModel"), exports);
|
|
52
52
|
__exportStar(require("./models/LogisticsWorkflowModel"), exports);
|
|
53
53
|
__exportStar(require("./models/DelegateSettingsModel"), exports);
|
|
54
|
+
__exportStar(require("./models/feedbackModel"), exports);
|
|
55
|
+
__exportStar(require("./models/PortalFeedbackModel"), exports);
|
|
@@ -22,8 +22,11 @@ export declare class ITHelpDeskRequests extends BaseModel {
|
|
|
22
22
|
extn_num: string;
|
|
23
23
|
contact_num: string;
|
|
24
24
|
request_date: Date;
|
|
25
|
+
attachment_url: string;
|
|
25
26
|
user_id: number;
|
|
27
|
+
reporting_manager: number;
|
|
28
|
+
assigned_to: number;
|
|
26
29
|
status: status;
|
|
27
30
|
workflow_execution_id: string | null;
|
|
28
|
-
constructor(service_id: number, sub_service_id: number, problem: string, request_for: ContactFor, description: string, extn_num: string, contact_num: string, request_date: Date, status: status, workflow_execution_id?: string, req_user_department_id?: number | null, req_user_section_id?: number | null, service_type_id?: number | null);
|
|
31
|
+
constructor(service_id: number, sub_service_id: number, problem: string, request_for: ContactFor, description: string, extn_num: string, contact_num: string, request_date: Date, attachment_url: string, reporting_manager: number, assigned_to: number, status: status, workflow_execution_id?: string, req_user_department_id?: number | null, req_user_section_id?: number | null, service_type_id?: number | null);
|
|
29
32
|
}
|
|
@@ -26,7 +26,7 @@ var status;
|
|
|
26
26
|
status["REJECTED"] = "Rejected";
|
|
27
27
|
})(status || (exports.status = status = {}));
|
|
28
28
|
let ITHelpDeskRequests = class ITHelpDeskRequests extends BaseModel_1.BaseModel {
|
|
29
|
-
constructor(service_id, sub_service_id, problem, request_for, description, extn_num, contact_num, request_date, status, workflow_execution_id, req_user_department_id, req_user_section_id, service_type_id) {
|
|
29
|
+
constructor(service_id, sub_service_id, problem, request_for, description, extn_num, contact_num, request_date, attachment_url, reporting_manager, assigned_to, status, workflow_execution_id, req_user_department_id, req_user_section_id, service_type_id) {
|
|
30
30
|
super();
|
|
31
31
|
this.service_id = service_id;
|
|
32
32
|
this.sub_service_id = sub_service_id;
|
|
@@ -36,6 +36,9 @@ let ITHelpDeskRequests = class ITHelpDeskRequests extends BaseModel_1.BaseModel
|
|
|
36
36
|
this.extn_num = extn_num;
|
|
37
37
|
this.contact_num = contact_num;
|
|
38
38
|
this.request_date = request_date;
|
|
39
|
+
this.attachment_url = attachment_url;
|
|
40
|
+
this.reporting_manager = reporting_manager;
|
|
41
|
+
this.assigned_to = assigned_to;
|
|
39
42
|
this.status = status;
|
|
40
43
|
this.workflow_execution_id = workflow_execution_id || null;
|
|
41
44
|
this.req_user_department_id = req_user_department_id || null;
|
|
@@ -93,10 +96,22 @@ __decorate([
|
|
|
93
96
|
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
94
97
|
__metadata("design:type", Date)
|
|
95
98
|
], ITHelpDeskRequests.prototype, "request_date", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], ITHelpDeskRequests.prototype, "attachment_url", void 0);
|
|
96
103
|
__decorate([
|
|
97
104
|
(0, typeorm_1.Column)({ nullable: false }),
|
|
98
105
|
__metadata("design:type", Number)
|
|
99
106
|
], ITHelpDeskRequests.prototype, "user_id", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
109
|
+
__metadata("design:type", Number)
|
|
110
|
+
], ITHelpDeskRequests.prototype, "reporting_manager", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
113
|
+
__metadata("design:type", Number)
|
|
114
|
+
], ITHelpDeskRequests.prototype, "assigned_to", void 0);
|
|
100
115
|
__decorate([
|
|
101
116
|
(0, typeorm_1.Column)({
|
|
102
117
|
type: "enum",
|
|
@@ -112,5 +127,5 @@ __decorate([
|
|
|
112
127
|
], ITHelpDeskRequests.prototype, "workflow_execution_id", void 0);
|
|
113
128
|
exports.ITHelpDeskRequests = ITHelpDeskRequests = __decorate([
|
|
114
129
|
(0, typeorm_1.Entity)({ name: 'it_help_desk_requests' }),
|
|
115
|
-
__metadata("design:paramtypes", [Number, Number, String, String, String, String, String, Date, String, String, Object, Object, Object])
|
|
130
|
+
__metadata("design:paramtypes", [Number, Number, String, String, String, String, String, Date, String, Number, Number, String, String, Object, Object, Object])
|
|
116
131
|
], ITHelpDeskRequests);
|
|
@@ -8,11 +8,11 @@ export declare class ItApprovalDetails extends BaseModel {
|
|
|
8
8
|
request_id: number;
|
|
9
9
|
level: number;
|
|
10
10
|
approver_user_id: number | null;
|
|
11
|
-
approver_role_id: number
|
|
11
|
+
approver_role_id: number;
|
|
12
12
|
department_id: number | null;
|
|
13
13
|
section_id: number | null;
|
|
14
14
|
approved_by: number | null;
|
|
15
15
|
comment: string;
|
|
16
16
|
approval_status: ApprovalStatus;
|
|
17
|
-
constructor(request_id: number, approver_user_id: number | null, approver_role_id: number
|
|
17
|
+
constructor(request_id: number, approver_user_id: number | null, approver_role_id: number, comment: string, approval_status: ApprovalStatus, level: number, department_id?: number | null, section_id?: number | null, approved_by?: number | null);
|
|
18
18
|
}
|
|
@@ -47,7 +47,7 @@ __decorate([
|
|
|
47
47
|
], ItApprovalDetails.prototype, "approver_user_id", void 0);
|
|
48
48
|
__decorate([
|
|
49
49
|
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
50
|
-
__metadata("design:type",
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
51
|
], ItApprovalDetails.prototype, "approver_role_id", void 0);
|
|
52
52
|
__decorate([
|
|
53
53
|
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
@@ -71,5 +71,5 @@ __decorate([
|
|
|
71
71
|
], ItApprovalDetails.prototype, "approval_status", void 0);
|
|
72
72
|
exports.ItApprovalDetails = ItApprovalDetails = __decorate([
|
|
73
73
|
(0, typeorm_1.Entity)({ name: 'it_approvals' }),
|
|
74
|
-
__metadata("design:paramtypes", [Number, Object,
|
|
74
|
+
__metadata("design:paramtypes", [Number, Object, Number, String, String, Number, Object, Object, Object])
|
|
75
75
|
], ItApprovalDetails);
|
|
@@ -6,8 +6,7 @@ export declare enum workFlowStatus {
|
|
|
6
6
|
}
|
|
7
7
|
export declare class ItWorkFlow extends BaseModel {
|
|
8
8
|
request_id: number;
|
|
9
|
-
order: number | null;
|
|
10
9
|
content: string;
|
|
11
10
|
status: workFlowStatus;
|
|
12
|
-
constructor(request_id: number, content: string, status: workFlowStatus
|
|
11
|
+
constructor(request_id: number, content: string, status: workFlowStatus);
|
|
13
12
|
}
|
|
@@ -20,12 +20,11 @@ var workFlowStatus;
|
|
|
20
20
|
})(workFlowStatus || (exports.workFlowStatus = workFlowStatus = {}));
|
|
21
21
|
//This model is used to store the store the leave apporval matrix(HOD, Manager, HR, Director) based on leave type along with the levels
|
|
22
22
|
let ItWorkFlow = class ItWorkFlow extends BaseModel_1.BaseModel {
|
|
23
|
-
constructor(request_id, content, status
|
|
23
|
+
constructor(request_id, content, status) {
|
|
24
24
|
super();
|
|
25
25
|
this.request_id = request_id;
|
|
26
26
|
this.content = content;
|
|
27
27
|
this.status = status;
|
|
28
|
-
this.order = order || null;
|
|
29
28
|
}
|
|
30
29
|
};
|
|
31
30
|
exports.ItWorkFlow = ItWorkFlow;
|
|
@@ -33,10 +32,6 @@ __decorate([
|
|
|
33
32
|
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
34
33
|
__metadata("design:type", Number)
|
|
35
34
|
], ItWorkFlow.prototype, "request_id", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
38
|
-
__metadata("design:type", Object)
|
|
39
|
-
], ItWorkFlow.prototype, "order", void 0);
|
|
40
35
|
__decorate([
|
|
41
36
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
42
37
|
__metadata("design:type", String)
|
|
@@ -47,5 +42,5 @@ __decorate([
|
|
|
47
42
|
], ItWorkFlow.prototype, "status", void 0);
|
|
48
43
|
exports.ItWorkFlow = ItWorkFlow = __decorate([
|
|
49
44
|
(0, typeorm_1.Entity)({ name: 'it_work_flows' }),
|
|
50
|
-
__metadata("design:paramtypes", [Number, String, String
|
|
45
|
+
__metadata("design:paramtypes", [Number, String, String])
|
|
51
46
|
], ItWorkFlow);
|
|
@@ -15,6 +15,7 @@ const BaseModel_1 = require("./BaseModel");
|
|
|
15
15
|
var LogisticsApprovalStatus;
|
|
16
16
|
(function (LogisticsApprovalStatus) {
|
|
17
17
|
LogisticsApprovalStatus["PENDING"] = "Pending";
|
|
18
|
+
LogisticsApprovalStatus["IN_PROGRESS"] = "In Progress";
|
|
18
19
|
LogisticsApprovalStatus["APPROVED"] = "Approved";
|
|
19
20
|
LogisticsApprovalStatus["REJECTED"] = "Rejected";
|
|
20
21
|
})(LogisticsApprovalStatus || (exports.LogisticsApprovalStatus = LogisticsApprovalStatus = {}));
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
2
|
export declare enum Foreign_Purpose_of_Travel {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
CONFERENCE = "Conference/Event",
|
|
3
|
+
SITE = "Site Visit",
|
|
4
|
+
AIRPORT = "Airport Duty",
|
|
5
|
+
OFFICIAL = "Official Meeting",
|
|
7
6
|
OTHER = "Other"
|
|
8
7
|
}
|
|
9
8
|
export declare enum Foreign_Vehicle_Required_Location {
|
|
@@ -28,7 +27,7 @@ export declare class LogisticsForeignVehicleRequests extends BaseModel {
|
|
|
28
27
|
sub_service_id: number;
|
|
29
28
|
user_id: number;
|
|
30
29
|
number_of_passengers: number;
|
|
31
|
-
purpose_of_travel:
|
|
30
|
+
purpose_of_travel: string;
|
|
32
31
|
vehicle_required_location: Foreign_Vehicle_Required_Location;
|
|
33
32
|
employee_id_passport: string | null;
|
|
34
33
|
contact_number: string;
|
|
@@ -39,5 +38,5 @@ export declare class LogisticsForeignVehicleRequests extends BaseModel {
|
|
|
39
38
|
special_instructions: string | null;
|
|
40
39
|
status: Foreign_Request_Status;
|
|
41
40
|
workflow_execution_id: string | null;
|
|
42
|
-
constructor(req_user_department_id: number | null, req_user_section_id: number | null, service_id: number, sub_service_id: number, user_id: number, number_of_passengers: number, purpose_of_travel:
|
|
41
|
+
constructor(req_user_department_id: number | null, req_user_section_id: number | null, service_id: number, sub_service_id: number, user_id: number, number_of_passengers: number, purpose_of_travel: string, vehicle_required_location: Foreign_Vehicle_Required_Location, contact_number: string, request_type: Foreign_Request_Type, destination_city: string, arrival_departure_datetime: Date, status: Foreign_Request_Status, employee_id_passport?: string | null, origin_city?: string | null, special_instructions?: string | null, workflow_execution_id?: string | null);
|
|
43
42
|
}
|
|
@@ -14,10 +14,9 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
var Foreign_Purpose_of_Travel;
|
|
16
16
|
(function (Foreign_Purpose_of_Travel) {
|
|
17
|
-
Foreign_Purpose_of_Travel["
|
|
18
|
-
Foreign_Purpose_of_Travel["
|
|
19
|
-
Foreign_Purpose_of_Travel["
|
|
20
|
-
Foreign_Purpose_of_Travel["CONFERENCE"] = "Conference/Event";
|
|
17
|
+
Foreign_Purpose_of_Travel["SITE"] = "Site Visit";
|
|
18
|
+
Foreign_Purpose_of_Travel["AIRPORT"] = "Airport Duty";
|
|
19
|
+
Foreign_Purpose_of_Travel["OFFICIAL"] = "Official Meeting";
|
|
21
20
|
Foreign_Purpose_of_Travel["OTHER"] = "Other";
|
|
22
21
|
})(Foreign_Purpose_of_Travel || (exports.Foreign_Purpose_of_Travel = Foreign_Purpose_of_Travel = {}));
|
|
23
22
|
var Foreign_Vehicle_Required_Location;
|
|
@@ -87,9 +86,8 @@ __decorate([
|
|
|
87
86
|
], LogisticsForeignVehicleRequests.prototype, "number_of_passengers", void 0);
|
|
88
87
|
__decorate([
|
|
89
88
|
(0, typeorm_1.Column)({
|
|
90
|
-
type:
|
|
91
|
-
|
|
92
|
-
default: Foreign_Purpose_of_Travel.OTHER,
|
|
89
|
+
type: 'varchar',
|
|
90
|
+
default: 'Other',
|
|
93
91
|
nullable: false,
|
|
94
92
|
}),
|
|
95
93
|
__metadata("design:type", String)
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
2
|
export declare enum NotificationType {
|
|
3
3
|
REQUEST_RAISED = "request raised",
|
|
4
|
-
REQUEST_APPROVE = "request approve",
|
|
5
|
-
REQUEST_REJECT = "request reject",
|
|
6
|
-
REQUEST_WITHDRAW = "request withdraw",
|
|
7
4
|
REMINDER = "reminder",
|
|
8
5
|
IMPORT = "import"
|
|
9
6
|
}
|
|
@@ -15,9 +15,6 @@ const BaseModel_1 = require("./BaseModel");
|
|
|
15
15
|
var NotificationType;
|
|
16
16
|
(function (NotificationType) {
|
|
17
17
|
NotificationType["REQUEST_RAISED"] = "request raised";
|
|
18
|
-
NotificationType["REQUEST_APPROVE"] = "request approve";
|
|
19
|
-
NotificationType["REQUEST_REJECT"] = "request reject";
|
|
20
|
-
NotificationType["REQUEST_WITHDRAW"] = "request withdraw";
|
|
21
18
|
NotificationType["REMINDER"] = "reminder";
|
|
22
19
|
NotificationType["IMPORT"] = "import";
|
|
23
20
|
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { Rating } from './feedbackModel';
|
|
3
|
+
export declare class PortalFeedback extends BaseModel {
|
|
4
|
+
comment: string;
|
|
5
|
+
rating: Rating;
|
|
6
|
+
user_Id: number;
|
|
7
|
+
constructor(comment: string, rating: Rating, user_Id: number);
|
|
8
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.PortalFeedback = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const feedbackModel_1 = require("./feedbackModel");
|
|
16
|
+
let PortalFeedback = class PortalFeedback extends BaseModel_1.BaseModel {
|
|
17
|
+
constructor(comment, rating, user_Id) {
|
|
18
|
+
super();
|
|
19
|
+
this.comment = comment,
|
|
20
|
+
this.rating = rating,
|
|
21
|
+
this.user_Id = user_Id;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.PortalFeedback = PortalFeedback;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], PortalFeedback.prototype, "comment", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({
|
|
31
|
+
type: "enum",
|
|
32
|
+
enum: feedbackModel_1.Rating,
|
|
33
|
+
nullable: true,
|
|
34
|
+
}),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], PortalFeedback.prototype, "rating", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], PortalFeedback.prototype, "user_Id", void 0);
|
|
41
|
+
exports.PortalFeedback = PortalFeedback = __decorate([
|
|
42
|
+
(0, typeorm_1.Entity)({ name: 'portal_feedback' }),
|
|
43
|
+
__metadata("design:paramtypes", [String, Number, Number])
|
|
44
|
+
], PortalFeedback);
|
|
@@ -3,8 +3,5 @@ export declare class WorkflowTask extends BaseModel {
|
|
|
3
3
|
task_id: number;
|
|
4
4
|
name: string;
|
|
5
5
|
task_type: string;
|
|
6
|
-
|
|
7
|
-
sub_service_id: number | null;
|
|
8
|
-
service_type: string | null;
|
|
9
|
-
constructor(name: string, task_id?: number, task_type?: string, service_id?: number | null, sub_service_id?: number | null, service_type?: string | null);
|
|
6
|
+
constructor(name: string, task_id?: number, task_type?: string);
|
|
10
7
|
}
|
|
@@ -13,14 +13,11 @@ exports.WorkflowTask = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
let WorkflowTask = class WorkflowTask extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(name, task_id, task_type
|
|
16
|
+
constructor(name, task_id, task_type) {
|
|
17
17
|
super();
|
|
18
18
|
this.name = name;
|
|
19
19
|
this.task_id = task_id || 0;
|
|
20
20
|
this.task_type = task_type || '';
|
|
21
|
-
this.service_id = service_id || null;
|
|
22
|
-
this.sub_service_id = sub_service_id || null;
|
|
23
|
-
this.service_type = service_type || null;
|
|
24
21
|
}
|
|
25
22
|
};
|
|
26
23
|
exports.WorkflowTask = WorkflowTask;
|
|
@@ -36,19 +33,7 @@ __decorate([
|
|
|
36
33
|
(0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
|
|
37
34
|
__metadata("design:type", String)
|
|
38
35
|
], WorkflowTask.prototype, "task_type", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
41
|
-
__metadata("design:type", Object)
|
|
42
|
-
], WorkflowTask.prototype, "service_id", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
45
|
-
__metadata("design:type", Object)
|
|
46
|
-
], WorkflowTask.prototype, "sub_service_id", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
49
|
-
__metadata("design:type", Object)
|
|
50
|
-
], WorkflowTask.prototype, "service_type", void 0);
|
|
51
36
|
exports.WorkflowTask = WorkflowTask = __decorate([
|
|
52
37
|
(0, typeorm_1.Entity)({ name: 'workflow_tasks' }),
|
|
53
|
-
__metadata("design:paramtypes", [String, Number, String
|
|
38
|
+
__metadata("design:paramtypes", [String, Number, String])
|
|
54
39
|
], WorkflowTask);
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum TaskType {
|
|
3
|
+
SIMPLE = "SIMPLE",
|
|
4
|
+
HUMAN = "HUMAN"
|
|
5
|
+
}
|
|
6
|
+
export declare enum CategoryType {
|
|
7
|
+
CREATE = "CREATE",
|
|
8
|
+
APPROVAL = "APPROVAL",
|
|
9
|
+
NOTIFICATION = "NOTIFICATION"
|
|
10
|
+
}
|
|
2
11
|
export declare class WorkflowTaskNames extends BaseModel {
|
|
3
12
|
name: string;
|
|
4
|
-
task_id: number;
|
|
5
13
|
description: string;
|
|
6
|
-
task_type:
|
|
7
|
-
|
|
14
|
+
task_type: TaskType;
|
|
15
|
+
category: CategoryType;
|
|
16
|
+
constructor(name: string, description: string, task_type: TaskType, category: CategoryType);
|
|
8
17
|
}
|
|
@@ -9,16 +9,27 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.WorkflowTaskNames = void 0;
|
|
12
|
+
exports.WorkflowTaskNames = exports.CategoryType = exports.TaskType = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var TaskType;
|
|
16
|
+
(function (TaskType) {
|
|
17
|
+
TaskType["SIMPLE"] = "SIMPLE";
|
|
18
|
+
TaskType["HUMAN"] = "HUMAN";
|
|
19
|
+
})(TaskType || (exports.TaskType = TaskType = {}));
|
|
20
|
+
var CategoryType;
|
|
21
|
+
(function (CategoryType) {
|
|
22
|
+
CategoryType["CREATE"] = "CREATE";
|
|
23
|
+
CategoryType["APPROVAL"] = "APPROVAL";
|
|
24
|
+
CategoryType["NOTIFICATION"] = "NOTIFICATION";
|
|
25
|
+
})(CategoryType || (exports.CategoryType = CategoryType = {}));
|
|
15
26
|
let WorkflowTaskNames = class WorkflowTaskNames extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(name,
|
|
27
|
+
constructor(name, description, task_type, category) {
|
|
17
28
|
super();
|
|
18
29
|
this.name = name;
|
|
19
|
-
this.task_id = task_id;
|
|
20
30
|
this.description = description;
|
|
21
31
|
this.task_type = task_type;
|
|
32
|
+
this.category = category;
|
|
22
33
|
}
|
|
23
34
|
};
|
|
24
35
|
exports.WorkflowTaskNames = WorkflowTaskNames;
|
|
@@ -26,19 +37,27 @@ __decorate([
|
|
|
26
37
|
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
|
|
27
38
|
__metadata("design:type", String)
|
|
28
39
|
], WorkflowTaskNames.prototype, "name", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
31
|
-
__metadata("design:type", Number)
|
|
32
|
-
], WorkflowTaskNames.prototype, "task_id", void 0);
|
|
33
40
|
__decorate([
|
|
34
41
|
(0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
|
|
35
42
|
__metadata("design:type", String)
|
|
36
43
|
], WorkflowTaskNames.prototype, "description", void 0);
|
|
37
44
|
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({
|
|
45
|
+
(0, typeorm_1.Column)({
|
|
46
|
+
type: 'enum',
|
|
47
|
+
enum: TaskType,
|
|
48
|
+
nullable: true
|
|
49
|
+
}),
|
|
39
50
|
__metadata("design:type", String)
|
|
40
51
|
], WorkflowTaskNames.prototype, "task_type", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({
|
|
54
|
+
type: 'enum',
|
|
55
|
+
enum: CategoryType,
|
|
56
|
+
nullable: true
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], WorkflowTaskNames.prototype, "category", void 0);
|
|
41
60
|
exports.WorkflowTaskNames = WorkflowTaskNames = __decorate([
|
|
42
61
|
(0, typeorm_1.Entity)({ name: 'workflow_task_names' }),
|
|
43
|
-
__metadata("design:paramtypes", [String,
|
|
62
|
+
__metadata("design:paramtypes", [String, String, String, String])
|
|
44
63
|
], WorkflowTaskNames);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum Rating {
|
|
3
|
+
ONE = 1,
|
|
4
|
+
TWO = 2,
|
|
5
|
+
THREE = 3,
|
|
6
|
+
FOUR = 4,
|
|
7
|
+
FIVE = 5
|
|
8
|
+
}
|
|
9
|
+
export declare class Feedback extends BaseModel {
|
|
10
|
+
comment: string;
|
|
11
|
+
rating: Rating;
|
|
12
|
+
category_Id: number;
|
|
13
|
+
sub_category_Id: number;
|
|
14
|
+
user_Id: number;
|
|
15
|
+
constructor(comment: string, rating: Rating, category_Id: number, sub_category_Id: number, user_Id: number);
|
|
16
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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.Feedback = exports.Rating = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var Rating;
|
|
16
|
+
(function (Rating) {
|
|
17
|
+
Rating[Rating["ONE"] = 1] = "ONE";
|
|
18
|
+
Rating[Rating["TWO"] = 2] = "TWO";
|
|
19
|
+
Rating[Rating["THREE"] = 3] = "THREE";
|
|
20
|
+
Rating[Rating["FOUR"] = 4] = "FOUR";
|
|
21
|
+
Rating[Rating["FIVE"] = 5] = "FIVE";
|
|
22
|
+
})(Rating || (exports.Rating = Rating = {}));
|
|
23
|
+
let Feedback = class Feedback extends BaseModel_1.BaseModel {
|
|
24
|
+
constructor(comment, rating, category_Id, sub_category_Id, user_Id) {
|
|
25
|
+
super();
|
|
26
|
+
this.comment = comment,
|
|
27
|
+
this.rating = rating,
|
|
28
|
+
this.category_Id = category_Id,
|
|
29
|
+
this.sub_category_Id = sub_category_Id,
|
|
30
|
+
this.user_Id = user_Id;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.Feedback = Feedback;
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Feedback.prototype, "comment", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({
|
|
40
|
+
type: "enum",
|
|
41
|
+
enum: Rating,
|
|
42
|
+
nullable: true,
|
|
43
|
+
}),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], Feedback.prototype, "rating", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], Feedback.prototype, "category_Id", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], Feedback.prototype, "sub_category_Id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], Feedback.prototype, "user_Id", void 0);
|
|
58
|
+
exports.Feedback = Feedback = __decorate([
|
|
59
|
+
(0, typeorm_1.Entity)({ name: 'feedback' }),
|
|
60
|
+
__metadata("design:paramtypes", [String, Number, Number, Number, Number])
|
|
61
|
+
], Feedback);
|
package/dist/models/user.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare class User extends BaseModel {
|
|
|
21
21
|
mobile?: string;
|
|
22
22
|
office_number?: string;
|
|
23
23
|
department?: number;
|
|
24
|
-
category
|
|
24
|
+
category: "CAA" | "Embassy";
|
|
25
25
|
directorate?: string;
|
|
26
26
|
section?: number;
|
|
27
27
|
position?: number;
|
|
@@ -34,6 +34,7 @@ export declare class User extends BaseModel {
|
|
|
34
34
|
passport_number?: string;
|
|
35
35
|
personal_email?: string;
|
|
36
36
|
extension_number?: number;
|
|
37
|
+
fax_number?: string;
|
|
37
38
|
diplomatic_name?: string;
|
|
38
39
|
avatar?: string;
|
|
39
40
|
father_name?: string;
|
|
@@ -41,5 +42,5 @@ export declare class User extends BaseModel {
|
|
|
41
42
|
children1_name?: string;
|
|
42
43
|
children2_name?: string;
|
|
43
44
|
address?: string;
|
|
44
|
-
constructor(employee_id?: number, civil_employee_id?: number, employee_name?: string, employee_arabic_name?: string, person_type?: string, date_of_birth?: string, region_of_birth?: string, country_of_birth?: string, date_of_joining?: string, last_promotion_date?: string, gender?: string, qualification?: string, marital_status?: string, nationality?: string, email?: string, blood_type?: string, national_id?: number, manpower_id?: number, mobile?: string, office_number?: string, department?: number, category?:
|
|
45
|
+
constructor(employee_id?: number, civil_employee_id?: number, employee_name?: string, employee_arabic_name?: string, person_type?: string, date_of_birth?: string, region_of_birth?: string, country_of_birth?: string, date_of_joining?: string, last_promotion_date?: string, gender?: string, qualification?: string, marital_status?: string, nationality?: string, email?: string, blood_type?: string, national_id?: number, manpower_id?: number, mobile?: string, office_number?: string, department?: number, category?: "CAA" | "Embassy", directorate?: string, section?: number, position?: number, arabic_position?: string, grade?: number, location?: string, supervisor_emp_id?: number, supervisor_emp_name?: string, passport_number?: string, personal_email?: string, extension_number?: number, fax_number?: string, diplomatic_name?: string, avatar?: string, father_name?: string, spouse_name?: string, children1_name?: string, children2_name?: string, address?: string);
|
|
45
46
|
}
|
package/dist/models/user.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.User = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
let User = class User extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(employee_id, civil_employee_id, employee_name, employee_arabic_name, person_type, date_of_birth, region_of_birth, country_of_birth, date_of_joining, last_promotion_date, gender, qualification, marital_status, nationality, email, blood_type, national_id, manpower_id, mobile, office_number, department, category, directorate, section, position, arabic_position, grade, location, supervisor_emp_id, supervisor_emp_name, passport_number, personal_email, extension_number, diplomatic_name, avatar, father_name, spouse_name, children1_name, children2_name, address) {
|
|
16
|
+
constructor(employee_id, civil_employee_id, employee_name, employee_arabic_name, person_type, date_of_birth, region_of_birth, country_of_birth, date_of_joining, last_promotion_date, gender, qualification, marital_status, nationality, email, blood_type, national_id, manpower_id, mobile, office_number, department, category, directorate, section, position, arabic_position, grade, location, supervisor_emp_id, supervisor_emp_name, passport_number, personal_email, extension_number, fax_number, diplomatic_name, avatar, father_name, spouse_name, children1_name, children2_name, address) {
|
|
17
17
|
super();
|
|
18
18
|
this.employee_id = employee_id;
|
|
19
19
|
this.civil_employee_id = civil_employee_id;
|
|
@@ -36,7 +36,7 @@ let User = class User extends BaseModel_1.BaseModel {
|
|
|
36
36
|
this.mobile = mobile;
|
|
37
37
|
this.office_number = office_number;
|
|
38
38
|
this.department = department;
|
|
39
|
-
this.category = category;
|
|
39
|
+
this.category = category || "CAA";
|
|
40
40
|
this.directorate = directorate;
|
|
41
41
|
this.section = section;
|
|
42
42
|
this.position = position;
|
|
@@ -48,6 +48,7 @@ let User = class User extends BaseModel_1.BaseModel {
|
|
|
48
48
|
this.passport_number = passport_number;
|
|
49
49
|
this.personal_email = personal_email;
|
|
50
50
|
this.extension_number = extension_number;
|
|
51
|
+
this.fax_number = fax_number;
|
|
51
52
|
this.diplomatic_name = diplomatic_name;
|
|
52
53
|
this.avatar = avatar;
|
|
53
54
|
this.father_name = father_name;
|
|
@@ -143,7 +144,7 @@ __decorate([
|
|
|
143
144
|
__metadata("design:type", Number)
|
|
144
145
|
], User.prototype, "department", void 0);
|
|
145
146
|
__decorate([
|
|
146
|
-
(0, typeorm_1.Column)({ nullable:
|
|
147
|
+
(0, typeorm_1.Column)({ type: "enum", enum: ["CAA", "Embassy"], nullable: false, default: "CAA" }),
|
|
147
148
|
__metadata("design:type", String)
|
|
148
149
|
], User.prototype, "category", void 0);
|
|
149
150
|
__decorate([
|
|
@@ -194,6 +195,10 @@ __decorate([
|
|
|
194
195
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
195
196
|
__metadata("design:type", Number)
|
|
196
197
|
], User.prototype, "extension_number", void 0);
|
|
198
|
+
__decorate([
|
|
199
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true }),
|
|
200
|
+
__metadata("design:type", String)
|
|
201
|
+
], User.prototype, "fax_number", void 0);
|
|
197
202
|
__decorate([
|
|
198
203
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
199
204
|
__metadata("design:type", String)
|
|
@@ -224,5 +229,5 @@ __decorate([
|
|
|
224
229
|
], User.prototype, "address", void 0);
|
|
225
230
|
exports.User = User = __decorate([
|
|
226
231
|
(0, typeorm_1.Entity)({ name: 'users' }),
|
|
227
|
-
__metadata("design:paramtypes", [Number, Number, String, String, String, String, String, String, String, String, String, String, String, String, String, String, Number, Number, String, String, Number, String, String, Number, Number, String, Number, String, Number, String, String, String, Number, String, String, String, String, String, String, String])
|
|
232
|
+
__metadata("design:paramtypes", [Number, Number, String, String, String, String, String, String, String, String, String, String, String, String, String, String, Number, Number, String, String, Number, String, String, Number, Number, String, Number, String, Number, String, String, String, Number, String, String, String, String, String, String, String, String])
|
|
228
233
|
], User);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -6,12 +6,12 @@ import { User } from './models/user'; // import all entities here
|
|
|
6
6
|
import { userSessions } from './models/user-sessions';
|
|
7
7
|
import { Role } from './models/role';
|
|
8
8
|
import { ITHelpDeskRequests } from './models/ITHelpDeskModel';
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
import { ITServicesTypesSalalah } from './models/ITServicesTypesSalalahModel';
|
|
10
|
+
import { ITServicesTypesMuscat } from './models/ITServicesTypesMuscatModel';
|
|
11
11
|
import { ServiceType } from './models/ServiceTypeModel';
|
|
12
12
|
import { CAAServices } from './models/CAAServices';
|
|
13
13
|
import { CAASubServices } from './models/CAASubServices';
|
|
14
|
-
|
|
14
|
+
import { ITApprovalSettings } from './models/ITApprovalSettings';
|
|
15
15
|
// import { Workflows } from './models/Workflows';
|
|
16
16
|
import { ItApprovalDetails } from './models/ItApprovalsModel';
|
|
17
17
|
import { ItWorkFlow } from './models/ItWorkflowModel';
|
|
@@ -56,12 +56,12 @@ export const AppDataSource = new DataSource({
|
|
|
56
56
|
User,userSessions,
|
|
57
57
|
Role,
|
|
58
58
|
ITHelpDeskRequests,
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
ITServicesTypesSalalah,
|
|
60
|
+
ITServicesTypesMuscat,
|
|
61
61
|
ServiceType,
|
|
62
62
|
CAAServices,
|
|
63
63
|
CAASubServices,
|
|
64
|
-
|
|
64
|
+
ITApprovalSettings,
|
|
65
65
|
// Workflows,
|
|
66
66
|
ItApprovalDetails,
|
|
67
67
|
ItWorkFlow,
|
package/src/index.ts
CHANGED
|
@@ -2,13 +2,13 @@ export * from './models/user';
|
|
|
2
2
|
export * from './models/role';
|
|
3
3
|
export * from './models/user-sessions';
|
|
4
4
|
export * from './models/ITHelpDeskModel';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
export * from './models/ITServicesTypesSalalahModel';
|
|
6
|
+
export * from './models/ITServicesTypesMuscatModel';
|
|
7
7
|
export * from './models/ServiceTypeModel';
|
|
8
8
|
export * from './models/CAAServices';
|
|
9
9
|
export * from './models/CAASubServices';
|
|
10
|
-
|
|
11
|
-
// export * from './models/Workflows';
|
|
10
|
+
export * from './models/ITApprovalSettings';
|
|
11
|
+
// export * from './models/Workflows';
|
|
12
12
|
export * from './models/ItApprovalsModel';
|
|
13
13
|
export * from './models/ItWorkflowModel';
|
|
14
14
|
export * from './models/WorkflowDefinitions';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Column, Entity, Unique } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'it_approval_settings' })
|
|
5
|
+
@Unique(['workflow_id', 'level'])
|
|
6
|
+
export class ITApprovalSettings extends BaseModel {
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'int', nullable: false })
|
|
10
|
+
level: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'int', nullable: false })
|
|
13
|
+
approval_role_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'int', nullable: false })
|
|
16
|
+
workflow_id: number;
|
|
17
|
+
constructor(
|
|
18
|
+
level: number,
|
|
19
|
+
approval_role_id: number,
|
|
20
|
+
workflow_id: number
|
|
21
|
+
) {
|
|
22
|
+
super();
|
|
23
|
+
this.level = level;
|
|
24
|
+
this.approval_role_id = approval_role_id;
|
|
25
|
+
this.workflow_id = workflow_id;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
@@ -53,9 +53,17 @@ export class ITHelpDeskRequests extends BaseModel {
|
|
|
53
53
|
@Column({ type: "date", nullable: false })
|
|
54
54
|
request_date: Date;
|
|
55
55
|
|
|
56
|
+
@Column({ nullable: true })
|
|
57
|
+
attachment_url: string;
|
|
58
|
+
|
|
56
59
|
@Column({ nullable: false })
|
|
57
60
|
user_id: number;
|
|
58
61
|
|
|
62
|
+
@Column({ nullable: true })
|
|
63
|
+
reporting_manager: number;
|
|
64
|
+
|
|
65
|
+
@Column({ nullable: true })
|
|
66
|
+
assigned_to: number;
|
|
59
67
|
|
|
60
68
|
@Column({
|
|
61
69
|
type: "enum",
|
|
@@ -77,6 +85,9 @@ export class ITHelpDeskRequests extends BaseModel {
|
|
|
77
85
|
extn_num: string,
|
|
78
86
|
contact_num: string,
|
|
79
87
|
request_date: Date,
|
|
88
|
+
attachment_url: string,
|
|
89
|
+
reporting_manager: number,
|
|
90
|
+
assigned_to: number,
|
|
80
91
|
status: status,
|
|
81
92
|
workflow_execution_id?: string,
|
|
82
93
|
req_user_department_id?: number | null,
|
|
@@ -92,6 +103,9 @@ export class ITHelpDeskRequests extends BaseModel {
|
|
|
92
103
|
this.extn_num = extn_num;
|
|
93
104
|
this.contact_num = contact_num;
|
|
94
105
|
this.request_date = request_date;
|
|
106
|
+
this.attachment_url = attachment_url;
|
|
107
|
+
this.reporting_manager = reporting_manager;
|
|
108
|
+
this.assigned_to = assigned_to;
|
|
95
109
|
this.status = status;
|
|
96
110
|
this.workflow_execution_id = workflow_execution_id || null;
|
|
97
111
|
this.req_user_department_id = req_user_department_id || null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
import { Column, Entity } from "typeorm";
|
|
3
|
+
import { BaseModel } from './BaseModel';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'it_services_types_muscat' })
|
|
6
|
+
export class ITServicesTypesMuscat extends BaseModel {
|
|
7
|
+
|
|
8
|
+
@Column({ nullable: false })
|
|
9
|
+
name: string;
|
|
10
|
+
|
|
11
|
+
@Column({ nullable: false })
|
|
12
|
+
name_in_arabic: string;
|
|
13
|
+
|
|
14
|
+
constructor(
|
|
15
|
+
name: string,
|
|
16
|
+
name_in_arabic: string
|
|
17
|
+
) {
|
|
18
|
+
super();
|
|
19
|
+
this.name = name
|
|
20
|
+
this.name_in_arabic = name_in_arabic
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
import { Column, Entity } from "typeorm";
|
|
3
|
+
import { BaseModel } from './BaseModel';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'it_services_types_salalah' })
|
|
6
|
+
export class ITServicesTypesSalalah extends BaseModel {
|
|
7
|
+
|
|
8
|
+
@Column({ nullable: false })
|
|
9
|
+
name: string;
|
|
10
|
+
|
|
11
|
+
@Column({ nullable: false })
|
|
12
|
+
name_in_arabic: string;
|
|
13
|
+
|
|
14
|
+
constructor(
|
|
15
|
+
name: string,
|
|
16
|
+
name_in_arabic: string
|
|
17
|
+
) {
|
|
18
|
+
super();
|
|
19
|
+
this.name = name
|
|
20
|
+
this.name_in_arabic = name_in_arabic
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -20,7 +20,7 @@ export class ItApprovalDetails extends BaseModel {
|
|
|
20
20
|
approver_user_id: number | null;
|
|
21
21
|
|
|
22
22
|
@Column({ type: 'integer', nullable: false })
|
|
23
|
-
approver_role_id: number
|
|
23
|
+
approver_role_id: number;
|
|
24
24
|
|
|
25
25
|
@Column({ type: 'integer', nullable: true })
|
|
26
26
|
department_id: number | null;
|
|
@@ -40,7 +40,7 @@ export class ItApprovalDetails extends BaseModel {
|
|
|
40
40
|
constructor(
|
|
41
41
|
request_id: number,
|
|
42
42
|
approver_user_id: number | null,
|
|
43
|
-
approver_role_id: number
|
|
43
|
+
approver_role_id: number,
|
|
44
44
|
comment: string,
|
|
45
45
|
approval_status: ApprovalStatus,
|
|
46
46
|
level: number,
|
|
@@ -13,20 +13,16 @@ export class ItWorkFlow extends BaseModel {
|
|
|
13
13
|
@Column({ type: 'int', nullable: false })
|
|
14
14
|
request_id: number;
|
|
15
15
|
|
|
16
|
-
@Column({ type: 'int', nullable: true })
|
|
17
|
-
order: number | null;
|
|
18
|
-
|
|
19
16
|
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
20
17
|
content: string;
|
|
21
18
|
|
|
22
19
|
@Column({ type: 'enum', enum: workFlowStatus, default: workFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
23
20
|
status: workFlowStatus;
|
|
24
21
|
|
|
25
|
-
constructor(request_id: number, content: string, status: workFlowStatus
|
|
22
|
+
constructor(request_id: number, content: string, status: workFlowStatus) {
|
|
26
23
|
super();
|
|
27
24
|
this.request_id = request_id;
|
|
28
25
|
this.content = content;
|
|
29
26
|
this.status = status;
|
|
30
|
-
this.order = order || null;
|
|
31
27
|
}
|
|
32
28
|
}
|
|
@@ -47,13 +47,12 @@ export class LogisticsForeignVehicleRequests extends BaseModel {
|
|
|
47
47
|
@Column({ type: 'int', nullable: false })
|
|
48
48
|
number_of_passengers: number;
|
|
49
49
|
|
|
50
|
-
@Column({
|
|
51
|
-
type:
|
|
52
|
-
|
|
53
|
-
default: Foreign_Purpose_of_Travel.OTHER,
|
|
50
|
+
@Column({
|
|
51
|
+
type: 'varchar',
|
|
52
|
+
default: 'Other',
|
|
54
53
|
nullable: false,
|
|
55
54
|
})
|
|
56
|
-
purpose_of_travel:
|
|
55
|
+
purpose_of_travel: string;
|
|
57
56
|
|
|
58
57
|
@Column({
|
|
59
58
|
type: "enum",
|
|
@@ -107,7 +106,7 @@ export class LogisticsForeignVehicleRequests extends BaseModel {
|
|
|
107
106
|
sub_service_id: number,
|
|
108
107
|
user_id: number,
|
|
109
108
|
number_of_passengers: number,
|
|
110
|
-
purpose_of_travel:
|
|
109
|
+
purpose_of_travel: string,
|
|
111
110
|
vehicle_required_location: Foreign_Vehicle_Required_Location,
|
|
112
111
|
contact_number: string,
|
|
113
112
|
request_type: Foreign_Request_Type,
|
|
@@ -4,9 +4,6 @@ import { BaseModel } from './BaseModel';
|
|
|
4
4
|
|
|
5
5
|
export enum NotificationType {
|
|
6
6
|
REQUEST_RAISED = 'request raised',
|
|
7
|
-
REQUEST_APPROVE = 'request approve',
|
|
8
|
-
REQUEST_REJECT = 'request reject',
|
|
9
|
-
REQUEST_WITHDRAW = 'request withdraw',
|
|
10
7
|
REMINDER = 'reminder',
|
|
11
8
|
IMPORT = 'import',
|
|
12
9
|
}
|
|
@@ -13,29 +13,14 @@ export class WorkflowTask extends BaseModel {
|
|
|
13
13
|
@Column({ type: 'varchar', length: 200, nullable: true })
|
|
14
14
|
task_type: string;
|
|
15
15
|
|
|
16
|
-
@Column({ type: 'int', nullable: true })
|
|
17
|
-
service_id: number | null;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'int', nullable: true })
|
|
20
|
-
sub_service_id: number | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
23
|
-
service_type: string | null;
|
|
24
|
-
|
|
25
16
|
constructor(
|
|
26
17
|
name: string,
|
|
27
18
|
task_id?: number,
|
|
28
|
-
task_type?: string
|
|
29
|
-
service_id?: number | null,
|
|
30
|
-
sub_service_id?: number | null,
|
|
31
|
-
service_type?: string | null
|
|
19
|
+
task_type?: string
|
|
32
20
|
) {
|
|
33
21
|
super();
|
|
34
22
|
this.name = name;
|
|
35
23
|
this.task_id = task_id || 0;
|
|
36
24
|
this.task_type = task_type || '';
|
|
37
|
-
this.service_id = service_id || null;
|
|
38
|
-
this.sub_service_id = sub_service_id || null;
|
|
39
|
-
this.service_type = service_type || null;
|
|
40
25
|
}
|
|
41
26
|
}
|
|
@@ -1,31 +1,50 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
+
export enum TaskType {
|
|
5
|
+
SIMPLE = 'SIMPLE',
|
|
6
|
+
HUMAN = 'HUMAN'
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export enum CategoryType {
|
|
10
|
+
CREATE = 'CREATE',
|
|
11
|
+
APPROVAL = 'APPROVAL',
|
|
12
|
+
NOTIFICATION = 'NOTIFICATION'
|
|
13
|
+
}
|
|
14
|
+
|
|
4
15
|
@Entity({ name: 'workflow_task_names' })
|
|
5
16
|
export class WorkflowTaskNames extends BaseModel {
|
|
6
17
|
|
|
7
18
|
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
8
19
|
name: string;
|
|
9
|
-
|
|
10
|
-
@Column({ type: 'integer', nullable: false })
|
|
11
|
-
task_id: number;
|
|
12
20
|
|
|
13
21
|
@Column({ type: 'varchar', length: 200, nullable: true })
|
|
14
22
|
description: string;
|
|
15
23
|
|
|
16
|
-
@Column({
|
|
17
|
-
|
|
24
|
+
@Column({
|
|
25
|
+
type: 'enum',
|
|
26
|
+
enum: TaskType,
|
|
27
|
+
nullable: true
|
|
28
|
+
})
|
|
29
|
+
task_type: TaskType;
|
|
30
|
+
|
|
31
|
+
@Column({
|
|
32
|
+
type: 'enum',
|
|
33
|
+
enum: CategoryType,
|
|
34
|
+
nullable: true
|
|
35
|
+
})
|
|
36
|
+
category: CategoryType;
|
|
18
37
|
|
|
19
38
|
constructor(
|
|
20
39
|
name: string,
|
|
21
|
-
task_id: number,
|
|
22
40
|
description: string,
|
|
23
|
-
task_type:
|
|
41
|
+
task_type: TaskType,
|
|
42
|
+
category: CategoryType
|
|
24
43
|
) {
|
|
25
44
|
super();
|
|
26
45
|
this.name = name;
|
|
27
|
-
this.task_id = task_id;
|
|
28
46
|
this.description = description;
|
|
29
47
|
this.task_type = task_type;
|
|
48
|
+
this.category = category;
|
|
30
49
|
}
|
|
31
50
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// import { Column, Entity, Unique } from "typeorm";
|
|
2
|
+
// import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
// @Entity({ name: 'workflows' })
|
|
5
|
+
// @Unique(['service_id', 'sub_service_id', 'request_for'])
|
|
6
|
+
// export class Workflows extends BaseModel {
|
|
7
|
+
|
|
8
|
+
// @Column({ type: 'varchar', length: 100, nullable: false })
|
|
9
|
+
// name: string;
|
|
10
|
+
|
|
11
|
+
// @Column({ type: 'bigint', nullable: false })
|
|
12
|
+
// service_id: number;
|
|
13
|
+
|
|
14
|
+
// @Column({ type: 'bigint', nullable: false })
|
|
15
|
+
// sub_service_id: number;
|
|
16
|
+
|
|
17
|
+
// @Column({ type: 'varchar', length: 20, nullable: false })
|
|
18
|
+
// request_for: string; // 'Self' | 'Behalf of' | 'Internal'
|
|
19
|
+
|
|
20
|
+
// @Column({ type: 'int', nullable: false })
|
|
21
|
+
// levels: number;
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
// constructor(
|
|
25
|
+
// name: string,
|
|
26
|
+
// service_id: number,
|
|
27
|
+
// sub_service_id: number,
|
|
28
|
+
// request_for: string,
|
|
29
|
+
// levels: number,
|
|
30
|
+
// ) {
|
|
31
|
+
// super();
|
|
32
|
+
// this.name = name;
|
|
33
|
+
// this.service_id = service_id;
|
|
34
|
+
// this.sub_service_id = sub_service_id;
|
|
35
|
+
// this.request_for = request_for;
|
|
36
|
+
// this.levels = levels;
|
|
37
|
+
// }
|
|
38
|
+
// }
|
|
39
|
+
|
|
40
|
+
|