@platform-modules/civil-aviation-authority 2.0.33 → 2.0.35

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 (57) hide show
  1. package/dist/data-source.js +12 -16
  2. package/dist/index.d.ts +3 -8
  3. package/dist/index.js +7 -9
  4. package/dist/models/ITHelpDeskModel.d.ts +1 -4
  5. package/dist/models/ITHelpDeskModel.js +2 -17
  6. package/dist/models/ItApprovalsModel.d.ts +3 -2
  7. package/dist/models/ItApprovalsModel.js +3 -2
  8. package/dist/models/ItWorkflowModel.d.ts +2 -1
  9. package/dist/models/ItWorkflowModel.js +7 -2
  10. package/dist/models/LogisticsForeignVehicleModel.d.ts +5 -6
  11. package/dist/models/LogisticsForeignVehicleModel.js +5 -7
  12. package/dist/models/NotificationModel.d.ts +3 -0
  13. package/dist/models/NotificationModel.js +3 -0
  14. package/dist/models/PortalFeedbackModel.d.ts +8 -0
  15. package/dist/models/PortalFeedbackModel.js +44 -0
  16. package/dist/models/VpnRequestModel.d.ts +70 -0
  17. package/dist/models/VpnRequestModel.js +175 -0
  18. package/dist/models/WorkflowTask.d.ts +5 -2
  19. package/dist/models/WorkflowTask.js +28 -4
  20. package/dist/models/WorkflowTaskNames.d.ts +12 -3
  21. package/dist/models/WorkflowTaskNames.js +28 -9
  22. package/dist/models/feedbackModel.d.ts +16 -0
  23. package/dist/models/feedbackModel.js +61 -0
  24. package/package.json +1 -1
  25. package/src/data-source.ts +13 -16
  26. package/src/index.ts +7 -9
  27. package/src/models/ITHelpDeskModel.ts +0 -14
  28. package/src/models/ItApprovalsModel.ts +3 -2
  29. package/src/models/ItWorkflowModel.ts +5 -1
  30. package/src/models/LogisticsForeignVehicleModel.ts +8 -10
  31. package/src/models/NotificationModel.ts +3 -0
  32. package/src/models/PortalFeedbackModel.ts +34 -0
  33. package/src/models/VpnRequestModel.ts +135 -0
  34. package/src/models/WorkflowTask.ts +31 -4
  35. package/src/models/WorkflowTaskNames.ts +27 -8
  36. package/src/models/feedbackModel.ts +50 -0
  37. package/dist/models/HotelApprovalModel.d.ts +0 -22
  38. package/dist/models/HotelApprovalModel.js +0 -91
  39. package/dist/models/HotelAttachedModel.d.ts +0 -12
  40. package/dist/models/HotelAttachedModel.js +0 -64
  41. package/dist/models/HotelChatModel.d.ts +0 -17
  42. package/dist/models/HotelChatModel.js +0 -67
  43. package/dist/models/HotelWorkFlowModel.d.ts +0 -14
  44. package/dist/models/HotelWorkFlowModel.js +0 -56
  45. package/dist/models/HotelreservationModal.d.ts +0 -30
  46. package/dist/models/HotelreservationModal.js +0 -119
  47. package/dist/models/HotelreservationModel.d.ts +0 -44
  48. package/dist/models/HotelreservationModel.js +0 -171
  49. package/src/models/HotelApprovalModel.ts +0 -79
  50. package/src/models/HotelAttachedModel.ts +0 -54
  51. package/src/models/HotelChatModel.ts +0 -55
  52. package/src/models/HotelWorkFlowModel.ts +0 -42
  53. package/src/models/HotelreservationModel.ts +0 -159
  54. package/src/models/ITApprovalSettings.ts +0 -29
  55. package/src/models/ITServicesTypesMuscatModel.ts +0 -22
  56. package/src/models/ITServicesTypesSalalahModel.ts +0 -22
  57. package/src/models/Workflows.ts +0 -40
@@ -1,7 +1,10 @@
1
1
  import { BaseModel } from './BaseModel';
2
+ import { TaskType } from "./WorkflowTaskNames";
3
+ import { CategoryType } from "./WorkflowTaskNames";
2
4
  export declare class WorkflowTask extends BaseModel {
3
5
  task_id: number;
4
6
  name: string;
5
- task_type: string;
6
- constructor(name: string, task_id?: number, task_type?: string);
7
+ task_type: TaskType;
8
+ category: CategoryType;
9
+ constructor(name: string, task_id?: number, task_type?: TaskType, category?: CategoryType);
7
10
  }
