@platform-modules/civil-aviation-authority 2.3.333 → 2.3.335

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.
Files changed (91) hide show
  1. package/dist/data-source.js +2 -0
  2. package/dist/helpers/cancellation-bilingual-persist.helper.d.ts +37 -0
  3. package/dist/helpers/cancellation-bilingual-persist.helper.js +77 -0
  4. package/dist/index.d.ts +1 -3
  5. package/dist/index.js +2 -3
  6. package/dist/models/AnnualPlanSubmissionRestrictionModel.d.ts +9 -0
  7. package/dist/models/AnnualPlanSubmissionRestrictionModel.js +47 -0
  8. package/dist/models/AnnualTrainingPlanRequestModel.d.ts +12 -21
  9. package/dist/models/AnnualTrainingPlanRequestModel.js +60 -75
  10. package/dist/models/CyberSecurityRiskManagementRiskModel.d.ts +4 -0
  11. package/dist/models/CyberSecurityRiskManagementRiskModel.js +16 -0
  12. package/dist/models/SlaApprovalsViewModel.js +54 -54
  13. package/package.json +1 -1
  14. package/scripts/sync-sla-reports-sql.js +92 -92
  15. package/sql/README.md +21 -21
  16. package/sql/add_csrm_risk_tracking_fields.sql +6 -0
  17. package/sql/add_training_request_reference_number.sql +9 -9
  18. package/sql/add_training_room_booking_records_reference.sql +19 -19
  19. package/sql/annual_training_plan_bulk_upload.sql +140 -140
  20. package/sql/annual_training_plan_department_plans.sql +80 -80
  21. package/sql/create_annual_plan_submission_restriction.sql +27 -0
  22. package/sql/sla_reports_admin_procedures.sql +322 -322
  23. package/sql/sla_reports_approvals_workbook.sql +427 -427
  24. package/sql/sla_reports_procedures.sql +883 -883
  25. package/sql/vw_sla_approvals.sql +115 -115
  26. package/sql/vw_sla_my_requests.sql +58 -58
  27. package/src/data-source.ts +2 -0
  28. package/src/index.ts +521 -518
  29. package/src/models/AccessCardRequestModel.ts +135 -135
  30. package/src/models/AirportEntryPermitModel.ts +276 -276
  31. package/src/models/AnnualPlanSubmissionRestrictionModel.ts +27 -0
  32. package/src/models/AnnualTrainingPlanDepartmentPlanDecisionModel.ts +33 -33
  33. package/src/models/AnnualTrainingPlanDepartmentPlanModel.ts +31 -31
  34. package/src/models/AnnualTrainingPlanItemModel.ts +71 -71
  35. package/src/models/AnnualTrainingPlanRequestModel.ts +156 -156
  36. package/src/models/CyberSecurityRiskManagementRiskModel.ts +12 -0
  37. package/src/models/DocumentDriveModel.ts +28 -28
  38. package/src/models/DocumentFolderModel.ts +45 -45
  39. package/src/models/HotelApprovalModel.ts +83 -83
  40. package/src/models/HousingContractCancelApprovalModel.ts +64 -64
  41. package/src/models/HousingContractRenewalApprovalModel.ts +64 -64
  42. package/src/models/ITRequestAttachmentModel.ts +73 -73
  43. package/src/models/ItApprovalsModel.ts +84 -84
  44. package/src/models/LegalConsultationApprovalModel.ts +65 -65
  45. package/src/models/MissionTravelPassportExpiryNotificationConfigModel.ts +36 -36
  46. package/src/models/NotificationModel.ts +89 -89
  47. package/src/models/ResidentialUnitRentalApprovalModel.ts +143 -143
  48. package/src/models/ServiceExtensionAfter60ApprovalModel.ts +87 -87
  49. package/src/models/ServiceSlaApprovalModel.ts +64 -64
  50. package/src/models/ServicesNotificationConfigModel.ts +55 -55
  51. package/src/models/SlaApprovalsViewModel.ts +142 -142
  52. package/src/models/StudyLeaveRequestModel.ts +173 -173
  53. package/src/models/TrainingRequestModel.ts +169 -169
  54. package/src/models/TrainingRoomBookingRequestModel.ts +178 -178
  55. package/src/models/TrainingRoomBookingWorkflowModel.ts +81 -81
  56. package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
  57. package/src/models/role.ts +34 -34
  58. package/src/scripts.ts +20 -20
  59. package/src/sla/sla-table-sync.service.ts +90 -90
  60. package/dist/models/AnnualTrainingPlanDepartmentPlanDecisionModel.d.ts +0 -10
  61. package/dist/models/AnnualTrainingPlanDepartmentPlanDecisionModel.js +0 -51
  62. package/dist/models/AnnualTrainingPlanDepartmentPlanModel.d.ts +0 -13
  63. package/dist/models/AnnualTrainingPlanDepartmentPlanModel.js +0 -50
  64. package/dist/models/AnnualTrainingPlanItemModel.d.ts +0 -22
  65. package/dist/models/AnnualTrainingPlanItemModel.js +0 -101
  66. package/dist/models/DocumentMetadataModel.d.ts +0 -45
  67. package/dist/models/DocumentMetadataModel.js +0 -171
  68. package/dist/models/DocumentationDepartmentsModel.d.ts +0 -13
  69. package/dist/models/DocumentationDepartmentsModel.js +0 -53
  70. package/dist/models/FolderModel.d.ts +0 -16
  71. package/dist/models/FolderModel.js +0 -85
  72. package/dist/models/ImportExportMaterialModels.d.ts +0 -92
  73. package/dist/models/ImportExportMaterialModels.js +0 -307
  74. package/dist/models/PermissionModel.d.ts +0 -18
  75. package/dist/models/PermissionModel.js +0 -68
  76. package/dist/models/SecurityAccessApprovalModel.d.ts +0 -23
  77. package/dist/models/SecurityAccessApprovalModel.js +0 -82
  78. package/dist/models/SecurityAccessAttachmentModel.d.ts +0 -12
  79. package/dist/models/SecurityAccessAttachmentModel.js +0 -56
  80. package/dist/models/SecurityAccessChatModel.d.ts +0 -12
  81. package/dist/models/SecurityAccessChatModel.js +0 -56
  82. package/dist/models/SecurityAccessRequestModel.d.ts +0 -25
  83. package/dist/models/SecurityAccessRequestModel.js +0 -80
  84. package/dist/models/SecurityAccessWorkflowModel.d.ts +0 -24
  85. package/dist/models/SecurityAccessWorkflowModel.js +0 -84
  86. package/dist/models/ServiceExtensionAfterAge60Models.d.ts +0 -93
  87. package/dist/models/ServiceExtensionAfterAge60Models.js +0 -312
  88. package/dist/models/UUIDBaseModel.d.ts +0 -14
  89. package/dist/models/UUIDBaseModel.js +0 -66
  90. package/dist/models/WorkingHoursExtensionModels.d.ts +0 -88
  91. package/dist/models/WorkingHoursExtensionModels.js +0 -295
