@platform-modules/civil-aviation-authority 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env CHANGED
@@ -1,9 +1,11 @@
1
- DB_HOST=164.52.222.169
2
- DB_PORT=5432
3
- DB_USER=postgres_admin_user
4
- DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
1
+ DB_HOST=localhost
2
+ DB_PORT=5433
3
+ DB_USER=postgres
4
+ DB_PASS=123
5
5
  DB_NAME=CAA
6
6
 
7
- # TYPEORM_HOST =164.52.222.169
8
- # TYPEORM_USERNAME = postgres_admin_user
9
- # TYPEORM_PASSWORD = pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
7
+ # DB_HOST=164.52.222.169
8
+ # DB_PORT=5432
9
+ # DB_USER=postgres_admin_user
10
+ # DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
11
+ # DB_NAME=CAA
@@ -33,6 +33,11 @@ const roleRightsModel_1 = require("./models/roleRightsModel");
33
33
  const NotificationModel_1 = require("./models/NotificationModel");
34
34
  const ITRequestChatModel_1 = require("./models/ITRequestChatModel");
35
35
  const ITRequestAttachmentModel_1 = require("./models/ITRequestAttachmentModel");
36
+ const LogisticsModel_1 = require("./models/LogisticsModel");
37
+ const LogisticsApprovalModel_1 = require("./models/LogisticsApprovalModel");
38
+ const LogisticsChatModel_1 = require("./models/LogisticsChatModel");
39
+ const LogisticsAttachmentModel_1 = require("./models/LogisticsAttachmentModel");
40
+ const LogisticsWorkflowModel_1 = require("./models/LogisticsWorkflowModel");
36
41
  exports.AppDataSource = new typeorm_1.DataSource({
37
42
  type: 'postgres',
38
43
  host: process.env.DB_HOST || 'localhost',
@@ -69,6 +74,11 @@ exports.AppDataSource = new typeorm_1.DataSource({
69
74
  roleRightsModel_1.RoleRights,
70
75
  NotificationModel_1.Notification,
71
76
  ITRequestChatModel_1.ITRequestChat,
72
- ITRequestAttachmentModel_1.ITRequestAttachment
77
+ ITRequestAttachmentModel_1.ITRequestAttachment,
78
+ LogisticsModel_1.LogisticsRequests,
79
+ LogisticsApprovalModel_1.LogisticsApprovalDetails,
80
+ LogisticsChatModel_1.LogisticsRequestChat,
81
+ LogisticsAttachmentModel_1.LogisticsRequestAttachment,
82
+ LogisticsWorkflowModel_1.LogisticsWorkFlow
73
83
  ],
74
84
  });
package/dist/index.d.ts CHANGED
@@ -25,3 +25,8 @@ export * from './models/roleRightsModel';
25
25
  export * from './models/NotificationModel';
26
26
  export * from './models/ITRequestChatModel';
27
27
  export * from './models/ITRequestAttachmentModel';
28
+ export * from './models/LogisticsModel';
29
+ export * from './models/LogisticsApprovalModel';
30
+ export * from './models/LogisticsChatModel';
31
+ export * from './models/LogisticsAttachmentModel';
32
+ export * from './models/LogisticsWorkflowModel';
package/dist/index.js CHANGED
@@ -42,3 +42,8 @@ __exportStar(require("./models/roleRightsModel"), exports);
42
42
  __exportStar(require("./models/NotificationModel"), exports);
43
43
  __exportStar(require("./models/ITRequestChatModel"), exports);
44
44
  __exportStar(require("./models/ITRequestAttachmentModel"), exports);
45
+ __exportStar(require("./models/LogisticsModel"), exports);
46
+ __exportStar(require("./models/LogisticsApprovalModel"), exports);
47
+ __exportStar(require("./models/LogisticsChatModel"), exports);
48
+ __exportStar(require("./models/LogisticsAttachmentModel"), exports);
49
+ __exportStar(require("./models/LogisticsWorkflowModel"), exports);
@@ -0,0 +1,5 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class ITServicesTypes extends BaseModel {
3
+ name: string;
4
+ constructor(name: string);
5
+ }
@@ -0,0 +1,29 @@
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.ITServicesTypes = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let ITServicesTypes = class ITServicesTypes extends BaseModel_1.BaseModel {
16
+ constructor(name) {
17
+ super();
18
+ this.name = name;
19
+ }
20
+ };
21
+ exports.ITServicesTypes = ITServicesTypes;
22
+ __decorate([
23
+ (0, typeorm_1.Column)({ nullable: false }),
24
+ __metadata("design:type", String)
25
+ ], ITServicesTypes.prototype, "name", void 0);
26
+ exports.ITServicesTypes = ITServicesTypes = __decorate([
27
+ (0, typeorm_1.Entity)({ name: 'IT_Services_Types' }),
28
+ __metadata("design:paramtypes", [String])
29
+ ], ITServicesTypes);
@@ -0,0 +1,17 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum LogisticsApprovalStatus {
3
+ PENDING = "Pending",
4
+ APPROVED = "Approved",
5
+ REJECTED = "Rejected"
6
+ }
7
+ export declare class LogisticsApprovalDetails extends BaseModel {
8
+ request_id: number;
9
+ level: number;
10
+ approver_role_id: number;
11
+ department_id: number | null;
12
+ section_id: number | null;
13
+ approved_by: number | null;
14
+ comment: string;
15
+ approval_status: LogisticsApprovalStatus;
16
+ constructor(request_id: number, approver_role_id: number, comment: string, approval_status: LogisticsApprovalStatus, level: number, department_id?: number | null, section_id?: number | null, approved_by?: number | null);
17
+ }
@@ -0,0 +1,70 @@
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.LogisticsApprovalDetails = exports.LogisticsApprovalStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var LogisticsApprovalStatus;
16
+ (function (LogisticsApprovalStatus) {
17
+ LogisticsApprovalStatus["PENDING"] = "Pending";
18
+ LogisticsApprovalStatus["APPROVED"] = "Approved";
19
+ LogisticsApprovalStatus["REJECTED"] = "Rejected";
20
+ })(LogisticsApprovalStatus || (exports.LogisticsApprovalStatus = LogisticsApprovalStatus = {}));
21
+ let LogisticsApprovalDetails = class LogisticsApprovalDetails extends BaseModel_1.BaseModel {
22
+ constructor(request_id, approver_role_id, comment, approval_status, level, department_id, section_id, approved_by) {
23
+ super();
24
+ this.request_id = request_id;
25
+ this.approver_role_id = approver_role_id;
26
+ this.comment = comment;
27
+ this.approval_status = approval_status;
28
+ this.level = level;
29
+ this.department_id = department_id || null;
30
+ this.section_id = section_id || null;
31
+ this.approved_by = approved_by || null;
32
+ }
33
+ };
34
+ exports.LogisticsApprovalDetails = LogisticsApprovalDetails;
35
+ __decorate([
36
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
37
+ __metadata("design:type", Number)
38
+ ], LogisticsApprovalDetails.prototype, "request_id", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
41
+ __metadata("design:type", Number)
42
+ ], LogisticsApprovalDetails.prototype, "level", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
45
+ __metadata("design:type", Number)
46
+ ], LogisticsApprovalDetails.prototype, "approver_role_id", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
49
+ __metadata("design:type", Object)
50
+ ], LogisticsApprovalDetails.prototype, "department_id", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
53
+ __metadata("design:type", Object)
54
+ ], LogisticsApprovalDetails.prototype, "section_id", void 0);
55
+ __decorate([
56
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
57
+ __metadata("design:type", Object)
58
+ ], LogisticsApprovalDetails.prototype, "approved_by", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
61
+ __metadata("design:type", String)
62
+ ], LogisticsApprovalDetails.prototype, "comment", void 0);
63
+ __decorate([
64
+ (0, typeorm_1.Column)({ type: 'enum', enum: LogisticsApprovalStatus, default: LogisticsApprovalStatus.PENDING, nullable: false }),
65
+ __metadata("design:type", String)
66
+ ], LogisticsApprovalDetails.prototype, "approval_status", void 0);
67
+ exports.LogisticsApprovalDetails = LogisticsApprovalDetails = __decorate([
68
+ (0, typeorm_1.Entity)({ name: 'logistics_approvals' }),
69
+ __metadata("design:paramtypes", [Number, Number, String, String, Number, Object, Object, Object])
70
+ ], LogisticsApprovalDetails);
@@ -0,0 +1,9 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class LogisticsRequestAttachment extends BaseModel {
3
+ request_id: number;
4
+ file_url: string;
5
+ file_name: string;
6
+ file_type: string;
7
+ file_size: number | null;
8
+ constructor(request_id: number, file_url: string, file_name?: string, file_type?: string, file_size?: number);
9
+ }
@@ -0,0 +1,49 @@
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.LogisticsRequestAttachment = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let LogisticsRequestAttachment = class LogisticsRequestAttachment extends BaseModel_1.BaseModel {
16
+ constructor(request_id, file_url, file_name, file_type, file_size) {
17
+ super();
18
+ this.request_id = request_id;
19
+ this.file_url = file_url;
20
+ this.file_name = file_name || '';
21
+ this.file_type = file_type || '';
22
+ this.file_size = file_size || null;
23
+ }
24
+ };
25
+ exports.LogisticsRequestAttachment = LogisticsRequestAttachment;
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
28
+ __metadata("design:type", Number)
29
+ ], LogisticsRequestAttachment.prototype, "request_id", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
32
+ __metadata("design:type", String)
33
+ ], LogisticsRequestAttachment.prototype, "file_url", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
36
+ __metadata("design:type", String)
37
+ ], LogisticsRequestAttachment.prototype, "file_name", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
40
+ __metadata("design:type", String)
41
+ ], LogisticsRequestAttachment.prototype, "file_type", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
44
+ __metadata("design:type", Object)
45
+ ], LogisticsRequestAttachment.prototype, "file_size", void 0);
46
+ exports.LogisticsRequestAttachment = LogisticsRequestAttachment = __decorate([
47
+ (0, typeorm_1.Entity)({ name: 'logistics_request_attachments' }),
48
+ __metadata("design:paramtypes", [Number, String, String, String, Number])
49
+ ], LogisticsRequestAttachment);
@@ -0,0 +1,7 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class LogisticsRequestChat extends BaseModel {
3
+ request_id: number;
4
+ user_id: number;
5
+ message: string;
6
+ constructor(request_id: number, user_id: number, message: string);
7
+ }
@@ -0,0 +1,39 @@
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.LogisticsRequestChat = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let LogisticsRequestChat = class LogisticsRequestChat extends BaseModel_1.BaseModel {
16
+ constructor(request_id, user_id, message) {
17
+ super();
18
+ this.request_id = request_id;
19
+ this.user_id = user_id;
20
+ this.message = message;
21
+ }
22
+ };
23
+ exports.LogisticsRequestChat = LogisticsRequestChat;
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
26
+ __metadata("design:type", Number)
27
+ ], LogisticsRequestChat.prototype, "request_id", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
30
+ __metadata("design:type", Number)
31
+ ], LogisticsRequestChat.prototype, "user_id", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: 'text', nullable: false }),
34
+ __metadata("design:type", String)
35
+ ], LogisticsRequestChat.prototype, "message", void 0);
36
+ exports.LogisticsRequestChat = LogisticsRequestChat = __decorate([
37
+ (0, typeorm_1.Entity)({ name: 'logistics_request_chat' }),
38
+ __metadata("design:paramtypes", [Number, Number, String])
39
+ ], LogisticsRequestChat);
@@ -0,0 +1,52 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum Request_Type {
3
+ DAILY = "Daily",
4
+ EMERGENCY = "Emergency"
5
+ }
6
+ export declare enum Status {
7
+ PENDING = "Pending",
8
+ ASSIGNED = "Assigned",
9
+ IN_PROGRESS = "In Progress",
10
+ APPROVED = "Approved",
11
+ REJECTED = "Rejected"
12
+ }
13
+ export declare enum Vehicle_Required_For {
14
+ CONFERENCES = "Conferences",
15
+ CELEBRATIONS = "Celebrations and Official Meetings",
16
+ OTHERS = "Others"
17
+ }
18
+ export declare enum Vehicle_Required_Location {
19
+ INSIDE = "Inside Muscat",
20
+ OUTSIDE = "Outside Muscat"
21
+ }
22
+ export declare enum Purpose_of_Travel {
23
+ SITE = "Site Visit",
24
+ AIRPORT = "Airport Duty",
25
+ OFFICIAL = "Official Meeting",
26
+ OTHER = "Other"
27
+ }
28
+ export declare enum Type_of_Vehicle {
29
+ SEDAN = "Sedan",
30
+ SUV = "SUV"
31
+ }
32
+ export declare class LogisticsRequests extends BaseModel {
33
+ req_user_department_id: number | null;
34
+ req_user_section_id: number | null;
35
+ service_id: number;
36
+ sub_service_id: number;
37
+ user_id: number;
38
+ request_type: Request_Type;
39
+ vehicle_required_for: Vehicle_Required_For;
40
+ vehicle_required_location: Vehicle_Required_Location;
41
+ title: string;
42
+ purpose_of_travel: Purpose_of_Travel;
43
+ type_of_vehicle_required: Type_of_Vehicle;
44
+ date_of_travel: Date;
45
+ time_of_travel: string;
46
+ exp_duration_of_use_hrs: number;
47
+ exp_duration_of_use_days: number;
48
+ description: string;
49
+ status: Status;
50
+ workflow_execution_id: string | null;
51
+ constructor(req_user_department_id: number | null, req_user_section_id: number | null, service_id: number, sub_service_id: number, user_id: number, request_type: Request_Type, vehicle_required_for: Vehicle_Required_For, vehicle_required_location: Vehicle_Required_Location, title: string, purpose_of_travel: Purpose_of_Travel, type_of_vehicle_required: Type_of_Vehicle, date_of_travel: Date, time_of_travel: string, exp_duration_of_use_hrs: number, exp_duration_of_use_days: number, description: string, status: Status, workflow_execution_id?: string | null);
52
+ }
@@ -0,0 +1,180 @@
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.LogisticsRequests = exports.Type_of_Vehicle = exports.Purpose_of_Travel = exports.Vehicle_Required_Location = exports.Vehicle_Required_For = exports.Status = exports.Request_Type = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var Request_Type;
16
+ (function (Request_Type) {
17
+ Request_Type["DAILY"] = "Daily";
18
+ Request_Type["EMERGENCY"] = "Emergency";
19
+ })(Request_Type || (exports.Request_Type = Request_Type = {}));
20
+ var Status;
21
+ (function (Status) {
22
+ Status["PENDING"] = "Pending";
23
+ Status["ASSIGNED"] = "Assigned";
24
+ Status["IN_PROGRESS"] = "In Progress";
25
+ Status["APPROVED"] = "Approved";
26
+ Status["REJECTED"] = "Rejected";
27
+ })(Status || (exports.Status = Status = {}));
28
+ var Vehicle_Required_For;
29
+ (function (Vehicle_Required_For) {
30
+ Vehicle_Required_For["CONFERENCES"] = "Conferences";
31
+ Vehicle_Required_For["CELEBRATIONS"] = "Celebrations and Official Meetings";
32
+ Vehicle_Required_For["OTHERS"] = "Others";
33
+ })(Vehicle_Required_For || (exports.Vehicle_Required_For = Vehicle_Required_For = {}));
34
+ var Vehicle_Required_Location;
35
+ (function (Vehicle_Required_Location) {
36
+ Vehicle_Required_Location["INSIDE"] = "Inside Muscat";
37
+ Vehicle_Required_Location["OUTSIDE"] = "Outside Muscat";
38
+ })(Vehicle_Required_Location || (exports.Vehicle_Required_Location = Vehicle_Required_Location = {}));
39
+ var Purpose_of_Travel;
40
+ (function (Purpose_of_Travel) {
41
+ Purpose_of_Travel["SITE"] = "Site Visit";
42
+ Purpose_of_Travel["AIRPORT"] = "Airport Duty";
43
+ Purpose_of_Travel["OFFICIAL"] = "Official Meeting";
44
+ Purpose_of_Travel["OTHER"] = "Other";
45
+ })(Purpose_of_Travel || (exports.Purpose_of_Travel = Purpose_of_Travel = {}));
46
+ var Type_of_Vehicle;
47
+ (function (Type_of_Vehicle) {
48
+ Type_of_Vehicle["SEDAN"] = "Sedan";
49
+ Type_of_Vehicle["SUV"] = "SUV";
50
+ })(Type_of_Vehicle || (exports.Type_of_Vehicle = Type_of_Vehicle = {}));
51
+ let LogisticsRequests = class LogisticsRequests extends BaseModel_1.BaseModel {
52
+ constructor(req_user_department_id, req_user_section_id, service_id, sub_service_id, user_id, request_type, vehicle_required_for, vehicle_required_location, title, purpose_of_travel, type_of_vehicle_required, date_of_travel, time_of_travel, exp_duration_of_use_hrs, exp_duration_of_use_days, description, status, workflow_execution_id) {
53
+ super();
54
+ this.req_user_department_id = req_user_department_id ?? null;
55
+ this.req_user_section_id = req_user_section_id ?? null;
56
+ this.service_id = service_id;
57
+ this.sub_service_id = sub_service_id;
58
+ this.user_id = user_id;
59
+ this.request_type = request_type;
60
+ this.vehicle_required_for = vehicle_required_for;
61
+ this.vehicle_required_location = vehicle_required_location;
62
+ this.title = title;
63
+ this.purpose_of_travel = purpose_of_travel;
64
+ this.type_of_vehicle_required = type_of_vehicle_required;
65
+ this.date_of_travel = date_of_travel;
66
+ this.time_of_travel = time_of_travel;
67
+ this.exp_duration_of_use_hrs = exp_duration_of_use_hrs;
68
+ this.exp_duration_of_use_days = exp_duration_of_use_days;
69
+ this.description = description;
70
+ this.status = status;
71
+ this.workflow_execution_id = workflow_execution_id ?? null;
72
+ }
73
+ };
74
+ exports.LogisticsRequests = LogisticsRequests;
75
+ __decorate([
76
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
77
+ __metadata("design:type", Object)
78
+ ], LogisticsRequests.prototype, "req_user_department_id", void 0);
79
+ __decorate([
80
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
81
+ __metadata("design:type", Object)
82
+ ], LogisticsRequests.prototype, "req_user_section_id", void 0);
83
+ __decorate([
84
+ (0, typeorm_1.Column)({ nullable: true }),
85
+ __metadata("design:type", Number)
86
+ ], LogisticsRequests.prototype, "service_id", void 0);
87
+ __decorate([
88
+ (0, typeorm_1.Column)({ nullable: true }),
89
+ __metadata("design:type", Number)
90
+ ], LogisticsRequests.prototype, "sub_service_id", void 0);
91
+ __decorate([
92
+ (0, typeorm_1.Column)({ nullable: false }),
93
+ __metadata("design:type", Number)
94
+ ], LogisticsRequests.prototype, "user_id", void 0);
95
+ __decorate([
96
+ (0, typeorm_1.Column)({
97
+ type: "enum",
98
+ enum: Request_Type,
99
+ default: Request_Type.DAILY,
100
+ nullable: false,
101
+ }),
102
+ __metadata("design:type", String)
103
+ ], LogisticsRequests.prototype, "request_type", void 0);
104
+ __decorate([
105
+ (0, typeorm_1.Column)({
106
+ type: "enum",
107
+ enum: Vehicle_Required_For,
108
+ default: Vehicle_Required_For.OTHERS,
109
+ nullable: false,
110
+ }),
111
+ __metadata("design:type", String)
112
+ ], LogisticsRequests.prototype, "vehicle_required_for", void 0);
113
+ __decorate([
114
+ (0, typeorm_1.Column)({
115
+ type: "enum",
116
+ enum: Vehicle_Required_Location,
117
+ default: Vehicle_Required_Location.INSIDE,
118
+ nullable: false,
119
+ }),
120
+ __metadata("design:type", String)
121
+ ], LogisticsRequests.prototype, "vehicle_required_location", void 0);
122
+ __decorate([
123
+ (0, typeorm_1.Column)({ nullable: false }),
124
+ __metadata("design:type", String)
125
+ ], LogisticsRequests.prototype, "title", void 0);
126
+ __decorate([
127
+ (0, typeorm_1.Column)({
128
+ type: "enum",
129
+ enum: Purpose_of_Travel,
130
+ default: Purpose_of_Travel.OTHER,
131
+ nullable: false,
132
+ }),
133
+ __metadata("design:type", String)
134
+ ], LogisticsRequests.prototype, "purpose_of_travel", void 0);
135
+ __decorate([
136
+ (0, typeorm_1.Column)({
137
+ type: "enum",
138
+ enum: Type_of_Vehicle,
139
+ default: Type_of_Vehicle.SEDAN,
140
+ nullable: false,
141
+ }),
142
+ __metadata("design:type", String)
143
+ ], LogisticsRequests.prototype, "type_of_vehicle_required", void 0);
144
+ __decorate([
145
+ (0, typeorm_1.Column)({ type: "date", nullable: false }),
146
+ __metadata("design:type", Date)
147
+ ], LogisticsRequests.prototype, "date_of_travel", void 0);
148
+ __decorate([
149
+ (0, typeorm_1.Column)({ type: "time", nullable: true }),
150
+ __metadata("design:type", String)
151
+ ], LogisticsRequests.prototype, "time_of_travel", void 0);
152
+ __decorate([
153
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
154
+ __metadata("design:type", Number)
155
+ ], LogisticsRequests.prototype, "exp_duration_of_use_hrs", void 0);
156
+ __decorate([
157
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
158
+ __metadata("design:type", Number)
159
+ ], LogisticsRequests.prototype, "exp_duration_of_use_days", void 0);
160
+ __decorate([
161
+ (0, typeorm_1.Column)({ nullable: false }),
162
+ __metadata("design:type", String)
163
+ ], LogisticsRequests.prototype, "description", void 0);
164
+ __decorate([
165
+ (0, typeorm_1.Column)({
166
+ type: "enum",
167
+ enum: Status,
168
+ default: Status.PENDING,
169
+ nullable: false,
170
+ }),
171
+ __metadata("design:type", String)
172
+ ], LogisticsRequests.prototype, "status", void 0);
173
+ __decorate([
174
+ (0, typeorm_1.Column)({ type: "varchar", nullable: true }),
175
+ __metadata("design:type", Object)
176
+ ], LogisticsRequests.prototype, "workflow_execution_id", void 0);
177
+ exports.LogisticsRequests = LogisticsRequests = __decorate([
178
+ (0, typeorm_1.Entity)({ name: 'logistics_requests' }),
179
+ __metadata("design:paramtypes", [Object, Object, Number, Number, Number, String, String, String, String, String, String, Date, String, Number, Number, String, String, Object])
180
+ ], LogisticsRequests);
@@ -0,0 +1,12 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum LogisticsWorkFlowStatus {
3
+ COMPLETED = "Completed",
4
+ NOT_YET_STARTED = "Not Yet Started",
5
+ PENDING = "Pending"
6
+ }
7
+ export declare class LogisticsWorkFlow extends BaseModel {
8
+ request_id: number;
9
+ content: string;
10
+ status: LogisticsWorkFlowStatus;
11
+ constructor(request_id: number, content: string, status: LogisticsWorkFlowStatus);
12
+ }
@@ -0,0 +1,46 @@
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.LogisticsWorkFlow = exports.LogisticsWorkFlowStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var LogisticsWorkFlowStatus;
16
+ (function (LogisticsWorkFlowStatus) {
17
+ LogisticsWorkFlowStatus["COMPLETED"] = "Completed";
18
+ LogisticsWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
19
+ LogisticsWorkFlowStatus["PENDING"] = "Pending";
20
+ })(LogisticsWorkFlowStatus || (exports.LogisticsWorkFlowStatus = LogisticsWorkFlowStatus = {}));
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
+ let LogisticsWorkFlow = class LogisticsWorkFlow extends BaseModel_1.BaseModel {
23
+ constructor(request_id, content, status) {
24
+ super();
25
+ this.request_id = request_id;
26
+ this.content = content;
27
+ this.status = status;
28
+ }
29
+ };
30
+ exports.LogisticsWorkFlow = LogisticsWorkFlow;
31
+ __decorate([
32
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
33
+ __metadata("design:type", Number)
34
+ ], LogisticsWorkFlow.prototype, "request_id", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
37
+ __metadata("design:type", String)
38
+ ], LogisticsWorkFlow.prototype, "content", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({ type: 'enum', enum: LogisticsWorkFlowStatus, default: LogisticsWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
41
+ __metadata("design:type", String)
42
+ ], LogisticsWorkFlow.prototype, "status", void 0);
43
+ exports.LogisticsWorkFlow = LogisticsWorkFlow = __decorate([
44
+ (0, typeorm_1.Entity)({ name: 'logistics_workflows' }),
45
+ __metadata("design:paramtypes", [Number, String, String])
46
+ ], LogisticsWorkFlow);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {