@platform-modules/civil-aviation-authority 2.2.321 → 2.2.322

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.
@@ -86,6 +86,7 @@ const TrainingWorkflowModel_1 = require("./models/TrainingWorkflowModel");
86
86
  const TrainingApprovalModel_1 = require("./models/TrainingApprovalModel");
87
87
  const TrainingChatModel_1 = require("./models/TrainingChatModel");
88
88
  const TrainingAttachmentModel_1 = require("./models/TrainingAttachmentModel");
89
+ const SecondmentRequestModel_1 = require("./models/SecondmentRequestModel");
89
90
  exports.AppDataSource = new typeorm_1.DataSource({
90
91
  type: 'postgres',
91
92
  host: process.env.DB_HOST || 'localhost',
@@ -175,6 +176,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
175
176
  TrainingWorkflowModel_1.TrainingWorkFlow,
176
177
  TrainingApprovalModel_1.TrainingApprovalDetails,
177
178
  TrainingChatModel_1.TrainingRequestChat,
178
- TrainingAttachmentModel_1.TrainingRequestAttachment
179
+ TrainingAttachmentModel_1.TrainingRequestAttachment,
180
+ SecondmentRequestModel_1.SecondmentRequest
179
181
  ],
180
182
  });
package/dist/index.d.ts CHANGED
@@ -88,3 +88,5 @@ export { TrainingWorkFlowStatus } from './models/TrainingWorkflowModel';
88
88
  export { TrainingRequestAttachment } from './models/TrainingAttachmentModel';
89
89
  export { TrainingRequestChat } from './models/TrainingChatModel';
90
90
  export { TrainingMessageType } from './models/TrainingChatModel';
91
+ export * from './models/SecondmentRequestModel';
92
+ export { SecondmentRequestStatus } from './models/SecondmentRequestModel';
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.TrainingMessageType = exports.TrainingRequestChat = exports.TrainingRequestAttachment = exports.TrainingWorkFlowStatus = exports.TrainingApprovalStatus = exports.TrainingRequestStatus = exports.HrServiceChatStatus = exports.HrServiceMessageType = exports.HrServiceRequestChat = exports.HrServiceRequestAttachment = exports.HrServiceWorkFlowStatus = exports.HrServiceApprovalStatus = exports.HrServiceRequestStatus = void 0;
17
+ exports.SecondmentRequestStatus = exports.TrainingMessageType = exports.TrainingRequestChat = exports.TrainingRequestAttachment = exports.TrainingWorkFlowStatus = exports.TrainingApprovalStatus = exports.TrainingRequestStatus = exports.HrServiceChatStatus = exports.HrServiceMessageType = exports.HrServiceRequestChat = exports.HrServiceRequestAttachment = exports.HrServiceWorkFlowStatus = exports.HrServiceApprovalStatus = exports.HrServiceRequestStatus = void 0;
18
18
  __exportStar(require("./models/user"), exports);
19
19
  __exportStar(require("./models/role"), exports);
20
20
  __exportStar(require("./models/user-sessions"), exports);
@@ -122,3 +122,6 @@ var TrainingChatModel_1 = require("./models/TrainingChatModel");
122
122
  Object.defineProperty(exports, "TrainingRequestChat", { enumerable: true, get: function () { return TrainingChatModel_1.TrainingRequestChat; } });
123
123
  var TrainingChatModel_2 = require("./models/TrainingChatModel");
124
124
  Object.defineProperty(exports, "TrainingMessageType", { enumerable: true, get: function () { return TrainingChatModel_2.TrainingMessageType; } });
125
+ __exportStar(require("./models/SecondmentRequestModel"), exports);
126
+ var SecondmentRequestModel_1 = require("./models/SecondmentRequestModel");
127
+ Object.defineProperty(exports, "SecondmentRequestStatus", { enumerable: true, get: function () { return SecondmentRequestModel_1.SecondmentRequestStatus; } });
@@ -20,6 +20,7 @@ export declare class HrServiceApprovalDetails extends BaseModel {
20
20
  comment: string;
21
21
  approval_status: HrServiceApprovalStatus;
22
22
  is_manager: boolean;
23
+ is_president: boolean;
23
24
  is_allowed: boolean;
24
- constructor(request_id: number, approver_user_id: number | null, approver_role_id: number | null, comment: string, approval_status: HrServiceApprovalStatus, level: number, service_id?: number | null, sub_service_id?: number | null, department_id?: number | null, section_id?: number | null, delegate_user_id?: number | null, approved_by?: number | null, is_manager?: boolean, is_allowed?: boolean);
25
+ constructor(request_id: number, approver_user_id: number | null, approver_role_id: number | null, comment: string, approval_status: HrServiceApprovalStatus, level: number, service_id?: number | null, sub_service_id?: number | null, department_id?: number | null, section_id?: number | null, delegate_user_id?: number | null, approved_by?: number | null, is_manager?: boolean, is_president?: boolean, is_allowed?: boolean);
25
26
  }
