@platform-modules/civil-aviation-authority 1.0.58 → 2.0.1
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 +7 -9
- package/dist/data-source.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/models/BaseModel.d.ts +2 -2
- package/dist/models/BaseModel.js +4 -6
- package/dist/models/CAASubServices.d.ts +2 -0
- package/dist/models/CAASubServices.js +6 -0
- package/dist/models/ITHelpDeskModel.d.ts +8 -3
- package/dist/models/ITHelpDeskModel.js +39 -22
- package/dist/models/ItApprovalsModel.d.ts +5 -2
- package/dist/models/ItApprovalsModel.js +22 -7
- package/dist/models/ServiceTypeModel.d.ts +14 -0
- package/dist/models/ServiceTypeModel.js +66 -0
- package/dist/models/WorkflowDefinitions.d.ts +8 -2
- package/dist/models/WorkflowDefinitions.js +31 -4
- package/dist/models/WorkflowHierarchy.d.ts +6 -2
- package/dist/models/WorkflowHierarchy.js +24 -4
- package/package.json +1 -1
- package/src/data-source.ts +70 -68
- package/src/index.ts +26 -25
- package/src/models/BaseModel.ts +46 -46
- package/src/models/CAAServices.ts +0 -4
- package/src/models/CAASubServices.ts +6 -1
- package/src/models/ITHelpDeskModel.ts +114 -97
- package/src/models/ItApprovalsModel.ts +61 -39
- package/src/models/ServiceTypeModel.ts +52 -0
- package/src/models/WorkflowDefinitions.ts +32 -6
- package/src/models/WorkflowHierarchy.ts +24 -4
- package/dist/models/ITServicesTypesModel.d.ts +0 -5
- package/dist/models/ITServicesTypesModel.js +0 -29
package/.env
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
DB_HOST=
|
|
2
|
-
DB_PORT=
|
|
3
|
-
DB_USER=
|
|
4
|
-
DB_PASS=
|
|
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
5
|
DB_NAME=CAA
|
|
6
6
|
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
# DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
|
|
11
|
-
# DB_NAME=CAA
|
|
7
|
+
# TYPEORM_HOST =164.52.222.169
|
|
8
|
+
# TYPEORM_USERNAME = postgres_admin_user
|
|
9
|
+
# TYPEORM_PASSWORD = pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
|
package/dist/data-source.js
CHANGED
|
@@ -11,6 +11,7 @@ const role_1 = require("./models/role");
|
|
|
11
11
|
const ITHelpDeskModel_1 = require("./models/ITHelpDeskModel");
|
|
12
12
|
const ITServicesTypesSalalahModel_1 = require("./models/ITServicesTypesSalalahModel");
|
|
13
13
|
const ITServicesTypesMuscatModel_1 = require("./models/ITServicesTypesMuscatModel");
|
|
14
|
+
const ServiceTypeModel_1 = require("./models/ServiceTypeModel");
|
|
14
15
|
const CAAServices_1 = require("./models/CAAServices");
|
|
15
16
|
const CAASubServices_1 = require("./models/CAASubServices");
|
|
16
17
|
const ITApprovalSettings_1 = require("./models/ITApprovalSettings");
|
|
@@ -45,6 +46,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
45
46
|
ITHelpDeskModel_1.ITHelpDeskRequests,
|
|
46
47
|
ITServicesTypesSalalahModel_1.ITServicesTypesSalalah,
|
|
47
48
|
ITServicesTypesMuscatModel_1.ITServicesTypesMuscat,
|
|
49
|
+
ServiceTypeModel_1.ServiceType,
|
|
48
50
|
CAAServices_1.CAAServices,
|
|
49
51
|
CAASubServices_1.CAASubServices,
|
|
50
52
|
ITApprovalSettings_1.ITApprovalSettings,
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './models/user-sessions';
|
|
|
4
4
|
export * from './models/ITHelpDeskModel';
|
|
5
5
|
export * from './models/ITServicesTypesSalalahModel';
|
|
6
6
|
export * from './models/ITServicesTypesMuscatModel';
|
|
7
|
+
export * from './models/ServiceTypeModel';
|
|
7
8
|
export * from './models/CAAServices';
|
|
8
9
|
export * from './models/CAASubServices';
|
|
9
10
|
export * from './models/ITApprovalSettings';
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ __exportStar(require("./models/user-sessions"), exports);
|
|
|
20
20
|
__exportStar(require("./models/ITHelpDeskModel"), exports);
|
|
21
21
|
__exportStar(require("./models/ITServicesTypesSalalahModel"), exports);
|
|
22
22
|
__exportStar(require("./models/ITServicesTypesMuscatModel"), exports);
|
|
23
|
+
__exportStar(require("./models/ServiceTypeModel"), exports);
|
|
23
24
|
__exportStar(require("./models/CAAServices"), exports);
|
|
24
25
|
__exportStar(require("./models/CAASubServices"), exports);
|
|
25
26
|
__exportStar(require("./models/ITApprovalSettings"), exports);
|
package/dist/models/BaseModel.js
CHANGED
|
@@ -23,23 +23,21 @@ class Model0 {
|
|
|
23
23
|
}
|
|
24
24
|
constructor() {
|
|
25
25
|
this.jsonIgnore = ['logicalDelete', 'is_deleted', 'jsonIgnore'];
|
|
26
|
-
this.created_by = '';
|
|
27
|
-
this.updated_by = '';
|
|
28
26
|
this.is_deleted = false;
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
29
|
exports.Model0 = Model0;
|
|
32
30
|
__decorate([
|
|
33
|
-
(0, typeorm_1.Column)({ nullable:
|
|
34
|
-
__metadata("design:type",
|
|
31
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
32
|
+
__metadata("design:type", Number)
|
|
35
33
|
], Model0.prototype, "created_by", void 0);
|
|
36
34
|
__decorate([
|
|
37
35
|
(0, typeorm_1.CreateDateColumn)({ type: "timestamptz", default: () => "CURRENT_TIMESTAMP" }),
|
|
38
36
|
__metadata("design:type", Date)
|
|
39
37
|
], Model0.prototype, "created_at", void 0);
|
|
40
38
|
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
42
|
-
__metadata("design:type",
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
43
41
|
], Model0.prototype, "updated_by", void 0);
|
|
44
42
|
__decorate([
|
|
45
43
|
(0, typeorm_1.UpdateDateColumn)({ type: "timestamptz", default: () => "CURRENT_TIMESTAMP" }),
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { CAAServices } from './CAAServices';
|
|
2
3
|
export declare class CAASubServices extends BaseModel {
|
|
3
4
|
code: string | null;
|
|
4
5
|
sub_service_name: string;
|
|
5
6
|
description: string;
|
|
6
7
|
service_id: number;
|
|
8
|
+
service: CAAServices;
|
|
7
9
|
logo_url: string;
|
|
8
10
|
constructor(sub_service_name: string, description: string, service_id: number, logo_url: string, code?: string | null);
|
|
9
11
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CAASubServices = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const CAAServices_1 = require("./CAAServices");
|
|
15
16
|
let CAASubServices = class CAASubServices extends BaseModel_1.BaseModel {
|
|
16
17
|
constructor(sub_service_name, description, service_id, logo_url, code = null) {
|
|
17
18
|
super();
|
|
@@ -39,6 +40,11 @@ __decorate([
|
|
|
39
40
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
40
41
|
__metadata("design:type", Number)
|
|
41
42
|
], CAASubServices.prototype, "service_id", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.ManyToOne)(() => CAAServices_1.CAAServices),
|
|
45
|
+
(0, typeorm_1.JoinColumn)({ name: 'service_id' }),
|
|
46
|
+
__metadata("design:type", CAAServices_1.CAAServices)
|
|
47
|
+
], CAASubServices.prototype, "service", void 0);
|
|
42
48
|
__decorate([
|
|
43
49
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
44
50
|
__metadata("design:type", String)
|
|
@@ -5,12 +5,17 @@ export declare enum ContactFor {
|
|
|
5
5
|
}
|
|
6
6
|
export declare enum status {
|
|
7
7
|
PENDING = "Pending",
|
|
8
|
+
ASSIGNED = "Assigned",
|
|
9
|
+
IN_PROGRESS = "In Progress",
|
|
8
10
|
APPROVED = "Approved",
|
|
9
11
|
REJECTED = "Rejected"
|
|
10
12
|
}
|
|
11
13
|
export declare class ITHelpDeskRequests extends BaseModel {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
req_user_department_id: number | null;
|
|
15
|
+
req_user_section_id: number | null;
|
|
16
|
+
service_id: number;
|
|
17
|
+
sub_service_id: number;
|
|
18
|
+
service_type_id: number | null;
|
|
14
19
|
problem: string;
|
|
15
20
|
request_for: ContactFor;
|
|
16
21
|
description: string;
|
|
@@ -23,5 +28,5 @@ export declare class ITHelpDeskRequests extends BaseModel {
|
|
|
23
28
|
assigned_to: number;
|
|
24
29
|
status: status;
|
|
25
30
|
workflow_execution_id: string | null;
|
|
26
|
-
constructor(
|
|
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);
|
|
27
32
|
}
|
|
@@ -20,36 +20,53 @@ var ContactFor;
|
|
|
20
20
|
var status;
|
|
21
21
|
(function (status) {
|
|
22
22
|
status["PENDING"] = "Pending";
|
|
23
|
+
status["ASSIGNED"] = "Assigned";
|
|
24
|
+
status["IN_PROGRESS"] = "In Progress";
|
|
23
25
|
status["APPROVED"] = "Approved";
|
|
24
26
|
status["REJECTED"] = "Rejected";
|
|
25
27
|
})(status || (exports.status = status = {}));
|
|
26
28
|
let ITHelpDeskRequests = class ITHelpDeskRequests extends BaseModel_1.BaseModel {
|
|
27
|
-
constructor(
|
|
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) {
|
|
28
30
|
super();
|
|
29
|
-
this.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
this.service_id = service_id;
|
|
32
|
+
this.sub_service_id = sub_service_id;
|
|
33
|
+
this.problem = problem;
|
|
34
|
+
this.request_for = request_for;
|
|
35
|
+
this.description = description;
|
|
36
|
+
this.extn_num = extn_num;
|
|
37
|
+
this.contact_num = contact_num;
|
|
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
|
+
this.status = status;
|
|
43
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
44
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
45
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
46
|
+
this.service_type_id = service_type_id || null;
|
|
42
47
|
}
|
|
43
48
|
};
|
|
44
49
|
exports.ITHelpDeskRequests = ITHelpDeskRequests;
|
|
45
50
|
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({ nullable:
|
|
47
|
-
__metadata("design:type",
|
|
48
|
-
], ITHelpDeskRequests.prototype, "
|
|
51
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], ITHelpDeskRequests.prototype, "req_user_department_id", void 0);
|
|
49
54
|
__decorate([
|
|
50
|
-
(0, typeorm_1.Column)({ nullable:
|
|
51
|
-
__metadata("design:type",
|
|
52
|
-
], ITHelpDeskRequests.prototype, "
|
|
55
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], ITHelpDeskRequests.prototype, "req_user_section_id", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], ITHelpDeskRequests.prototype, "service_id", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
64
|
+
__metadata("design:type", Number)
|
|
65
|
+
], ITHelpDeskRequests.prototype, "sub_service_id", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
|
+
], ITHelpDeskRequests.prototype, "service_type_id", void 0);
|
|
53
70
|
__decorate([
|
|
54
71
|
(0, typeorm_1.Column)({ nullable: false }),
|
|
55
72
|
__metadata("design:type", String)
|
|
@@ -109,6 +126,6 @@ __decorate([
|
|
|
109
126
|
__metadata("design:type", Object)
|
|
110
127
|
], ITHelpDeskRequests.prototype, "workflow_execution_id", void 0);
|
|
111
128
|
exports.ITHelpDeskRequests = ITHelpDeskRequests = __decorate([
|
|
112
|
-
(0, typeorm_1.Entity)({ name: '
|
|
113
|
-
__metadata("design:paramtypes", [
|
|
129
|
+
(0, typeorm_1.Entity)({ name: 'it_help_desk_requests' }),
|
|
130
|
+
__metadata("design:paramtypes", [Number, Number, String, String, String, String, String, Date, String, Number, Number, String, String, Object, Object, Object])
|
|
114
131
|
], ITHelpDeskRequests);
|
|
@@ -7,9 +7,12 @@ export declare enum ApprovalStatus {
|
|
|
7
7
|
export declare class ItApprovalDetails extends BaseModel {
|
|
8
8
|
request_id: number;
|
|
9
9
|
level: number;
|
|
10
|
-
approver_user_id: number;
|
|
10
|
+
approver_user_id: number | null;
|
|
11
11
|
approver_role_id: number;
|
|
12
|
+
department_id: number | null;
|
|
13
|
+
section_id: number | null;
|
|
14
|
+
approved_by: number | null;
|
|
12
15
|
comment: string;
|
|
13
16
|
approval_status: ApprovalStatus;
|
|
14
|
-
constructor(request_id: number, approver_user_id: number, approver_role_id: number, comment: string, approval_status: ApprovalStatus, level: 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);
|
|
15
18
|
}
|
|
@@ -19,7 +19,7 @@ var ApprovalStatus;
|
|
|
19
19
|
ApprovalStatus["REJECTED"] = "Rejected";
|
|
20
20
|
})(ApprovalStatus || (exports.ApprovalStatus = ApprovalStatus = {}));
|
|
21
21
|
let ItApprovalDetails = class ItApprovalDetails extends BaseModel_1.BaseModel {
|
|
22
|
-
constructor(request_id, approver_user_id, approver_role_id, comment, approval_status, level) {
|
|
22
|
+
constructor(request_id, approver_user_id, approver_role_id, comment, approval_status, level, department_id, section_id, approved_by) {
|
|
23
23
|
super();
|
|
24
24
|
this.request_id = request_id;
|
|
25
25
|
this.approver_user_id = approver_user_id;
|
|
@@ -27,25 +27,40 @@ let ItApprovalDetails = class ItApprovalDetails extends BaseModel_1.BaseModel {
|
|
|
27
27
|
this.comment = comment;
|
|
28
28
|
this.approval_status = approval_status;
|
|
29
29
|
this.level = level;
|
|
30
|
+
this.department_id = department_id || null;
|
|
31
|
+
this.section_id = section_id || null;
|
|
32
|
+
this.approved_by = approved_by || null;
|
|
30
33
|
}
|
|
31
34
|
};
|
|
32
35
|
exports.ItApprovalDetails = ItApprovalDetails;
|
|
33
36
|
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ type: '
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
35
38
|
__metadata("design:type", Number)
|
|
36
39
|
], ItApprovalDetails.prototype, "request_id", void 0);
|
|
37
40
|
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({ type: '
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
39
42
|
__metadata("design:type", Number)
|
|
40
43
|
], ItApprovalDetails.prototype, "level", void 0);
|
|
41
44
|
__decorate([
|
|
42
|
-
(0, typeorm_1.Column)({ type: '
|
|
43
|
-
__metadata("design:type",
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
44
47
|
], ItApprovalDetails.prototype, "approver_user_id", void 0);
|
|
45
48
|
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({ type: '
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
47
50
|
__metadata("design:type", Number)
|
|
48
51
|
], ItApprovalDetails.prototype, "approver_role_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], ItApprovalDetails.prototype, "department_id", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], ItApprovalDetails.prototype, "section_id", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], ItApprovalDetails.prototype, "approved_by", void 0);
|
|
49
64
|
__decorate([
|
|
50
65
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
51
66
|
__metadata("design:type", String)
|
|
@@ -56,5 +71,5 @@ __decorate([
|
|
|
56
71
|
], ItApprovalDetails.prototype, "approval_status", void 0);
|
|
57
72
|
exports.ItApprovalDetails = ItApprovalDetails = __decorate([
|
|
58
73
|
(0, typeorm_1.Entity)({ name: 'it_approvals' }),
|
|
59
|
-
__metadata("design:paramtypes", [Number,
|
|
74
|
+
__metadata("design:paramtypes", [Number, Object, Number, String, String, Number, Object, Object, Object])
|
|
60
75
|
], ItApprovalDetails);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { CAAServices } from './CAAServices';
|
|
3
|
+
import { CAASubServices } from './CAASubServices';
|
|
4
|
+
export declare class ServiceType extends BaseModel {
|
|
5
|
+
name: string;
|
|
6
|
+
name_in_arabic: string;
|
|
7
|
+
service_id: number;
|
|
8
|
+
service: CAAServices;
|
|
9
|
+
sub_service_id: number;
|
|
10
|
+
sub_service: CAASubServices;
|
|
11
|
+
description: string;
|
|
12
|
+
is_active: boolean;
|
|
13
|
+
constructor(name: string, name_in_arabic: string, service_id: number, sub_service_id: number, description?: string, is_active?: boolean);
|
|
14
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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.ServiceType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const CAAServices_1 = require("./CAAServices");
|
|
16
|
+
const CAASubServices_1 = require("./CAASubServices");
|
|
17
|
+
let ServiceType = class ServiceType extends BaseModel_1.BaseModel {
|
|
18
|
+
constructor(name, name_in_arabic, service_id, sub_service_id, description, is_active) {
|
|
19
|
+
super();
|
|
20
|
+
this.name = name;
|
|
21
|
+
this.name_in_arabic = name_in_arabic;
|
|
22
|
+
this.service_id = service_id;
|
|
23
|
+
this.sub_service_id = sub_service_id;
|
|
24
|
+
this.description = description || '';
|
|
25
|
+
this.is_active = is_active !== undefined ? is_active : true;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.ServiceType = ServiceType;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], ServiceType.prototype, "name", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], ServiceType.prototype, "name_in_arabic", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], ServiceType.prototype, "service_id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.ManyToOne)(() => CAAServices_1.CAAServices),
|
|
43
|
+
(0, typeorm_1.JoinColumn)({ name: 'service_id' }),
|
|
44
|
+
__metadata("design:type", CAAServices_1.CAAServices)
|
|
45
|
+
], ServiceType.prototype, "service", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], ServiceType.prototype, "sub_service_id", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.ManyToOne)(() => CAASubServices_1.CAASubServices),
|
|
52
|
+
(0, typeorm_1.JoinColumn)({ name: 'sub_service_id' }),
|
|
53
|
+
__metadata("design:type", CAASubServices_1.CAASubServices)
|
|
54
|
+
], ServiceType.prototype, "sub_service", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], ServiceType.prototype, "description", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
61
|
+
__metadata("design:type", Boolean)
|
|
62
|
+
], ServiceType.prototype, "is_active", void 0);
|
|
63
|
+
exports.ServiceType = ServiceType = __decorate([
|
|
64
|
+
(0, typeorm_1.Entity)({ name: 'service_types' }),
|
|
65
|
+
__metadata("design:paramtypes", [String, String, Number, Number, String, Boolean])
|
|
66
|
+
], ServiceType);
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { CAAServices } from './CAAServices';
|
|
3
|
+
import { CAASubServices } from './CAASubServices';
|
|
2
4
|
export declare class WorkflowDefinitions extends BaseModel {
|
|
3
5
|
name: string;
|
|
4
6
|
description: string;
|
|
5
7
|
version: number;
|
|
6
8
|
is_active: boolean;
|
|
7
|
-
service_type:
|
|
9
|
+
service_type: 'internal' | 'external' | 'none';
|
|
10
|
+
service_id: number | null;
|
|
11
|
+
service: CAAServices;
|
|
12
|
+
sub_service_id: number | null;
|
|
13
|
+
sub_service: CAASubServices;
|
|
8
14
|
status: 'draft' | 'published';
|
|
9
|
-
constructor(name: string, description?: string, version?: number, is_active?: boolean,
|
|
15
|
+
constructor(name: string, description?: string, version?: number, is_active?: boolean, service_id?: number | null, sub_service_id?: number | null, status?: 'draft' | 'published', service_type?: 'internal' | 'external' | 'none');
|
|
10
16
|
}
|
|
@@ -12,15 +12,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.WorkflowDefinitions = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const CAAServices_1 = require("./CAAServices");
|
|
16
|
+
const CAASubServices_1 = require("./CAASubServices");
|
|
15
17
|
let WorkflowDefinitions = class WorkflowDefinitions extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(name, description, version, is_active,
|
|
18
|
+
constructor(name, description, version, is_active, service_id, sub_service_id, status, service_type) {
|
|
17
19
|
super();
|
|
18
20
|
this.name = name;
|
|
19
21
|
this.description = description || '';
|
|
20
22
|
this.version = version || 1;
|
|
21
23
|
this.is_active = is_active !== undefined ? is_active : true;
|
|
22
|
-
this.
|
|
24
|
+
this.service_id = service_id || null;
|
|
25
|
+
this.sub_service_id = sub_service_id || null;
|
|
23
26
|
this.status = status || 'draft';
|
|
27
|
+
this.service_type = service_type || 'none';
|
|
24
28
|
}
|
|
25
29
|
};
|
|
26
30
|
exports.WorkflowDefinitions = WorkflowDefinitions;
|
|
@@ -41,9 +45,32 @@ __decorate([
|
|
|
41
45
|
__metadata("design:type", Boolean)
|
|
42
46
|
], WorkflowDefinitions.prototype, "is_active", void 0);
|
|
43
47
|
__decorate([
|
|
44
|
-
(0, typeorm_1.Column)({
|
|
48
|
+
(0, typeorm_1.Column)({
|
|
49
|
+
type: 'varchar',
|
|
50
|
+
length: 20,
|
|
51
|
+
nullable: true,
|
|
52
|
+
enum: ['internal', 'external', 'none']
|
|
53
|
+
}),
|
|
45
54
|
__metadata("design:type", String)
|
|
46
55
|
], WorkflowDefinitions.prototype, "service_type", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], WorkflowDefinitions.prototype, "service_id", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.ManyToOne)(() => CAAServices_1.CAAServices),
|
|
62
|
+
(0, typeorm_1.JoinColumn)({ name: 'service_id' }),
|
|
63
|
+
__metadata("design:type", CAAServices_1.CAAServices)
|
|
64
|
+
], WorkflowDefinitions.prototype, "service", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], WorkflowDefinitions.prototype, "sub_service_id", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.ManyToOne)(() => CAASubServices_1.CAASubServices),
|
|
71
|
+
(0, typeorm_1.JoinColumn)({ name: 'sub_service_id' }),
|
|
72
|
+
__metadata("design:type", CAASubServices_1.CAASubServices)
|
|
73
|
+
], WorkflowDefinitions.prototype, "sub_service", void 0);
|
|
47
74
|
__decorate([
|
|
48
75
|
(0, typeorm_1.Column)({
|
|
49
76
|
type: 'varchar',
|
|
@@ -55,5 +82,5 @@ __decorate([
|
|
|
55
82
|
], WorkflowDefinitions.prototype, "status", void 0);
|
|
56
83
|
exports.WorkflowDefinitions = WorkflowDefinitions = __decorate([
|
|
57
84
|
(0, typeorm_1.Entity)({ name: 'workflow_definitions' }),
|
|
58
|
-
__metadata("design:paramtypes", [String, String, Number, Boolean, String, String])
|
|
85
|
+
__metadata("design:paramtypes", [String, String, Number, Boolean, Object, Object, String, String])
|
|
59
86
|
], WorkflowDefinitions);
|
|
@@ -4,9 +4,13 @@ export declare class WorkflowHierarchy extends BaseModel {
|
|
|
4
4
|
workflow_definition_id: number;
|
|
5
5
|
department_id: number;
|
|
6
6
|
section_id: number;
|
|
7
|
-
|
|
7
|
+
approval_role_id: number;
|
|
8
|
+
approval_user_id: number;
|
|
9
|
+
taskname: string | null;
|
|
10
|
+
status: string | null;
|
|
11
|
+
task: any | null;
|
|
8
12
|
step_order: number;
|
|
9
13
|
is_required: boolean;
|
|
10
14
|
workflow_definition: WorkflowDefinitions;
|
|
11
|
-
constructor(workflow_definition_id: number, department_id: number, section_id: number,
|
|
15
|
+
constructor(workflow_definition_id: number, department_id: number, section_id: number, approval_role_id: number, approval_user_id: number, step_order: number, is_required?: boolean, taskname?: string, status?: string, task?: any);
|
|
12
16
|
}
|
|
@@ -14,14 +14,18 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
const WorkflowDefinitions_1 = require("./WorkflowDefinitions");
|
|
16
16
|
let WorkflowHierarchy = class WorkflowHierarchy extends BaseModel_1.BaseModel {
|
|
17
|
-
constructor(workflow_definition_id, department_id, section_id,
|
|
17
|
+
constructor(workflow_definition_id, department_id, section_id, approval_role_id, approval_user_id, step_order, is_required, taskname, status, task) {
|
|
18
18
|
super();
|
|
19
19
|
this.workflow_definition_id = workflow_definition_id;
|
|
20
20
|
this.department_id = department_id;
|
|
21
21
|
this.section_id = section_id;
|
|
22
|
-
this.
|
|
22
|
+
this.approval_role_id = approval_role_id;
|
|
23
|
+
this.approval_user_id = approval_user_id;
|
|
23
24
|
this.step_order = step_order;
|
|
24
25
|
this.is_required = is_required !== undefined ? is_required : true;
|
|
26
|
+
this.taskname = taskname || null;
|
|
27
|
+
this.status = status || null;
|
|
28
|
+
this.task = task || null;
|
|
25
29
|
}
|
|
26
30
|
};
|
|
27
31
|
exports.WorkflowHierarchy = WorkflowHierarchy;
|
|
@@ -40,7 +44,23 @@ __decorate([
|
|
|
40
44
|
__decorate([
|
|
41
45
|
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
42
46
|
__metadata("design:type", Number)
|
|
43
|
-
], WorkflowHierarchy.prototype, "
|
|
47
|
+
], WorkflowHierarchy.prototype, "approval_role_id", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], WorkflowHierarchy.prototype, "approval_user_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], WorkflowHierarchy.prototype, "taskname", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], WorkflowHierarchy.prototype, "status", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], WorkflowHierarchy.prototype, "task", void 0);
|
|
44
64
|
__decorate([
|
|
45
65
|
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
46
66
|
__metadata("design:type", Number)
|
|
@@ -57,5 +77,5 @@ __decorate([
|
|
|
57
77
|
exports.WorkflowHierarchy = WorkflowHierarchy = __decorate([
|
|
58
78
|
(0, typeorm_1.Entity)({ name: 'workflow_hierarchy' }),
|
|
59
79
|
(0, typeorm_1.Unique)(['workflow_definition_id', 'step_order']),
|
|
60
|
-
__metadata("design:paramtypes", [Number, Number, Number, Number, Number, Boolean])
|
|
80
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number, Number, Number, Boolean, String, String, Object])
|
|
61
81
|
], WorkflowHierarchy);
|