@platform-modules/civil-aviation-authority 2.0.23 → 2.0.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.
Files changed (37) hide show
  1. package/dist/data-source.js +7 -9
  2. package/dist/index.d.ts +0 -4
  3. package/dist/index.js +4 -5
  4. package/dist/models/ITHelpDeskModel.d.ts +1 -4
  5. package/dist/models/ITHelpDeskModel.js +2 -17
  6. package/dist/models/ItApprovalsModel.d.ts +2 -2
  7. package/dist/models/ItApprovalsModel.js +2 -2
  8. package/dist/models/ItWorkflowModel.d.ts +2 -1
  9. package/dist/models/ItWorkflowModel.js +7 -2
  10. package/dist/models/LogisticsApprovalModel.d.ts +0 -1
  11. package/dist/models/LogisticsApprovalModel.js +0 -1
  12. package/dist/models/NotificationModel.d.ts +3 -0
  13. package/dist/models/NotificationModel.js +3 -0
  14. package/dist/models/WorkflowTask.d.ts +4 -1
  15. package/dist/models/WorkflowTask.js +17 -2
  16. package/dist/models/user.d.ts +2 -3
  17. package/dist/models/user.js +4 -9
  18. package/package.json +1 -1
  19. package/src/data-source.ts +10 -8
  20. package/src/index.ts +6 -5
  21. package/src/models/ITHelpDeskModel.ts +0 -14
  22. package/src/models/ItApprovalsModel.ts +2 -2
  23. package/src/models/ItWorkflowModel.ts +5 -1
  24. package/src/models/LogisticsForeignVehicleModel.ts +3 -4
  25. package/src/models/NotificationModel.ts +3 -0
  26. package/src/models/PortalFeedbackModel.ts +34 -0
  27. package/src/models/WorkflowTask.ts +16 -1
  28. package/src/models/feedbackModel.ts +50 -0
  29. package/dist/models/HotelreservationModal.d.ts +0 -30
  30. package/dist/models/HotelreservationModal.js +0 -119
  31. package/dist/models/HotelreservationModel.d.ts +0 -30
  32. package/dist/models/HotelreservationModel.js +0 -119
  33. package/src/models/HotelreservationModel.ts +0 -105
  34. package/src/models/ITApprovalSettings.ts +0 -29
  35. package/src/models/ITServicesTypesMuscatModel.ts +0 -22
  36. package/src/models/ITServicesTypesSalalahModel.ts +0 -22
  37. package/src/models/Workflows.ts +0 -40
@@ -9,12 +9,12 @@ const user_1 = require("./models/user"); // import all entities here
9
9
  const user_sessions_1 = require("./models/user-sessions");
10
10
  const role_1 = require("./models/role");
11
11
  const ITHelpDeskModel_1 = require("./models/ITHelpDeskModel");
12
- const ITServicesTypesSalalahModel_1 = require("./models/ITServicesTypesSalalahModel");
13
- const ITServicesTypesMuscatModel_1 = require("./models/ITServicesTypesMuscatModel");
12
+ // import { ITServicesTypesSalalah } from './models/ITServicesTypesSalalahModel'; // REMOVED - table no longer used
13
+ // import { ITServicesTypesMuscat } from './models/ITServicesTypesMuscatModel'; // REMOVED - table no longer used
14
14
  const ServiceTypeModel_1 = require("./models/ServiceTypeModel");
15
15
  const CAAServices_1 = require("./models/CAAServices");
16
16
  const CAASubServices_1 = require("./models/CAASubServices");
17
- const ITApprovalSettings_1 = require("./models/ITApprovalSettings");
17
+ // import { ITApprovalSettings } from './models/ITApprovalSettings'; // REMOVED - table no longer used
18
18
  // import { Workflows } from './models/Workflows';
19
19
  const ItApprovalsModel_1 = require("./models/ItApprovalsModel");
20
20
  const ItWorkflowModel_1 = require("./models/ItWorkflowModel");
@@ -42,7 +42,6 @@ const LogisticsAttachmentModel_1 = require("./models/LogisticsAttachmentModel");
42
42
  const LogisticsWorkflowModel_1 = require("./models/LogisticsWorkflowModel");
43
43
  const importantLinksModel_1 = require("./models/importantLinksModel");
44
44
  const DelegateSettingsModel_1 = require("./models/DelegateSettingsModel");
