@platform-modules/civil-aviation-authority 2.3.310 → 2.3.312
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/data-source.js +2 -0
- package/dist/i18n/workflow-chat-i18n.json +8 -0
- package/dist/i18n/workflow-chat-message.builder.d.ts +1 -1
- package/dist/i18n/workflow-chat-message.builder.js +21 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/models/ChatbotQnsAnsMappingModel.d.ts +8 -0
- package/dist/models/ChatbotQnsAnsMappingModel.js +40 -0
- 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/ImportExportMaterialModels.d.ts +92 -0
- package/dist/models/ImportExportMaterialModels.js +307 -0
- package/dist/models/PermissionModel.d.ts +18 -0
- package/dist/models/PermissionModel.js +68 -0
- package/dist/models/SecurityAccessApprovalModel.d.ts +23 -0
- package/dist/models/SecurityAccessApprovalModel.js +82 -0
- package/dist/models/SecurityAccessAttachmentModel.d.ts +12 -0
- package/dist/models/SecurityAccessAttachmentModel.js +56 -0
- package/dist/models/SecurityAccessChatModel.d.ts +12 -0
- package/dist/models/SecurityAccessChatModel.js +56 -0
- package/dist/models/SecurityAccessRequestModel.d.ts +25 -0
- package/dist/models/SecurityAccessRequestModel.js +80 -0
- package/dist/models/SecurityAccessWorkflowModel.d.ts +24 -0
- package/dist/models/SecurityAccessWorkflowModel.js +84 -0
- package/dist/models/ServiceExtensionAfterAge60Models.d.ts +93 -0
- package/dist/models/ServiceExtensionAfterAge60Models.js +312 -0
- package/dist/models/SlaApprovalsViewModel.js +54 -47
- package/dist/models/SlaMyRequestsViewModel.d.ts +3 -0
- package/dist/models/SlaMyRequestsViewModel.js +22 -2
- package/dist/models/UUIDBaseModel.d.ts +14 -0
- package/dist/models/UUIDBaseModel.js +66 -0
- package/dist/models/WorkingHoursExtensionModels.d.ts +88 -0
- package/dist/models/WorkingHoursExtensionModels.js +295 -0
- package/package.json +1 -1
- package/scripts/sync-sla-reports-sql.js +92 -92
- package/sql/README.md +21 -21
- package/sql/create_chatbot_qns_ans_mapping.sql +25 -0
- package/sql/sla_reports_admin_procedures.sql +323 -304
- package/sql/sla_reports_approvals_workbook.sql +430 -383
- package/sql/sla_reports_procedures.sql +886 -886
- package/sql/user_role_department_section_validation.sql +214 -0
- package/sql/vw_sla_approvals.sql +115 -108
- package/sql/vw_sla_my_requests.sql +58 -53
- package/src/data-source.ts +2 -0
- package/src/i18n/workflow-chat-i18n.json +8 -0
- package/src/i18n/workflow-chat-message.builder.ts +27 -3
- package/src/index.ts +1 -0
- package/src/models/AccessCardRequestModel.ts +135 -135
- package/src/models/AirportEntryPermitModel.ts +276 -276
- package/src/models/AnnualTrainingPlanRequestModel.ts +153 -153
- package/src/models/ChatbotQnsAnsMappingModel.ts +21 -0
- package/src/models/DocumentDriveModel.ts +28 -28
- package/src/models/DocumentFolderModel.ts +45 -45
- package/src/models/HotelApprovalModel.ts +83 -83
- package/src/models/HousingContractCancelApprovalModel.ts +64 -64
- package/src/models/HousingContractRenewalApprovalModel.ts +64 -64
- package/src/models/ITRequestAttachmentModel.ts +73 -73
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/LegalConsultationApprovalModel.ts +65 -65
- package/src/models/MissionTravelPassportExpiryNotificationConfigModel.ts +36 -36
- package/src/models/NotificationModel.ts +89 -89
- package/src/models/ResidentialUnitRentalApprovalModel.ts +143 -143
- package/src/models/ServiceExtensionAfter60ApprovalModel.ts +87 -87
- package/src/models/ServiceSlaApprovalModel.ts +64 -64
- package/src/models/ServicesNotificationConfigModel.ts +55 -55
- package/src/models/SlaApprovalsViewModel.ts +142 -135
- package/src/models/SlaMyRequestsViewModel.ts +21 -1
- package/src/models/StudyLeaveRequestModel.ts +144 -144
- package/src/models/TrainingRequestModel.ts +164 -164
- package/src/models/TrainingRoomBookingRequestModel.ts +142 -142
- package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
- package/src/models/role.ts +34 -34
- package/src/sla/sla-table-sync.service.ts +90 -90
- package/dist/helpers/cancellation-bilingual-persist.helper.d.ts +0 -37
- package/dist/helpers/cancellation-bilingual-persist.helper.js +0 -77
|
@@ -1,135 +1,142 @@
|
|
|
1
|
-
import { ViewColumn, ViewEntity } from "typeorm";
|
|
2
|
-
|
|
3
|
-
const VW_SLA_APPROVALS_SQL = `
|
|
4
|
-
SELECT
|
|
5
|
-
sa.id AS sla_approval_id,
|
|
6
|
-
sa.source_approval_id,
|
|
7
|
-
sa.request_id,
|
|
8
|
-
sa.service_id AS service_id,
|
|
9
|
-
sa.sub_service_id AS sub_service_id,
|
|
10
|
-
TRIM(COALESCE(svc.name, ''))::TEXT AS service_name,
|
|
11
|
-
TRIM(COALESCE(subsvc.sub_service_name, ''))::TEXT AS sub_service_name,
|
|
12
|
-
sa.approver_role_id AS approval_role_id,
|
|
13
|
-
TRIM(COALESCE(ar.name, ''))::TEXT AS approval_role_name,
|
|
14
|
-
sa.department_id AS approval_department_id,
|
|
15
|
-
TRIM(COALESCE(adpt.department_name, ''))::TEXT AS approval_department_name,
|
|
16
|
-
sa.section_id AS approval_section_id,
|
|
17
|
-
TRIM(COALESCE(asec.section_name, ''))::TEXT AS approval_section_name,
|
|
18
|
-
sa.approval_status::TEXT AS approval_status,
|
|
19
|
-
sr.status::TEXT AS request_status,
|
|
20
|
-
sa.level AS level,
|
|
21
|
-
sa.approver_user_id AS approver_user_id,
|
|
22
|
-
TRIM(COALESCE(au.employee_name, ''))::TEXT AS approver_user_name,
|
|
23
|
-
sa.delegate_user_id AS delegate_user_id,
|
|
24
|
-
TRIM(COALESCE(du.employee_name, ''))::TEXT AS delegate_user_name,
|
|
25
|
-
sa.approved_by AS approved_by,
|
|
26
|
-
TRIM(COALESCE(ab.employee_name, ''))::TEXT AS approved_by_name,
|
|
27
|
-
sa.comment::TEXT AS comment,
|
|
28
|
-
sa.created_at AS created_at,
|
|
29
|
-
sa.updated_at AS updated_at
|
|
30
|
-
FROM sla_approval sa
|
|
31
|
-
INNER JOIN sla_requests sr
|
|
32
|
-
ON sr.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
1
|
+
import { ViewColumn, ViewEntity } from "typeorm";
|
|
2
|
+
|
|
3
|
+
const VW_SLA_APPROVALS_SQL = `
|
|
4
|
+
SELECT
|
|
5
|
+
sa.id AS sla_approval_id,
|
|
6
|
+
sa.source_approval_id,
|
|
7
|
+
sa.request_id,
|
|
8
|
+
sa.service_id AS service_id,
|
|
9
|
+
sa.sub_service_id AS sub_service_id,
|
|
10
|
+
TRIM(COALESCE(svc.name, ''))::TEXT AS service_name,
|
|
11
|
+
TRIM(COALESCE(subsvc.sub_service_name, ''))::TEXT AS sub_service_name,
|
|
12
|
+
sa.approver_role_id AS approval_role_id,
|
|
13
|
+
TRIM(COALESCE(ar.name, ''))::TEXT AS approval_role_name,
|
|
14
|
+
sa.department_id AS approval_department_id,
|
|
15
|
+
TRIM(COALESCE(adpt.department_name, ''))::TEXT AS approval_department_name,
|
|
16
|
+
sa.section_id AS approval_section_id,
|
|
17
|
+
TRIM(COALESCE(asec.section_name, ''))::TEXT AS approval_section_name,
|
|
18
|
+
sa.approval_status::TEXT AS approval_status,
|
|
19
|
+
sr.status::TEXT AS request_status,
|
|
20
|
+
sa.level AS level,
|
|
21
|
+
sa.approver_user_id AS approver_user_id,
|
|
22
|
+
TRIM(COALESCE(au.employee_name, ''))::TEXT AS approver_user_name,
|
|
23
|
+
sa.delegate_user_id AS delegate_user_id,
|
|
24
|
+
TRIM(COALESCE(du.employee_name, ''))::TEXT AS delegate_user_name,
|
|
25
|
+
sa.approved_by AS approved_by,
|
|
26
|
+
TRIM(COALESCE(ab.employee_name, ''))::TEXT AS approved_by_name,
|
|
27
|
+
sa.comment::TEXT AS comment,
|
|
28
|
+
sa.created_at AS created_at,
|
|
29
|
+
sa.updated_at AS updated_at
|
|
30
|
+
FROM sla_approval sa
|
|
31
|
+
INNER JOIN sla_requests sr
|
|
32
|
+
ON sr.id = (
|
|
33
|
+
SELECT MIN(sr2.id)
|
|
34
|
+
FROM sla_requests sr2
|
|
35
|
+
WHERE sr2.request_id = sa.request_id
|
|
36
|
+
AND COALESCE(sr2.is_deleted, false) = false
|
|
37
|
+
AND (sa.service_id IS NULL OR sr2.service_id = sa.service_id)
|
|
38
|
+
AND (sa.sub_service_id IS NULL OR sr2.sub_service_id = sa.sub_service_id)
|
|
39
|
+
)
|
|
40
|
+
LEFT JOIN caa_services svc
|
|
41
|
+
ON svc.id = sa.service_id AND COALESCE(svc.is_deleted, false) = false
|
|
42
|
+
LEFT JOIN caa_sub_services subsvc
|
|
43
|
+
ON subsvc.id = sa.sub_service_id AND COALESCE(subsvc.is_deleted, false) = false
|
|
44
|
+
LEFT JOIN departments adpt
|
|
45
|
+
ON adpt.id = sa.department_id AND COALESCE(adpt.is_deleted, false) = false
|
|
46
|
+
LEFT JOIN sections asec
|
|
47
|
+
ON asec.id = sa.section_id AND COALESCE(asec.is_deleted, false) = false
|
|
48
|
+
LEFT JOIN role ar
|
|
49
|
+
ON ar.id = sa.approver_role_id AND COALESCE(ar.is_deleted, false) = false
|
|
50
|
+
LEFT JOIN users au
|
|
51
|
+
ON au.id = sa.approver_user_id AND COALESCE(au.is_deleted, false) = false
|
|
52
|
+
LEFT JOIN users du
|
|
53
|
+
ON du.id = sa.delegate_user_id AND COALESCE(du.is_deleted, false) = false
|
|
54
|
+
LEFT JOIN users ab
|
|
55
|
+
ON ab.id = sa.approved_by AND COALESCE(ab.is_deleted, false) = false
|
|
56
|
+
WHERE COALESCE(sa.is_deleted, false) = false
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Read-only view for SLA approvals listings (TypeORM).
|
|
61
|
+
* Approver matching (`sla_approval_matches_user` semantics) is applied in Reports_Service queries.
|
|
62
|
+
*/
|
|
63
|
+
@ViewEntity({
|
|
64
|
+
name: "vw_sla_approvals",
|
|
65
|
+
expression: VW_SLA_APPROVALS_SQL,
|
|
66
|
+
})
|
|
67
|
+
export class SlaApprovalsView {
|
|
68
|
+
@ViewColumn()
|
|
69
|
+
sla_approval_id: number;
|
|
70
|
+
|
|
71
|
+
@ViewColumn()
|
|
72
|
+
source_approval_id: number;
|
|
73
|
+
|
|
74
|
+
@ViewColumn()
|
|
75
|
+
request_id: number;
|
|
76
|
+
|
|
77
|
+
@ViewColumn()
|
|
78
|
+
service_id: number;
|
|
79
|
+
|
|
80
|
+
@ViewColumn()
|
|
81
|
+
sub_service_id: number;
|
|
82
|
+
|
|
83
|
+
@ViewColumn()
|
|
84
|
+
service_name: string;
|
|
85
|
+
|
|
86
|
+
@ViewColumn()
|
|
87
|
+
sub_service_name: string;
|
|
88
|
+
|
|
89
|
+
@ViewColumn()
|
|
90
|
+
approval_role_id: number;
|
|
91
|
+
|
|
92
|
+
@ViewColumn()
|
|
93
|
+
approval_role_name: string;
|
|
94
|
+
|
|
95
|
+
@ViewColumn()
|
|
96
|
+
approval_department_id: number;
|
|
97
|
+
|
|
98
|
+
@ViewColumn()
|
|
99
|
+
approval_department_name: string;
|
|
100
|
+
|
|
101
|
+
@ViewColumn()
|
|
102
|
+
approval_section_id: number;
|
|
103
|
+
|
|
104
|
+
@ViewColumn()
|
|
105
|
+
approval_section_name: string;
|
|
106
|
+
|
|
107
|
+
@ViewColumn()
|
|
108
|
+
approval_status: string;
|
|
109
|
+
|
|
110
|
+
@ViewColumn()
|
|
111
|
+
request_status: string;
|
|
112
|
+
|
|
113
|
+
@ViewColumn()
|
|
114
|
+
level: number;
|
|
115
|
+
|
|
116
|
+
@ViewColumn()
|
|
117
|
+
approver_user_id: number;
|
|
118
|
+
|
|
119
|
+
@ViewColumn()
|
|
120
|
+
approver_user_name: string;
|
|
121
|
+
|
|
122
|
+
@ViewColumn()
|
|
123
|
+
delegate_user_id: number;
|
|
124
|
+
|
|
125
|
+
@ViewColumn()
|
|
126
|
+
delegate_user_name: string;
|
|
127
|
+
|
|
128
|
+
@ViewColumn()
|
|
129
|
+
approved_by: number;
|
|
130
|
+
|
|
131
|
+
@ViewColumn()
|
|
132
|
+
approved_by_name: string;
|
|
133
|
+
|
|
134
|
+
@ViewColumn()
|
|
135
|
+
comment: string;
|
|
136
|
+
|
|
137
|
+
@ViewColumn()
|
|
138
|
+
created_at: Date;
|
|
139
|
+
|
|
140
|
+
@ViewColumn()
|
|
141
|
+
updated_at: Date;
|
|
142
|
+
}
|
|
@@ -62,8 +62,13 @@ SELECT
|
|
|
62
62
|
- 'is_deleted'
|
|
63
63
|
- 'sla_request'
|
|
64
64
|
- 'sla_request_id'
|
|
65
|
-
) AS request_fields
|
|
65
|
+
) AS request_fields,
|
|
66
|
+
TRIM(COALESCE(req_owner.employee_arabic_name, ''))::TEXT AS req_user_arabicname,
|
|
67
|
+
TRIM(COALESCE(dept.department_arabic_name, ''))::TEXT AS req_user_department_arabicname,
|
|
68
|
+
TRIM(COALESCE(sec.section_arabic_name, ''))::TEXT AS req_user_section_arabicname
|
|
66
69
|
FROM sla_requests sr
|
|
70
|
+
LEFT JOIN users req_owner
|
|
71
|
+
ON req_owner.id = sr.user_id AND COALESCE(req_owner.is_deleted, false) = false
|
|
67
72
|
LEFT JOIN users creator
|
|
68
73
|
ON creator.id = sr.created_by AND COALESCE(creator.is_deleted, false) = false
|
|
69
74
|
LEFT JOIN departments dept
|
|
@@ -129,6 +134,15 @@ export class SlaMyRequestsView {
|
|
|
129
134
|
/** Remaining `request_obj` keys after excluding workflow/common duplicates. */
|
|
130
135
|
@ViewColumn()
|
|
131
136
|
request_fields: Record<string, unknown>;
|
|
137
|
+
|
|
138
|
+
@ViewColumn()
|
|
139
|
+
req_user_arabicname: string;
|
|
140
|
+
|
|
141
|
+
@ViewColumn()
|
|
142
|
+
req_user_department_arabicname: string;
|
|
143
|
+
|
|
144
|
+
@ViewColumn()
|
|
145
|
+
req_user_section_arabicname: string;
|
|
132
146
|
}
|
|
133
147
|
|
|
134
148
|
/** Flatten view row: fixed columns plus each entry in `request_fields`. */
|
|
@@ -144,6 +158,9 @@ export function flattenSlaMyRequestsViewRow(
|
|
|
144
158
|
created_at,
|
|
145
159
|
req_user_department_id,
|
|
146
160
|
req_user_section_id,
|
|
161
|
+
req_user_arabicname,
|
|
162
|
+
req_user_department_arabicname,
|
|
163
|
+
req_user_section_arabicname,
|
|
147
164
|
service_name,
|
|
148
165
|
sub_service_name,
|
|
149
166
|
status,
|
|
@@ -160,6 +177,9 @@ export function flattenSlaMyRequestsViewRow(
|
|
|
160
177
|
created_at,
|
|
161
178
|
req_user_department_id,
|
|
162
179
|
req_user_section_id,
|
|
180
|
+
req_user_arabicname,
|
|
181
|
+
req_user_department_arabicname,
|
|
182
|
+
req_user_section_arabicname,
|
|
163
183
|
service_name,
|
|
164
184
|
sub_service_name,
|
|
165
185
|
status,
|
|
@@ -1,144 +1,144 @@
|
|
|
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
|
-
@Column({ type: "boolean", default: false, nullable: true })
|
|
74
|
-
already_submitted_in_ministry_of_education_system: boolean | null;
|
|
75
|
-
|
|
76
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
77
|
-
area_name: string | null;
|
|
78
|
-
|
|
79
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
80
|
-
country_name: string | null;
|
|
81
|
-
|
|
82
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
83
|
-
qualification_required: string | null;
|
|
84
|
-
|
|
85
|
-
@Column({ type: "boolean", default: false, nullable: true })
|
|
86
|
-
have_you_ever_received_authority: boolean | null;
|
|
87
|
-
|
|
88
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
89
|
-
scholarship: string | null;
|
|
90
|
-
|
|
91
|
-
constructor(
|
|
92
|
-
user_id: number,
|
|
93
|
-
course_name: string,
|
|
94
|
-
institute_name: string,
|
|
95
|
-
course_start_date: Date,
|
|
96
|
-
course_end_date: Date,
|
|
97
|
-
location: string,
|
|
98
|
-
description: string,
|
|
99
|
-
status: StudyLeaveRequestStatus = StudyLeaveRequestStatus.PENDING,
|
|
100
|
-
service_id?: number | null,
|
|
101
|
-
sub_service_id?: number | null,
|
|
102
|
-
req_user_department_id?: number | null,
|
|
103
|
-
req_user_section_id?: number | null,
|
|
104
|
-
req_user_position_id?: number | null,
|
|
105
|
-
duration_of_course?: string | null,
|
|
106
|
-
reviewer_user_id?: number | null,
|
|
107
|
-
assigned_to_user_id?: number | null,
|
|
108
|
-
assigned_at?: Date | null,
|
|
109
|
-
workflow_execution_id?: string | null,
|
|
110
|
-
already_submitted_in_ministry_of_education_system?: boolean | null,
|
|
111
|
-
area_name?: string | null,
|
|
112
|
-
country_name?: string | null,
|
|
113
|
-
qualification_required?: string | null,
|
|
114
|
-
have_you_ever_received_authority?: boolean | null,
|
|
115
|
-
scholarship?: string | null
|
|
116
|
-
) {
|
|
117
|
-
super();
|
|
118
|
-
this.user_id = user_id;
|
|
119
|
-
this.course_name = course_name;
|
|
120
|
-
this.institute_name = institute_name;
|
|
121
|
-
this.course_start_date = course_start_date;
|
|
122
|
-
this.course_end_date = course_end_date;
|
|
123
|
-
this.location = location;
|
|
124
|
-
this.description = description;
|
|
125
|
-
this.status = status;
|
|
126
|
-
this.service_id = service_id || null;
|
|
127
|
-
this.sub_service_id = sub_service_id || null;
|
|
128
|
-
this.req_user_department_id = req_user_department_id || null;
|
|
129
|
-
this.req_user_section_id = req_user_section_id || null;
|
|
130
|
-
this.req_user_position_id = req_user_position_id || null;
|
|
131
|
-
this.duration_of_course = duration_of_course || null;
|
|
132
|
-
this.reviewer_user_id = reviewer_user_id || null;
|
|
133
|
-
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
134
|
-
this.assigned_at = assigned_at || null;
|
|
135
|
-
this.workflow_execution_id = workflow_execution_id || null;
|
|
136
|
-
this.already_submitted_in_ministry_of_education_system = already_submitted_in_ministry_of_education_system ?? null;
|
|
137
|
-
this.area_name = area_name ?? null;
|
|
138
|
-
this.country_name = country_name ?? null;
|
|
139
|
-
this.qualification_required = qualification_required ?? null;
|
|
140
|
-
this.have_you_ever_received_authority = have_you_ever_received_authority ?? null;
|
|
141
|
-
this.scholarship = scholarship ?? null;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
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
|
+
@Column({ type: "boolean", default: false, nullable: true })
|
|
74
|
+
already_submitted_in_ministry_of_education_system: boolean | null;
|
|
75
|
+
|
|
76
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
77
|
+
area_name: string | null;
|
|
78
|
+
|
|
79
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
80
|
+
country_name: string | null;
|
|
81
|
+
|
|
82
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
83
|
+
qualification_required: string | null;
|
|
84
|
+
|
|
85
|
+
@Column({ type: "boolean", default: false, nullable: true })
|
|
86
|
+
have_you_ever_received_authority: boolean | null;
|
|
87
|
+
|
|
88
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
89
|
+
scholarship: string | null;
|
|
90
|
+
|
|
91
|
+
constructor(
|
|
92
|
+
user_id: number,
|
|
93
|
+
course_name: string,
|
|
94
|
+
institute_name: string,
|
|
95
|
+
course_start_date: Date,
|
|
96
|
+
course_end_date: Date,
|
|
97
|
+
location: string,
|
|
98
|
+
description: string,
|
|
99
|
+
status: StudyLeaveRequestStatus = StudyLeaveRequestStatus.PENDING,
|
|
100
|
+
service_id?: number | null,
|
|
101
|
+
sub_service_id?: number | null,
|
|
102
|
+
req_user_department_id?: number | null,
|
|
103
|
+
req_user_section_id?: number | null,
|
|
104
|
+
req_user_position_id?: number | null,
|
|
105
|
+
duration_of_course?: string | null,
|
|
106
|
+
reviewer_user_id?: number | null,
|
|
107
|
+
assigned_to_user_id?: number | null,
|
|
108
|
+
assigned_at?: Date | null,
|
|
109
|
+
workflow_execution_id?: string | null,
|
|
110
|
+
already_submitted_in_ministry_of_education_system?: boolean | null,
|
|
111
|
+
area_name?: string | null,
|
|
112
|
+
country_name?: string | null,
|
|
113
|
+
qualification_required?: string | null,
|
|
114
|
+
have_you_ever_received_authority?: boolean | null,
|
|
115
|
+
scholarship?: string | null
|
|
116
|
+
) {
|
|
117
|
+
super();
|
|
118
|
+
this.user_id = user_id;
|
|
119
|
+
this.course_name = course_name;
|
|
120
|
+
this.institute_name = institute_name;
|
|
121
|
+
this.course_start_date = course_start_date;
|
|
122
|
+
this.course_end_date = course_end_date;
|
|
123
|
+
this.location = location;
|
|
124
|
+
this.description = description;
|
|
125
|
+
this.status = status;
|
|
126
|
+
this.service_id = service_id || null;
|
|
127
|
+
this.sub_service_id = sub_service_id || null;
|
|
128
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
129
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
130
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
131
|
+
this.duration_of_course = duration_of_course || null;
|
|
132
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
133
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
134
|
+
this.assigned_at = assigned_at || null;
|
|
135
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
136
|
+
this.already_submitted_in_ministry_of_education_system = already_submitted_in_ministry_of_education_system ?? null;
|
|
137
|
+
this.area_name = area_name ?? null;
|
|
138
|
+
this.country_name = country_name ?? null;
|
|
139
|
+
this.qualification_required = qualification_required ?? null;
|
|
140
|
+
this.have_you_ever_received_authority = have_you_ever_received_authority ?? null;
|
|
141
|
+
this.scholarship = scholarship ?? null;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|