@platform-modules/civil-aviation-authority 2.3.161 → 2.3.166
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 +17 -9
- package/dist/models/DocumentMetadataModel.d.ts +45 -0
- package/dist/models/DocumentMetadataModel.js +171 -0
- package/dist/models/DocumentationDepartmentsModel.d.ts +13 -0
- package/dist/models/DocumentationDepartmentsModel.js +53 -0
- package/dist/models/FolderModel.d.ts +16 -0
- package/dist/models/FolderModel.js +85 -0
- package/dist/models/ITRequestAttachmentModel.d.ts +3 -1
- package/dist/models/ITRequestAttachmentModel.js +7 -2
- package/dist/models/ITRequestChatModel.d.ts +9 -0
- package/dist/models/ITRequestChatModel.js +14 -1
- package/dist/models/PermissionModel.d.ts +18 -0
- package/dist/models/PermissionModel.js +68 -0
- package/dist/models/UUIDBaseModel.d.ts +14 -0
- package/dist/models/UUIDBaseModel.js +66 -0
- package/package.json +1 -1
- package/src/models/AccommodationApprovalModel.ts +8 -8
- package/src/models/AccommodationRequestModel.ts +8 -8
- package/src/models/AnnualIncrementRequestEmployeeModel.ts +65 -65
- package/src/models/AnnualIncrementRequestModel.ts +25 -25
- package/src/models/AnnualTrainingPlanRequestModel.ts +153 -153
- package/src/models/AppealAgainstAdministrativeDecisionRequestModel.ts +23 -23
- package/src/models/CAAServices.ts +33 -33
- package/src/models/CAASubServices.ts +33 -33
- package/src/models/CAIRatingMasterModel.ts +39 -39
- package/src/models/CSRMBusinessImpactRatingMasterModel.ts +25 -25
- package/src/models/CSRMLikelihoodMasterModel.ts +25 -25
- package/src/models/CashAllowanceLeaveRequestModel.ts +11 -11
- package/src/models/CyberSecurityAuditRequestModel.ts +32 -32
- package/src/models/DepartmentsModel.ts +25 -25
- package/src/models/DocumentDriveModel.ts +28 -28
- package/src/models/DocumentFolderModel.ts +45 -45
- package/src/models/HousingContractCancelChatModel.ts +56 -56
- package/src/models/HousingContractRenewalChatModel.ts +59 -59
- package/src/models/HrServiceRequestModel.ts +193 -193
- package/src/models/ITRequestAttachmentModel.ts +7 -1
- package/src/models/ITRequestChatModel.ts +12 -0
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/src/models/MissionTravelPassportExpiryNotificationConfigModel.ts +36 -36
- package/src/models/PerformanceCyclePeriodModel.ts +26 -26
- package/src/models/PerformanceGoalMasterModel.ts +27 -27
- package/src/models/PerformanceManagementRequestGoalModel.ts +46 -46
- package/src/models/PerformanceManagementRequestModel.ts +14 -14
- package/src/models/PromotionRequestModel.ts +11 -11
- package/src/models/ResidentialUnitRentalChatModel.ts +56 -56
- package/src/models/ServicesNotificationConfigModel.ts +55 -55
- package/src/models/StudyLeaveRequestModel.ts +144 -144
- package/src/models/TrainingRoomBookingRequestModel.ts +142 -142
- package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
- package/src/models/UserSkillModel.ts +56 -56
- 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/Workflows.d.ts +0 -9
- package/dist/models/Workflows.js +0 -31
|
@@ -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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.UUIDBaseModel = exports.UUIDModel0 = void 0;
|
|
16
|
+
const moment_timezone_1 = __importDefault(require("moment-timezone"));
|
|
17
|
+
const typeorm_1 = require("typeorm");
|
|
18
|
+
class UUIDModel0 {
|
|
19
|
+
insertCreated() {
|
|
20
|
+
const currentTime = (0, moment_timezone_1.default)().utc().tz('Asia/Kolkata').toDate();
|
|
21
|
+
this.created_at = currentTime;
|
|
22
|
+
this.updated_at = currentTime;
|
|
23
|
+
}
|
|
24
|
+
constructor() {
|
|
25
|
+
this.jsonIgnore = ['logicalDelete', 'is_deleted', 'jsonIgnore'];
|
|
26
|
+
this.is_deleted = false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.UUIDModel0 = UUIDModel0;
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], UUIDModel0.prototype, "created_by", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.CreateDateColumn)({ type: "timestamptz", default: () => "CURRENT_TIMESTAMP" }),
|
|
36
|
+
__metadata("design:type", Date)
|
|
37
|
+
], UUIDModel0.prototype, "created_at", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], UUIDModel0.prototype, "updated_by", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.UpdateDateColumn)({ type: "timestamptz", default: () => "CURRENT_TIMESTAMP" }),
|
|
44
|
+
__metadata("design:type", Date)
|
|
45
|
+
], UUIDModel0.prototype, "updated_at", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
48
|
+
__metadata("design:type", Function),
|
|
49
|
+
__metadata("design:paramtypes", []),
|
|
50
|
+
__metadata("design:returntype", void 0)
|
|
51
|
+
], UUIDModel0.prototype, "insertCreated", null);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ nullable: true, default: false }),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], UUIDModel0.prototype, "is_deleted", void 0);
|
|
56
|
+
class UUIDBaseModel extends UUIDModel0 {
|
|
57
|
+
constructor() {
|
|
58
|
+
super();
|
|
59
|
+
this.id = ''; // This will be set by the database when the entity is saved
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.UUIDBaseModel = UUIDBaseModel;
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], UUIDBaseModel.prototype, "id", void 0);
|
package/package.json
CHANGED
|
@@ -35,14 +35,14 @@ export class AccommodationApproval extends BaseModel {
|
|
|
35
35
|
@Column({ type: 'int', nullable: true })
|
|
36
36
|
department_id: number;
|
|
37
37
|
|
|
38
|
-
@Column({ type: 'int', nullable: true })
|
|
39
|
-
section_id: number;
|
|
40
|
-
|
|
41
|
-
@Column({ type: 'boolean', nullable: false, default: true })
|
|
42
|
-
is_allowed: boolean;
|
|
43
|
-
|
|
44
|
-
@Column({ type: 'int', nullable: false })
|
|
45
|
-
level: number;
|
|
38
|
+
@Column({ type: 'int', nullable: true })
|
|
39
|
+
section_id: number;
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'boolean', nullable: false, default: true })
|
|
42
|
+
is_allowed: boolean;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'int', nullable: false })
|
|
45
|
+
level: number;
|
|
46
46
|
|
|
47
47
|
@Column({
|
|
48
48
|
type: 'enum',
|
|
@@ -134,14 +134,14 @@ export class AccommodationRequest extends BaseModel {
|
|
|
134
134
|
@Column({ type: 'int', nullable: true })
|
|
135
135
|
assigned_to_user_id: number | null;
|
|
136
136
|
|
|
137
|
-
@Column({ type: 'text', nullable: true })
|
|
138
|
-
approver_comment: string | null;
|
|
139
|
-
|
|
140
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
141
|
-
accommodation_allocated: string | null;
|
|
142
|
-
|
|
143
|
-
@Column({ type: 'int', nullable: true })
|
|
144
|
-
approved_by: number | null;
|
|
137
|
+
@Column({ type: 'text', nullable: true })
|
|
138
|
+
approver_comment: string | null;
|
|
139
|
+
|
|
140
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
141
|
+
accommodation_allocated: string | null;
|
|
142
|
+
|
|
143
|
+
@Column({ type: 'int', nullable: true })
|
|
144
|
+
approved_by: number | null;
|
|
145
145
|
|
|
146
146
|
@Column({ type: 'date', nullable: true })
|
|
147
147
|
approved_at: Date | null;
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
import { AnnualIncrementRequest } from "./AnnualIncrementRequestModel";
|
|
4
|
-
|
|
5
|
-
@Entity({ name: "annual_increment_request_employees" })
|
|
6
|
-
export class AnnualIncrementRequestEmployee extends BaseModel {
|
|
7
|
-
@Column({ type: "integer", nullable: false })
|
|
8
|
-
request_id: number;
|
|
9
|
-
|
|
10
|
-
@Column({ type: "integer", nullable: true })
|
|
11
|
-
service_id: number | null;
|
|
12
|
-
|
|
13
|
-
@Column({ type: "integer", nullable: true })
|
|
14
|
-
sub_service_id: number | null;
|
|
15
|
-
|
|
16
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
17
|
-
employee_name: string;
|
|
18
|
-
|
|
19
|
-
@Column({ type: "varchar", length: 100, nullable: false })
|
|
20
|
-
employee_id: string;
|
|
21
|
-
|
|
22
|
-
@Column({ type: "integer", nullable: false })
|
|
23
|
-
allowance_year: number;
|
|
24
|
-
|
|
25
|
-
@Column({ type: "date", nullable: false })
|
|
26
|
-
effective_date: Date;
|
|
27
|
-
|
|
28
|
-
@Column({ type: "decimal", precision: 10, scale: 3, nullable: true })
|
|
29
|
-
current_basic_salary: number | null;
|
|
30
|
-
|
|
31
|
-
@Column({ type: "decimal", precision: 5, scale: 2, nullable: true })
|
|
32
|
-
increment_percentage: number | null;
|
|
33
|
-
|
|
34
|
-
@Column({ type: "decimal", precision: 10, scale: 3, nullable: true })
|
|
35
|
-
new_basic_salary: number | null;
|
|
36
|
-
|
|
37
|
-
@ManyToOne(() => AnnualIncrementRequest, { onDelete: "CASCADE" })
|
|
38
|
-
@JoinColumn({ name: "request_id", referencedColumnName: "id" })
|
|
39
|
-
request: AnnualIncrementRequest;
|
|
40
|
-
|
|
41
|
-
constructor(
|
|
42
|
-
request_id: number,
|
|
43
|
-
employee_name: string,
|
|
44
|
-
employee_id: string,
|
|
45
|
-
allowance_year: number,
|
|
46
|
-
effective_date: Date,
|
|
47
|
-
service_id?: number | null,
|
|
48
|
-
sub_service_id?: number | null,
|
|
49
|
-
current_basic_salary?: number | null,
|
|
50
|
-
increment_percentage?: number | null,
|
|
51
|
-
new_basic_salary?: number | null
|
|
52
|
-
) {
|
|
53
|
-
super();
|
|
54
|
-
this.request_id = request_id;
|
|
55
|
-
this.service_id = service_id ?? null;
|
|
56
|
-
this.sub_service_id = sub_service_id ?? null;
|
|
57
|
-
this.employee_name = employee_name;
|
|
58
|
-
this.employee_id = employee_id;
|
|
59
|
-
this.allowance_year = allowance_year;
|
|
60
|
-
this.effective_date = effective_date;
|
|
61
|
-
this.current_basic_salary = current_basic_salary ?? null;
|
|
62
|
-
this.increment_percentage = increment_percentage ?? null;
|
|
63
|
-
this.new_basic_salary = new_basic_salary ?? null;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
1
|
+
import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
import { AnnualIncrementRequest } from "./AnnualIncrementRequestModel";
|
|
4
|
+
|
|
5
|
+
@Entity({ name: "annual_increment_request_employees" })
|
|
6
|
+
export class AnnualIncrementRequestEmployee extends BaseModel {
|
|
7
|
+
@Column({ type: "integer", nullable: false })
|
|
8
|
+
request_id: number;
|
|
9
|
+
|
|
10
|
+
@Column({ type: "integer", nullable: true })
|
|
11
|
+
service_id: number | null;
|
|
12
|
+
|
|
13
|
+
@Column({ type: "integer", nullable: true })
|
|
14
|
+
sub_service_id: number | null;
|
|
15
|
+
|
|
16
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
17
|
+
employee_name: string;
|
|
18
|
+
|
|
19
|
+
@Column({ type: "varchar", length: 100, nullable: false })
|
|
20
|
+
employee_id: string;
|
|
21
|
+
|
|
22
|
+
@Column({ type: "integer", nullable: false })
|
|
23
|
+
allowance_year: number;
|
|
24
|
+
|
|
25
|
+
@Column({ type: "date", nullable: false })
|
|
26
|
+
effective_date: Date;
|
|
27
|
+
|
|
28
|
+
@Column({ type: "decimal", precision: 10, scale: 3, nullable: true })
|
|
29
|
+
current_basic_salary: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: "decimal", precision: 5, scale: 2, nullable: true })
|
|
32
|
+
increment_percentage: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: "decimal", precision: 10, scale: 3, nullable: true })
|
|
35
|
+
new_basic_salary: number | null;
|
|
36
|
+
|
|
37
|
+
@ManyToOne(() => AnnualIncrementRequest, { onDelete: "CASCADE" })
|
|
38
|
+
@JoinColumn({ name: "request_id", referencedColumnName: "id" })
|
|
39
|
+
request: AnnualIncrementRequest;
|
|
40
|
+
|
|
41
|
+
constructor(
|
|
42
|
+
request_id: number,
|
|
43
|
+
employee_name: string,
|
|
44
|
+
employee_id: string,
|
|
45
|
+
allowance_year: number,
|
|
46
|
+
effective_date: Date,
|
|
47
|
+
service_id?: number | null,
|
|
48
|
+
sub_service_id?: number | null,
|
|
49
|
+
current_basic_salary?: number | null,
|
|
50
|
+
increment_percentage?: number | null,
|
|
51
|
+
new_basic_salary?: number | null
|
|
52
|
+
) {
|
|
53
|
+
super();
|
|
54
|
+
this.request_id = request_id;
|
|
55
|
+
this.service_id = service_id ?? null;
|
|
56
|
+
this.sub_service_id = sub_service_id ?? null;
|
|
57
|
+
this.employee_name = employee_name;
|
|
58
|
+
this.employee_id = employee_id;
|
|
59
|
+
this.allowance_year = allowance_year;
|
|
60
|
+
this.effective_date = effective_date;
|
|
61
|
+
this.current_basic_salary = current_basic_salary ?? null;
|
|
62
|
+
this.increment_percentage = increment_percentage ?? null;
|
|
63
|
+
this.new_basic_salary = new_basic_salary ?? null;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -45,24 +45,24 @@ export class AnnualIncrementRequest extends BaseModel {
|
|
|
45
45
|
@Column({ type: "timestamp", nullable: true })
|
|
46
46
|
assigned_at: Date | null;
|
|
47
47
|
|
|
48
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
49
|
-
workflow_execution_id: string | null;
|
|
50
|
-
|
|
51
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
52
|
-
reference_number: string | null;
|
|
53
|
-
|
|
48
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
49
|
+
workflow_execution_id: string | null;
|
|
50
|
+
|
|
51
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
52
|
+
reference_number: string | null;
|
|
53
|
+
|
|
54
54
|
// Annual Increment specific fields
|
|
55
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
56
|
-
employee_name: string | null;
|
|
57
|
-
|
|
58
|
-
@Column({ type: "varchar", length: 100, nullable: true })
|
|
59
|
-
employee_id: string | null;
|
|
60
|
-
|
|
61
|
-
@Column({ type: "integer", nullable: true })
|
|
62
|
-
allowance_year: number | null;
|
|
63
|
-
|
|
64
|
-
@Column({ type: "date", nullable: true })
|
|
65
|
-
effective_date: Date | null;
|
|
55
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
56
|
+
employee_name: string | null;
|
|
57
|
+
|
|
58
|
+
@Column({ type: "varchar", length: 100, nullable: true })
|
|
59
|
+
employee_id: string | null;
|
|
60
|
+
|
|
61
|
+
@Column({ type: "integer", nullable: true })
|
|
62
|
+
allowance_year: number | null;
|
|
63
|
+
|
|
64
|
+
@Column({ type: "date", nullable: true })
|
|
65
|
+
effective_date: Date | null;
|
|
66
66
|
|
|
67
67
|
@Column({ type: "decimal", precision: 10, scale: 3, nullable: true })
|
|
68
68
|
current_basic_salary: number | null;
|
|
@@ -104,14 +104,14 @@ export class AnnualIncrementRequest extends BaseModel {
|
|
|
104
104
|
this.req_user_position_id = req_user_position_id || null;
|
|
105
105
|
this.description = description || null;
|
|
106
106
|
this.reviewer_user_id = reviewer_user_id || null;
|
|
107
|
-
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
108
|
-
this.assigned_at = assigned_at || null;
|
|
109
|
-
this.workflow_execution_id = workflow_execution_id || null;
|
|
110
|
-
this.reference_number = null;
|
|
111
|
-
this.employee_name = employee_name || null;
|
|
112
|
-
this.employee_id = employee_id || null;
|
|
113
|
-
this.allowance_year = allowance_year || null;
|
|
114
|
-
this.effective_date = effective_date || null;
|
|
107
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
108
|
+
this.assigned_at = assigned_at || null;
|
|
109
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
110
|
+
this.reference_number = null;
|
|
111
|
+
this.employee_name = employee_name || null;
|
|
112
|
+
this.employee_id = employee_id || null;
|
|
113
|
+
this.allowance_year = allowance_year || null;
|
|
114
|
+
this.effective_date = effective_date || null;
|
|
115
115
|
this.current_basic_salary = current_basic_salary || null;
|
|
116
116
|
this.increment_percentage = increment_percentage || null;
|
|
117
117
|
this.new_basic_salary = new_basic_salary || null;
|
|
@@ -1,153 +1,153 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
export enum AnnualTrainingPlanRequestStatus {
|
|
5
|
-
PENDING = "Pending",
|
|
6
|
-
IN_PROGRESS = "In Progress",
|
|
7
|
-
COMPLETED = "Completed",
|
|
8
|
-
APPROVED = "Approved",
|
|
9
|
-
REJECTED = "Rejected"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export enum AnnualTrainingPlanPlace {
|
|
13
|
-
INSIDE = "Inside",
|
|
14
|
-
OUTSIDE = "Outside"
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@Entity({ name: "annual_training_plan_requests" })
|
|
18
|
-
export class AnnualTrainingPlanRequest extends BaseModel {
|
|
19
|
-
@Column({ type: "integer", nullable: true })
|
|
20
|
-
req_user_department_id: number | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: "integer", nullable: true })
|
|
23
|
-
req_user_section_id: number | null;
|
|
24
|
-
|
|
25
|
-
@Column({ type: "integer", nullable: true })
|
|
26
|
-
req_user_position_id: number | null;
|
|
27
|
-
|
|
28
|
-
@Column({ type: "integer", nullable: true })
|
|
29
|
-
service_id: number | null;
|
|
30
|
-
|
|
31
|
-
@Column({ type: "integer", nullable: true })
|
|
32
|
-
sub_service_id: number | null;
|
|
33
|
-
|
|
34
|
-
@Column({ type: "integer", nullable: false })
|
|
35
|
-
user_id: number;
|
|
36
|
-
|
|
37
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
38
|
-
course_name: string;
|
|
39
|
-
|
|
40
|
-
@Column({ type: "integer", nullable: false })
|
|
41
|
-
no_of_participants: number;
|
|
42
|
-
|
|
43
|
-
@Column({ type: "decimal", precision: 10, scale: 2, nullable: false })
|
|
44
|
-
course_cost: number;
|
|
45
|
-
|
|
46
|
-
@Column({ type: "decimal", precision: 10, scale: 2, nullable: false })
|
|
47
|
-
total_cost: number;
|
|
48
|
-
|
|
49
|
-
@Column({ type: "date", nullable: false })
|
|
50
|
-
proposed_implementation_date: Date;
|
|
51
|
-
|
|
52
|
-
@Column({ type: "text", nullable: false })
|
|
53
|
-
description: string;
|
|
54
|
-
|
|
55
|
-
@Column({
|
|
56
|
-
type: "enum",
|
|
57
|
-
enum: AnnualTrainingPlanPlace,
|
|
58
|
-
nullable: false
|
|
59
|
-
})
|
|
60
|
-
place: AnnualTrainingPlanPlace;
|
|
61
|
-
|
|
62
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
63
|
-
location: string | null;
|
|
64
|
-
|
|
65
|
-
@Column({ type: "text", nullable: false })
|
|
66
|
-
reason: string;
|
|
67
|
-
|
|
68
|
-
@Column({ type: "jsonb", nullable: true })
|
|
69
|
-
employee_list: any[] | null; // List of employees for training attendance
|
|
70
|
-
|
|
71
|
-
@Column({
|
|
72
|
-
type: "enum",
|
|
73
|
-
enum: AnnualTrainingPlanRequestStatus,
|
|
74
|
-
default: AnnualTrainingPlanRequestStatus.PENDING,
|
|
75
|
-
nullable: false
|
|
76
|
-
})
|
|
77
|
-
status: AnnualTrainingPlanRequestStatus;
|
|
78
|
-
|
|
79
|
-
@Column({ type: "integer", nullable: true })
|
|
80
|
-
reviewer_user_id: number | null;
|
|
81
|
-
|
|
82
|
-
@Column({ type: "integer", nullable: true })
|
|
83
|
-
assigned_to_user_id: number | null;
|
|
84
|
-
|
|
85
|
-
@Column({ type: "timestamp", nullable: true })
|
|
86
|
-
assigned_at: Date | null;
|
|
87
|
-
|
|
88
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
89
|
-
workflow_execution_id: string | null;
|
|
90
|
-
|
|
91
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
92
|
-
job_competency: string | null;
|
|
93
|
-
|
|
94
|
-
@Column({ type: "jsonb", nullable: true })
|
|
95
|
-
name_of_participants: string[] | null;
|
|
96
|
-
|
|
97
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
98
|
-
directarate: string | null;
|
|
99
|
-
|
|
100
|
-
constructor(
|
|
101
|
-
user_id: number,
|
|
102
|
-
course_name: string,
|
|
103
|
-
no_of_participants: number,
|
|
104
|
-
course_cost: number,
|
|
105
|
-
total_cost: number,
|
|
106
|
-
proposed_implementation_date: Date,
|
|
107
|
-
description: string,
|
|
108
|
-
place: AnnualTrainingPlanPlace,
|
|
109
|
-
reason: string,
|
|
110
|
-
status: AnnualTrainingPlanRequestStatus = AnnualTrainingPlanRequestStatus.PENDING,
|
|
111
|
-
service_id?: number | null,
|
|
112
|
-
sub_service_id?: number | null,
|
|
113
|
-
req_user_department_id?: number | null,
|
|
114
|
-
req_user_section_id?: number | null,
|
|
115
|
-
req_user_position_id?: number | null,
|
|
116
|
-
location?: string | null,
|
|
117
|
-
employee_list?: any[] | null,
|
|
118
|
-
reviewer_user_id?: number | null,
|
|
119
|
-
assigned_to_user_id?: number | null,
|
|
120
|
-
assigned_at?: Date | null,
|
|
121
|
-
workflow_execution_id?: string | null,
|
|
122
|
-
job_competency?: string | null,
|
|
123
|
-
name_of_participants?: string[] | null,
|
|
124
|
-
directarate?: string | null
|
|
125
|
-
) {
|
|
126
|
-
super();
|
|
127
|
-
this.user_id = user_id;
|
|
128
|
-
this.course_name = course_name;
|
|
129
|
-
this.no_of_participants = no_of_participants;
|
|
130
|
-
this.course_cost = course_cost;
|
|
131
|
-
this.total_cost = total_cost;
|
|
132
|
-
this.proposed_implementation_date = proposed_implementation_date;
|
|
133
|
-
this.description = description;
|
|
134
|
-
this.place = place;
|
|
135
|
-
this.reason = reason;
|
|
136
|
-
this.status = status;
|
|
137
|
-
this.service_id = service_id || null;
|
|
138
|
-
this.sub_service_id = sub_service_id || null;
|
|
139
|
-
this.req_user_department_id = req_user_department_id || null;
|
|
140
|
-
this.req_user_section_id = req_user_section_id || null;
|
|
141
|
-
this.req_user_position_id = req_user_position_id || null;
|
|
142
|
-
this.location = location || null;
|
|
143
|
-
this.employee_list = employee_list || null;
|
|
144
|
-
this.reviewer_user_id = reviewer_user_id || null;
|
|
145
|
-
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
146
|
-
this.assigned_at = assigned_at || null;
|
|
147
|
-
this.workflow_execution_id = workflow_execution_id || null;
|
|
148
|
-
this.job_competency = job_competency ?? null;
|
|
149
|
-
this.name_of_participants = name_of_participants ?? null;
|
|
150
|
-
this.directarate = directarate ?? null;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum AnnualTrainingPlanRequestStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
IN_PROGRESS = "In Progress",
|
|
7
|
+
COMPLETED = "Completed",
|
|
8
|
+
APPROVED = "Approved",
|
|
9
|
+
REJECTED = "Rejected"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum AnnualTrainingPlanPlace {
|
|
13
|
+
INSIDE = "Inside",
|
|
14
|
+
OUTSIDE = "Outside"
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@Entity({ name: "annual_training_plan_requests" })
|
|
18
|
+
export class AnnualTrainingPlanRequest extends BaseModel {
|
|
19
|
+
@Column({ type: "integer", nullable: true })
|
|
20
|
+
req_user_department_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: "integer", nullable: true })
|
|
23
|
+
req_user_section_id: number | null;
|
|
24
|
+
|
|
25
|
+
@Column({ type: "integer", nullable: true })
|
|
26
|
+
req_user_position_id: number | null;
|
|
27
|
+
|
|
28
|
+
@Column({ type: "integer", nullable: true })
|
|
29
|
+
service_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: "integer", nullable: true })
|
|
32
|
+
sub_service_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: "integer", nullable: false })
|
|
35
|
+
user_id: number;
|
|
36
|
+
|
|
37
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
38
|
+
course_name: string;
|
|
39
|
+
|
|
40
|
+
@Column({ type: "integer", nullable: false })
|
|
41
|
+
no_of_participants: number;
|
|
42
|
+
|
|
43
|
+
@Column({ type: "decimal", precision: 10, scale: 2, nullable: false })
|
|
44
|
+
course_cost: number;
|
|
45
|
+
|
|
46
|
+
@Column({ type: "decimal", precision: 10, scale: 2, nullable: false })
|
|
47
|
+
total_cost: number;
|
|
48
|
+
|
|
49
|
+
@Column({ type: "date", nullable: false })
|
|
50
|
+
proposed_implementation_date: Date;
|
|
51
|
+
|
|
52
|
+
@Column({ type: "text", nullable: false })
|
|
53
|
+
description: string;
|
|
54
|
+
|
|
55
|
+
@Column({
|
|
56
|
+
type: "enum",
|
|
57
|
+
enum: AnnualTrainingPlanPlace,
|
|
58
|
+
nullable: false
|
|
59
|
+
})
|
|
60
|
+
place: AnnualTrainingPlanPlace;
|
|
61
|
+
|
|
62
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
63
|
+
location: string | null;
|
|
64
|
+
|
|
65
|
+
@Column({ type: "text", nullable: false })
|
|
66
|
+
reason: string;
|
|
67
|
+
|
|
68
|
+
@Column({ type: "jsonb", nullable: true })
|
|
69
|
+
employee_list: any[] | null; // List of employees for training attendance
|
|
70
|
+
|
|
71
|
+
@Column({
|
|
72
|
+
type: "enum",
|
|
73
|
+
enum: AnnualTrainingPlanRequestStatus,
|
|
74
|
+
default: AnnualTrainingPlanRequestStatus.PENDING,
|
|
75
|
+
nullable: false
|
|
76
|
+
})
|
|
77
|
+
status: AnnualTrainingPlanRequestStatus;
|
|
78
|
+
|
|
79
|
+
@Column({ type: "integer", nullable: true })
|
|
80
|
+
reviewer_user_id: number | null;
|
|
81
|
+
|
|
82
|
+
@Column({ type: "integer", nullable: true })
|
|
83
|
+
assigned_to_user_id: number | null;
|
|
84
|
+
|
|
85
|
+
@Column({ type: "timestamp", nullable: true })
|
|
86
|
+
assigned_at: Date | null;
|
|
87
|
+
|
|
88
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
89
|
+
workflow_execution_id: string | null;
|
|
90
|
+
|
|
91
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
92
|
+
job_competency: string | null;
|
|
93
|
+
|
|
94
|
+
@Column({ type: "jsonb", nullable: true })
|
|
95
|
+
name_of_participants: string[] | null;
|
|
96
|
+
|
|
97
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
98
|
+
directarate: string | null;
|
|
99
|
+
|
|
100
|
+
constructor(
|
|
101
|
+
user_id: number,
|
|
102
|
+
course_name: string,
|
|
103
|
+
no_of_participants: number,
|
|
104
|
+
course_cost: number,
|
|
105
|
+
total_cost: number,
|
|
106
|
+
proposed_implementation_date: Date,
|
|
107
|
+
description: string,
|
|
108
|
+
place: AnnualTrainingPlanPlace,
|
|
109
|
+
reason: string,
|
|
110
|
+
status: AnnualTrainingPlanRequestStatus = AnnualTrainingPlanRequestStatus.PENDING,
|
|
111
|
+
service_id?: number | null,
|
|
112
|
+
sub_service_id?: number | null,
|
|
113
|
+
req_user_department_id?: number | null,
|
|
114
|
+
req_user_section_id?: number | null,
|
|
115
|
+
req_user_position_id?: number | null,
|
|
116
|
+
location?: string | null,
|
|
117
|
+
employee_list?: any[] | null,
|
|
118
|
+
reviewer_user_id?: number | null,
|
|
119
|
+
assigned_to_user_id?: number | null,
|
|
120
|
+
assigned_at?: Date | null,
|
|
121
|
+
workflow_execution_id?: string | null,
|
|
122
|
+
job_competency?: string | null,
|
|
123
|
+
name_of_participants?: string[] | null,
|
|
124
|
+
directarate?: string | null
|
|
125
|
+
) {
|
|
126
|
+
super();
|
|
127
|
+
this.user_id = user_id;
|
|
128
|
+
this.course_name = course_name;
|
|
129
|
+
this.no_of_participants = no_of_participants;
|
|
130
|
+
this.course_cost = course_cost;
|
|
131
|
+
this.total_cost = total_cost;
|
|
132
|
+
this.proposed_implementation_date = proposed_implementation_date;
|
|
133
|
+
this.description = description;
|
|
134
|
+
this.place = place;
|
|
135
|
+
this.reason = reason;
|
|
136
|
+
this.status = status;
|
|
137
|
+
this.service_id = service_id || null;
|
|
138
|
+
this.sub_service_id = sub_service_id || null;
|
|
139
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
140
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
141
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
142
|
+
this.location = location || null;
|
|
143
|
+
this.employee_list = employee_list || null;
|
|
144
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
145
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
146
|
+
this.assigned_at = assigned_at || null;
|
|
147
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
148
|
+
this.job_competency = job_competency ?? null;
|
|
149
|
+
this.name_of_participants = name_of_participants ?? null;
|
|
150
|
+
this.directarate = directarate ?? null;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|