@platform-modules/civil-aviation-authority 2.2.324 → 2.2.999
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +10 -10
- package/dist/data-source.js +1 -3
- package/dist/index.d.ts +0 -8
- package/dist/index.js +1 -16
- package/dist/models/HrServiceApprovalModel.d.ts +1 -3
- package/dist/models/HrServiceApprovalModel.js +2 -12
- package/package.json +1 -1
- package/src/data-source.ts +189 -181
- package/src/index.ts +106 -96
- package/src/models/HrServiceApprovalModel.ts +0 -10
- package/src/models/HrServiceRequestModel.ts +167 -167
- package/src/models/ITRequestChatModel.ts +62 -62
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/src/models/StudyLeaveApprovalModel.ts +94 -0
- package/src/models/StudyLeaveAttachmentModel.ts +56 -0
- package/src/models/StudyLeaveChatModel.ts +76 -0
- package/src/models/StudyLeaveRequestModel.ts +114 -0
- package/src/models/StudyLeaveWorkflowModel.ts +68 -0
- package/dist/models/ITApprovalSettings.d.ts +0 -7
- package/dist/models/ITApprovalSettings.js +0 -40
- package/dist/models/ITServicesTypesMuscatModel.d.ts +0 -6
- package/dist/models/ITServicesTypesMuscatModel.js +0 -34
- package/dist/models/ITServicesTypesSalalahModel.d.ts +0 -6
- package/dist/models/ITServicesTypesSalalahModel.js +0 -34
- package/dist/models/SecondmentRequestModel.d.ts +0 -40
- package/dist/models/SecondmentRequestModel.js +0 -174
- package/dist/models/Workflows.d.ts +0 -9
- package/dist/models/Workflows.js +0 -31
- package/src/models/SecondmentRequestModel.ts +0 -163
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum StudyLeaveRequestStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
IN_PROGRESS = "In Progress",
|
|
7
|
+
COMPLETED = "Completed",
|
|
8
|
+
APPROVED = "Approved",
|
|
9
|
+
REJECTED = "Rejected"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Entity({ name: "study_leave_requests" })
|
|
13
|
+
export class StudyLeaveRequest extends BaseModel {
|
|
14
|
+
@Column({ type: "integer", nullable: true })
|
|
15
|
+
req_user_department_id: number | null;
|
|
16
|
+
|
|
17
|
+
@Column({ type: "integer", nullable: true })
|
|
18
|
+
req_user_section_id: number | null;
|
|
19
|
+
|
|
20
|
+
@Column({ type: "integer", nullable: true })
|
|
21
|
+
req_user_position_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: "integer", nullable: true })
|
|
24
|
+
service_id: number | null;
|
|
25
|
+
|
|
26
|
+
@Column({ type: "integer", nullable: true })
|
|
27
|
+
sub_service_id: number | null;
|
|
28
|
+
|
|
29
|
+
@Column({ type: "integer", nullable: false })
|
|
30
|
+
user_id: number;
|
|
31
|
+
|
|
32
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
33
|
+
course_name: string;
|
|
34
|
+
|
|
35
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
36
|
+
institute_name: string;
|
|
37
|
+
|
|
38
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
39
|
+
duration_of_course: string | null;
|
|
40
|
+
|
|
41
|
+
@Column({ type: "date", nullable: false })
|
|
42
|
+
course_start_date: Date;
|
|
43
|
+
|
|
44
|
+
@Column({ type: "date", nullable: false })
|
|
45
|
+
course_end_date: Date;
|
|
46
|
+
|
|
47
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
48
|
+
location: string;
|
|
49
|
+
|
|
50
|
+
@Column({ type: "text", nullable: false })
|
|
51
|
+
description: string;
|
|
52
|
+
|
|
53
|
+
@Column({
|
|
54
|
+
type: "enum",
|
|
55
|
+
enum: StudyLeaveRequestStatus,
|
|
56
|
+
default: StudyLeaveRequestStatus.PENDING,
|
|
57
|
+
nullable: false
|
|
58
|
+
})
|
|
59
|
+
status: StudyLeaveRequestStatus;
|
|
60
|
+
|
|
61
|
+
@Column({ type: "integer", nullable: true })
|
|
62
|
+
reviewer_user_id: number | null;
|
|
63
|
+
|
|
64
|
+
@Column({ type: "integer", nullable: true })
|
|
65
|
+
assigned_to_user_id: number | null;
|
|
66
|
+
|
|
67
|
+
@Column({ type: "timestamp", nullable: true })
|
|
68
|
+
assigned_at: Date | null;
|
|
69
|
+
|
|
70
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
71
|
+
workflow_execution_id: string | null;
|
|
72
|
+
|
|
73
|
+
constructor(
|
|
74
|
+
user_id: number,
|
|
75
|
+
course_name: string,
|
|
76
|
+
institute_name: string,
|
|
77
|
+
course_start_date: Date,
|
|
78
|
+
course_end_date: Date,
|
|
79
|
+
location: string,
|
|
80
|
+
description: string,
|
|
81
|
+
status: StudyLeaveRequestStatus = StudyLeaveRequestStatus.PENDING,
|
|
82
|
+
service_id?: number | null,
|
|
83
|
+
sub_service_id?: number | null,
|
|
84
|
+
req_user_department_id?: number | null,
|
|
85
|
+
req_user_section_id?: number | null,
|
|
86
|
+
req_user_position_id?: number | null,
|
|
87
|
+
duration_of_course?: string | null,
|
|
88
|
+
reviewer_user_id?: number | null,
|
|
89
|
+
assigned_to_user_id?: number | null,
|
|
90
|
+
assigned_at?: Date | null,
|
|
91
|
+
workflow_execution_id?: string | null
|
|
92
|
+
) {
|
|
93
|
+
super();
|
|
94
|
+
this.user_id = user_id;
|
|
95
|
+
this.course_name = course_name;
|
|
96
|
+
this.institute_name = institute_name;
|
|
97
|
+
this.course_start_date = course_start_date;
|
|
98
|
+
this.course_end_date = course_end_date;
|
|
99
|
+
this.location = location;
|
|
100
|
+
this.description = description;
|
|
101
|
+
this.status = status;
|
|
102
|
+
this.service_id = service_id || null;
|
|
103
|
+
this.sub_service_id = sub_service_id || null;
|
|
104
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
105
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
106
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
107
|
+
this.duration_of_course = duration_of_course || null;
|
|
108
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
109
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
110
|
+
this.assigned_at = assigned_at || null;
|
|
111
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum StudyLeaveWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending",
|
|
8
|
+
REJECTED = "Rejected"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Entity({ name: "study_leave_workflows" })
|
|
12
|
+
export class StudyLeaveWorkFlow extends BaseModel {
|
|
13
|
+
@Column({ type: "int", nullable: false })
|
|
14
|
+
request_id: number;
|
|
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: "int", nullable: true })
|
|
23
|
+
order: number | null;
|
|
24
|
+
|
|
25
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
26
|
+
content: string;
|
|
27
|
+
|
|
28
|
+
@Column({ type: "integer", nullable: true })
|
|
29
|
+
approver_role_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: "integer", nullable: true })
|
|
32
|
+
approver_user_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: "integer", nullable: true })
|
|
35
|
+
approved_by: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({
|
|
38
|
+
type: "enum",
|
|
39
|
+
enum: StudyLeaveWorkFlowStatus,
|
|
40
|
+
default: StudyLeaveWorkFlowStatus.PENDING,
|
|
41
|
+
nullable: false
|
|
42
|
+
})
|
|
43
|
+
status: StudyLeaveWorkFlowStatus;
|
|
44
|
+
|
|
45
|
+
constructor(
|
|
46
|
+
request_id: number,
|
|
47
|
+
content: string,
|
|
48
|
+
status: StudyLeaveWorkFlowStatus,
|
|
49
|
+
service_id?: number | null,
|
|
50
|
+
sub_service_id?: number | null,
|
|
51
|
+
order?: number,
|
|
52
|
+
approver_role_id?: number | null,
|
|
53
|
+
approver_user_id?: number | null,
|
|
54
|
+
approved_by?: number | null
|
|
55
|
+
) {
|
|
56
|
+
super();
|
|
57
|
+
this.request_id = request_id;
|
|
58
|
+
this.service_id = service_id || null;
|
|
59
|
+
this.sub_service_id = sub_service_id || null;
|
|
60
|
+
this.content = content;
|
|
61
|
+
this.status = status;
|
|
62
|
+
this.order = order || null;
|
|
63
|
+
this.approver_role_id = approver_role_id || null;
|
|
64
|
+
this.approver_user_id = approver_user_id || null;
|
|
65
|
+
this.approved_by = approved_by || null;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
@@ -1,40 +0,0 @@
|
|
|
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);
|
|
@@ -1,34 +0,0 @@
|
|
|
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);
|
|
@@ -1,34 +0,0 @@
|
|
|
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);
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from "./BaseModel";
|
|
2
|
-
export declare enum SecondmentRequestStatus {
|
|
3
|
-
PENDING = "Pending",
|
|
4
|
-
ASSIGNED = "Assigned",
|
|
5
|
-
IN_PROGRESS = "In Progress",
|
|
6
|
-
COMPLETED = "Completed",
|
|
7
|
-
APPROVED = "Approved",
|
|
8
|
-
REJECTED = "Rejected"
|
|
9
|
-
}
|
|
10
|
-
export declare class SecondmentRequest extends BaseModel {
|
|
11
|
-
req_user_department_id: number | null;
|
|
12
|
-
req_user_section_id: number | null;
|
|
13
|
-
req_user_position_id: number | null;
|
|
14
|
-
service_id: number | null;
|
|
15
|
-
sub_service_id: number | null;
|
|
16
|
-
user_id: number;
|
|
17
|
-
description: string | null;
|
|
18
|
-
status: SecondmentRequestStatus;
|
|
19
|
-
reviewer_user_id: number | null;
|
|
20
|
-
assigned_to_user_id: number | null;
|
|
21
|
-
assigned_at: Date | null;
|
|
22
|
-
workflow_execution_id: string | null;
|
|
23
|
-
assigned_employee_name: string;
|
|
24
|
-
civil_id_card_number: string | null;
|
|
25
|
-
employee_id: string;
|
|
26
|
-
original_department: string;
|
|
27
|
-
assigned_department: string;
|
|
28
|
-
start_date: Date;
|
|
29
|
-
end_date: Date;
|
|
30
|
-
phone_number: string;
|
|
31
|
-
reason_for_request: string;
|
|
32
|
-
is_replaced: boolean;
|
|
33
|
-
replacement_employee_name: string | null;
|
|
34
|
-
replacement_employee_id: string | null;
|
|
35
|
-
replacement_civil_id_card_number: string | null;
|
|
36
|
-
replacement_reason: string | null;
|
|
37
|
-
replaced_by_user_id: number | null;
|
|
38
|
-
replaced_at: Date | null;
|
|
39
|
-
constructor(user_id: number, status?: SecondmentRequestStatus, service_id?: number | null, sub_service_id?: number | null, req_user_department_id?: number | null, req_user_section_id?: number | null, req_user_position_id?: number | null, description?: string | null, reviewer_user_id?: number | null, assigned_to_user_id?: number | null, assigned_at?: Date | null, workflow_execution_id?: string | null, assigned_employee_name?: string, civil_id_card_number?: string | null, employee_id?: string, original_department?: string, assigned_department?: string, start_date?: Date, end_date?: Date, phone_number?: string, reason_for_request?: string, is_replaced?: boolean, replacement_employee_name?: string | null, replacement_employee_id?: string | null, replacement_civil_id_card_number?: string | null, replacement_reason?: string | null, replaced_by_user_id?: number | null, replaced_at?: Date | null);
|
|
40
|
-
}
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.SecondmentRequest = exports.SecondmentRequestStatus = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
var SecondmentRequestStatus;
|
|
16
|
-
(function (SecondmentRequestStatus) {
|
|
17
|
-
SecondmentRequestStatus["PENDING"] = "Pending";
|
|
18
|
-
SecondmentRequestStatus["ASSIGNED"] = "Assigned";
|
|
19
|
-
SecondmentRequestStatus["IN_PROGRESS"] = "In Progress";
|
|
20
|
-
SecondmentRequestStatus["COMPLETED"] = "Completed";
|
|
21
|
-
SecondmentRequestStatus["APPROVED"] = "Approved";
|
|
22
|
-
SecondmentRequestStatus["REJECTED"] = "Rejected";
|
|
23
|
-
})(SecondmentRequestStatus || (exports.SecondmentRequestStatus = SecondmentRequestStatus = {}));
|
|
24
|
-
let SecondmentRequest = class SecondmentRequest extends BaseModel_1.BaseModel {
|
|
25
|
-
constructor(user_id, status = SecondmentRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, description, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id, assigned_employee_name, civil_id_card_number, employee_id, original_department, assigned_department, start_date, end_date, phone_number, reason_for_request, is_replaced, replacement_employee_name, replacement_employee_id, replacement_civil_id_card_number, replacement_reason, replaced_by_user_id, replaced_at) {
|
|
26
|
-
super();
|
|
27
|
-
this.user_id = user_id;
|
|
28
|
-
this.status = status;
|
|
29
|
-
this.service_id = service_id || null;
|
|
30
|
-
this.sub_service_id = sub_service_id || null;
|
|
31
|
-
this.req_user_department_id = req_user_department_id || null;
|
|
32
|
-
this.req_user_section_id = req_user_section_id || null;
|
|
33
|
-
this.req_user_position_id = req_user_position_id || null;
|
|
34
|
-
this.description = description || null;
|
|
35
|
-
this.reviewer_user_id = reviewer_user_id || null;
|
|
36
|
-
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
37
|
-
this.assigned_at = assigned_at || null;
|
|
38
|
-
this.workflow_execution_id = workflow_execution_id || null;
|
|
39
|
-
this.assigned_employee_name = assigned_employee_name || "";
|
|
40
|
-
this.civil_id_card_number = civil_id_card_number || null;
|
|
41
|
-
this.employee_id = employee_id || "";
|
|
42
|
-
this.original_department = original_department || "";
|
|
43
|
-
this.assigned_department = assigned_department || "";
|
|
44
|
-
this.start_date = start_date || new Date();
|
|
45
|
-
this.end_date = end_date || new Date();
|
|
46
|
-
this.phone_number = phone_number || "";
|
|
47
|
-
this.reason_for_request = reason_for_request || "";
|
|
48
|
-
this.is_replaced = is_replaced || false;
|
|
49
|
-
this.replacement_employee_name = replacement_employee_name || null;
|
|
50
|
-
this.replacement_employee_id = replacement_employee_id || null;
|
|
51
|
-
this.replacement_civil_id_card_number = replacement_civil_id_card_number || null;
|
|
52
|
-
this.replacement_reason = replacement_reason || null;
|
|
53
|
-
this.replaced_by_user_id = replaced_by_user_id || null;
|
|
54
|
-
this.replaced_at = replaced_at || null;
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
exports.SecondmentRequest = SecondmentRequest;
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
60
|
-
__metadata("design:type", Object)
|
|
61
|
-
], SecondmentRequest.prototype, "req_user_department_id", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
64
|
-
__metadata("design:type", Object)
|
|
65
|
-
], SecondmentRequest.prototype, "req_user_section_id", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
68
|
-
__metadata("design:type", Object)
|
|
69
|
-
], SecondmentRequest.prototype, "req_user_position_id", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
72
|
-
__metadata("design:type", Object)
|
|
73
|
-
], SecondmentRequest.prototype, "service_id", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
76
|
-
__metadata("design:type", Object)
|
|
77
|
-
], SecondmentRequest.prototype, "sub_service_id", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
80
|
-
__metadata("design:type", Number)
|
|
81
|
-
], SecondmentRequest.prototype, "user_id", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
84
|
-
__metadata("design:type", Object)
|
|
85
|
-
], SecondmentRequest.prototype, "description", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, typeorm_1.Column)({ type: "enum", enum: SecondmentRequestStatus, default: SecondmentRequestStatus.PENDING, nullable: false }),
|
|
88
|
-
__metadata("design:type", String)
|
|
89
|
-
], SecondmentRequest.prototype, "status", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
92
|
-
__metadata("design:type", Object)
|
|
93
|
-
], SecondmentRequest.prototype, "reviewer_user_id", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
96
|
-
__metadata("design:type", Object)
|
|
97
|
-
], SecondmentRequest.prototype, "assigned_to_user_id", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
100
|
-
__metadata("design:type", Object)
|
|
101
|
-
], SecondmentRequest.prototype, "assigned_at", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
104
|
-
__metadata("design:type", Object)
|
|
105
|
-
], SecondmentRequest.prototype, "workflow_execution_id", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
108
|
-
__metadata("design:type", String)
|
|
109
|
-
], SecondmentRequest.prototype, "assigned_employee_name", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
112
|
-
__metadata("design:type", Object)
|
|
113
|
-
], SecondmentRequest.prototype, "civil_id_card_number", void 0);
|
|
114
|
-
__decorate([
|
|
115
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: false }),
|
|
116
|
-
__metadata("design:type", String)
|
|
117
|
-
], SecondmentRequest.prototype, "employee_id", void 0);
|
|
118
|
-
__decorate([
|
|
119
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
120
|
-
__metadata("design:type", String)
|
|
121
|
-
], SecondmentRequest.prototype, "original_department", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
124
|
-
__metadata("design:type", String)
|
|
125
|
-
], SecondmentRequest.prototype, "assigned_department", void 0);
|
|
126
|
-
__decorate([
|
|
127
|
-
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
128
|
-
__metadata("design:type", Date)
|
|
129
|
-
], SecondmentRequest.prototype, "start_date", void 0);
|
|
130
|
-
__decorate([
|
|
131
|
-
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
132
|
-
__metadata("design:type", Date)
|
|
133
|
-
], SecondmentRequest.prototype, "end_date", void 0);
|
|
134
|
-
__decorate([
|
|
135
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: false }),
|
|
136
|
-
__metadata("design:type", String)
|
|
137
|
-
], SecondmentRequest.prototype, "phone_number", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
140
|
-
__metadata("design:type", String)
|
|
141
|
-
], SecondmentRequest.prototype, "reason_for_request", void 0);
|
|
142
|
-
__decorate([
|
|
143
|
-
(0, typeorm_1.Column)({ type: "boolean", default: false, nullable: false }),
|
|
144
|
-
__metadata("design:type", Boolean)
|
|
145
|
-
], SecondmentRequest.prototype, "is_replaced", void 0);
|
|
146
|
-
__decorate([
|
|
147
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
148
|
-
__metadata("design:type", Object)
|
|
149
|
-
], SecondmentRequest.prototype, "replacement_employee_name", void 0);
|
|
150
|
-
__decorate([
|
|
151
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
|
|
152
|
-
__metadata("design:type", Object)
|
|
153
|
-
], SecondmentRequest.prototype, "replacement_employee_id", void 0);
|
|
154
|
-
__decorate([
|
|
155
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
156
|
-
__metadata("design:type", Object)
|
|
157
|
-
], SecondmentRequest.prototype, "replacement_civil_id_card_number", void 0);
|
|
158
|
-
__decorate([
|
|
159
|
-
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
160
|
-
__metadata("design:type", Object)
|
|
161
|
-
], SecondmentRequest.prototype, "replacement_reason", void 0);
|
|
162
|
-
__decorate([
|
|
163
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
164
|
-
__metadata("design:type", Object)
|
|
165
|
-
], SecondmentRequest.prototype, "replaced_by_user_id", void 0);
|
|
166
|
-
__decorate([
|
|
167
|
-
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
168
|
-
__metadata("design:type", Object)
|
|
169
|
-
], SecondmentRequest.prototype, "replaced_at", void 0);
|
|
170
|
-
exports.SecondmentRequest = SecondmentRequest = __decorate([
|
|
171
|
-
(0, typeorm_1.Entity)({ name: "secondment_requests" }),
|
|
172
|
-
__metadata("design:paramtypes", [Number, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, String, Object, String, String, String, Date,
|
|
173
|
-
Date, String, String, Boolean, Object, Object, Object, Object, Object, Object])
|
|
174
|
-
], SecondmentRequest);
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
}
|
package/dist/models/Workflows.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
// }
|