@@ -21,7 +21,7 @@ var HrServiceApprovalStatus;
21
21
  HrServiceApprovalStatus["ASSIGNED"] = "Assigned";
22
22
  })(HrServiceApprovalStatus || (exports.HrServiceApprovalStatus = HrServiceApprovalStatus = {}));
23
23
  let HrServiceApprovalDetails = class HrServiceApprovalDetails extends BaseModel_1.BaseModel {
24
- constructor(request_id, approver_user_id, approver_role_id, comment, approval_status, level, service_id, sub_service_id, department_id, section_id, delegate_user_id, approved_by, is_manager, is_allowed) {
24
+ constructor(request_id, approver_user_id, approver_role_id, comment, approval_status, level, service_id, sub_service_id, department_id, section_id, delegate_user_id, approved_by, is_manager, is_president, is_allowed) {
25
25
  super();
26
26
  this.request_id = request_id;
27
27
  this.service_id = service_id || null;
@@ -36,6 +36,7 @@ let HrServiceApprovalDetails = class HrServiceApprovalDetails extends BaseModel_
36
36
  this.delegate_user_id = delegate_user_id || null;
37
37
  this.approved_by = approved_by || null;
38
38
  this.is_manager = is_manager ?? false;
39
+ this.is_president = is_president ?? false;
39
40
  this.is_allowed = is_allowed !== undefined ? is_allowed : true;
40
41
  }
41
42
  };
@@ -97,11 +98,15 @@ __decorate([
97
98
  (0, typeorm_1.Column)({ type: "boolean", default: null, nullable: true }),
98
99
  __metadata("design:type", Boolean)
99
100
  ], HrServiceApprovalDetails.prototype, "is_manager", void 0);
101
+ __decorate([
102
+ (0, typeorm_1.Column)({ type: "boolean", default: false, nullable: true }),
103
+ __metadata("design:type", Boolean)
104
+ ], HrServiceApprovalDetails.prototype, "is_president", void 0);
100
105
  __decorate([
101
106
  (0, typeorm_1.Column)({ type: "boolean", default: true, nullable: false }),
102
107
  __metadata("design:type", Boolean)
103
108
  ], HrServiceApprovalDetails.prototype, "is_allowed", void 0);
104
109
  exports.HrServiceApprovalDetails = HrServiceApprovalDetails = __decorate([
105
110
  (0, typeorm_1.Entity)({ name: "hr_service_approvals" }),
106
- __metadata("design:paramtypes", [Number, Object, Object, String, String, Number, Object, Object, Object, Object, Object, Object, Boolean, Boolean])
111
+ __metadata("design:paramtypes", [Number, Object, Object, String, String, Number, Object, Object, Object, Object, Object, Object, Boolean, Boolean, Boolean])
107
112
  ], HrServiceApprovalDetails);
@@ -0,0 +1,40 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare enum SecondmentRequestStatus {
3
+ PENDING = "Pending",
4
+ ASSIGNED = "Assigned",
5
+ IN_PROGRESS = "In Progress",
6
+ COMPLETED = "Completed",
7
+ APPROVED = "Approved",
8
+ REJECTED = "Rejected"
9
+ }
10
+ export declare class SecondmentRequest extends BaseModel {
11
+ req_user_department_id: number | null;
12
+ req_user_section_id: number | null;
13
+ req_user_position_id: number | null;
14
+ service_id: number | null;
15
+ sub_service_id: number | null;
16
+ user_id: number;
17
+ description: string | null;
18
+ status: SecondmentRequestStatus;
19
+ reviewer_user_id: number | null;
20
+ assigned_to_user_id: number | null;
21
+ assigned_at: Date | null;
22
+ workflow_execution_id: string | null;
23
+ assigned_employee_name: string;
24
+ civil_id_card_number: string | null;
25
+ employee_id: string;
26
+ original_department: string;
27
+ assigned_department: string;
28
+ start_date: Date;
29
+ end_date: Date;
30
+ phone_number: string;
31
+ reason_for_request: string;
32
+ is_replaced: boolean;
33
+ replacement_employee_name: string | null;
34
+ replacement_employee_id: string | null;
35
+ replacement_civil_id_card_number: string | null;
36
+ replacement_reason: string | null;
37
+ replaced_by_user_id: number | null;
38
+ replaced_at: Date | null;
39
+ constructor(user_id: number, status?: SecondmentRequestStatus, service_id?: number | null, sub_service_id?: number | null, req_user_department_id?: number | null, req_user_section_id?: number | null, req_user_position_id?: number | null, description?: string | null, reviewer_user_id?: number | null, assigned_to_user_id?: number | null, assigned_at?: Date | null, workflow_execution_id?: string | null, assigned_employee_name?: string, civil_id_card_number?: string | null, employee_id?: string, original_department?: string, assigned_department?: string, start_date?: Date, end_date?: Date, phone_number?: string, reason_for_request?: string, is_replaced?: boolean, replacement_employee_name?: string | null, replacement_employee_id?: string | null, replacement_civil_id_card_number?: string | null, replacement_reason?: string | null, replaced_by_user_id?: number | null, replaced_at?: Date | null);
40
+ }
@@ -0,0 +1,174 @@
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.SecondmentRequest = exports.SecondmentRequestStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var SecondmentRequestStatus;
16
+ (function (SecondmentRequestStatus) {
17
+ SecondmentRequestStatus["PENDING"] = "Pending";
18
+ SecondmentRequestStatus["ASSIGNED"] = "Assigned";
19
+ SecondmentRequestStatus["IN_PROGRESS"] = "In Progress";
20
+ SecondmentRequestStatus["COMPLETED"] = "Completed";
21
+ SecondmentRequestStatus["APPROVED"] = "Approved";
22
+ SecondmentRequestStatus["REJECTED"] = "Rejected";
23
+ })(SecondmentRequestStatus || (exports.SecondmentRequestStatus = SecondmentRequestStatus = {}));
24
+ let SecondmentRequest = class SecondmentRequest extends BaseModel_1.BaseModel {
25
+ constructor(user_id, status = SecondmentRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, description, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id, assigned_employee_name, civil_id_card_number, employee_id, original_department, assigned_department, start_date, end_date, phone_number, reason_for_request, is_replaced, replacement_employee_name, replacement_employee_id, replacement_civil_id_card_number, replacement_reason, replaced_by_user_id, replaced_at) {
26
+ super();
27
+ this.user_id = user_id;
28
+ this.status = status;
29
+ this.service_id = service_id || null;
30
+ this.sub_service_id = sub_service_id || null;
31
+ this.req_user_department_id = req_user_department_id || null;
32
+ this.req_user_section_id = req_user_section_id || null;
33
+ this.req_user_position_id = req_user_position_id || null;
34
+ this.description = description || null;
35
+ this.reviewer_user_id = reviewer_user_id || null;
36
+ this.assigned_to_user_id = assigned_to_user_id || null;
37
+ this.assigned_at = assigned_at || null;
38
+ this.workflow_execution_id = workflow_execution_id || null;
39
+ this.assigned_employee_name = assigned_employee_name || "";
40
+ this.civil_id_card_number = civil_id_card_number || null;
41
+ this.employee_id = employee_id || "";
42
+ this.original_department = original_department || "";
43
+ this.assigned_department = assigned_department || "";
44
+ this.start_date = start_date || new Date();
45
+ this.end_date = end_date || new Date();
46
+ this.phone_number = phone_number || "";
47
+ this.reason_for_request = reason_for_request || "";
48
+ this.is_replaced = is_replaced || false;
49
+ this.replacement_employee_name = replacement_employee_name || null;
50
+ this.replacement_employee_id = replacement_employee_id || null;
51
+ this.replacement_civil_id_card_number = replacement_civil_id_card_number || null;
52
+ this.replacement_reason = replacement_reason || null;
53
+ this.replaced_by_user_id = replaced_by_user_id || null;
54
+ this.replaced_at = replaced_at || null;
55
+ }
56
+ };
57
+ exports.SecondmentRequest = SecondmentRequest;
58
+ __decorate([
59
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
60
+ __metadata("design:type", Object)
61
+ ], SecondmentRequest.prototype, "req_user_department_id", void 0);
62
+ __decorate([
63
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
64
+ __metadata("design:type", Object)
65
+ ], SecondmentRequest.prototype, "req_user_section_id", void 0);
66
+ __decorate([
67
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
68
+ __metadata("design:type", Object)
69
+ ], SecondmentRequest.prototype, "req_user_position_id", void 0);
70
+ __decorate([
71
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
72
+ __metadata("design:type", Object)
73
+ ], SecondmentRequest.prototype, "service_id", void 0);
74
+ __decorate([
75
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
76
+ __metadata("design:type", Object)
77
+ ], SecondmentRequest.prototype, "sub_service_id", void 0);
78
+ __decorate([
79
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
80
+ __metadata("design:type", Number)
81
+ ], SecondmentRequest.prototype, "user_id", void 0);
82
+ __decorate([
83
+ (0, typeorm_1.Column)({ type: "text", nullable: true }),
84
+ __metadata("design:type", Object)
85
+ ], SecondmentRequest.prototype, "description", void 0);
86
+ __decorate([
87
+ (0, typeorm_1.Column)({ type: "enum", enum: SecondmentRequestStatus, default: SecondmentRequestStatus.PENDING, nullable: false }),
88
+ __metadata("design:type", String)
89
+ ], SecondmentRequest.prototype, "status", void 0);
90
+ __decorate([
91
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
92
+ __metadata("design:type", Object)
93
+ ], SecondmentRequest.prototype, "reviewer_user_id", void 0);
94
+ __decorate([
95
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
96
+ __metadata("design:type", Object)
97
+ ], SecondmentRequest.prototype, "assigned_to_user_id", void 0);
98
+ __decorate([
99
+ (0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
100
+ __metadata("design:type", Object)
101
+ ], SecondmentRequest.prototype, "assigned_at", void 0);
102
+ __decorate([
103
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
104
+ __metadata("design:type", Object)
105
+ ], SecondmentRequest.prototype, "workflow_execution_id", void 0);
106
+ __decorate([
107
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
108
+ __metadata("design:type", String)
109
+ ], SecondmentRequest.prototype, "assigned_employee_name", void 0);
110
+ __decorate([
111
+ (0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
112
+ __metadata("design:type", Object)
113
+ ], SecondmentRequest.prototype, "civil_id_card_number", void 0);
114
+ __decorate([
115
+ (0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: false }),
116
+ __metadata("design:type", String)
117
+ ], SecondmentRequest.prototype, "employee_id", void 0);
118
+ __decorate([
119
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
120
+ __metadata("design:type", String)
121
+ ], SecondmentRequest.prototype, "original_department", void 0);
122
+ __decorate([
123
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
124
+ __metadata("design:type", String)
125
+ ], SecondmentRequest.prototype, "assigned_department", void 0);
126
+ __decorate([
127
+ (0, typeorm_1.Column)({ type: "date", nullable: false }),
128
+ __metadata("design:type", Date)
129
+ ], SecondmentRequest.prototype, "start_date", void 0);
130
+ __decorate([
131
+ (0, typeorm_1.Column)({ type: "date", nullable: false }),
132
+ __metadata("design:type", Date)
133
+ ], SecondmentRequest.prototype, "end_date", void 0);
134
+ __decorate([
135
+ (0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: false }),
136
+ __metadata("design:type", String)
137
+ ], SecondmentRequest.prototype, "phone_number", void 0);
138
+ __decorate([
139
+ (0, typeorm_1.Column)({ type: "text", nullable: false }),
140
+ __metadata("design:type", String)
141
+ ], SecondmentRequest.prototype, "reason_for_request", void 0);
142
+ __decorate([
143
+ (0, typeorm_1.Column)({ type: "boolean", default: false, nullable: false }),
144
+ __metadata("design:type", Boolean)
145
+ ], SecondmentRequest.prototype, "is_replaced", void 0);
146
+ __decorate([
147
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
148
+ __metadata("design:type", Object)
149
+ ], SecondmentRequest.prototype, "replacement_employee_name", void 0);
150
+ __decorate([
151
+ (0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
152
+ __metadata("design:type", Object)
153
+ ], SecondmentRequest.prototype, "replacement_employee_id", void 0);
154
+ __decorate([
155
+ (0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
156
+ __metadata("design:type", Object)
157
+ ], SecondmentRequest.prototype, "replacement_civil_id_card_number", void 0);
158
+ __decorate([
159
+ (0, typeorm_1.Column)({ type: "text", nullable: true }),
160
+ __metadata("design:type", Object)
161
+ ], SecondmentRequest.prototype, "replacement_reason", void 0);
162
+ __decorate([
163
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
164
+ __metadata("design:type", Object)
165
+ ], SecondmentRequest.prototype, "replaced_by_user_id", void 0);
166
+ __decorate([
167
+ (0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
168
+ __metadata("design:type", Object)
169
+ ], SecondmentRequest.prototype, "replaced_at", void 0);
170
+ exports.SecondmentRequest = SecondmentRequest = __decorate([
171
+ (0, typeorm_1.Entity)({ name: "secondment_requests" }),
172
+ __metadata("design:paramtypes", [Number, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, String, Object, String, String, String, Date,
173
+ Date, String, String, Boolean, Object, Object, Object, Object, Object, Object])
174
+ ], SecondmentRequest);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.2.321",
3
+ "version": "2.2.322",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {