@platform-modules/civil-aviation-authority 2.0.27 → 2.0.29
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 +4 -10
- package/dist/data-source.js +6 -6
- package/dist/index.d.ts +0 -3
- package/dist/index.js +4 -4
- package/dist/models/ITHelpDeskModel.d.ts +1 -4
- package/dist/models/ITHelpDeskModel.js +2 -17
- package/dist/models/ItApprovalsModel.d.ts +2 -2
- package/dist/models/ItApprovalsModel.js +2 -2
- package/dist/models/ItWorkflowModel.d.ts +2 -1
- package/dist/models/ItWorkflowModel.js +7 -2
- package/dist/models/NotificationModel.d.ts +3 -0
- package/dist/models/NotificationModel.js +3 -0
- package/dist/models/WorkflowTask.d.ts +5 -2
- package/dist/models/WorkflowTask.js +28 -4
- package/package.json +1 -1
- package/src/data-source.ts +6 -6
- package/src/index.ts +4 -4
- package/src/models/ITHelpDeskModel.ts +0 -14
- package/src/models/ItApprovalsModel.ts +2 -2
- package/src/models/ItWorkflowModel.ts +5 -1
- package/src/models/NotificationModel.ts +3 -0
- package/src/models/WorkflowTask.ts +31 -4
- package/src/models/ITApprovalSettings.ts +0 -29
- package/src/models/ITServicesTypesMuscatModel.ts +0 -22
- package/src/models/ITServicesTypesSalalahModel.ts +0 -22
- package/src/models/Workflows.ts +0 -40
package/.env
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
|
1
|
+
DB_HOST=localhost
|
|
2
|
+
DB_PORT=5433
|
|
3
|
+
DB_USER=postgres
|
|
4
|
+
DB_PASS=123
|
|
11
5
|
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
|
+
// import { ITServicesTypesSalalah } from './models/ITServicesTypesSalalahModel'; // REMOVED - table no longer used
|
|
13
|
+
// import { ITServicesTypesMuscat } from './models/ITServicesTypesMuscatModel'; // REMOVED - table no longer used
|
|
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
|
+
// import { ITApprovalSettings } from './models/ITApprovalSettings'; // REMOVED - table no longer used
|
|
18
18
|
// import { Workflows } from './models/Workflows';
|
|
19
19
|
const ItApprovalsModel_1 = require("./models/ItApprovalsModel");
|
|
20
20
|
const ItWorkflowModel_1 = require("./models/ItWorkflowModel");
|
|
@@ -57,12 +57,12 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
57
57
|
user_1.User, user_sessions_1.userSessions,
|
|
58
58
|
role_1.Role,
|
|
59
59
|
ITHelpDeskModel_1.ITHelpDeskRequests,
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
// ITServicesTypesSalalah, // REMOVED - table no longer used
|
|
61
|
+
// ITServicesTypesMuscat, // REMOVED - table no longer used
|
|
62
62
|
ServiceTypeModel_1.ServiceType,
|
|
63
63
|
CAAServices_1.CAAServices,
|
|
64
64
|
CAASubServices_1.CAASubServices,
|
|
65
|
-
|
|
65
|
+
// ITApprovalSettings, // REMOVED - table no longer used
|
|
66
66
|
// Workflows,
|
|
67
67
|
ItApprovalsModel_1.ItApprovalDetails,
|
|
68
68
|
ItWorkflowModel_1.ItWorkFlow,
|
package/dist/index.d.ts
CHANGED
|
@@ -2,12 +2,9 @@ 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';
|
|
7
5
|
export * from './models/ServiceTypeModel';
|
|
8
6
|
export * from './models/CAAServices';
|
|
9
7
|
export * from './models/CAASubServices';
|
|
10
|
-
export * from './models/ITApprovalSettings';
|
|
11
8
|
export * from './models/ItApprovalsModel';
|
|
12
9
|
export * from './models/ItWorkflowModel';
|
|
13
10
|
export * from './models/WorkflowDefinitions';
|
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
|
+
// export * from './models/ITServicesTypesSalalahModel'; // REMOVED - table no longer used
|
|
22
|
+
// export * from './models/ITServicesTypesMuscatModel'; // REMOVED - table no longer used
|
|
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
|
+
// export * from './models/ITApprovalSettings'; // REMOVED - table no longer used
|
|
27
|
+
// export * from './models/Workflows'; // REMOVED - table no longer used
|
|
28
28
|
__exportStar(require("./models/ItApprovalsModel"), exports);
|
|
29
29
|
__exportStar(require("./models/ItWorkflowModel"), exports);
|
|
30
30
|
__exportStar(require("./models/WorkflowDefinitions"), exports);
|
|
@@ -22,11 +22,8 @@ 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;
|
|
26
25
|
user_id: number;
|
|
27
|
-
reporting_manager: number;
|
|
28
|
-
assigned_to: number;
|
|
29
26
|
status: status;
|
|
30
27
|
workflow_execution_id: string | 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,
|
|
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);
|
|
32
29
|
}
|
|
@@ -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,
|
|
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) {
|
|
30
30
|
super();
|
|
31
31
|
this.service_id = service_id;
|
|
32
32
|
this.sub_service_id = sub_service_id;
|
|
@@ -36,9 +36,6 @@ 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;
|
|
42
39
|
this.status = status;
|
|
43
40
|
this.workflow_execution_id = workflow_execution_id || null;
|
|
44
41
|
this.req_user_department_id = req_user_department_id || null;
|
|
@@ -96,22 +93,10 @@ __decorate([
|
|
|
96
93
|
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
97
94
|
__metadata("design:type", Date)
|
|
98
95
|
], 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);
|
|
103
96
|
__decorate([
|
|
104
97
|
(0, typeorm_1.Column)({ nullable: false }),
|
|
105
98
|
__metadata("design:type", Number)
|
|
106
99
|
], 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);
|
|
115
100
|
__decorate([
|
|
116
101
|
(0, typeorm_1.Column)({
|
|
117
102
|
type: "enum",
|
|
@@ -127,5 +112,5 @@ __decorate([
|
|
|
127
112
|
], ITHelpDeskRequests.prototype, "workflow_execution_id", void 0);
|
|
128
113
|
exports.ITHelpDeskRequests = ITHelpDeskRequests = __decorate([
|
|
129
114
|
(0, typeorm_1.Entity)({ name: 'it_help_desk_requests' }),
|
|
130
|
-
__metadata("design:paramtypes", [Number, Number, String, String, String, String, String, Date, String,
|
|
115
|
+
__metadata("design:paramtypes", [Number, Number, String, String, String, String, String, Date, String, String, Object, Object, Object])
|
|
131
116
|
], 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 | null;
|
|
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, comment: string, approval_status: ApprovalStatus, level: number, department_id?: number | null, section_id?: number | null, approved_by?: number | null);
|
|
17
|
+
constructor(request_id: number, approver_user_id: number | null, approver_role_id: number | null, 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", Object)
|
|
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, Object, String, String, Number, Object, Object, Object])
|
|
75
75
|
], ItApprovalDetails);
|
|
@@ -6,7 +6,8 @@ export declare enum workFlowStatus {
|
|
|
6
6
|
}
|
|
7
7
|
export declare class ItWorkFlow extends BaseModel {
|
|
8
8
|
request_id: number;
|
|
9
|
+
order: number | null;
|
|
9
10
|
content: string;
|
|
10
11
|
status: workFlowStatus;
|
|
11
|
-
constructor(request_id: number, content: string, status: workFlowStatus);
|
|
12
|
+
constructor(request_id: number, content: string, status: workFlowStatus, order?: number);
|
|
12
13
|
}
|
|
@@ -20,11 +20,12 @@ 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, order) {
|
|
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;
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
31
|
exports.ItWorkFlow = ItWorkFlow;
|
|
@@ -32,6 +33,10 @@ __decorate([
|
|
|
32
33
|
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
33
34
|
__metadata("design:type", Number)
|
|
34
35
|
], 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);
|
|
35
40
|
__decorate([
|
|
36
41
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
37
42
|
__metadata("design:type", String)
|
|
@@ -42,5 +47,5 @@ __decorate([
|
|
|
42
47
|
], ItWorkFlow.prototype, "status", void 0);
|
|
43
48
|
exports.ItWorkFlow = ItWorkFlow = __decorate([
|
|
44
49
|
(0, typeorm_1.Entity)({ name: 'it_work_flows' }),
|
|
45
|
-
__metadata("design:paramtypes", [Number, String, String])
|
|
50
|
+
__metadata("design:paramtypes", [Number, String, String, Number])
|
|
46
51
|
], ItWorkFlow);
|
|
@@ -1,6 +1,9 @@
|
|
|
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",
|
|
4
7
|
REMINDER = "reminder",
|
|
5
8
|
IMPORT = "import"
|
|
6
9
|
}
|
|
@@ -15,6 +15,9 @@ 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";
|
|
18
21
|
NotificationType["REMINDER"] = "reminder";
|
|
19
22
|
NotificationType["IMPORT"] = "import";
|
|
20
23
|
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { TaskType } from "./WorkflowTaskNames";
|
|
3
|
+
import { CategoryType } from "./WorkflowTaskNames";
|
|
2
4
|
export declare class WorkflowTask extends BaseModel {
|
|
3
5
|
task_id: number;
|
|
4
6
|
name: string;
|
|
5
|
-
task_type:
|
|
6
|
-
|
|
7
|
+
task_type: TaskType;
|
|
8
|
+
category: CategoryType;
|
|
9
|
+
constructor(name: string, task_id?: number, task_type?: TaskType, category?: CategoryType);
|
|
7
10
|
}
|
|
@@ -12,12 +12,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.WorkflowTask = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const WorkflowTaskNames_1 = require("./WorkflowTaskNames");
|
|
16
|
+
const WorkflowTaskNames_2 = require("./WorkflowTaskNames");
|
|
17
|
+
// export enum TaskNameType {
|
|
18
|
+
// SIMPLE = 'SIMPLE',
|
|
19
|
+
// HUMAN = 'HUMAN'
|
|
20
|
+
// }
|
|
21
|
+
// export enum CategoryNameType {
|
|
22
|
+
// CREATE = 'CREATE',
|
|
23
|
+
// APPROVAL = 'APPROVAL',
|
|
24
|
+
// NOTIFICATION = 'NOTIFICATION'
|
|
25
|
+
// }
|
|
15
26
|
let WorkflowTask = class WorkflowTask extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(name, task_id, task_type) {
|
|
27
|
+
constructor(name, task_id, task_type, category) {
|
|
17
28
|
super();
|
|
18
29
|
this.name = name;
|
|
19
30
|
this.task_id = task_id || 0;
|
|
20
|
-
this.task_type = task_type ||
|
|
31
|
+
this.task_type = task_type || WorkflowTaskNames_1.TaskType.SIMPLE;
|
|
32
|
+
this.category = category || WorkflowTaskNames_2.CategoryType.CREATE;
|
|
21
33
|
}
|
|
22
34
|
};
|
|
23
35
|
exports.WorkflowTask = WorkflowTask;
|
|
@@ -30,10 +42,22 @@ __decorate([
|
|
|
30
42
|
__metadata("design:type", String)
|
|
31
43
|
], WorkflowTask.prototype, "name", void 0);
|
|
32
44
|
__decorate([
|
|
33
|
-
(0, typeorm_1.Column)({
|
|
45
|
+
(0, typeorm_1.Column)({
|
|
46
|
+
type: 'enum',
|
|
47
|
+
enum: WorkflowTaskNames_1.TaskType,
|
|
48
|
+
nullable: true
|
|
49
|
+
}),
|
|
34
50
|
__metadata("design:type", String)
|
|
35
51
|
], WorkflowTask.prototype, "task_type", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({
|
|
54
|
+
type: 'enum',
|
|
55
|
+
enum: WorkflowTaskNames_2.CategoryType,
|
|
56
|
+
nullable: true
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], WorkflowTask.prototype, "category", void 0);
|
|
36
60
|
exports.WorkflowTask = WorkflowTask = __decorate([
|
|
37
61
|
(0, typeorm_1.Entity)({ name: 'workflow_tasks' }),
|
|
38
|
-
__metadata("design:paramtypes", [String, Number, String])
|
|
62
|
+
__metadata("design:paramtypes", [String, Number, String, String])
|
|
39
63
|
], WorkflowTask);
|
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
|
-
import { ITServicesTypesSalalah } from './models/ITServicesTypesSalalahModel';
|
|
10
|
-
import { ITServicesTypesMuscat } from './models/ITServicesTypesMuscatModel';
|
|
9
|
+
// import { ITServicesTypesSalalah } from './models/ITServicesTypesSalalahModel'; // REMOVED - table no longer used
|
|
10
|
+
// import { ITServicesTypesMuscat } from './models/ITServicesTypesMuscatModel'; // REMOVED - table no longer used
|
|
11
11
|
import { ServiceType } from './models/ServiceTypeModel';
|
|
12
12
|
import { CAAServices } from './models/CAAServices';
|
|
13
13
|
import { CAASubServices } from './models/CAASubServices';
|
|
14
|
-
import { ITApprovalSettings } from './models/ITApprovalSettings';
|
|
14
|
+
// import { ITApprovalSettings } from './models/ITApprovalSettings'; // REMOVED - table no longer used
|
|
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
|
-
ITServicesTypesSalalah,
|
|
60
|
-
ITServicesTypesMuscat,
|
|
59
|
+
// ITServicesTypesSalalah, // REMOVED - table no longer used
|
|
60
|
+
// ITServicesTypesMuscat, // REMOVED - table no longer used
|
|
61
61
|
ServiceType,
|
|
62
62
|
CAAServices,
|
|
63
63
|
CAASubServices,
|
|
64
|
-
ITApprovalSettings,
|
|
64
|
+
// ITApprovalSettings, // REMOVED - table no longer used
|
|
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
|
-
export * from './models/ITServicesTypesSalalahModel';
|
|
6
|
-
export * from './models/ITServicesTypesMuscatModel';
|
|
5
|
+
// export * from './models/ITServicesTypesSalalahModel'; // REMOVED - table no longer used
|
|
6
|
+
// export * from './models/ITServicesTypesMuscatModel'; // REMOVED - table no longer used
|
|
7
7
|
export * from './models/ServiceTypeModel';
|
|
8
8
|
export * from './models/CAAServices';
|
|
9
9
|
export * from './models/CAASubServices';
|
|
10
|
-
export * from './models/ITApprovalSettings';
|
|
11
|
-
// export * from './models/Workflows';
|
|
10
|
+
// export * from './models/ITApprovalSettings'; // REMOVED - table no longer used
|
|
11
|
+
// export * from './models/Workflows'; // REMOVED - table no longer used
|
|
12
12
|
export * from './models/ItApprovalsModel';
|
|
13
13
|
export * from './models/ItWorkflowModel';
|
|
14
14
|
export * from './models/WorkflowDefinitions';
|
|
@@ -53,17 +53,9 @@ 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
|
-
|
|
59
56
|
@Column({ nullable: false })
|
|
60
57
|
user_id: number;
|
|
61
58
|
|
|
62
|
-
@Column({ nullable: true })
|
|
63
|
-
reporting_manager: number;
|
|
64
|
-
|
|
65
|
-
@Column({ nullable: true })
|
|
66
|
-
assigned_to: number;
|
|
67
59
|
|
|
68
60
|
@Column({
|
|
69
61
|
type: "enum",
|
|
@@ -85,9 +77,6 @@ export class ITHelpDeskRequests extends BaseModel {
|
|
|
85
77
|
extn_num: string,
|
|
86
78
|
contact_num: string,
|
|
87
79
|
request_date: Date,
|
|
88
|
-
attachment_url: string,
|
|
89
|
-
reporting_manager: number,
|
|
90
|
-
assigned_to: number,
|
|
91
80
|
status: status,
|
|
92
81
|
workflow_execution_id?: string,
|
|
93
82
|
req_user_department_id?: number | null,
|
|
@@ -103,9 +92,6 @@ export class ITHelpDeskRequests extends BaseModel {
|
|
|
103
92
|
this.extn_num = extn_num;
|
|
104
93
|
this.contact_num = contact_num;
|
|
105
94
|
this.request_date = request_date;
|
|
106
|
-
this.attachment_url = attachment_url;
|
|
107
|
-
this.reporting_manager = reporting_manager;
|
|
108
|
-
this.assigned_to = assigned_to;
|
|
109
95
|
this.status = status;
|
|
110
96
|
this.workflow_execution_id = workflow_execution_id || null;
|
|
111
97
|
this.req_user_department_id = req_user_department_id || null;
|
|
@@ -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 | null;
|
|
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 | null,
|
|
44
44
|
comment: string,
|
|
45
45
|
approval_status: ApprovalStatus,
|
|
46
46
|
level: number,
|
|
@@ -13,16 +13,20 @@ 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
|
+
|
|
16
19
|
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
17
20
|
content: string;
|
|
18
21
|
|
|
19
22
|
@Column({ type: 'enum', enum: workFlowStatus, default: workFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
20
23
|
status: workFlowStatus;
|
|
21
24
|
|
|
22
|
-
constructor(request_id: number, content: string, status: workFlowStatus) {
|
|
25
|
+
constructor(request_id: number, content: string, status: workFlowStatus, order?: number) {
|
|
23
26
|
super();
|
|
24
27
|
this.request_id = request_id;
|
|
25
28
|
this.content = content;
|
|
26
29
|
this.status = status;
|
|
30
|
+
this.order = order || null;
|
|
27
31
|
}
|
|
28
32
|
}
|
|
@@ -4,6 +4,9 @@ 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',
|
|
7
10
|
REMINDER = 'reminder',
|
|
8
11
|
IMPORT = 'import',
|
|
9
12
|
}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { TaskType } from "./WorkflowTaskNames";
|
|
4
|
+
import { CategoryType } from "./WorkflowTaskNames";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
// export enum TaskNameType {
|
|
8
|
+
// SIMPLE = 'SIMPLE',
|
|
9
|
+
// HUMAN = 'HUMAN'
|
|
10
|
+
// }
|
|
11
|
+
|
|
12
|
+
// export enum CategoryNameType {
|
|
13
|
+
// CREATE = 'CREATE',
|
|
14
|
+
// APPROVAL = 'APPROVAL',
|
|
15
|
+
// NOTIFICATION = 'NOTIFICATION'
|
|
16
|
+
// }
|
|
3
17
|
|
|
4
18
|
@Entity({ name: 'workflow_tasks' })
|
|
5
19
|
export class WorkflowTask extends BaseModel {
|
|
@@ -10,17 +24,30 @@ export class WorkflowTask extends BaseModel {
|
|
|
10
24
|
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
11
25
|
name: string;
|
|
12
26
|
|
|
13
|
-
@Column({
|
|
14
|
-
|
|
27
|
+
@Column({
|
|
28
|
+
type: 'enum',
|
|
29
|
+
enum: TaskType,
|
|
30
|
+
nullable: true
|
|
31
|
+
})
|
|
32
|
+
task_type: TaskType;
|
|
33
|
+
|
|
34
|
+
@Column({
|
|
35
|
+
type: 'enum',
|
|
36
|
+
enum: CategoryType,
|
|
37
|
+
nullable: true
|
|
38
|
+
})
|
|
39
|
+
category: CategoryType;
|
|
15
40
|
|
|
16
41
|
constructor(
|
|
17
42
|
name: string,
|
|
18
43
|
task_id?: number,
|
|
19
|
-
task_type?:
|
|
44
|
+
task_type?: TaskType,
|
|
45
|
+
category?: CategoryType
|
|
20
46
|
) {
|
|
21
47
|
super();
|
|
22
48
|
this.name = name;
|
|
23
49
|
this.task_id = task_id || 0;
|
|
24
|
-
this.task_type = task_type ||
|
|
50
|
+
this.task_type = task_type || TaskType.SIMPLE;
|
|
51
|
+
this.category = category || CategoryType.CREATE;
|
|
25
52
|
}
|
|
26
53
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
}
|
package/src/models/Workflows.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
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
|
-
|