45
- const HotelreservationModel_1 = require("./models/HotelreservationModel");
46
45
  exports.AppDataSource = new typeorm_1.DataSource({
47
46
  type: 'postgres',
48
47
  host: process.env.DB_HOST || 'localhost',
@@ -56,12 +55,12 @@ exports.AppDataSource = new typeorm_1.DataSource({
56
55
  user_1.User, user_sessions_1.userSessions,
57
56
  role_1.Role,
58
57
  ITHelpDeskModel_1.ITHelpDeskRequests,
59
- ITServicesTypesSalalahModel_1.ITServicesTypesSalalah,
60
- ITServicesTypesMuscatModel_1.ITServicesTypesMuscat,
58
+ // ITServicesTypesSalalah, // REMOVED - table no longer used
59
+ // ITServicesTypesMuscat, // REMOVED - table no longer used
61
60
  ServiceTypeModel_1.ServiceType,
62
61
  CAAServices_1.CAAServices,
63
62
  CAASubServices_1.CAASubServices,
64
- ITApprovalSettings_1.ITApprovalSettings,
63
+ // ITApprovalSettings, // REMOVED - table no longer used
65
64
  // Workflows,
66
65
  ItApprovalsModel_1.ItApprovalDetails,
67
66
  ItWorkflowModel_1.ItWorkFlow,
@@ -88,7 +87,6 @@ exports.AppDataSource = new typeorm_1.DataSource({
88
87
  LogisticsAttachmentModel_1.LogisticsRequestAttachment,
89
88
  LogisticsWorkflowModel_1.LogisticsWorkFlow,
90
89
  importantLinksModel_1.ImportantLinks,
91
- DelegateSettingsModel_1.DelegateSettings,
92
- HotelreservationModel_1.HotelReservation
90
+ DelegateSettingsModel_1.DelegateSettings
93
91
  ],
94
92
  });
package/dist/index.d.ts CHANGED
@@ -2,12 +2,9 @@ export * from './models/user';
2
2
  export * from './models/role';
3
3
  export * from './models/user-sessions';
4
4
  export * from './models/ITHelpDeskModel';
5
- export * from './models/ITServicesTypesSalalahModel';
6
- export * from './models/ITServicesTypesMuscatModel';
7
5
  export * from './models/ServiceTypeModel';
8
6
  export * from './models/CAAServices';
9
7
  export * from './models/CAASubServices';
10
- export * from './models/ITApprovalSettings';
11
8
  export * from './models/ItApprovalsModel';
12
9
  export * from './models/ItWorkflowModel';
13
10
  export * from './models/WorkflowDefinitions';
@@ -34,4 +31,3 @@ export * from './models/LogisticsAttachmentModel';
34
31
  export * from './models/importantLinksModel';
35
32
  export * from './models/LogisticsWorkflowModel';
36
33
  export * from './models/DelegateSettingsModel';
37
- export * from './models/HotelreservationModel';
package/dist/index.js CHANGED
@@ -18,13 +18,13 @@ __exportStar(require("./models/user"), exports);
18
18
  __exportStar(require("./models/role"), exports);
19
19
  __exportStar(require("./models/user-sessions"), exports);
20
20
  __exportStar(require("./models/ITHelpDeskModel"), exports);
21
- __exportStar(require("./models/ITServicesTypesSalalahModel"), exports);
22
- __exportStar(require("./models/ITServicesTypesMuscatModel"), exports);
21
+ // export * from './models/ITServicesTypesSalalahModel'; // REMOVED - table no longer used
22
+ // export * from './models/ITServicesTypesMuscatModel'; // REMOVED - table no longer used
23
23
  __exportStar(require("./models/ServiceTypeModel"), exports);
24
24
  __exportStar(require("./models/CAAServices"), exports);
25
25
  __exportStar(require("./models/CAASubServices"), exports);
26
- __exportStar(require("./models/ITApprovalSettings"), exports);
27
- // export * from './models/Workflows';
26
+ // export * from './models/ITApprovalSettings'; // REMOVED - table no longer used
27
+ // export * from './models/Workflows'; // REMOVED - table no longer used
28
28
  __exportStar(require("./models/ItApprovalsModel"), exports);
29
29
  __exportStar(require("./models/ItWorkflowModel"), exports);
30
30
  __exportStar(require("./models/WorkflowDefinitions"), exports);
@@ -51,4 +51,3 @@ __exportStar(require("./models/LogisticsAttachmentModel"), exports);
51
51
  __exportStar(require("./models/importantLinksModel"), exports);
52
52
  __exportStar(require("./models/LogisticsWorkflowModel"), exports);
53
53
  __exportStar(require("./models/DelegateSettingsModel"), exports);
54
- __exportStar(require("./models/HotelreservationModel"), exports);
@@ -22,11 +22,8 @@ export declare class ITHelpDeskRequests extends BaseModel {
22
22
  extn_num: string;
23
23
  contact_num: string;
24
24
  request_date: Date;
25
- attachment_url: string;
26
25
  user_id: number;
27
- reporting_manager: number;
28
- assigned_to: number;
29
26
  status: status;
30
27
  workflow_execution_id: string | null;
31
- constructor(service_id: number, sub_service_id: number, problem: string, request_for: ContactFor, description: string, extn_num: string, contact_num: string, request_date: Date, attachment_url: string, reporting_manager: number, assigned_to: number, status: status, workflow_execution_id?: string, req_user_department_id?: number | null, req_user_section_id?: number | null, service_type_id?: number | null);
28
+ constructor(service_id: number, sub_service_id: number, problem: string, request_for: ContactFor, description: string, extn_num: string, contact_num: string, request_date: Date, status: status, workflow_execution_id?: string, req_user_department_id?: number | null, req_user_section_id?: number | null, service_type_id?: number | null);
32
29
  }
@@ -26,7 +26,7 @@ var status;
26
26
  status["REJECTED"] = "Rejected";
27
27
  })(status || (exports.status = status = {}));
28
28
  let ITHelpDeskRequests = class ITHelpDeskRequests extends BaseModel_1.BaseModel {
29
- constructor(service_id, sub_service_id, problem, request_for, description, extn_num, contact_num, request_date, attachment_url, reporting_manager, assigned_to, status, workflow_execution_id, req_user_department_id, req_user_section_id, service_type_id) {
29
+ constructor(service_id, sub_service_id, problem, request_for, description, extn_num, contact_num, request_date, status, workflow_execution_id, req_user_department_id, req_user_section_id, service_type_id) {
30
30
  super();
31
31
  this.service_id = service_id;
32
32
  this.sub_service_id = sub_service_id;
@@ -36,9 +36,6 @@ let ITHelpDeskRequests = class ITHelpDeskRequests extends BaseModel_1.BaseModel
36
36
  this.extn_num = extn_num;
37
37
  this.contact_num = contact_num;
38
38
  this.request_date = request_date;
39
- this.attachment_url = attachment_url;
40
- this.reporting_manager = reporting_manager;
41
- this.assigned_to = assigned_to;
42
39
  this.status = status;
43
40
  this.workflow_execution_id = workflow_execution_id || null;
44
41
  this.req_user_department_id = req_user_department_id || null;
@@ -96,22 +93,10 @@ __decorate([
96
93
  (0, typeorm_1.Column)({ type: "date", nullable: false }),
97
94
  __metadata("design:type", Date)
98
95
  ], ITHelpDeskRequests.prototype, "request_date", void 0);
99
- __decorate([
100
- (0, typeorm_1.Column)({ nullable: true }),
101
- __metadata("design:type", String)
102
- ], ITHelpDeskRequests.prototype, "attachment_url", void 0);
103
96
  __decorate([
104
97
  (0, typeorm_1.Column)({ nullable: false }),
105
98
  __metadata("design:type", Number)
106
99
  ], ITHelpDeskRequests.prototype, "user_id", void 0);
107
- __decorate([
108
- (0, typeorm_1.Column)({ nullable: true }),
109
- __metadata("design:type", Number)
110
- ], ITHelpDeskRequests.prototype, "reporting_manager", void 0);
111
- __decorate([
112
- (0, typeorm_1.Column)({ nullable: true }),
113
- __metadata("design:type", Number)
114
- ], ITHelpDeskRequests.prototype, "assigned_to", void 0);
115
100
  __decorate([
116
101
  (0, typeorm_1.Column)({
117
102
  type: "enum",
@@ -127,5 +112,5 @@ __decorate([
127
112
  ], ITHelpDeskRequests.prototype, "workflow_execution_id", void 0);
128
113
  exports.ITHelpDeskRequests = ITHelpDeskRequests = __decorate([
129
114
  (0, typeorm_1.Entity)({ name: 'it_help_desk_requests' }),
130
- __metadata("design:paramtypes", [Number, Number, String, String, String, String, String, Date, String, Number, Number, String, String, Object, Object, Object])
115
+ __metadata("design:paramtypes", [Number, Number, String, String, String, String, String, Date, String, String, Object, Object, Object])
131
116
  ], ITHelpDeskRequests);
@@ -8,11 +8,11 @@ export declare class ItApprovalDetails extends BaseModel {
8
8
  request_id: number;
9
9
  level: number;
10
10
  approver_user_id: number | null;
11
- approver_role_id: number;
11
+ approver_role_id: number | null;
12
12
  department_id: number | null;
13
13
  section_id: number | null;
14
14
  approved_by: number | null;
15
15
  comment: string;
16
16
  approval_status: ApprovalStatus;
17
- constructor(request_id: number, approver_user_id: number | null, approver_role_id: number, comment: string, approval_status: ApprovalStatus, level: number, department_id?: number | null, section_id?: number | null, approved_by?: number | null);
17
+ constructor(request_id: number, approver_user_id: number | null, approver_role_id: number | null, comment: string, approval_status: ApprovalStatus, level: number, department_id?: number | null, section_id?: number | null, approved_by?: number | null);
18
18
  }
@@ -47,7 +47,7 @@ __decorate([
47
47
  ], ItApprovalDetails.prototype, "approver_user_id", void 0);
48
48
  __decorate([
49
49
  (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
50
- __metadata("design:type", Number)
50
+ __metadata("design:type", Object)
51
51
  ], ItApprovalDetails.prototype, "approver_role_id", void 0);
52
52
  __decorate([
53
53
  (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
@@ -71,5 +71,5 @@ __decorate([
71
71
  ], ItApprovalDetails.prototype, "approval_status", void 0);
72
72
  exports.ItApprovalDetails = ItApprovalDetails = __decorate([
73
73
  (0, typeorm_1.Entity)({ name: 'it_approvals' }),
74
- __metadata("design:paramtypes", [Number, Object, Number, String, String, Number, Object, Object, Object])
74
+ __metadata("design:paramtypes", [Number, Object, Object, String, String, Number, Object, Object, Object])
75
75
  ], ItApprovalDetails);
@@ -6,7 +6,8 @@ export declare enum workFlowStatus {
6
6
  }
7
7
  export declare class ItWorkFlow extends BaseModel {
8
8
  request_id: number;
9
+ order: number | null;
9
10
  content: string;
10
11
  status: workFlowStatus;
11
- constructor(request_id: number, content: string, status: workFlowStatus);
12
+ constructor(request_id: number, content: string, status: workFlowStatus, order?: number);
12
13
  }
@@ -20,11 +20,12 @@ var workFlowStatus;
20
20
  })(workFlowStatus || (exports.workFlowStatus = workFlowStatus = {}));
21
21
  //This model is used to store the store the leave apporval matrix(HOD, Manager, HR, Director) based on leave type along with the levels
22
22
  let ItWorkFlow = class ItWorkFlow extends BaseModel_1.BaseModel {
23
- constructor(request_id, content, status) {
23
+ constructor(request_id, content, status, order) {
24
24
  super();
25
25
  this.request_id = request_id;
26
26
  this.content = content;
27
27
  this.status = status;
28
+ this.order = order || null;
28
29
  }
29
30
  };
30
31
  exports.ItWorkFlow = ItWorkFlow;
@@ -32,6 +33,10 @@ __decorate([
32
33
  (0, typeorm_1.Column)({ type: 'int', nullable: false }),
33
34
  __metadata("design:type", Number)
34
35
  ], ItWorkFlow.prototype, "request_id", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
38
+ __metadata("design:type", Object)
39
+ ], ItWorkFlow.prototype, "order", void 0);
35
40
  __decorate([
36
41
  (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
37
42
  __metadata("design:type", String)
@@ -42,5 +47,5 @@ __decorate([
42
47
  ], ItWorkFlow.prototype, "status", void 0);
43
48
  exports.ItWorkFlow = ItWorkFlow = __decorate([
44
49
  (0, typeorm_1.Entity)({ name: 'it_work_flows' }),
45
- __metadata("design:paramtypes", [Number, String, String])
50
+ __metadata("design:paramtypes", [Number, String, String, Number])
46
51
  ], ItWorkFlow);
@@ -1,7 +1,6 @@
1
1
  import { BaseModel } from './BaseModel';
2
2
  export declare enum LogisticsApprovalStatus {
3
3
  PENDING = "Pending",
4
- IN_PROGRESS = "In Progress",
5
4
  APPROVED = "Approved",
6
5
  REJECTED = "Rejected"
7
6
  }
@@ -15,7 +15,6 @@ const BaseModel_1 = require("./BaseModel");
15
15
  var LogisticsApprovalStatus;
16
16
  (function (LogisticsApprovalStatus) {
17
17
  LogisticsApprovalStatus["PENDING"] = "Pending";
18
- LogisticsApprovalStatus["IN_PROGRESS"] = "In Progress";
19
18
  LogisticsApprovalStatus["APPROVED"] = "Approved";
20
19
  LogisticsApprovalStatus["REJECTED"] = "Rejected";
21
20
  })(LogisticsApprovalStatus || (exports.LogisticsApprovalStatus = LogisticsApprovalStatus = {}));
@@ -1,6 +1,9 @@
1
1
  import { BaseModel } from './BaseModel';
2
2
  export declare enum NotificationType {
3
3
  REQUEST_RAISED = "request raised",
4
+ REQUEST_APPROVE = "request approve",
5
+ REQUEST_REJECT = "request reject",
6
+ REQUEST_WITHDRAW = "request withdraw",
4
7
  REMINDER = "reminder",
5
8
  IMPORT = "import"
6
9
  }
@@ -15,6 +15,9 @@ const BaseModel_1 = require("./BaseModel");
15
15
  var NotificationType;
16
16
  (function (NotificationType) {
17
17
  NotificationType["REQUEST_RAISED"] = "request raised";
18
+ NotificationType["REQUEST_APPROVE"] = "request approve";
19
+ NotificationType["REQUEST_REJECT"] = "request reject";
20
+ NotificationType["REQUEST_WITHDRAW"] = "request withdraw";
18
21
  NotificationType["REMINDER"] = "reminder";
19
22
  NotificationType["IMPORT"] = "import";
20
23
  })(NotificationType || (exports.NotificationType = NotificationType = {}));
@@ -3,5 +3,8 @@ export declare class WorkflowTask extends BaseModel {
3
3
  task_id: number;
4
4
  name: string;
5
5
  task_type: string;
6
- constructor(name: string, task_id?: number, task_type?: string);
6
+ service_id: number | null;
7
+ sub_service_id: number | null;
8
+ service_type: string | null;
9
+ constructor(name: string, task_id?: number, task_type?: string, service_id?: number | null, sub_service_id?: number | null, service_type?: string | null);
7
10
  }
@@ -13,11 +13,14 @@ exports.WorkflowTask = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
15
  let WorkflowTask = class WorkflowTask extends BaseModel_1.BaseModel {
16
- constructor(name, task_id, task_type) {
16
+ constructor(name, task_id, task_type, service_id, sub_service_id, service_type) {
17
17
  super();
18
18
  this.name = name;
19
19
  this.task_id = task_id || 0;
20
20
  this.task_type = task_type || '';
21
+ this.service_id = service_id || null;
22
+ this.sub_service_id = sub_service_id || null;
23
+ this.service_type = service_type || null;
21
24
  }
22
25
  };
23
26
  exports.WorkflowTask = WorkflowTask;
@@ -33,7 +36,19 @@ __decorate([
33
36
  (0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
34
37
  __metadata("design:type", String)
35
38
  ], WorkflowTask.prototype, "task_type", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
41
+ __metadata("design:type", Object)
42
+ ], WorkflowTask.prototype, "service_id", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
45
+ __metadata("design:type", Object)
46
+ ], WorkflowTask.prototype, "sub_service_id", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
49
+ __metadata("design:type", Object)
50
+ ], WorkflowTask.prototype, "service_type", void 0);
36
51
  exports.WorkflowTask = WorkflowTask = __decorate([
37
52
  (0, typeorm_1.Entity)({ name: 'workflow_tasks' }),
38
- __metadata("design:paramtypes", [String, Number, String])
53
+ __metadata("design:paramtypes", [String, Number, String, Object, Object, Object])
39
54
  ], WorkflowTask);
@@ -21,7 +21,7 @@ export declare class User extends BaseModel {
21
21
  mobile?: string;
22
22
  office_number?: string;
23
23
  department?: number;
24
- category: "CAA" | "Embassy";
24
+ category?: string;
25
25
  directorate?: string;
26
26
  section?: number;
27
27
  position?: number;
@@ -34,7 +34,6 @@ export declare class User extends BaseModel {
34
34
  passport_number?: string;
35
35
  personal_email?: string;
36
36
  extension_number?: number;
37
- fax_number?: string;
38
37
  diplomatic_name?: string;
39
38
  avatar?: string;
40
39
  father_name?: string;
@@ -42,5 +41,5 @@ export declare class User extends BaseModel {
42
41
  children1_name?: string;
43
42
  children2_name?: string;
44
43
  address?: string;
45
- constructor(employee_id?: number, civil_employee_id?: number, employee_name?: string, employee_arabic_name?: string, person_type?: string, date_of_birth?: string, region_of_birth?: string, country_of_birth?: string, date_of_joining?: string, last_promotion_date?: string, gender?: string, qualification?: string, marital_status?: string, nationality?: string, email?: string, blood_type?: string, national_id?: number, manpower_id?: number, mobile?: string, office_number?: string, department?: number, category?: "CAA" | "Embassy", directorate?: string, section?: number, position?: number, arabic_position?: string, grade?: number, location?: string, supervisor_emp_id?: number, supervisor_emp_name?: string, passport_number?: string, personal_email?: string, extension_number?: number, fax_number?: string, diplomatic_name?: string, avatar?: string, father_name?: string, spouse_name?: string, children1_name?: string, children2_name?: string, address?: string);
44
+ constructor(employee_id?: number, civil_employee_id?: number, employee_name?: string, employee_arabic_name?: string, person_type?: string, date_of_birth?: string, region_of_birth?: string, country_of_birth?: string, date_of_joining?: string, last_promotion_date?: string, gender?: string, qualification?: string, marital_status?: string, nationality?: string, email?: string, blood_type?: string, national_id?: number, manpower_id?: number, mobile?: string, office_number?: string, department?: number, category?: string, directorate?: string, section?: number, position?: number, arabic_position?: string, grade?: number, location?: string, supervisor_emp_id?: number, supervisor_emp_name?: string, passport_number?: string, personal_email?: string, extension_number?: number, diplomatic_name?: string, avatar?: string, father_name?: string, spouse_name?: string, children1_name?: string, children2_name?: string, address?: string);
46
45
  }
@@ -13,7 +13,7 @@ exports.User = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
15
  let User = class User extends BaseModel_1.BaseModel {
16
- constructor(employee_id, civil_employee_id, employee_name, employee_arabic_name, person_type, date_of_birth, region_of_birth, country_of_birth, date_of_joining, last_promotion_date, gender, qualification, marital_status, nationality, email, blood_type, national_id, manpower_id, mobile, office_number, department, category, directorate, section, position, arabic_position, grade, location, supervisor_emp_id, supervisor_emp_name, passport_number, personal_email, extension_number, fax_number, diplomatic_name, avatar, father_name, spouse_name, children1_name, children2_name, address) {
16
+ constructor(employee_id, civil_employee_id, employee_name, employee_arabic_name, person_type, date_of_birth, region_of_birth, country_of_birth, date_of_joining, last_promotion_date, gender, qualification, marital_status, nationality, email, blood_type, national_id, manpower_id, mobile, office_number, department, category, directorate, section, position, arabic_position, grade, location, supervisor_emp_id, supervisor_emp_name, passport_number, personal_email, extension_number, diplomatic_name, avatar, father_name, spouse_name, children1_name, children2_name, address) {
17
17
  super();
18
18
  this.employee_id = employee_id;
19
19
  this.civil_employee_id = civil_employee_id;
@@ -36,7 +36,7 @@ let User = class User extends BaseModel_1.BaseModel {
36
36
  this.mobile = mobile;
37
37
  this.office_number = office_number;
38
38
  this.department = department;
39
- this.category = category || "CAA";
39
+ this.category = category;
40
40
  this.directorate = directorate;
41
41
  this.section = section;
42
42
  this.position = position;
@@ -48,7 +48,6 @@ let User = class User extends BaseModel_1.BaseModel {
48
48
  this.passport_number = passport_number;
49
49
  this.personal_email = personal_email;
50
50
  this.extension_number = extension_number;
51
- this.fax_number = fax_number;
52
51
  this.diplomatic_name = diplomatic_name;
53
52
  this.avatar = avatar;
54
53
  this.father_name = father_name;
@@ -144,7 +143,7 @@ __decorate([
144
143
  __metadata("design:type", Number)
145
144
  ], User.prototype, "department", void 0);
146
145
  __decorate([
147
- (0, typeorm_1.Column)({ type: "enum", enum: ["CAA", "Embassy"], nullable: false, default: "CAA" }),
146
+ (0, typeorm_1.Column)({ nullable: true }),
148
147
  __metadata("design:type", String)
149
148
  ], User.prototype, "category", void 0);
150
149
  __decorate([
@@ -195,10 +194,6 @@ __decorate([
195
194
  (0, typeorm_1.Column)({ nullable: true }),
196
195
  __metadata("design:type", Number)
197
196
  ], User.prototype, "extension_number", void 0);
198
- __decorate([
199
- (0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true }),
200
- __metadata("design:type", String)
201
- ], User.prototype, "fax_number", void 0);
202
197
  __decorate([
203
198
  (0, typeorm_1.Column)({ nullable: true }),
204
199
  __metadata("design:type", String)
@@ -229,5 +224,5 @@ __decorate([
229
224
  ], User.prototype, "address", void 0);
230
225
  exports.User = User = __decorate([
231
226
  (0, typeorm_1.Entity)({ name: 'users' }),
232
- __metadata("design:paramtypes", [Number, Number, String, String, String, String, String, String, String, String, String, String, String, String, String, String, Number, Number, String, String, Number, String, String, Number, Number, String, Number, String, Number, String, String, String, Number, String, String, String, String, String, String, String, String])
227
+ __metadata("design:paramtypes", [Number, Number, String, String, String, String, String, String, String, String, String, String, String, String, String, String, Number, Number, String, String, Number, String, String, Number, Number, String, Number, String, Number, String, String, String, Number, String, String, String, String, String, String, String])
233
228
  ], User);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.0.23",
3
+ "version": "2.0.25",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -6,12 +6,12 @@ import { User } from './models/user'; // import all entities here
6
6
  import { userSessions } from './models/user-sessions';
7
7
  import { Role } from './models/role';
8
8
  import { ITHelpDeskRequests } from './models/ITHelpDeskModel';
9
- import { ITServicesTypesSalalah } from './models/ITServicesTypesSalalahModel';
10
- import { ITServicesTypesMuscat } from './models/ITServicesTypesMuscatModel';
9
+ // import { ITServicesTypesSalalah } from './models/ITServicesTypesSalalahModel'; // REMOVED - table no longer used
10
+ // import { ITServicesTypesMuscat } from './models/ITServicesTypesMuscatModel'; // REMOVED - table no longer used
11
11
  import { ServiceType } from './models/ServiceTypeModel';
12
12
  import { CAAServices } from './models/CAAServices';
13
13
  import { CAASubServices } from './models/CAASubServices';
14
- import { ITApprovalSettings } from './models/ITApprovalSettings';
14
+ // import { ITApprovalSettings } from './models/ITApprovalSettings'; // REMOVED - table no longer used
15
15
  // import { Workflows } from './models/Workflows';
16
16
  import { ItApprovalDetails } from './models/ItApprovalsModel';
17
17
  import { ItWorkFlow } from './models/ItWorkflowModel';
@@ -39,7 +39,8 @@ import { LogisticsRequestAttachment } from './models/LogisticsAttachmentModel';
39
39
  import { LogisticsWorkFlow } from './models/LogisticsWorkflowModel';
40
40
  import { ImportantLinks } from './models/importantLinksModel';
41
41
  import { DelegateSettings } from './models/DelegateSettingsModel';
42
- import { HotelReservation } from './models/HotelreservationModel'
42
+ import { Feedback } from './models/feedbackModel';
43
+ import { PortalFeedback } from './models/PortalFeedbackModel';
43
44
 
44
45
 
45
46
  export const AppDataSource = new DataSource({
@@ -55,12 +56,12 @@ export const AppDataSource = new DataSource({
55
56
  User,userSessions,
56
57
  Role,
57
58
  ITHelpDeskRequests,
58
- ITServicesTypesSalalah,
59
- ITServicesTypesMuscat,
59
+ // ITServicesTypesSalalah, // REMOVED - table no longer used
60
+ // ITServicesTypesMuscat, // REMOVED - table no longer used
60
61
  ServiceType,
61
62
  CAAServices,
62
63
  CAASubServices,
63
- ITApprovalSettings,
64
+ // ITApprovalSettings, // REMOVED - table no longer used
64
65
  // Workflows,
65
66
  ItApprovalDetails,
66
67
  ItWorkFlow,
@@ -88,6 +89,7 @@ export const AppDataSource = new DataSource({
88
89
  LogisticsWorkFlow,
89
90
  ImportantLinks,
90
91
  DelegateSettings,
91
- HotelReservation
92
+ Feedback,
93
+ PortalFeedback
92
94
  ],
93
95
  });
package/src/index.ts CHANGED
@@ -2,13 +2,13 @@ export * from './models/user';
2
2
  export * from './models/role';
3
3
  export * from './models/user-sessions';
4
4
  export * from './models/ITHelpDeskModel';
5
- export * from './models/ITServicesTypesSalalahModel';
6
- export * from './models/ITServicesTypesMuscatModel';
5
+ // export * from './models/ITServicesTypesSalalahModel'; // REMOVED - table no longer used
6
+ // export * from './models/ITServicesTypesMuscatModel'; // REMOVED - table no longer used
7
7
  export * from './models/ServiceTypeModel';
8
8
  export * from './models/CAAServices';
9
9
  export * from './models/CAASubServices';
10
- export * from './models/ITApprovalSettings';
11
- // export * from './models/Workflows';
10
+ // export * from './models/ITApprovalSettings'; // REMOVED - table no longer used
11
+ // export * from './models/Workflows'; // REMOVED - table no longer used
12
12
  export * from './models/ItApprovalsModel';
13
13
  export * from './models/ItWorkflowModel';
14
14
  export * from './models/WorkflowDefinitions';
@@ -35,4 +35,5 @@ export * from './models/LogisticsAttachmentModel';
35
35
  export * from './models/importantLinksModel';
36
36
  export * from './models/LogisticsWorkflowModel';
37
37
  export * from './models/DelegateSettingsModel';
38
- export * from './models/HotelreservationModel';
38
+ export * from './models/feedbackModel';
39
+ export * from './models/PortalFeedbackModel';
@@ -53,17 +53,9 @@ export class ITHelpDeskRequests extends BaseModel {
53
53
  @Column({ type: "date", nullable: false })
54
54
  request_date: Date;
55
55
 
56
- @Column({ nullable: true })
57
- attachment_url: string;
58
-
59
56
  @Column({ nullable: false })
60
57
  user_id: number;
61
58
 
62
- @Column({ nullable: true })
63
- reporting_manager: number;
64
-
65
- @Column({ nullable: true })
66
- assigned_to: number;
67
59
 
68
60
  @Column({
69
61
  type: "enum",
@@ -85,9 +77,6 @@ export class ITHelpDeskRequests extends BaseModel {
85
77
  extn_num: string,
86
78
  contact_num: string,
87
79
  request_date: Date,
88
- attachment_url: string,
89
- reporting_manager: number,
90
- assigned_to: number,
91
80
  status: status,
92
81
  workflow_execution_id?: string,
93
82
  req_user_department_id?: number | null,
@@ -103,9 +92,6 @@ export class ITHelpDeskRequests extends BaseModel {
103
92
  this.extn_num = extn_num;
104
93
  this.contact_num = contact_num;
105
94
  this.request_date = request_date;
106
- this.attachment_url = attachment_url;
107
- this.reporting_manager = reporting_manager;
108
- this.assigned_to = assigned_to;
109
95
  this.status = status;
110
96
  this.workflow_execution_id = workflow_execution_id || null;
111
97
  this.req_user_department_id = req_user_department_id || null;
@@ -20,7 +20,7 @@ export class ItApprovalDetails extends BaseModel {
20
20
  approver_user_id: number | null;
21
21
 
22
22
  @Column({ type: 'integer', nullable: false })
23
- approver_role_id: number;
23
+ approver_role_id: number | null;
24
24
 
25
25
  @Column({ type: 'integer', nullable: true })
26
26
  department_id: number | null;
@@ -40,7 +40,7 @@ export class ItApprovalDetails extends BaseModel {
40
40
  constructor(
41
41
  request_id: number,
42
42
  approver_user_id: number | null,
43
- approver_role_id: number,
43
+ approver_role_id: number | null,
44
44
  comment: string,
45
45
  approval_status: ApprovalStatus,
46
46
  level: number,
@@ -13,16 +13,20 @@ export class ItWorkFlow extends BaseModel {
13
13
  @Column({ type: 'int', nullable: false })
14
14
  request_id: number;
15
15
 
16
+ @Column({ type: 'int', nullable: true })
17
+ order: number | null;
18
+
16
19
  @Column({ type: 'varchar', length: 255, nullable: false })
17
20
  content: string;
18
21
 
19
22
  @Column({ type: 'enum', enum: workFlowStatus, default: workFlowStatus.NOT_YET_STARTED, nullable: false })
20
23
  status: workFlowStatus;
21
24
 
22
- constructor(request_id: number, content: string, status: workFlowStatus) {
25
+ constructor(request_id: number, content: string, status: workFlowStatus, order?: number) {
23
26
  super();
24
27
  this.request_id = request_id;
25
28
  this.content = content;
26
29
  this.status = status;
30
+ this.order = order || null;
27
31
  }
28
32
  }
@@ -2,10 +2,9 @@ import { Column, Entity } from "typeorm";
2
2
  import { BaseModel } from './BaseModel';
3
3
 
4
4
  export enum Foreign_Purpose_of_Travel {
5
- AIRPORT_PICKUP = "Airport Pickup/Drop-off",
6
- OFFICIAL_MEETING = "Official Meeting",
7
- SITE_VISIT = "Site Visit",
8
- CONFERENCE = "Conference/Event",
5
+ SITE = "Site Visit",
6
+ AIRPORT = "Airport Duty",
7
+ OFFICIAL = "Official Meeting",
9
8
  OTHER = "Other"
10
9
  }
11
10
 
@@ -4,6 +4,9 @@ import { BaseModel } from './BaseModel';
4
4
 
5
5
  export enum NotificationType {
6
6
  REQUEST_RAISED = 'request raised',
7
+ REQUEST_APPROVE = 'request approve',
8
+ REQUEST_REJECT = 'request reject',
9
+ REQUEST_WITHDRAW = 'request withdraw',
7
10
  REMINDER = 'reminder',
8
11
  IMPORT = 'import',
9
12
  }
@@ -0,0 +1,34 @@
1
+
2
+ import { Column, Entity } from "typeorm";
3
+ import { BaseModel } from './BaseModel';
4
+ import { Rating } from './feedbackModel';
5
+
6
+ @Entity({ name: 'portal_feedback' })
7
+ export class PortalFeedback extends BaseModel {
8
+
9
+ @Column({ nullable: true })
10
+ comment: string;
11
+
12
+ @Column({
13
+ type: "enum",
14
+ enum: Rating,
15
+ nullable: true,
16
+ })
17
+ rating: Rating;
18
+
19
+ @Column({ nullable: true })
20
+ user_Id: number;
21
+
22
+ constructor(
23
+ comment: string,
24
+ rating: Rating,
25
+ user_Id: number,
26
+ ) {
27
+ super();
28
+ this.comment = comment,
29
+ this.rating = rating,
30
+ this.user_Id = user_Id
31
+ }
32
+ }
33
+
34
+
@@ -13,14 +13,29 @@ export class WorkflowTask extends BaseModel {
13
13
  @Column({ type: 'varchar', length: 200, nullable: true })
14
14
  task_type: string;
15
15
 
16
+ @Column({ type: 'int', nullable: true })
17
+ service_id: number | null;
18
+
19
+ @Column({ type: 'int', nullable: true })
20
+ sub_service_id: number | null;
21
+
22
+ @Column({ type: 'varchar', length: 50, nullable: true })
23
+ service_type: string | null;
24
+
16
25
  constructor(
17
26
  name: string,
18
27
  task_id?: number,
19
- task_type?: string
28
+ task_type?: string,
29
+ service_id?: number | null,
30
+ sub_service_id?: number | null,
31
+ service_type?: string | null
20
32
  ) {
21
33
  super();
22
34
  this.name = name;
23
35
  this.task_id = task_id || 0;
24
36
  this.task_type = task_type || '';
37
+ this.service_id = service_id || null;
38
+ this.sub_service_id = sub_service_id || null;
39
+ this.service_type = service_type || null;
25
40
  }
26
41
  }
@@ -0,0 +1,50 @@
1
+
2
+ import { Column, Entity, BeforeInsert, BeforeUpdate } from "typeorm";
3
+ import { BaseModel } from './BaseModel';
4
+
5
+ export enum Rating {
6
+ ONE = 1,
7
+ TWO = 2,
8
+ THREE = 3,
9
+ FOUR = 4,
10
+ FIVE = 5,
11
+ }
12
+
13
+ @Entity({ name: 'feedback' })
14
+ export class Feedback extends BaseModel {
15
+
16
+ @Column({ nullable: true })
17
+ comment: string;
18
+
19
+ @Column({
20
+ type: "enum",
21
+ enum: Rating,
22
+ nullable: true,
23
+ })
24
+ rating: Rating;
25
+
26
+ @Column({ nullable: true })
27
+ category_Id: number;
28
+
29
+ @Column({ nullable: true })
30
+ sub_category_Id: number;
31
+
32
+ @Column({ nullable: true })
33
+ user_Id: number;
34
+
35
+ constructor(
36
+ comment: string,
37
+ rating: Rating,
38
+ category_Id: number,
39
+ sub_category_Id: number,
40
+ user_Id: number,
41
+ ) {
42
+ super();
43
+ this.comment = comment,
44
+ this.rating = rating,
45
+ this.category_Id = category_Id,
46
+ this.sub_category_Id = sub_category_Id,
47
+ this.user_Id = user_Id
48
+ }
49
+ }
50
+
@@ -1,30 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare enum MealType {
3
- BREAKFAST = "Breakfast",
4
- LUNCH = "Lunch",
5
- DINNER = "Dinner"
6
- }
7
- export declare enum ServiceTypes {
8
- LAUNDRY = "Laundry",
9
- TELEPHONE = "Telephone Service"
10
- }
11
- export declare class HotelReservation extends BaseModel {
12
- type_of_accommodation: string;
13
- price: number;
14
- meal: MealType;
15
- service: ServiceTypes;
16
- date_of_request: Date;
17
- hotel_name: string;
18
- check_in_date: Date;
19
- check_in_time: string;
20
- check_out_date: Date;
21
- check_out_time: string;
22
- number_of_guests: number;
23
- description: string;
24
- attachment_url: string;
25
- requested_by: string;
26
- visitor_name: string;
27
- hr_approval: boolean;
28
- pr_approval: boolean;
29
- constructor(type_of_accommodation: string, price: number, meal: MealType, service: ServiceTypes, date_of_request: Date, hotel_name: string, check_in_date: Date, check_in_time: string, check_out_date: Date, check_out_time: string, number_of_guests: number, description: string, requested_by: string, visitor_name: string, hr_approval: boolean, pr_approval: boolean);
30
- }
@@ -1,119 +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.HotelReservation = exports.ServiceTypes = exports.MealType = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- var MealType;
16
- (function (MealType) {
17
- MealType["BREAKFAST"] = "Breakfast";
18
- MealType["LUNCH"] = "Lunch";
19
- MealType["DINNER"] = "Dinner";
20
- })(MealType || (exports.MealType = MealType = {}));
21
- var ServiceTypes;
22
- (function (ServiceTypes) {
23
- ServiceTypes["LAUNDRY"] = "Laundry";
24
- ServiceTypes["TELEPHONE"] = "Telephone Service";
25
- })(ServiceTypes || (exports.ServiceTypes = ServiceTypes = {}));
26
- let HotelReservation = class HotelReservation extends BaseModel_1.BaseModel {
27
- constructor(type_of_accommodation, price, meal, service, date_of_request, hotel_name, check_in_date, check_in_time, check_out_date, check_out_time, number_of_guests, description, requested_by, visitor_name, hr_approval, pr_approval) {
28
- super();
29
- this.type_of_accommodation = type_of_accommodation;
30
- this.price = price;
31
- this.meal = meal;
32
- this.service = service;
33
- this.date_of_request = date_of_request;
34
- this.hotel_name = hotel_name;
35
- this.check_in_date = check_in_date;
36
- this.check_in_time = check_in_time;
37
- this.check_out_date = check_out_date;
38
- this.check_out_time = check_out_time;
39
- this.number_of_guests = number_of_guests;
40
- this.description = description;
41
- this.requested_by = requested_by;
42
- this.visitor_name = visitor_name;
43
- this.hr_approval = hr_approval;
44
- this.pr_approval = pr_approval;
45
- }
46
- };
47
- exports.HotelReservation = HotelReservation;
48
- __decorate([
49
- (0, typeorm_1.Column)({ type: 'varchar', length: 50 }),
50
- __metadata("design:type", String)
51
- ], HotelReservation.prototype, "type_of_accommodation", void 0);
52
- __decorate([
53
- (0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: false }),
54
- __metadata("design:type", Number)
55
- ], HotelReservation.prototype, "price", void 0);
56
- __decorate([
57
- (0, typeorm_1.Column)({ type: 'enum', enum: MealType, nullable: false, }),
58
- __metadata("design:type", String)
59
- ], HotelReservation.prototype, "meal", void 0);
60
- __decorate([
61
- (0, typeorm_1.Column)({ type: 'enum', enum: ServiceTypes, nullable: false, }),
62
- __metadata("design:type", String)
63
- ], HotelReservation.prototype, "service", void 0);
64
- __decorate([
65
- (0, typeorm_1.Column)({ type: 'timestamptz', nullable: false }),
66
- __metadata("design:type", Date)
67
- ], HotelReservation.prototype, "date_of_request", void 0);
68
- __decorate([
69
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
70
- __metadata("design:type", String)
71
- ], HotelReservation.prototype, "hotel_name", void 0);
72
- __decorate([
73
- (0, typeorm_1.Column)({ type: 'date', nullable: false }),
74
- __metadata("design:type", Date)
75
- ], HotelReservation.prototype, "check_in_date", void 0);
76
- __decorate([
77
- (0, typeorm_1.Column)({ type: 'time', nullable: false }),
78
- __metadata("design:type", String)
79
- ], HotelReservation.prototype, "check_in_time", void 0);
80
- __decorate([
81
- (0, typeorm_1.Column)({ type: 'date', nullable: false }),
82
- __metadata("design:type", Date)
83
- ], HotelReservation.prototype, "check_out_date", void 0);
84
- __decorate([
85
- (0, typeorm_1.Column)({ type: 'time', nullable: false }),
86
- __metadata("design:type", String)
87
- ], HotelReservation.prototype, "check_out_time", void 0);
88
- __decorate([
89
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
90
- __metadata("design:type", Number)
91
- ], HotelReservation.prototype, "number_of_guests", void 0);
92
- __decorate([
93
- (0, typeorm_1.Column)({ type: 'text', nullable: true }),
94
- __metadata("design:type", String)
95
- ], HotelReservation.prototype, "description", void 0);
96
- __decorate([
97
- (0, typeorm_1.Column)({ type: 'text', nullable: false }),
98
- __metadata("design:type", String)
99
- ], HotelReservation.prototype, "attachment_url", void 0);
100
- __decorate([
101
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
102
- __metadata("design:type", String)
103
- ], HotelReservation.prototype, "requested_by", void 0);
104
- __decorate([
105
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
106
- __metadata("design:type", String)
107
- ], HotelReservation.prototype, "visitor_name", void 0);
108
- __decorate([
109
- (0, typeorm_1.Column)({ type: 'boolean', default: false }),
110
- __metadata("design:type", Boolean)
111
- ], HotelReservation.prototype, "hr_approval", void 0);
112
- __decorate([
113
- (0, typeorm_1.Column)({ type: 'boolean', default: false }),
114
- __metadata("design:type", Boolean)
115
- ], HotelReservation.prototype, "pr_approval", void 0);
116
- exports.HotelReservation = HotelReservation = __decorate([
117
- (0, typeorm_1.Entity)({ name: 'hotel_reservations' }),
118
- __metadata("design:paramtypes", [String, Number, String, String, Date, String, Date, String, Date, String, Number, String, String, String, Boolean, Boolean])
119
- ], HotelReservation);
@@ -1,30 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare enum MealType {
3
- BREAKFAST = "Breakfast",
4
- LUNCH = "Lunch",
5
- DINNER = "Dinner"
6
- }
7
- export declare enum ServiceTypes {
8
- LAUNDRY = "Laundry",
9
- TELEPHONE = "Telephone Service"
10
- }
11
- export declare class HotelReservation extends BaseModel {
12
- type_of_accommodation: string;
13
- price: number;
14
- meal: MealType;
15
- service: ServiceTypes;
16
- date_of_request: Date;
17
- hotel_name: string;
18
- check_in_date: Date;
19
- check_in_time: string;
20
- check_out_date: Date;
21
- check_out_time: string;
22
- number_of_guests: number;
23
- description: string;
24
- attachment_url: string;
25
- requested_by: string;
26
- visitor_name: string;
27
- hr_approval: boolean;
28
- pr_approval: boolean;
29
- constructor(type_of_accommodation: string, price: number, meal: MealType, service: ServiceTypes, date_of_request: Date, hotel_name: string, check_in_date: Date, check_in_time: string, check_out_date: Date, check_out_time: string, number_of_guests: number, description: string, requested_by: string, visitor_name: string, hr_approval: boolean, pr_approval: boolean);
30
- }
@@ -1,119 +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.HotelReservation = exports.ServiceTypes = exports.MealType = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- var MealType;
16
- (function (MealType) {
17
- MealType["BREAKFAST"] = "Breakfast";
18
- MealType["LUNCH"] = "Lunch";
19
- MealType["DINNER"] = "Dinner";
20
- })(MealType || (exports.MealType = MealType = {}));
21
- var ServiceTypes;
22
- (function (ServiceTypes) {
23
- ServiceTypes["LAUNDRY"] = "Laundry";
24
- ServiceTypes["TELEPHONE"] = "Telephone Service";
25
- })(ServiceTypes || (exports.ServiceTypes = ServiceTypes = {}));
26
- let HotelReservation = class HotelReservation extends BaseModel_1.BaseModel {
27
- constructor(type_of_accommodation, price, meal, service, date_of_request, hotel_name, check_in_date, check_in_time, check_out_date, check_out_time, number_of_guests, description, requested_by, visitor_name, hr_approval, pr_approval) {
28
- super();
29
- this.type_of_accommodation = type_of_accommodation;
30
- this.price = price;
31
- this.meal = meal;
32
- this.service = service;
33
- this.date_of_request = date_of_request;
34
- this.hotel_name = hotel_name;
35
- this.check_in_date = check_in_date;
36
- this.check_in_time = check_in_time;
37
- this.check_out_date = check_out_date;
38
- this.check_out_time = check_out_time;
39
- this.number_of_guests = number_of_guests;
40
- this.description = description;
41
- this.requested_by = requested_by;
42
- this.visitor_name = visitor_name;
43
- this.hr_approval = hr_approval;
44
- this.pr_approval = pr_approval;
45
- }
46
- };
47
- exports.HotelReservation = HotelReservation;
48
- __decorate([
49
- (0, typeorm_1.Column)({ type: 'varchar', length: 50 }),
50
- __metadata("design:type", String)
51
- ], HotelReservation.prototype, "type_of_accommodation", void 0);
52
- __decorate([
53
- (0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: false }),
54
- __metadata("design:type", Number)
55
- ], HotelReservation.prototype, "price", void 0);
56
- __decorate([
57
- (0, typeorm_1.Column)({ type: 'enum', enum: MealType, nullable: false, }),
58
- __metadata("design:type", String)
59
- ], HotelReservation.prototype, "meal", void 0);
60
- __decorate([
61
- (0, typeorm_1.Column)({ type: 'enum', enum: ServiceTypes, nullable: false, }),
62
- __metadata("design:type", String)
63
- ], HotelReservation.prototype, "service", void 0);
64
- __decorate([
65
- (0, typeorm_1.Column)({ type: 'timestamptz', nullable: false }),
66
- __metadata("design:type", Date)
67
- ], HotelReservation.prototype, "date_of_request", void 0);
68
- __decorate([
69
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
70
- __metadata("design:type", String)
71
- ], HotelReservation.prototype, "hotel_name", void 0);
72
- __decorate([
73
- (0, typeorm_1.Column)({ type: 'date', nullable: false }),
74
- __metadata("design:type", Date)
75
- ], HotelReservation.prototype, "check_in_date", void 0);
76
- __decorate([
77
- (0, typeorm_1.Column)({ type: 'time', nullable: false }),
78
- __metadata("design:type", String)
79
- ], HotelReservation.prototype, "check_in_time", void 0);
80
- __decorate([
81
- (0, typeorm_1.Column)({ type: 'date', nullable: false }),
82
- __metadata("design:type", Date)
83
- ], HotelReservation.prototype, "check_out_date", void 0);
84
- __decorate([
85
- (0, typeorm_1.Column)({ type: 'time', nullable: false }),
86
- __metadata("design:type", String)
87
- ], HotelReservation.prototype, "check_out_time", void 0);
88
- __decorate([
89
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
90
- __metadata("design:type", Number)
91
- ], HotelReservation.prototype, "number_of_guests", void 0);
92
- __decorate([
93
- (0, typeorm_1.Column)({ type: 'text', nullable: true }),
94
- __metadata("design:type", String)
95
- ], HotelReservation.prototype, "description", void 0);
96
- __decorate([
97
- (0, typeorm_1.Column)({ type: 'text', nullable: false }),
98
- __metadata("design:type", String)
99
- ], HotelReservation.prototype, "attachment_url", void 0);
100
- __decorate([
101
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
102
- __metadata("design:type", String)
103
- ], HotelReservation.prototype, "requested_by", void 0);
104
- __decorate([
105
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
106
- __metadata("design:type", String)
107
- ], HotelReservation.prototype, "visitor_name", void 0);
108
- __decorate([
109
- (0, typeorm_1.Column)({ type: 'boolean', default: false }),
110
- __metadata("design:type", Boolean)
111
- ], HotelReservation.prototype, "hr_approval", void 0);
112
- __decorate([
113
- (0, typeorm_1.Column)({ type: 'boolean', default: false }),
114
- __metadata("design:type", Boolean)
115
- ], HotelReservation.prototype, "pr_approval", void 0);
116
- exports.HotelReservation = HotelReservation = __decorate([
117
- (0, typeorm_1.Entity)({ name: 'hotelreservations' }),
118
- __metadata("design:paramtypes", [String, Number, String, String, Date, String, Date, String, Date, String, Number, String, String, String, Boolean, Boolean])
119
- ], HotelReservation);
@@ -1,105 +0,0 @@
1
- import { Entity, Column } from 'typeorm';
2
- import { BaseModel } from './BaseModel';
3
- export enum MealType {
4
- BREAKFAST = "Breakfast",
5
- LUNCH = "Lunch",
6
- DINNER = "Dinner",
7
- }
8
-
9
- export enum ServiceTypes {
10
- LAUNDRY = "Laundry",
11
- TELEPHONE = "Telephone Service",
12
- }
13
-
14
-
15
-
16
- @Entity({ name:'hotelreservations'})
17
- export class HotelReservation extends BaseModel {
18
- @Column({ type: 'varchar', length: 50 })
19
- type_of_accommodation: string;
20
-
21
- @Column({ type: 'decimal', precision: 10, scale: 2, nullable: false })
22
- price: number;
23
-
24
- @Column({ type: 'enum', enum: MealType, nullable: false, })
25
- meal: MealType;
26
-
27
- @Column({ type: 'enum', enum: ServiceTypes, nullable: false, })
28
- service: ServiceTypes;
29
-
30
- @Column({ type: 'timestamptz', nullable: false })
31
- date_of_request: Date;
32
-
33
- @Column({ type: 'varchar', length: 100, nullable: false })
34
- hotel_name: string;
35
- @Column({ type: 'date', nullable: false })
36
- check_in_date: Date;
37
-
38
- @Column({ type: 'time', nullable: false })
39
- check_in_time: string;
40
-
41
- @Column({ type: 'date', nullable: false })
42
- check_out_date: Date;
43
-
44
- @Column({ type: 'time', nullable: false })
45
- check_out_time: string;
46
-
47
- @Column({ type: 'int', nullable: false })
48
- number_of_guests: number;
49
-
50
- @Column({ type: 'text', nullable: true })
51
- description: string;
52
-
53
- @Column({ type: 'text', nullable: false })
54
- attachment_url: string;
55
-
56
- @Column({ type: 'varchar', length: 100, nullable: false })
57
- requested_by: string;
58
-
59
- @Column({ type: 'varchar', length: 100, nullable: false })
60
- visitor_name: string;
61
-
62
- @Column({ type: 'boolean', default: false })
63
- hr_approval: boolean;
64
-
65
- @Column({ type: 'boolean', default: false })
66
- pr_approval: boolean;
67
-
68
-
69
- constructor(
70
- type_of_accommodation: string,
71
- price: number,
72
- meal: MealType,
73
- service: ServiceTypes,
74
- date_of_request: Date,
75
- hotel_name: string,
76
- check_in_date: Date,
77
- check_in_time: string,
78
- check_out_date: Date,
79
- check_out_time: string,
80
- number_of_guests: number,
81
- description: string,
82
- requested_by: string,
83
- visitor_name: string,
84
- hr_approval: boolean,
85
- pr_approval: boolean,
86
- ) {
87
- super();
88
- this.type_of_accommodation = type_of_accommodation;
89
- this.price = price;
90
- this.meal = meal;
91
- this.service = service;
92
- this.date_of_request = date_of_request;
93
- this.hotel_name = hotel_name;
94
- this.check_in_date = check_in_date;
95
- this.check_in_time = check_in_time;
96
- this.check_out_date = check_out_date;
97
- this.check_out_time = check_out_time;
98
- this.number_of_guests = number_of_guests;
99
- this.description = description;
100
- this.requested_by = requested_by;
101
- this.visitor_name = visitor_name;
102
- this.hr_approval = hr_approval;
103
- this.pr_approval = pr_approval;
104
- }
105
- }
@@ -1,29 +0,0 @@
1
- import { Column, Entity, Unique } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- @Entity({ name: 'it_approval_settings' })
5
- @Unique(['workflow_id', 'level'])
6
- export class ITApprovalSettings extends BaseModel {
7
-
8
-
9
- @Column({ type: 'int', nullable: false })
10
- level: number;
11
-
12
- @Column({ type: 'int', nullable: false })
13
- approval_role_id: number;
14
-
15
- @Column({ type: 'int', nullable: false })
16
- workflow_id: number;
17
- constructor(
18
- level: number,
19
- approval_role_id: number,
20
- workflow_id: number
21
- ) {
22
- super();
23
- this.level = level;
24
- this.approval_role_id = approval_role_id;
25
- this.workflow_id = workflow_id;
26
- }
27
- }
28
-
29
-
@@ -1,22 +0,0 @@
1
-
2
- import { Column, Entity } from "typeorm";
3
- import { BaseModel } from './BaseModel';
4
-
5
- @Entity({ name: 'it_services_types_muscat' })
6
- export class ITServicesTypesMuscat extends BaseModel {
7
-
8
- @Column({ nullable: false })
9
- name: string;
10
-
11
- @Column({ nullable: false })
12
- name_in_arabic: string;
13
-
14
- constructor(
15
- name: string,
16
- name_in_arabic: string
17
- ) {
18
- super();
19
- this.name = name
20
- this.name_in_arabic = name_in_arabic
21
- }
22
- }
@@ -1,22 +0,0 @@
1
-
2
- import { Column, Entity } from "typeorm";
3
- import { BaseModel } from './BaseModel';
4
-
5
- @Entity({ name: 'it_services_types_salalah' })
6
- export class ITServicesTypesSalalah extends BaseModel {
7
-
8
- @Column({ nullable: false })
9
- name: string;
10
-
11
- @Column({ nullable: false })
12
- name_in_arabic: string;
13
-
14
- constructor(
15
- name: string,
16
- name_in_arabic: string
17
- ) {
18
- super();
19
- this.name = name
20
- this.name_in_arabic = name_in_arabic
21
- }
22
- }
@@ -1,40 +0,0 @@
1
- // import { Column, Entity, Unique } from "typeorm";
2
- // import { BaseModel } from './BaseModel';
3
-
4
- // @Entity({ name: 'workflows' })
5
- // @Unique(['service_id', 'sub_service_id', 'request_for'])
6
- // export class Workflows extends BaseModel {
7
-
8
- // @Column({ type: 'varchar', length: 100, nullable: false })
9
- // name: string;
10
-
11
- // @Column({ type: 'bigint', nullable: false })
12
- // service_id: number;
13
-
14
- // @Column({ type: 'bigint', nullable: false })
15
- // sub_service_id: number;
16
-
17
- // @Column({ type: 'varchar', length: 20, nullable: false })
18
- // request_for: string; // 'Self' | 'Behalf of' | 'Internal'
19
-
20
- // @Column({ type: 'int', nullable: false })
21
- // levels: number;
22
-
23
-
24
- // constructor(
25
- // name: string,
26
- // service_id: number,
27
- // sub_service_id: number,
28
- // request_for: string,
29
- // levels: number,
30
- // ) {
31
- // super();
32
- // this.name = name;
33
- // this.service_id = service_id;
34
- // this.sub_service_id = sub_service_id;
35
- // this.request_for = request_for;
36
- // this.levels = levels;
37
- // }
38
- // }
39
-
40
-