@@ -1,173 +1,173 @@
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
- export enum TypeOfStudy {
13
- SCHOLARSHIP = "Scholarship",
14
- SELF_FUNDED = "Self-funded",
15
- OTHER = "Other"
16
- }
17
-
18
- export enum TypeOfLeave {
19
- PARTIAL = "Partial",
20
- FULL = "Full",
21
- OTHER = "Other"
22
- }
23
-
24
- @Entity({ name: "study_leave_requests" })
25
- export class StudyLeaveRequest extends BaseModel {
26
- @Column({ type: "integer", nullable: true })
27
- req_user_department_id: number | null;
28
-
29
- @Column({ type: "integer", nullable: true })
30
- req_user_section_id: number | null;
31
-
32
- @Column({ type: "integer", nullable: true })
33
- req_user_position_id: number | null;
34
-
35
- @Column({ type: "integer", nullable: true })
36
- service_id: number | null;
37
-
38
- @Column({ type: "integer", nullable: true })
39
- sub_service_id: number | null;
40
-
41
- @Column({ type: "integer", nullable: false })
42
- user_id: number;
43
-
44
- @Column({ type: "varchar", length: 255, nullable: false })
45
- course_name: string;
46
-
47
- @Column({ type: "varchar", length: 255, nullable: false })
48
- institute_name: string;
49
-
50
- @Column({ type: "varchar", length: 255, nullable: true })
51
- duration_of_course: string | null;
52
-
53
- @Column({ type: "date", nullable: false })
54
- course_start_date: Date;
55
-
56
- @Column({ type: "date", nullable: false })
57
- course_end_date: Date;
58
-
59
- @Column({ type: "varchar", length: 255, nullable: false })
60
- location: string;
61
-
62
- @Column({ type: "text", nullable: false })
63
- description: string;
64
-
65
- @Column({
66
- type: "enum",
67
- enum: StudyLeaveRequestStatus,
68
- default: StudyLeaveRequestStatus.PENDING,
69
- nullable: false
70
- })
71
- status: StudyLeaveRequestStatus;
72
-
73
- @Column({ type: "integer", nullable: true })
74
- reviewer_user_id: number | null;
75
-
76
- @Column({ type: "integer", nullable: true })
77
- assigned_to_user_id: number | null;
78
-
79
- @Column({ type: "timestamp", nullable: true })
80
- assigned_at: Date | null;
81
-
82
- @Column({ type: "varchar", length: 255, nullable: true })
83
- workflow_execution_id: string | null;
84
-
85
- @Column({ type: "boolean", default: false, nullable: true })
86
- already_submitted_in_ministry_of_education_system: boolean | null;
87
-
88
- @Column({ type: "varchar", length: 255, nullable: true })
89
- area_name: string | null;
90
-
91
- @Column({ type: "varchar", length: 255, nullable: true })
92
- country_name: string | null;
93
-
94
- @Column({ type: "varchar", length: 255, nullable: true })
95
- qualification_required: string | null;
96
-
97
- @Column({ type: "boolean", default: false, nullable: true })
98
- have_you_ever_received_authority: boolean | null;
99
-
100
- @Column({ type: "varchar", length: 255, nullable: true })
101
- scholarship: string | null;
102
-
103
- @Column({ type: "varchar", length: 50, nullable: true })
104
- type_of_study: TypeOfStudy | null;
105
-
106
- @Column({ type: "varchar", length: 255, nullable: true })
107
- type_of_study_other: string | null;
108
-
109
- @Column({ type: "varchar", length: 50, nullable: true })
110
- type_of_leave: TypeOfLeave | null;
111
-
112
- /** Assigned when the request reaches Records approval, e.g. SL00001. */
113
- @Column({ type: "varchar", length: 20, nullable: true, unique: true })
114
- reference_number: string | null;
115
-
116
- constructor(
117
- user_id: number,
118
- course_name: string,
119
- institute_name: string,
120
- course_start_date: Date,
121
- course_end_date: Date,
122
- location: string,
123
- description: string,
124
- status: StudyLeaveRequestStatus = StudyLeaveRequestStatus.PENDING,
125
- service_id?: number | null,
126
- sub_service_id?: number | null,
127
- req_user_department_id?: number | null,
128
- req_user_section_id?: number | null,
129
- req_user_position_id?: number | null,
130
- duration_of_course?: string | null,
131
- reviewer_user_id?: number | null,
132
- assigned_to_user_id?: number | null,
133
- assigned_at?: Date | null,
134
- workflow_execution_id?: string | null,
135
- already_submitted_in_ministry_of_education_system?: boolean | null,
136
- area_name?: string | null,
137
- country_name?: string | null,
138
- qualification_required?: string | null,
139
- have_you_ever_received_authority?: boolean | null,
140
- scholarship?: string | null
141
- ) {
142
- super();
143
- this.user_id = user_id;
144
- this.course_name = course_name;
145
- this.institute_name = institute_name;
146
- this.course_start_date = course_start_date;
147
- this.course_end_date = course_end_date;
148
- this.location = location;
149
- this.description = description;
150
- this.status = status;
151
- this.service_id = service_id || null;
152
- this.sub_service_id = sub_service_id || null;
153
- this.req_user_department_id = req_user_department_id || null;
154
- this.req_user_section_id = req_user_section_id || null;
155
- this.req_user_position_id = req_user_position_id || null;
156
- this.duration_of_course = duration_of_course || null;
157
- this.reviewer_user_id = reviewer_user_id || null;
158
- this.assigned_to_user_id = assigned_to_user_id || null;
159
- this.assigned_at = assigned_at || null;
160
- this.workflow_execution_id = workflow_execution_id || null;
161
- this.already_submitted_in_ministry_of_education_system = already_submitted_in_ministry_of_education_system ?? null;
162
- this.area_name = area_name ?? null;
163
- this.country_name = country_name ?? null;
164
- this.qualification_required = qualification_required ?? null;
165
- this.have_you_ever_received_authority = have_you_ever_received_authority ?? null;
166
- this.scholarship = scholarship ?? null;
167
- this.type_of_study = null;
168
- this.type_of_study_other = null;
169
- this.type_of_leave = null;
170
- this.reference_number = null;
171
- }
172
- }
173
-
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
+ export enum TypeOfStudy {
13
+ SCHOLARSHIP = "Scholarship",
14
+ SELF_FUNDED = "Self-funded",
15
+ OTHER = "Other"
16
+ }
17
+
18
+ export enum TypeOfLeave {
19
+ PARTIAL = "Partial",
20
+ FULL = "Full",
21
+ OTHER = "Other"
22
+ }
23
+
24
+ @Entity({ name: "study_leave_requests" })
25
+ export class StudyLeaveRequest extends BaseModel {
26
+ @Column({ type: "integer", nullable: true })
27
+ req_user_department_id: number | null;
28
+
29
+ @Column({ type: "integer", nullable: true })
30
+ req_user_section_id: number | null;
31
+
32
+ @Column({ type: "integer", nullable: true })
33
+ req_user_position_id: number | null;
34
+
35
+ @Column({ type: "integer", nullable: true })
36
+ service_id: number | null;
37
+
38
+ @Column({ type: "integer", nullable: true })
39
+ sub_service_id: number | null;
40
+
41
+ @Column({ type: "integer", nullable: false })
42
+ user_id: number;
43
+
44
+ @Column({ type: "varchar", length: 255, nullable: false })
45
+ course_name: string;
46
+
47
+ @Column({ type: "varchar", length: 255, nullable: false })
48
+ institute_name: string;
49
+
50
+ @Column({ type: "varchar", length: 255, nullable: true })
51
+ duration_of_course: string | null;
52
+
53
+ @Column({ type: "date", nullable: false })
54
+ course_start_date: Date;
55
+
56
+ @Column({ type: "date", nullable: false })
57
+ course_end_date: Date;
58
+
59
+ @Column({ type: "varchar", length: 255, nullable: false })
60
+ location: string;
61
+
62
+ @Column({ type: "text", nullable: false })
63
+ description: string;
64
+
65
+ @Column({
66
+ type: "enum",
67
+ enum: StudyLeaveRequestStatus,
68
+ default: StudyLeaveRequestStatus.PENDING,
69
+ nullable: false
70
+ })
71
+ status: StudyLeaveRequestStatus;
72
+
73
+ @Column({ type: "integer", nullable: true })
74
+ reviewer_user_id: number | null;
75
+
76
+ @Column({ type: "integer", nullable: true })
77
+ assigned_to_user_id: number | null;
78
+
79
+ @Column({ type: "timestamp", nullable: true })
80
+ assigned_at: Date | null;
81
+
82
+ @Column({ type: "varchar", length: 255, nullable: true })
83
+ workflow_execution_id: string | null;
84
+
85
+ @Column({ type: "boolean", default: false, nullable: true })
86
+ already_submitted_in_ministry_of_education_system: boolean | null;
87
+
88
+ @Column({ type: "varchar", length: 255, nullable: true })
89
+ area_name: string | null;
90
+
91
+ @Column({ type: "varchar", length: 255, nullable: true })
92
+ country_name: string | null;
93
+
94
+ @Column({ type: "varchar", length: 255, nullable: true })
95
+ qualification_required: string | null;
96
+
97
+ @Column({ type: "boolean", default: false, nullable: true })
98
+ have_you_ever_received_authority: boolean | null;
99
+
100
+ @Column({ type: "varchar", length: 255, nullable: true })
101
+ scholarship: string | null;
102
+
103
+ @Column({ type: "varchar", length: 50, nullable: true })
104
+ type_of_study: TypeOfStudy | null;
105
+
106
+ @Column({ type: "varchar", length: 255, nullable: true })
107
+ type_of_study_other: string | null;
108
+
109
+ @Column({ type: "varchar", length: 50, nullable: true })
110
+ type_of_leave: TypeOfLeave | null;
111
+
112
+ /** Assigned when the request reaches Records approval, e.g. SL00001. */
113
+ @Column({ type: "varchar", length: 20, nullable: true, unique: true })
114
+ reference_number: string | null;
115
+
116
+ constructor(
117
+ user_id: number,
118
+ course_name: string,
119
+ institute_name: string,
120
+ course_start_date: Date,
121
+ course_end_date: Date,
122
+ location: string,
123
+ description: string,
124
+ status: StudyLeaveRequestStatus = StudyLeaveRequestStatus.PENDING,
125
+ service_id?: number | null,
126
+ sub_service_id?: number | null,
127
+ req_user_department_id?: number | null,
128
+ req_user_section_id?: number | null,
129
+ req_user_position_id?: number | null,
130
+ duration_of_course?: string | null,
131
+ reviewer_user_id?: number | null,
132
+ assigned_to_user_id?: number | null,
133
+ assigned_at?: Date | null,
134
+ workflow_execution_id?: string | null,
135
+ already_submitted_in_ministry_of_education_system?: boolean | null,
136
+ area_name?: string | null,
137
+ country_name?: string | null,
138
+ qualification_required?: string | null,
139
+ have_you_ever_received_authority?: boolean | null,
140
+ scholarship?: string | null
141
+ ) {
142
+ super();
143
+ this.user_id = user_id;
144
+ this.course_name = course_name;
145
+ this.institute_name = institute_name;
146
+ this.course_start_date = course_start_date;
147
+ this.course_end_date = course_end_date;
148
+ this.location = location;
149
+ this.description = description;
150
+ this.status = status;
151
+ this.service_id = service_id || null;
152
+ this.sub_service_id = sub_service_id || null;
153
+ this.req_user_department_id = req_user_department_id || null;
154
+ this.req_user_section_id = req_user_section_id || null;
155
+ this.req_user_position_id = req_user_position_id || null;
156
+ this.duration_of_course = duration_of_course || null;
157
+ this.reviewer_user_id = reviewer_user_id || null;
158
+ this.assigned_to_user_id = assigned_to_user_id || null;
159
+ this.assigned_at = assigned_at || null;
160
+ this.workflow_execution_id = workflow_execution_id || null;
161
+ this.already_submitted_in_ministry_of_education_system = already_submitted_in_ministry_of_education_system ?? null;
162
+ this.area_name = area_name ?? null;
163
+ this.country_name = country_name ?? null;
164
+ this.qualification_required = qualification_required ?? null;
165
+ this.have_you_ever_received_authority = have_you_ever_received_authority ?? null;
166
+ this.scholarship = scholarship ?? null;
167
+ this.type_of_study = null;
168
+ this.type_of_study_other = null;
169
+ this.type_of_leave = null;
170
+ this.reference_number = null;
171
+ }
172
+ }
173
+