@@ -12,12 +12,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.WorkflowTask = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
+ const WorkflowTaskNames_1 = require("./WorkflowTaskNames");
16
+ const WorkflowTaskNames_2 = require("./WorkflowTaskNames");
17
+ // export enum TaskNameType {
18
+ // SIMPLE = 'SIMPLE',
19
+ // HUMAN = 'HUMAN'
20
+ // }
21
+ // export enum CategoryNameType {
22
+ // CREATE = 'CREATE',
23
+ // APPROVAL = 'APPROVAL',
24
+ // NOTIFICATION = 'NOTIFICATION'
25
+ // }
15
26
  let WorkflowTask = class WorkflowTask extends BaseModel_1.BaseModel {
16
- constructor(name, task_id, task_type) {
27
+ constructor(name, task_id, task_type, category) {
17
28
  super();
18
29
  this.name = name;
19
30
  this.task_id = task_id || 0;
20
- this.task_type = task_type || '';
31
+ this.task_type = task_type || WorkflowTaskNames_1.TaskType.SIMPLE;
32
+ this.category = category || WorkflowTaskNames_2.CategoryType.CREATE;
21
33
  }
22
34
  };
23
35
  exports.WorkflowTask = WorkflowTask;
@@ -30,10 +42,22 @@ __decorate([
30
42
  __metadata("design:type", String)
31
43
  ], WorkflowTask.prototype, "name", void 0);
32
44
  __decorate([
33
- (0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
45
+ (0, typeorm_1.Column)({
46
+ type: 'enum',
47
+ enum: WorkflowTaskNames_1.TaskType,
48
+ nullable: true
49
+ }),
34
50
  __metadata("design:type", String)
35
51
  ], WorkflowTask.prototype, "task_type", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({
54
+ type: 'enum',
55
+ enum: WorkflowTaskNames_2.CategoryType,
56
+ nullable: true
57
+ }),
58
+ __metadata("design:type", String)
59
+ ], WorkflowTask.prototype, "category", void 0);
36
60
  exports.WorkflowTask = WorkflowTask = __decorate([
37
61
  (0, typeorm_1.Entity)({ name: 'workflow_tasks' }),
38
- __metadata("design:paramtypes", [String, Number, String])
62
+ __metadata("design:paramtypes", [String, Number, String, String])
39
63
  ], WorkflowTask);
@@ -1,8 +1,17 @@
1
1
  import { BaseModel } from './BaseModel';
2
+ export declare enum TaskType {
3
+ SIMPLE = "SIMPLE",
4
+ HUMAN = "HUMAN"
5
+ }
6
+ export declare enum CategoryType {
7
+ CREATE = "CREATE",
8
+ APPROVAL = "APPROVAL",
9
+ NOTIFICATION = "NOTIFICATION"
10
+ }
2
11
  export declare class WorkflowTaskNames extends BaseModel {
3
12
  name: string;
4
- task_id: number;
5
13
  description: string;
6
- task_type: string;
7
- constructor(name: string, task_id: number, description: string, task_type: string);
14
+ task_type: TaskType;
15
+ category: CategoryType;
16
+ constructor(name: string, description: string, task_type: TaskType, category: CategoryType);
8
17
  }
@@ -9,16 +9,27 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.WorkflowTaskNames = void 0;
12
+ exports.WorkflowTaskNames = exports.CategoryType = exports.TaskType = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
+ var TaskType;
16
+ (function (TaskType) {
17
+ TaskType["SIMPLE"] = "SIMPLE";
18
+ TaskType["HUMAN"] = "HUMAN";
19
+ })(TaskType || (exports.TaskType = TaskType = {}));
20
+ var CategoryType;
21
+ (function (CategoryType) {
22
+ CategoryType["CREATE"] = "CREATE";
23
+ CategoryType["APPROVAL"] = "APPROVAL";
24
+ CategoryType["NOTIFICATION"] = "NOTIFICATION";
25
+ })(CategoryType || (exports.CategoryType = CategoryType = {}));
15
26
  let WorkflowTaskNames = class WorkflowTaskNames extends BaseModel_1.BaseModel {
16
- constructor(name, task_id, description, task_type) {
27
+ constructor(name, description, task_type, category) {
17
28
  super();
18
29
  this.name = name;
19
- this.task_id = task_id;
20
30
  this.description = description;
21
31
  this.task_type = task_type;
32
+ this.category = category;
22
33
  }
23
34
  };
24
35
  exports.WorkflowTaskNames = WorkflowTaskNames;
@@ -26,19 +37,27 @@ __decorate([
26
37
  (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
27
38
  __metadata("design:type", String)
28
39
  ], WorkflowTaskNames.prototype, "name", void 0);
29
- __decorate([
30
- (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
31
- __metadata("design:type", Number)
32
- ], WorkflowTaskNames.prototype, "task_id", void 0);
33
40
  __decorate([
34
41
  (0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
35
42
  __metadata("design:type", String)
36
43
  ], WorkflowTaskNames.prototype, "description", void 0);
37
44
  __decorate([
38
- (0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
45
+ (0, typeorm_1.Column)({
46
+ type: 'enum',
47
+ enum: TaskType,
48
+ nullable: true
49
+ }),
39
50
  __metadata("design:type", String)
40
51
  ], WorkflowTaskNames.prototype, "task_type", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({
54
+ type: 'enum',
55
+ enum: CategoryType,
56
+ nullable: true
57
+ }),
58
+ __metadata("design:type", String)
59
+ ], WorkflowTaskNames.prototype, "category", void 0);
41
60
  exports.WorkflowTaskNames = WorkflowTaskNames = __decorate([
42
61
  (0, typeorm_1.Entity)({ name: 'workflow_task_names' }),
43
- __metadata("design:paramtypes", [String, Number, String, String])
62
+ __metadata("design:paramtypes", [String, String, String, String])
44
63
  ], WorkflowTaskNames);
@@ -0,0 +1,16 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum Rating {
3
+ ONE = 1,
4
+ TWO = 2,
5
+ THREE = 3,
6
+ FOUR = 4,
7
+ FIVE = 5
8
+ }
9
+ export declare class Feedback extends BaseModel {
10
+ comment: string;
11
+ rating: Rating;
12
+ category_Id: number;
13
+ sub_category_Id: number;
14
+ user_Id: number;
15
+ constructor(comment: string, rating: Rating, category_Id: number, sub_category_Id: number, user_Id: number);
16
+ }
@@ -0,0 +1,61 @@
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.Feedback = exports.Rating = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var Rating;
16
+ (function (Rating) {
17
+ Rating[Rating["ONE"] = 1] = "ONE";
18
+ Rating[Rating["TWO"] = 2] = "TWO";
19
+ Rating[Rating["THREE"] = 3] = "THREE";
20
+ Rating[Rating["FOUR"] = 4] = "FOUR";
21
+ Rating[Rating["FIVE"] = 5] = "FIVE";
22
+ })(Rating || (exports.Rating = Rating = {}));
23
+ let Feedback = class Feedback extends BaseModel_1.BaseModel {
24
+ constructor(comment, rating, category_Id, sub_category_Id, user_Id) {
25
+ super();
26
+ this.comment = comment,
27
+ this.rating = rating,
28
+ this.category_Id = category_Id,
29
+ this.sub_category_Id = sub_category_Id,
30
+ this.user_Id = user_Id;
31
+ }
32
+ };
33
+ exports.Feedback = Feedback;
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ nullable: true }),
36
+ __metadata("design:type", String)
37
+ ], Feedback.prototype, "comment", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({
40
+ type: "enum",
41
+ enum: Rating,
42
+ nullable: true,
43
+ }),
44
+ __metadata("design:type", Number)
45
+ ], Feedback.prototype, "rating", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({ nullable: true }),
48
+ __metadata("design:type", Number)
49
+ ], Feedback.prototype, "category_Id", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.Column)({ nullable: true }),
52
+ __metadata("design:type", Number)
53
+ ], Feedback.prototype, "sub_category_Id", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.Column)({ nullable: true }),
56
+ __metadata("design:type", Number)
57
+ ], Feedback.prototype, "user_Id", void 0);
58
+ exports.Feedback = Feedback = __decorate([
59
+ (0, typeorm_1.Entity)({ name: 'feedback' }),
60
+ __metadata("design:paramtypes", [String, Number, Number, Number, Number])
61
+ ], Feedback);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.0.33",
3
+ "version": "2.0.35",
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,11 +39,10 @@ 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'
43
- import { HotelApprovalDetails } from './models/HotelApprovalModel';
44
- import { HotelWorkFlow } from './models/HotelWorkFlowModel';
45
- import { HotelRequestChat } from './models/HotelChatModel';
46
- import { HotelRequestAttachment } from './models/HotelAttachedModel';
42
+ import { Feedback } from './models/feedbackModel';
43
+ import { PortalFeedback } from './models/PortalFeedbackModel';
44
+ import { VpnRequest } from './models/VpnRequestModel';
45
+
47
46
 
