@platform-modules/civil-aviation-authority 2.3.23 → 2.3.25
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 +12 -7
- package/dist/data-source.js +10 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +16 -2
- package/dist/models/LogisticsVehicleMaintenanceApprovalModel.d.ts +23 -0
- package/dist/models/LogisticsVehicleMaintenanceApprovalModel.js +96 -0
- package/dist/models/LogisticsVehicleMaintenanceAttachmentModel.d.ts +12 -0
- package/dist/models/LogisticsVehicleMaintenanceAttachmentModel.js +64 -0
- package/dist/models/LogisticsVehicleMaintenanceChatModel.d.ts +20 -0
- package/dist/models/LogisticsVehicleMaintenanceChatModel.js +78 -0
- package/dist/models/LogisticsVehicleMaintenanceRequestModel.d.ts +28 -0
- package/dist/models/LogisticsVehicleMaintenanceRequestModel.js +107 -0
- package/dist/models/LogisticsVehicleMaintenanceWorkflowModel.d.ts +18 -0
- package/dist/models/LogisticsVehicleMaintenanceWorkflowModel.js +76 -0
- package/dist/models/TemporaryAssignmentRequestModel.js +1 -1
- package/dist/models/Workflows.d.ts +0 -9
- package/package.json +1 -1
- package/src/data-source.ts +10 -0
- package/src/index.ts +9 -0
- package/src/models/HrServiceRequestModel.ts +167 -167
- package/src/models/LogisticsVehicleMaintenanceApprovalModel.ts +83 -0
- package/src/models/LogisticsVehicleMaintenanceAttachmentModel.ts +52 -0
- package/src/models/LogisticsVehicleMaintenanceChatModel.ts +65 -0
- package/src/models/LogisticsVehicleMaintenanceRequestModel.ts +93 -0
- package/src/models/LogisticsVehicleMaintenanceWorkflowModel.ts +62 -0
- package/src/models/TemporaryAssignmentRequestModel.ts +1 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum VehicleMaintenanceType {
|
|
5
|
+
PREVENTIVE = "Preventive",
|
|
6
|
+
CORRECTIVE = "Corrective",
|
|
7
|
+
EMERGENCY = "Emergency"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export enum VehicleMaintenanceStatus {
|
|
11
|
+
PENDING = "Pending",
|
|
12
|
+
ASSIGNED = "Assigned",
|
|
13
|
+
IN_PROGRESS = "In Progress",
|
|
14
|
+
APPROVED = "Approved",
|
|
15
|
+
REJECTED = "Rejected"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@Entity({ name: 'logistics_vehicle_maintenance_requests' })
|
|
19
|
+
export class LogisticsVehicleMaintenanceRequests extends BaseModel {
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'int', nullable: true })
|
|
22
|
+
req_user_department_id: number | null;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'int', nullable: true })
|
|
25
|
+
req_user_section_id: number | null;
|
|
26
|
+
|
|
27
|
+
@Column({ nullable: true })
|
|
28
|
+
service_id: number;
|
|
29
|
+
|
|
30
|
+
@Column({ nullable: true })
|
|
31
|
+
sub_service_id: number;
|
|
32
|
+
|
|
33
|
+
@Column({ nullable: false })
|
|
34
|
+
user_id: number;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
37
|
+
vehicle_number: string;
|
|
38
|
+
|
|
39
|
+
@Column({
|
|
40
|
+
type: "enum",
|
|
41
|
+
enum: VehicleMaintenanceType,
|
|
42
|
+
nullable: false,
|
|
43
|
+
})
|
|
44
|
+
type_of_maintenance_required: VehicleMaintenanceType;
|
|
45
|
+
|
|
46
|
+
@Column({ type: 'text', nullable: false })
|
|
47
|
+
issue_description: string;
|
|
48
|
+
|
|
49
|
+
@Column({ type: "date", nullable: true })
|
|
50
|
+
preferred_maintenance_date: Date | null;
|
|
51
|
+
|
|
52
|
+
@Column({ type: "date", nullable: false, default: () => "CURRENT_DATE" })
|
|
53
|
+
request_submission_date: Date;
|
|
54
|
+
|
|
55
|
+
@Column({
|
|
56
|
+
type: "enum",
|
|
57
|
+
enum: VehicleMaintenanceStatus,
|
|
58
|
+
default: VehicleMaintenanceStatus.PENDING,
|
|
59
|
+
nullable: false,
|
|
60
|
+
})
|
|
61
|
+
status: VehicleMaintenanceStatus;
|
|
62
|
+
|
|
63
|
+
@Column({ type: "varchar", nullable: true })
|
|
64
|
+
workflow_execution_id: string | null;
|
|
65
|
+
|
|
66
|
+
constructor(
|
|
67
|
+
req_user_department_id: number | null,
|
|
68
|
+
req_user_section_id: number | null,
|
|
69
|
+
service_id: number,
|
|
70
|
+
sub_service_id: number,
|
|
71
|
+
user_id: number,
|
|
72
|
+
vehicle_number: string,
|
|
73
|
+
type_of_maintenance_required: VehicleMaintenanceType,
|
|
74
|
+
issue_description: string,
|
|
75
|
+
status: VehicleMaintenanceStatus,
|
|
76
|
+
preferred_maintenance_date?: Date | null,
|
|
77
|
+
workflow_execution_id?: string | null,
|
|
78
|
+
) {
|
|
79
|
+
super();
|
|
80
|
+
this.req_user_department_id = req_user_department_id ?? null;
|
|
81
|
+
this.req_user_section_id = req_user_section_id ?? null;
|
|
82
|
+
this.service_id = service_id;
|
|
83
|
+
this.sub_service_id = sub_service_id;
|
|
84
|
+
this.user_id = user_id;
|
|
85
|
+
this.vehicle_number = vehicle_number;
|
|
86
|
+
this.type_of_maintenance_required = type_of_maintenance_required;
|
|
87
|
+
this.issue_description = issue_description;
|
|
88
|
+
this.preferred_maintenance_date = preferred_maintenance_date ?? null;
|
|
89
|
+
this.request_submission_date = new Date();
|
|
90
|
+
this.status = status;
|
|
91
|
+
this.workflow_execution_id = workflow_execution_id ?? null;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum LogisticsVehicleMaintenanceWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//This model is used to store the logistics vehicle maintenance workflow status and activity logs
|
|
11
|
+
@Entity({ name: 'logistics_vehicle_maintenance_workflows' })
|
|
12
|
+
export class LogisticsVehicleMaintenanceWorkFlow extends BaseModel {
|
|
13
|
+
@Column({ type: 'integer', 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: 'varchar', length: 500, nullable: false })
|
|
23
|
+
content: string;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'enum', enum: LogisticsVehicleMaintenanceWorkFlowStatus, default: LogisticsVehicleMaintenanceWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
26
|
+
status: LogisticsVehicleMaintenanceWorkFlowStatus;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
user_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'integer', nullable: true })
|
|
32
|
+
role_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'integer', nullable: true })
|
|
35
|
+
department_id: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'integer', nullable: true })
|
|
38
|
+
section_id: number | null;
|
|
39
|
+
|
|
40
|
+
constructor(
|
|
41
|
+
request_id: number,
|
|
42
|
+
content: string,
|
|
43
|
+
status: LogisticsVehicleMaintenanceWorkFlowStatus,
|
|
44
|
+
service_id?: number,
|
|
45
|
+
sub_service_id?: number,
|
|
46
|
+
user_id?: number,
|
|
47
|
+
role_id?: number,
|
|
48
|
+
department_id?: number,
|
|
49
|
+
section_id?: number
|
|
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.content = content;
|
|
56
|
+
this.status = status;
|
|
57
|
+
this.user_id = user_id || null;
|
|
58
|
+
this.role_id = role_id || null;
|
|
59
|
+
this.department_id = department_id || null;
|
|
60
|
+
this.section_id = section_id || null;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -99,7 +99,7 @@ export class TemporaryAssignmentRequest extends BaseModel {
|
|
|
99
99
|
reason_for_request: string;
|
|
100
100
|
|
|
101
101
|
// Request type - Internal or External temporary assignment
|
|
102
|
-
@Column({ type: "enum", enum: TemporaryAssignmentRequestType, nullable: false })
|
|
102
|
+
@Column({ type: "enum", enum: TemporaryAssignmentRequestType,default:TemporaryAssignmentRequestType.INTERNAL, nullable: false })
|
|
103
103
|
request_type: TemporaryAssignmentRequestType;
|
|
104
104
|
|
|
105
105
|
// NEW FIELDS for External Temporary Assignment
|