@platform-modules/civil-aviation-authority 2.2.320 → 2.2.321
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/dist/index.d.ts +6 -0
- package/dist/index.js +13 -1
- package/dist/models/ITApprovalSettings.d.ts +7 -0
- package/dist/models/ITApprovalSettings.js +40 -0
- package/dist/models/ITServicesTypesMuscatModel.d.ts +6 -0
- package/dist/models/ITServicesTypesMuscatModel.js +34 -0
- package/dist/models/ITServicesTypesSalalahModel.d.ts +6 -0
- package/dist/models/ITServicesTypesSalalahModel.js +34 -0
- package/dist/models/Workflows.d.ts +9 -0
- package/dist/models/Workflows.js +31 -0
- package/package.json +1 -1
- package/src/index.ts +6 -0
- package/src/models/ITRequestChatModel.ts +62 -62
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
package/dist/index.d.ts
CHANGED
|
@@ -82,3 +82,9 @@ export { HrServiceRequestAttachment } from './models/HrServiceAttachmentModel';
|
|
|
82
82
|
export { HrServiceRequestChat } from './models/HrServiceChatModel';
|
|
83
83
|
export { HrServiceMessageType } from './models/HrServiceChatModel';
|
|
84
84
|
export { HrServiceChatStatus } from './models/HrServiceChatModel';
|
|
85
|
+
export { TrainingRequestStatus } from './models/TrainingRequestModel';
|
|
86
|
+
export { TrainingApprovalStatus } from './models/TrainingApprovalModel';
|
|
87
|
+
export { TrainingWorkFlowStatus } from './models/TrainingWorkflowModel';
|
|
88
|
+
export { TrainingRequestAttachment } from './models/TrainingAttachmentModel';
|
|
89
|
+
export { TrainingRequestChat } from './models/TrainingChatModel';
|
|
90
|
+
export { TrainingMessageType } from './models/TrainingChatModel';
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.HrServiceChatStatus = exports.HrServiceMessageType = exports.HrServiceRequestChat = exports.HrServiceRequestAttachment = exports.HrServiceWorkFlowStatus = exports.HrServiceApprovalStatus = exports.HrServiceRequestStatus = void 0;
|
|
17
|
+
exports.TrainingMessageType = exports.TrainingRequestChat = exports.TrainingRequestAttachment = exports.TrainingWorkFlowStatus = exports.TrainingApprovalStatus = exports.TrainingRequestStatus = exports.HrServiceChatStatus = exports.HrServiceMessageType = exports.HrServiceRequestChat = exports.HrServiceRequestAttachment = exports.HrServiceWorkFlowStatus = exports.HrServiceApprovalStatus = exports.HrServiceRequestStatus = void 0;
|
|
18
18
|
__exportStar(require("./models/user"), exports);
|
|
19
19
|
__exportStar(require("./models/role"), exports);
|
|
20
20
|
__exportStar(require("./models/user-sessions"), exports);
|
|
@@ -110,3 +110,15 @@ var HrServiceChatModel_2 = require("./models/HrServiceChatModel");
|
|
|
110
110
|
Object.defineProperty(exports, "HrServiceMessageType", { enumerable: true, get: function () { return HrServiceChatModel_2.HrServiceMessageType; } });
|
|
111
111
|
var HrServiceChatModel_3 = require("./models/HrServiceChatModel");
|
|
112
112
|
Object.defineProperty(exports, "HrServiceChatStatus", { enumerable: true, get: function () { return HrServiceChatModel_3.HrServiceChatStatus; } });
|
|
113
|
+
var TrainingRequestModel_1 = require("./models/TrainingRequestModel");
|
|
114
|
+
Object.defineProperty(exports, "TrainingRequestStatus", { enumerable: true, get: function () { return TrainingRequestModel_1.TrainingRequestStatus; } });
|
|
115
|
+
var TrainingApprovalModel_1 = require("./models/TrainingApprovalModel");
|
|
116
|
+
Object.defineProperty(exports, "TrainingApprovalStatus", { enumerable: true, get: function () { return TrainingApprovalModel_1.TrainingApprovalStatus; } });
|
|
117
|
+
var TrainingWorkflowModel_1 = require("./models/TrainingWorkflowModel");
|
|
118
|
+
Object.defineProperty(exports, "TrainingWorkFlowStatus", { enumerable: true, get: function () { return TrainingWorkflowModel_1.TrainingWorkFlowStatus; } });
|
|
119
|
+
var TrainingAttachmentModel_1 = require("./models/TrainingAttachmentModel");
|
|
120
|
+
Object.defineProperty(exports, "TrainingRequestAttachment", { enumerable: true, get: function () { return TrainingAttachmentModel_1.TrainingRequestAttachment; } });
|
|
121
|
+
var TrainingChatModel_1 = require("./models/TrainingChatModel");
|
|
122
|
+
Object.defineProperty(exports, "TrainingRequestChat", { enumerable: true, get: function () { return TrainingChatModel_1.TrainingRequestChat; } });
|
|
123
|
+
var TrainingChatModel_2 = require("./models/TrainingChatModel");
|
|
124
|
+
Object.defineProperty(exports, "TrainingMessageType", { enumerable: true, get: function () { return TrainingChatModel_2.TrainingMessageType; } });
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ITApprovalSettings = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let ITApprovalSettings = class ITApprovalSettings extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(level, approval_role_id, workflow_id) {
|
|
17
|
+
super();
|
|
18
|
+
this.level = level;
|
|
19
|
+
this.approval_role_id = approval_role_id;
|
|
20
|
+
this.workflow_id = workflow_id;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.ITApprovalSettings = ITApprovalSettings;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], ITApprovalSettings.prototype, "level", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], ITApprovalSettings.prototype, "approval_role_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], ITApprovalSettings.prototype, "workflow_id", void 0);
|
|
36
|
+
exports.ITApprovalSettings = ITApprovalSettings = __decorate([
|
|
37
|
+
(0, typeorm_1.Entity)({ name: 'it_approval_settings' }),
|
|
38
|
+
(0, typeorm_1.Unique)(['workflow_id', 'level']),
|
|
39
|
+
__metadata("design:paramtypes", [Number, Number, Number])
|
|
40
|
+
], ITApprovalSettings);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ITServicesTypesMuscat = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let ITServicesTypesMuscat = class ITServicesTypesMuscat extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, name_in_arabic) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.name_in_arabic = name_in_arabic;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.ITServicesTypesMuscat = ITServicesTypesMuscat;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ITServicesTypesMuscat.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ITServicesTypesMuscat.prototype, "name_in_arabic", void 0);
|
|
31
|
+
exports.ITServicesTypesMuscat = ITServicesTypesMuscat = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'it_services_types_muscat' }),
|
|
33
|
+
__metadata("design:paramtypes", [String, String])
|
|
34
|
+
], ITServicesTypesMuscat);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ITServicesTypesSalalah = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let ITServicesTypesSalalah = class ITServicesTypesSalalah extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, name_in_arabic) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.name_in_arabic = name_in_arabic;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.ITServicesTypesSalalah = ITServicesTypesSalalah;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ITServicesTypesSalalah.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ITServicesTypesSalalah.prototype, "name_in_arabic", void 0);
|
|
31
|
+
exports.ITServicesTypesSalalah = ITServicesTypesSalalah = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'it_services_types_salalah' }),
|
|
33
|
+
__metadata("design:paramtypes", [String, String])
|
|
34
|
+
], ITServicesTypesSalalah);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class Workflows extends BaseModel {
|
|
3
|
+
name: string;
|
|
4
|
+
service_id: number;
|
|
5
|
+
sub_service_id: number;
|
|
6
|
+
request_for: string;
|
|
7
|
+
levels: number;
|
|
8
|
+
constructor(name: string, service_id: number, sub_service_id: number, request_for: string, levels: number);
|
|
9
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import { Column, Entity, Unique } from "typeorm";
|
|
3
|
+
// import { BaseModel } from './BaseModel';
|
|
4
|
+
// @Entity({ name: 'workflows' })
|
|
5
|
+
// @Unique(['service_id', 'sub_service_id', 'request_for'])
|
|
6
|
+
// export class Workflows extends BaseModel {
|
|
7
|
+
// @Column({ type: 'varchar', length: 100, nullable: false })
|
|
8
|
+
// name: string;
|
|
9
|
+
// @Column({ type: 'bigint', nullable: false })
|
|
10
|
+
// service_id: number;
|
|
11
|
+
// @Column({ type: 'bigint', nullable: false })
|
|
12
|
+
// sub_service_id: number;
|
|
13
|
+
// @Column({ type: 'varchar', length: 20, nullable: false })
|
|
14
|
+
// request_for: string; // 'Self' | 'Behalf of' | 'Internal'
|
|
15
|
+
// @Column({ type: 'int', nullable: false })
|
|
16
|
+
// levels: number;
|
|
17
|
+
// constructor(
|
|
18
|
+
// name: string,
|
|
19
|
+
// service_id: number,
|
|
20
|
+
// sub_service_id: number,
|
|
21
|
+
// request_for: string,
|
|
22
|
+
// levels: number,
|
|
23
|
+
// ) {
|
|
24
|
+
// super();
|
|
25
|
+
// this.name = name;
|
|
26
|
+
// this.service_id = service_id;
|
|
27
|
+
// this.sub_service_id = sub_service_id;
|
|
28
|
+
// this.request_for = request_for;
|
|
29
|
+
// this.levels = levels;
|
|
30
|
+
// }
|
|
31
|
+
// }
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -86,3 +86,9 @@ export {HrServiceRequestAttachment} from './models/HrServiceAttachmentModel';
|
|
|
86
86
|
export {HrServiceRequestChat} from './models/HrServiceChatModel';
|
|
87
87
|
export {HrServiceMessageType} from './models/HrServiceChatModel';
|
|
88
88
|
export {HrServiceChatStatus} from './models/HrServiceChatModel';
|
|
89
|
+
export {TrainingRequestStatus} from './models/TrainingRequestModel';
|
|
90
|
+
export {TrainingApprovalStatus} from './models/TrainingApprovalModel';
|
|
91
|
+
export {TrainingWorkFlowStatus} from './models/TrainingWorkflowModel';
|
|
92
|
+
export {TrainingRequestAttachment} from './models/TrainingAttachmentModel';
|
|
93
|
+
export {TrainingRequestChat} from './models/TrainingChatModel';
|
|
94
|
+
export {TrainingMessageType} from './models/TrainingChatModel';
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
import { ITHelpDeskRequests } from './ITHelpDeskModel';
|
|
4
|
-
import { User } from './user';
|
|
5
|
-
|
|
6
|
-
@Entity({ name: 'it_request_chat' })
|
|
7
|
-
export class ITRequestChat extends BaseModel {
|
|
8
|
-
|
|
9
|
-
@Column({ type: 'integer', nullable: false })
|
|
10
|
-
request_id: number;
|
|
11
|
-
|
|
12
|
-
@ManyToOne(() => ITHelpDeskRequests)
|
|
13
|
-
@JoinColumn({ name: 'request_id' })
|
|
14
|
-
request: ITHelpDeskRequests;
|
|
15
|
-
|
|
16
|
-
@Column({ type: 'integer', nullable: true })
|
|
17
|
-
service_id: number | null;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'integer', nullable: true })
|
|
20
|
-
sub_service_id: number | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'integer', nullable: false })
|
|
23
|
-
user_id: number;
|
|
24
|
-
|
|
25
|
-
@ManyToOne(() => User)
|
|
26
|
-
@JoinColumn({ name: 'user_id' })
|
|
27
|
-
user: User;
|
|
28
|
-
|
|
29
|
-
@Column({ type: 'integer', nullable: true })
|
|
30
|
-
role_id: number | null;
|
|
31
|
-
|
|
32
|
-
@Column({ type: 'text', nullable: false })
|
|
33
|
-
message: string;
|
|
34
|
-
|
|
35
|
-
@Column({ type: 'text', nullable: true })
|
|
36
|
-
status: string | null;
|
|
37
|
-
|
|
38
|
-
@Column({ type: 'boolean', default: false })
|
|
39
|
-
is_internal: boolean;
|
|
40
|
-
|
|
41
|
-
constructor(
|
|
42
|
-
request_id: number,
|
|
43
|
-
user_id: number,
|
|
44
|
-
message: string,
|
|
45
|
-
is_internal?: boolean,
|
|
46
|
-
service_id?: number | null,
|
|
47
|
-
sub_service_id?: number | null,
|
|
48
|
-
role_id?: number | null,
|
|
49
|
-
status?: string | null
|
|
50
|
-
) {
|
|
51
|
-
super();
|
|
52
|
-
this.request_id = request_id;
|
|
53
|
-
this.service_id = service_id || null;
|
|
54
|
-
this.sub_service_id = sub_service_id || null;
|
|
55
|
-
this.user_id = user_id;
|
|
56
|
-
this.role_id = role_id || null;
|
|
57
|
-
this.message = message;
|
|
58
|
-
this.status = status || null;
|
|
59
|
-
this.is_internal = is_internal || false;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { ITHelpDeskRequests } from './ITHelpDeskModel';
|
|
4
|
+
import { User } from './user';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'it_request_chat' })
|
|
7
|
+
export class ITRequestChat extends BaseModel {
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'integer', nullable: false })
|
|
10
|
+
request_id: number;
|
|
11
|
+
|
|
12
|
+
@ManyToOne(() => ITHelpDeskRequests)
|
|
13
|
+
@JoinColumn({ name: 'request_id' })
|
|
14
|
+
request: ITHelpDeskRequests;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'integer', nullable: true })
|
|
17
|
+
service_id: number | null;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
sub_service_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'integer', nullable: false })
|
|
23
|
+
user_id: number;
|
|
24
|
+
|
|
25
|
+
@ManyToOne(() => User)
|
|
26
|
+
@JoinColumn({ name: 'user_id' })
|
|
27
|
+
user: User;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'integer', nullable: true })
|
|
30
|
+
role_id: number | null;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'text', nullable: false })
|
|
33
|
+
message: string;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'text', nullable: true })
|
|
36
|
+
status: string | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'boolean', default: false })
|
|
39
|
+
is_internal: boolean;
|
|
40
|
+
|
|
41
|
+
constructor(
|
|
42
|
+
request_id: number,
|
|
43
|
+
user_id: number,
|
|
44
|
+
message: string,
|
|
45
|
+
is_internal?: boolean,
|
|
46
|
+
service_id?: number | null,
|
|
47
|
+
sub_service_id?: number | null,
|
|
48
|
+
role_id?: number | null,
|
|
49
|
+
status?: string | null
|
|
50
|
+
) {
|
|
51
|
+
super();
|
|
52
|
+
this.request_id = request_id;
|
|
53
|
+
this.service_id = service_id || null;
|
|
54
|
+
this.sub_service_id = sub_service_id || null;
|
|
55
|
+
this.user_id = user_id;
|
|
56
|
+
this.role_id = role_id || null;
|
|
57
|
+
this.message = message;
|
|
58
|
+
this.status = status || null;
|
|
59
|
+
this.is_internal = is_internal || false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export enum ApprovalStatus {
|
|
6
|
-
PENDING = "Pending",
|
|
7
|
-
APPROVED = "Approved",
|
|
8
|
-
REJECTED = "Rejected",
|
|
9
|
-
ASSIGNED = "Assigned",
|
|
10
|
-
REASSIGNED = "Reassigned"
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@Entity({ name: 'it_approvals' })
|
|
15
|
-
export class ItApprovalDetails extends BaseModel {
|
|
16
|
-
@Column({ type: 'integer', nullable: false })
|
|
17
|
-
request_id: number;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'integer', nullable: true })
|
|
20
|
-
service_id: number | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'integer', nullable: true })
|
|
23
|
-
sub_service_id: number | null;
|
|
24
|
-
|
|
25
|
-
@Column({ type: 'integer', nullable: false })
|
|
26
|
-
level: number;
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'integer', nullable: true })
|
|
29
|
-
approver_user_id: number | null;
|
|
30
|
-
|
|
31
|
-
@Column({ type: 'integer', nullable: true })
|
|
32
|
-
delegation_user_id: number | null;
|
|
33
|
-
|
|
34
|
-
@Column({ type: 'integer', nullable: false })
|
|
35
|
-
approver_role_id: number | null;
|
|
36
|
-
|
|
37
|
-
@Column({ type: 'integer', nullable: true })
|
|
38
|
-
department_id: number | null;
|
|
39
|
-
|
|
40
|
-
@Column({ type: 'integer', nullable: true })
|
|
41
|
-
section_id: number | null;
|
|
42
|
-
|
|
43
|
-
@Column({ type: 'integer', nullable: true })
|
|
44
|
-
approved_by: number | null;
|
|
45
|
-
|
|
46
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
47
|
-
comment: string;
|
|
48
|
-
|
|
49
|
-
@Column({ type: 'enum', enum: ApprovalStatus,default: ApprovalStatus.PENDING, nullable: false })
|
|
50
|
-
approval_status: ApprovalStatus;
|
|
51
|
-
|
|
52
|
-
@Column({ type: 'boolean', default: true, nullable: false })
|
|
53
|
-
is_allowed: boolean;
|
|
54
|
-
|
|
55
|
-
constructor(
|
|
56
|
-
request_id: number,
|
|
57
|
-
approver_user_id: number | null,
|
|
58
|
-
approver_role_id: number | null,
|
|
59
|
-
comment: string,
|
|
60
|
-
approval_status: ApprovalStatus,
|
|
61
|
-
level: number,
|
|
62
|
-
department_id?: number | null,
|
|
63
|
-
section_id?: number | null,
|
|
64
|
-
approved_by?: number | null,
|
|
65
|
-
service_id?: number | null,
|
|
66
|
-
sub_service_id?: number | null,
|
|
67
|
-
delegation_user_id?: number | null,
|
|
68
|
-
is_allowed?: boolean
|
|
69
|
-
) {
|
|
70
|
-
super();
|
|
71
|
-
this.request_id = request_id;
|
|
72
|
-
this.approver_user_id = approver_user_id;
|
|
73
|
-
this.approver_role_id = approver_role_id;
|
|
74
|
-
this.comment = comment;
|
|
75
|
-
this.approval_status = approval_status;
|
|
76
|
-
this.level = level;
|
|
77
|
-
this.department_id = department_id || null;
|
|
78
|
-
this.section_id = section_id || null;
|
|
79
|
-
this.approved_by = approved_by || null;
|
|
80
|
-
this.service_id = service_id ?? null;
|
|
81
|
-
this.sub_service_id = sub_service_id ?? null;
|
|
82
|
-
this.delegation_user_id = delegation_user_id || null;
|
|
83
|
-
this.is_allowed = is_allowed ?? true;
|
|
84
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export enum ApprovalStatus {
|
|
6
|
+
PENDING = "Pending",
|
|
7
|
+
APPROVED = "Approved",
|
|
8
|
+
REJECTED = "Rejected",
|
|
9
|
+
ASSIGNED = "Assigned",
|
|
10
|
+
REASSIGNED = "Reassigned"
|
|
11
|
+
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@Entity({ name: 'it_approvals' })
|
|
15
|
+
export class ItApprovalDetails extends BaseModel {
|
|
16
|
+
@Column({ type: 'integer', nullable: false })
|
|
17
|
+
request_id: number;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
service_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'integer', nullable: true })
|
|
23
|
+
sub_service_id: number | null;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'integer', nullable: false })
|
|
26
|
+
level: number;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
approver_user_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'integer', nullable: true })
|
|
32
|
+
delegation_user_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'integer', nullable: false })
|
|
35
|
+
approver_role_id: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'integer', nullable: true })
|
|
38
|
+
department_id: number | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'integer', nullable: true })
|
|
41
|
+
section_id: number | null;
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'integer', nullable: true })
|
|
44
|
+
approved_by: number | null;
|
|
45
|
+
|
|
46
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
47
|
+
comment: string;
|
|
48
|
+
|
|
49
|
+
@Column({ type: 'enum', enum: ApprovalStatus,default: ApprovalStatus.PENDING, nullable: false })
|
|
50
|
+
approval_status: ApprovalStatus;
|
|
51
|
+
|
|
52
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
53
|
+
is_allowed: boolean;
|
|
54
|
+
|
|
55
|
+
constructor(
|
|
56
|
+
request_id: number,
|
|
57
|
+
approver_user_id: number | null,
|
|
58
|
+
approver_role_id: number | null,
|
|
59
|
+
comment: string,
|
|
60
|
+
approval_status: ApprovalStatus,
|
|
61
|
+
level: number,
|
|
62
|
+
department_id?: number | null,
|
|
63
|
+
section_id?: number | null,
|
|
64
|
+
approved_by?: number | null,
|
|
65
|
+
service_id?: number | null,
|
|
66
|
+
sub_service_id?: number | null,
|
|
67
|
+
delegation_user_id?: number | null,
|
|
68
|
+
is_allowed?: boolean
|
|
69
|
+
) {
|
|
70
|
+
super();
|
|
71
|
+
this.request_id = request_id;
|
|
72
|
+
this.approver_user_id = approver_user_id;
|
|
73
|
+
this.approver_role_id = approver_role_id;
|
|
74
|
+
this.comment = comment;
|
|
75
|
+
this.approval_status = approval_status;
|
|
76
|
+
this.level = level;
|
|
77
|
+
this.department_id = department_id || null;
|
|
78
|
+
this.section_id = section_id || null;
|
|
79
|
+
this.approved_by = approved_by || null;
|
|
80
|
+
this.service_id = service_id ?? null;
|
|
81
|
+
this.sub_service_id = sub_service_id ?? null;
|
|
82
|
+
this.delegation_user_id = delegation_user_id || null;
|
|
83
|
+
this.is_allowed = is_allowed ?? true;
|
|
84
|
+
}
|
|
85
85
|
}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
export enum workFlowStatus {
|
|
5
|
-
COMPLETED = "Completed",
|
|
6
|
-
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
-
PENDING = "Pending"
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//This model is used to store the store the leave apporval matrix(HOD, Manager, HR, Director) based on leave type along with the levels
|
|
11
|
-
@Entity({ name: 'it_work_flows' })
|
|
12
|
-
export class ItWorkFlow extends BaseModel {
|
|
13
|
-
@Column({ type: 'int', nullable: false })
|
|
14
|
-
request_id: number;
|
|
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: 'int', nullable: true })
|
|
23
|
-
order: number | null;
|
|
24
|
-
|
|
25
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
26
|
-
content: string;
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'enum', enum: workFlowStatus, default: workFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
29
|
-
status: workFlowStatus;
|
|
30
|
-
|
|
31
|
-
@Column({ type: 'integer', nullable: true })
|
|
32
|
-
user_id: number | null;
|
|
33
|
-
|
|
34
|
-
@Column({ type: 'integer', nullable: true })
|
|
35
|
-
role_id: number | null;
|
|
36
|
-
|
|
37
|
-
@Column({ type: 'integer', nullable: true })
|
|
38
|
-
department_id: number | null;
|
|
39
|
-
|
|
40
|
-
@Column({ type: 'integer', nullable: true })
|
|
41
|
-
section_id: number | null;
|
|
42
|
-
|
|
43
|
-
constructor(request_id: number, content: string, status: workFlowStatus, order?: number, service_id?: number | null, sub_service_id?: number | null, user_id?: number | null, role_id?: number | null, department_id?: number | null, section_id?: number | null) {
|
|
44
|
-
super();
|
|
45
|
-
this.request_id = request_id;
|
|
46
|
-
this.content = content;
|
|
47
|
-
this.status = status;
|
|
48
|
-
this.order = order || null;
|
|
49
|
-
this.service_id = service_id ?? null;
|
|
50
|
-
this.sub_service_id = sub_service_id ?? null;
|
|
51
|
-
this.user_id = user_id || null;
|
|
52
|
-
this.role_id = role_id || null;
|
|
53
|
-
this.department_id = department_id || null;
|
|
54
|
-
this.section_id = section_id || null;
|
|
55
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum workFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//This model is used to store the store the leave apporval matrix(HOD, Manager, HR, Director) based on leave type along with the levels
|
|
11
|
+
@Entity({ name: 'it_work_flows' })
|
|
12
|
+
export class ItWorkFlow extends BaseModel {
|
|
13
|
+
@Column({ type: 'int', nullable: false })
|
|
14
|
+
request_id: number;
|
|
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: 'int', nullable: true })
|
|
23
|
+
order: number | null;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
26
|
+
content: string;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'enum', enum: workFlowStatus, default: workFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
29
|
+
status: workFlowStatus;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'integer', nullable: true })
|
|
32
|
+
user_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'integer', nullable: true })
|
|
35
|
+
role_id: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'integer', nullable: true })
|
|
38
|
+
department_id: number | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'integer', nullable: true })
|
|
41
|
+
section_id: number | null;
|
|
42
|
+
|
|
43
|
+
constructor(request_id: number, content: string, status: workFlowStatus, order?: number, service_id?: number | null, sub_service_id?: number | null, user_id?: number | null, role_id?: number | null, department_id?: number | null, section_id?: number | null) {
|
|
44
|
+
super();
|
|
45
|
+
this.request_id = request_id;
|
|
46
|
+
this.content = content;
|
|
47
|
+
this.status = status;
|
|
48
|
+
this.order = order || null;
|
|
49
|
+
this.service_id = service_id ?? null;
|
|
50
|
+
this.sub_service_id = sub_service_id ?? null;
|
|
51
|
+
this.user_id = user_id || null;
|
|
52
|
+
this.role_id = role_id || null;
|
|
53
|
+
this.department_id = department_id || null;
|
|
54
|
+
this.section_id = section_id || null;
|
|
55
|
+
}
|
|
56
56
|
}
|