48
47
  export const AppDataSource = new DataSource({
49
48
  type: 'postgres',
@@ -58,12 +57,12 @@ export const AppDataSource = new DataSource({
58
57
  User,userSessions,
59
58
  Role,
60
59
  ITHelpDeskRequests,
61
- ITServicesTypesSalalah,
62
- ITServicesTypesMuscat,
60
+ // ITServicesTypesSalalah, // REMOVED - table no longer used
61
+ // ITServicesTypesMuscat, // REMOVED - table no longer used
63
62
  ServiceType,
64
63
  CAAServices,
65
64
  CAASubServices,
66
- ITApprovalSettings,
65
+ // ITApprovalSettings, // REMOVED - table no longer used
67
66
  // Workflows,
68
67
  ItApprovalDetails,
69
68
  ItWorkFlow,
@@ -91,10 +90,8 @@ export const AppDataSource = new DataSource({
91
90
  LogisticsWorkFlow,
92
91
  ImportantLinks,
93
92
  DelegateSettings,
94
- HotelReservation,
95
- HotelApprovalDetails,
96
- HotelWorkFlow,
97
- HotelRequestChat,
98
- HotelRequestAttachment
93
+ Feedback,
94
+ PortalFeedback,
95
+ VpnRequest
99
96
  ],
100
97
  });
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,8 +35,6 @@ 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';
39
- export * from './models/HotelApprovalModel';
40
- export * from './models/HotelWorkFlowModel';
41
- export * from './models/HotelChatModel';
42
- export * from './models/HotelAttachedModel';
38
+ export * from './models/feedbackModel';
39
+ export * from './models/PortalFeedbackModel';
40
+ export * from './models/VpnRequestModel';
@@ -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;
@@ -4,6 +4,7 @@ import { BaseModel } from './BaseModel';
4
4
 
5
5
  export enum ApprovalStatus {
6
6
  PENDING = "Pending",
7
+ IN_PROGRESS = "In Progress",
7
8
  APPROVED = "Approved",
8
9
  REJECTED = "Rejected"
9
10
  }
@@ -20,7 +21,7 @@ export class ItApprovalDetails extends BaseModel {
20
21
  approver_user_id: number | null;
21
22
 
22
23
  @Column({ type: 'integer', nullable: false })
23
- approver_role_id: number;
24
+ approver_role_id: number | null;
24
25
 
25
26
  @Column({ type: 'integer', nullable: true })
26
27
  department_id: number | null;
@@ -40,7 +41,7 @@ export class ItApprovalDetails extends BaseModel {
40
41
  constructor(
41
42
  request_id: number,
42
43
  approver_user_id: number | null,
43
- approver_role_id: number,
44
+ approver_role_id: number | null,
44
45
  comment: string,
45
46
  approval_status: ApprovalStatus,
46
47
  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
 
@@ -48,13 +47,12 @@ export class LogisticsForeignVehicleRequests extends BaseModel {
48
47
  @Column({ type: 'int', nullable: false })
49
48
  number_of_passengers: number;
50
49
 
51
- @Column({
52
- type: "enum",
53
- enum: Foreign_Purpose_of_Travel,
54
- default: Foreign_Purpose_of_Travel.OTHER,
50
+ @Column({
51
+ type: 'varchar',
52
+ default: 'Other',
55
53
  nullable: false,
56
54
  })
57
- purpose_of_travel: Foreign_Purpose_of_Travel;
55
+ purpose_of_travel: string;
58
56
 
59
57
  @Column({
60
58
  type: "enum",
@@ -108,7 +106,7 @@ export class LogisticsForeignVehicleRequests extends BaseModel {
108
106
  sub_service_id: number,
109
107
  user_id: number,
110
108
  number_of_passengers: number,
111
- purpose_of_travel: Foreign_Purpose_of_Travel,
109
+ purpose_of_travel: string,
112
110
  vehicle_required_location: Foreign_Vehicle_Required_Location,
113
111
  contact_number: string,
114
112
  request_type: Foreign_Request_Type,
@@ -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
+
@@ -0,0 +1,135 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum VpnRequestType {
5
+ CAA_STAFF = "CAA_STAFF",
6
+ CONTRACTOR = "CONTRACTOR"
7
+ }
8
+
9
+ export enum VpnReasonForRequest {
10
+ REMOTE_WORK = "REMOTE_WORK",
11
+ ACCESS_INTERNAL_SYSTEMS = "ACCESS_INTERNAL_SYSTEMS",
12
+ THIRD_PARTY_VENDOR = "THIRD_PARTY_VENDOR",
13
+ PROJECT_SPECIFIC = "PROJECT_SPECIFIC",
14
+ RENEWAL = "RENEWAL"
15
+ }
16
+
17
+ export enum VpnSystemsAccess {
18
+ INTERNAL_DATABASES = "INTERNAL_DATABASES",
19
+ FILE_SERVERS = "FILE_SERVERS",
20
+ SHARED_SERVERS = "SHARED_SERVERS",
21
+ UFUQ = "UFUQ",
22
+ ERP = "ERP",
23
+ OTHERS = "OTHERS"
24
+ }
25
+
26
+ export enum VpnSourceIpType {
27
+ PRIVATE = "PRIVATE",
28
+ PUBLIC = "PUBLIC"
29
+ }
30
+
31
+ export enum VpnAccessType {
32
+ ONE_TIME = "ONE_TIME",
33
+ PERMANENT = "PERMANENT"
34
+ }
35
+
36
+ export enum VpnDeviceType {
37
+ CAA_LAPTOP = "CAA_LAPTOP",
38
+ PERSONAL_DEVICE = "PERSONAL_DEVICE",
39
+ MOBILE_DEVICE = "MOBILE_DEVICE"
40
+ }
41
+
42
+ export enum VpnRequestStatus {
43
+ PENDING = "PENDING",
44
+ ASSIGNED = "ASSIGNED",
45
+ IN_PROGRESS = "IN_PROGRESS",
46
+ COMPLETED = "COMPLETED",
47
+ APPROVED = "APPROVED",
48
+ REJECTED = "REJECTED"
49
+ }
50
+
51
+ @Entity({ name: "vpn_requests" })
52
+ export class VpnRequest extends BaseModel {
53
+ @Column({ type: "varchar", length: 255, nullable: false })
54
+ job_title: string;
55
+
56
+ @Column({ type: "integer", nullable: true })
57
+ req_user_department_id: number | null;
58
+
59
+ @Column({ type: "integer", nullable: true })
60
+ req_user_section_id: number | null;
61
+
62
+ @Column({ type: "integer", nullable: true })
63
+ req_user_position_id: number | null;
64
+
65
+ @Column({ type: "integer", nullable: true })
66
+ service_id: number | null;
67
+
68
+ @Column({ type: "integer", nullable: true })
69
+ sub_service_id: number | null;
70
+
71
+ @Column({ type: "integer", nullable: false })
72
+ user_id: number;
73
+
74
+ @Column({ type: "enum", enum: VpnRequestType, nullable: false })
75
+ request_for: VpnRequestType;
76
+
77
+ @Column({ type: "varchar", length: 255, nullable: false })
78
+ employee_identifier: string;
79
+
80
+ @Column({ type: "varchar", length: 255, nullable: false })
81
+ employee_email: string;
82
+
83
+ @Column({ type: "varchar", length: 50, nullable: false })
84
+ phone_number: string;
85
+
86
+ @Column({ type: "enum", enum: VpnReasonForRequest, nullable: false })
87
+ reason_for_request: VpnReasonForRequest;
88
+
89
+ @Column({ type: "text", nullable: true })
90
+ description: string | null;
91
+
92
+ @Column({ type: "text", array: true, nullable: false })
93
+ systems_to_access: VpnSystemsAccess[];
94
+
95
+ @Column({ type: "enum", enum: VpnSourceIpType, nullable: true })
96
+ source_ip_type: VpnSourceIpType | null;
97
+
98
+ @Column({ type: "varchar", length: 255, nullable: true })
99
+ source_ip_address: string | null;
100
+
101
+ @Column({ type: "varchar", length: 150, nullable: false })
102
+ country: string;
103
+
104
+ @Column({ type: "date", nullable: false })
105
+ start_date: Date;
106
+
107
+ @Column({ type: "date", nullable: true })
108
+ end_date: Date | null;
109
+
110
+ @Column({ type: "enum", enum: VpnAccessType, nullable: false })
111
+ access_type: VpnAccessType;
112
+
113
+ @Column({ type: "enum", enum: VpnDeviceType, nullable: false })
114
+ device_type: VpnDeviceType;
115
+
116
+ @Column({ type: "boolean", default: false, nullable: false })
117
+ acknowledgement: boolean;
118
+
119
+ @Column({ type: "enum", enum: VpnRequestStatus, default: VpnRequestStatus.PENDING, nullable: false })
120
+ status: VpnRequestStatus;
121
+
122
+ @Column({ type: "integer", nullable: true })
123
+ reviewer_user_id: number | null;
124
+
125
+ @Column({ type: "integer", nullable: true })
126
+ assigned_to_user_id: number | null;
127
+
128
+ @Column({ type: "timestamp", nullable: true })
129
+ assigned_at: Date | null;
130
+
131
+ @Column({ type: "varchar", length: 255, nullable: true })
132
+ workflow_execution_id: string | null;
133
+ }
134
+
135
+