@platform-modules/foreign-ministry 1.2.23 → 1.2.24
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/dist/data-source.js +11 -1
- package/dist/index.d.ts +6 -14
- package/dist/index.js +7 -28
- package/dist/models/EmployeeCardApprovalsModel.d.ts +31 -0
- package/dist/models/EmployeeCardApprovalsModel.js +100 -0
- package/dist/models/EmployeeCardAttachmentsModel.d.ts +17 -0
- package/dist/models/EmployeeCardAttachmentsModel.js +69 -0
- package/dist/models/EmployeeCardChatsModel.d.ts +19 -0
- package/dist/models/EmployeeCardChatsModel.js +79 -0
- package/dist/models/EmployeeCardRequestsModel.d.ts +40 -0
- package/dist/models/EmployeeCardRequestsModel.js +126 -0
- package/dist/models/EmployeeCardWorkFlowModel.d.ts +34 -0
- package/dist/models/EmployeeCardWorkFlowModel.js +103 -0
- package/package.json +1 -1
package/dist/data-source.js
CHANGED
|
@@ -125,6 +125,11 @@ const TelephoneDirectoryModel_1 = require("./models/TelephoneDirectoryModel");
|
|
|
125
125
|
const RoutingGroupsModel_1 = require("./models/RoutingGroupsModel");
|
|
126
126
|
const RoutingGroupUsersModel_1 = require("./models/RoutingGroupUsersModel");
|
|
127
127
|
const IssueTypesModel_1 = require("./models/IssueTypesModel");
|
|
128
|
+
const EmployeeCardRequestsModel_1 = require("./models/EmployeeCardRequestsModel");
|
|
129
|
+
const EmployeeCardApprovalsModel_1 = require("./models/EmployeeCardApprovalsModel");
|
|
130
|
+
const EmployeeCardAttachmentsModel_1 = require("./models/EmployeeCardAttachmentsModel");
|
|
131
|
+
const EmployeeCardChatsModel_1 = require("./models/EmployeeCardChatsModel");
|
|
132
|
+
const EmployeeCardWorkFlowModel_1 = require("./models/EmployeeCardWorkFlowModel");
|
|
128
133
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
129
134
|
type: 'postgres',
|
|
130
135
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -254,6 +259,11 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
254
259
|
TelephoneDirectoryModel_1.TelephoneDirectory,
|
|
255
260
|
RoutingGroupsModel_1.RoutingGroups,
|
|
256
261
|
IssueTypesModel_1.IssueTypes,
|
|
257
|
-
RoutingGroupUsersModel_1.RoutingGroupUsers
|
|
262
|
+
RoutingGroupUsersModel_1.RoutingGroupUsers,
|
|
263
|
+
EmployeeCardRequestsModel_1.EmployeeCardRequests,
|
|
264
|
+
EmployeeCardApprovalsModel_1.EmployeeCardApprovalDetails,
|
|
265
|
+
EmployeeCardAttachmentsModel_1.EmployeeCardAttachments,
|
|
266
|
+
EmployeeCardChatsModel_1.EmployeeCardChat,
|
|
267
|
+
EmployeeCardWorkFlowModel_1.EmployeeCardWorkFlow
|
|
258
268
|
],
|
|
259
269
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -162,17 +162,9 @@ export { TitleCategory } from './models/DiplomaticTitlesMasterModel';
|
|
|
162
162
|
export * from './models/CountryMasterModel';
|
|
163
163
|
export * from './models/NationalityMasterModel';
|
|
164
164
|
export * from './models/OfficeMasterModel';
|
|
165
|
-
export * from './models/
|
|
166
|
-
export
|
|
167
|
-
export * from './models/
|
|
168
|
-
export
|
|
169
|
-
export * from './models/
|
|
170
|
-
export
|
|
171
|
-
export * from './models/MissionTravelApprovalModel';
|
|
172
|
-
export { MissionTravelApprovalDetails, MissionTravelApprovalStatus } from './models/MissionTravelApprovalModel';
|
|
173
|
-
export * from './models/MissionTravelAttachmentModel';
|
|
174
|
-
export { MissionTravelRequestAttachment } from './models/MissionTravelAttachmentModel';
|
|
175
|
-
export * from './models/MissionTravelChatModel';
|
|
176
|
-
export { MissionTravelRequestChat } from './models/MissionTravelChatModel';
|
|
177
|
-
export * from './models/MissionTravelWorkflowModel';
|
|
178
|
-
export { MissionTravelWorkFlow } from './models/MissionTravelWorkflowModel';
|
|
165
|
+
export * from './models/RoutingGroupUsersModel';
|
|
166
|
+
export * from './models/EmployeeCardRequestsModel';
|
|
167
|
+
export * from './models/EmployeeCardApprovalsModel';
|
|
168
|
+
export * from './models/EmployeeCardWorkFlowModel';
|
|
169
|
+
export * from './models/EmployeeCardChatsModel';
|
|
170
|
+
export * from './models/EmployeeCardAttachmentsModel';
|
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.
|
|
17
|
+
exports.TitleCategory = exports.ProfileUpdateRequestStatus = exports.StayAfterHoursTransactionStatus = exports.StayAfterHoursTransaction = exports.StayAfterHoursBalance = exports.EarlyCheckoutTransactionStatus = exports.EarlyCheckoutTransaction = exports.EarlyCheckoutFrequency = exports.EarlyCheckoutConfiguration = exports.EarlyCheckoutBalance = exports.LeaveTransactionStatus = exports.LeaveTransaction = exports.LeaveConfigurationGrades = exports.enumFrequency = exports.LeaveConfiguration = void 0;
|
|
18
18
|
__exportStar(require("./models/user"), exports);
|
|
19
19
|
__exportStar(require("./models/role"), exports);
|
|
20
20
|
__exportStar(require("./models/user-sessions"), exports);
|
|
@@ -194,30 +194,9 @@ Object.defineProperty(exports, "TitleCategory", { enumerable: true, get: functio
|
|
|
194
194
|
__exportStar(require("./models/CountryMasterModel"), exports);
|
|
195
195
|
__exportStar(require("./models/NationalityMasterModel"), exports);
|
|
196
196
|
__exportStar(require("./models/OfficeMasterModel"), exports);
|
|
197
|
-
__exportStar(require("./models/
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
__exportStar(require("./models/MissionTravelPersonModel"), exports);
|
|
204
|
-
var MissionTravelPersonModel_1 = require("./models/MissionTravelPersonModel");
|
|
205
|
-
Object.defineProperty(exports, "MissionTravelPersons", { enumerable: true, get: function () { return MissionTravelPersonModel_1.MissionTravelPersons; } });
|
|
206
|
-
Object.defineProperty(exports, "TravelClass", { enumerable: true, get: function () { return MissionTravelPersonModel_1.TravelClass; } });
|
|
207
|
-
Object.defineProperty(exports, "AllowanceRatio", { enumerable: true, get: function () { return MissionTravelPersonModel_1.AllowanceRatio; } });
|
|
208
|
-
__exportStar(require("./models/MissionTravelCostModel"), exports);
|
|
209
|
-
var MissionTravelCostModel_1 = require("./models/MissionTravelCostModel");
|
|
210
|
-
Object.defineProperty(exports, "MissionTravelCosts", { enumerable: true, get: function () { return MissionTravelCostModel_1.MissionTravelCosts; } });
|
|
211
|
-
__exportStar(require("./models/MissionTravelApprovalModel"), exports);
|
|
212
|
-
var MissionTravelApprovalModel_1 = require("./models/MissionTravelApprovalModel");
|
|
213
|
-
Object.defineProperty(exports, "MissionTravelApprovalDetails", { enumerable: true, get: function () { return MissionTravelApprovalModel_1.MissionTravelApprovalDetails; } });
|
|
214
|
-
Object.defineProperty(exports, "MissionTravelApprovalStatus", { enumerable: true, get: function () { return MissionTravelApprovalModel_1.MissionTravelApprovalStatus; } });
|
|
215
|
-
__exportStar(require("./models/MissionTravelAttachmentModel"), exports);
|
|
216
|
-
var MissionTravelAttachmentModel_1 = require("./models/MissionTravelAttachmentModel");
|
|
217
|
-
Object.defineProperty(exports, "MissionTravelRequestAttachment", { enumerable: true, get: function () { return MissionTravelAttachmentModel_1.MissionTravelRequestAttachment; } });
|
|
218
|
-
__exportStar(require("./models/MissionTravelChatModel"), exports);
|
|
219
|
-
var MissionTravelChatModel_1 = require("./models/MissionTravelChatModel");
|
|
220
|
-
Object.defineProperty(exports, "MissionTravelRequestChat", { enumerable: true, get: function () { return MissionTravelChatModel_1.MissionTravelRequestChat; } });
|
|
221
|
-
__exportStar(require("./models/MissionTravelWorkflowModel"), exports);
|
|
222
|
-
var MissionTravelWorkflowModel_1 = require("./models/MissionTravelWorkflowModel");
|
|
223
|
-
Object.defineProperty(exports, "MissionTravelWorkFlow", { enumerable: true, get: function () { return MissionTravelWorkflowModel_1.MissionTravelWorkFlow; } });
|
|
197
|
+
__exportStar(require("./models/RoutingGroupUsersModel"), exports);
|
|
198
|
+
__exportStar(require("./models/EmployeeCardRequestsModel"), exports);
|
|
199
|
+
__exportStar(require("./models/EmployeeCardApprovalsModel"), exports);
|
|
200
|
+
__exportStar(require("./models/EmployeeCardWorkFlowModel"), exports);
|
|
201
|
+
__exportStar(require("./models/EmployeeCardChatsModel"), exports);
|
|
202
|
+
__exportStar(require("./models/EmployeeCardAttachmentsModel"), exports);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
/**
|
|
3
|
+
* Approval Status Enum
|
|
4
|
+
*/
|
|
5
|
+
export declare enum EmployeeCardApprovalStatus {
|
|
6
|
+
PENDING = "Pending",
|
|
7
|
+
APPROVED = "Approved",
|
|
8
|
+
REJECTED = "Rejected",
|
|
9
|
+
IN_PROGRESS = "In Progress",
|
|
10
|
+
CANCELLED = "Cancelled"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Employee Card Approval Details Table
|
|
14
|
+
* Stores approval information for each level of the workflow
|
|
15
|
+
* Supports workflow: Employee → Department Admin Office → US (if Special) → Security
|
|
16
|
+
*/
|
|
17
|
+
export declare class EmployeeCardApprovalDetails extends BaseModel {
|
|
18
|
+
employee_card_request_id: number;
|
|
19
|
+
level: number;
|
|
20
|
+
approver_user_id: number | null;
|
|
21
|
+
approver_role_id: number | null;
|
|
22
|
+
delegate_user_id: number | null;
|
|
23
|
+
approved_by: number | null;
|
|
24
|
+
department_id: number | null;
|
|
25
|
+
section_id: number | null;
|
|
26
|
+
comment: string | null;
|
|
27
|
+
approval_status: EmployeeCardApprovalStatus;
|
|
28
|
+
is_allowed: boolean;
|
|
29
|
+
access_type: string | null;
|
|
30
|
+
constructor(employee_card_request_id: number, level: number, approver_user_id: number | null, approver_role_id: number | null, delegate_user_id: number | null, approved_by: number | null, department_id: number | null, section_id: number | null, comment: string | null, approval_status: EmployeeCardApprovalStatus, is_allowed: boolean, access_type: string | null);
|
|
31
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
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.EmployeeCardApprovalDetails = exports.EmployeeCardApprovalStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
/**
|
|
16
|
+
* Approval Status Enum
|
|
17
|
+
*/
|
|
18
|
+
var EmployeeCardApprovalStatus;
|
|
19
|
+
(function (EmployeeCardApprovalStatus) {
|
|
20
|
+
EmployeeCardApprovalStatus["PENDING"] = "Pending";
|
|
21
|
+
EmployeeCardApprovalStatus["APPROVED"] = "Approved";
|
|
22
|
+
EmployeeCardApprovalStatus["REJECTED"] = "Rejected";
|
|
23
|
+
EmployeeCardApprovalStatus["IN_PROGRESS"] = "In Progress";
|
|
24
|
+
EmployeeCardApprovalStatus["CANCELLED"] = "Cancelled";
|
|
25
|
+
})(EmployeeCardApprovalStatus || (exports.EmployeeCardApprovalStatus = EmployeeCardApprovalStatus = {}));
|
|
26
|
+
/**
|
|
27
|
+
* Employee Card Approval Details Table
|
|
28
|
+
* Stores approval information for each level of the workflow
|
|
29
|
+
* Supports workflow: Employee → Department Admin Office → US (if Special) → Security
|
|
30
|
+
*/
|
|
31
|
+
let EmployeeCardApprovalDetails = class EmployeeCardApprovalDetails extends BaseModel_1.BaseModel {
|
|
32
|
+
constructor(employee_card_request_id, level, approver_user_id, approver_role_id, delegate_user_id, approved_by, department_id, section_id, comment, approval_status, is_allowed, access_type) {
|
|
33
|
+
super();
|
|
34
|
+
this.employee_card_request_id = employee_card_request_id;
|
|
35
|
+
this.level = level;
|
|
36
|
+
this.approver_user_id = approver_user_id;
|
|
37
|
+
this.approver_role_id = approver_role_id;
|
|
38
|
+
this.delegate_user_id = delegate_user_id;
|
|
39
|
+
this.approved_by = approved_by;
|
|
40
|
+
this.department_id = department_id;
|
|
41
|
+
this.section_id = section_id;
|
|
42
|
+
this.comment = comment;
|
|
43
|
+
this.approval_status = approval_status;
|
|
44
|
+
this.is_allowed = is_allowed;
|
|
45
|
+
this.access_type = access_type;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
exports.EmployeeCardApprovalDetails = EmployeeCardApprovalDetails;
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
51
|
+
__metadata("design:type", Number)
|
|
52
|
+
], EmployeeCardApprovalDetails.prototype, "employee_card_request_id", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], EmployeeCardApprovalDetails.prototype, "level", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], EmployeeCardApprovalDetails.prototype, "approver_user_id", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], EmployeeCardApprovalDetails.prototype, "approver_role_id", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], EmployeeCardApprovalDetails.prototype, "delegate_user_id", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
71
|
+
__metadata("design:type", Object)
|
|
72
|
+
], EmployeeCardApprovalDetails.prototype, "approved_by", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
75
|
+
__metadata("design:type", Object)
|
|
76
|
+
], EmployeeCardApprovalDetails.prototype, "department_id", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
79
|
+
__metadata("design:type", Object)
|
|
80
|
+
], EmployeeCardApprovalDetails.prototype, "section_id", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
83
|
+
__metadata("design:type", Object)
|
|
84
|
+
], EmployeeCardApprovalDetails.prototype, "comment", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: EmployeeCardApprovalStatus, default: EmployeeCardApprovalStatus.PENDING, nullable: false }),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], EmployeeCardApprovalDetails.prototype, "approval_status", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true, nullable: false }),
|
|
91
|
+
__metadata("design:type", Boolean)
|
|
92
|
+
], EmployeeCardApprovalDetails.prototype, "is_allowed", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
95
|
+
__metadata("design:type", Object)
|
|
96
|
+
], EmployeeCardApprovalDetails.prototype, "access_type", void 0);
|
|
97
|
+
exports.EmployeeCardApprovalDetails = EmployeeCardApprovalDetails = __decorate([
|
|
98
|
+
(0, typeorm_1.Entity)({ name: 'employee_card_approvals' }),
|
|
99
|
+
__metadata("design:paramtypes", [Number, Number, Object, Object, Object, Object, Object, Object, Object, String, Boolean, Object])
|
|
100
|
+
], EmployeeCardApprovalDetails);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
/**
|
|
3
|
+
* Employee Card Attachments Table
|
|
4
|
+
* Stores file attachments related to employee card requests
|
|
5
|
+
* Can be attached during initial request or via chat
|
|
6
|
+
*/
|
|
7
|
+
export declare class EmployeeCardAttachments extends BaseModel {
|
|
8
|
+
employee_card_request_id: number;
|
|
9
|
+
attached_by_user_id: number;
|
|
10
|
+
file_url: string;
|
|
11
|
+
file_name: string | null;
|
|
12
|
+
file_type: string | null;
|
|
13
|
+
file_size: number | null;
|
|
14
|
+
chat_id: number | null;
|
|
15
|
+
description: string | null;
|
|
16
|
+
constructor(employee_card_request_id: number, attached_by_user_id: number, file_url: string, file_name: string | null, file_type: string | null, file_size: number | null, chat_id: number | null, description: string | null);
|
|
17
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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.EmployeeCardAttachments = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
/**
|
|
16
|
+
* Employee Card Attachments Table
|
|
17
|
+
* Stores file attachments related to employee card requests
|
|
18
|
+
* Can be attached during initial request or via chat
|
|
19
|
+
*/
|
|
20
|
+
let EmployeeCardAttachments = class EmployeeCardAttachments extends BaseModel_1.BaseModel {
|
|
21
|
+
constructor(employee_card_request_id, attached_by_user_id, file_url, file_name, file_type, file_size, chat_id, description) {
|
|
22
|
+
super();
|
|
23
|
+
this.employee_card_request_id = employee_card_request_id;
|
|
24
|
+
this.attached_by_user_id = attached_by_user_id;
|
|
25
|
+
this.file_url = file_url;
|
|
26
|
+
this.file_name = file_name;
|
|
27
|
+
this.file_type = file_type;
|
|
28
|
+
this.file_size = file_size;
|
|
29
|
+
this.chat_id = chat_id;
|
|
30
|
+
this.description = description;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.EmployeeCardAttachments = EmployeeCardAttachments;
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], EmployeeCardAttachments.prototype, "employee_card_request_id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], EmployeeCardAttachments.prototype, "attached_by_user_id", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], EmployeeCardAttachments.prototype, "file_url", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], EmployeeCardAttachments.prototype, "file_name", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], EmployeeCardAttachments.prototype, "file_type", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], EmployeeCardAttachments.prototype, "file_size", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], EmployeeCardAttachments.prototype, "chat_id", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], EmployeeCardAttachments.prototype, "description", void 0);
|
|
66
|
+
exports.EmployeeCardAttachments = EmployeeCardAttachments = __decorate([
|
|
67
|
+
(0, typeorm_1.Entity)({ name: 'employee_card_attachments' }),
|
|
68
|
+
__metadata("design:paramtypes", [Number, Number, String, Object, Object, Object, Object, Object])
|
|
69
|
+
], EmployeeCardAttachments);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
/**
|
|
3
|
+
* Employee Card Chat/Communication Table
|
|
4
|
+
* Stores messages/comments between the requester and approvers
|
|
5
|
+
* Allows discussion regarding the employee card request
|
|
6
|
+
*/
|
|
7
|
+
export declare class EmployeeCardChat extends BaseModel {
|
|
8
|
+
employee_card_request_id: number;
|
|
9
|
+
content: string;
|
|
10
|
+
sender_user_id: number;
|
|
11
|
+
service_id: number | null;
|
|
12
|
+
sub_service_id: number | null;
|
|
13
|
+
role_id: number | null;
|
|
14
|
+
status: string | null;
|
|
15
|
+
department_id: number | null;
|
|
16
|
+
section_id: number | null;
|
|
17
|
+
is_internal: boolean | null;
|
|
18
|
+
constructor(employee_card_request_id: number, content: string, sender_user_id: number, service_id: number | null, sub_service_id: number | null, role_id: number | null, status: string | null, department_id: number | null, section_id: number | null, is_internal: boolean | null);
|
|
19
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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.EmployeeCardChat = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
/**
|
|
16
|
+
* Employee Card Chat/Communication Table
|
|
17
|
+
* Stores messages/comments between the requester and approvers
|
|
18
|
+
* Allows discussion regarding the employee card request
|
|
19
|
+
*/
|
|
20
|
+
let EmployeeCardChat = class EmployeeCardChat extends BaseModel_1.BaseModel {
|
|
21
|
+
constructor(employee_card_request_id, content, sender_user_id, service_id, sub_service_id, role_id, status, department_id, section_id, is_internal) {
|
|
22
|
+
super();
|
|
23
|
+
this.employee_card_request_id = employee_card_request_id;
|
|
24
|
+
this.content = content;
|
|
25
|
+
this.sender_user_id = sender_user_id;
|
|
26
|
+
this.service_id = service_id;
|
|
27
|
+
this.sub_service_id = sub_service_id;
|
|
28
|
+
this.role_id = role_id;
|
|
29
|
+
this.status = status;
|
|
30
|
+
this.department_id = department_id;
|
|
31
|
+
this.section_id = section_id;
|
|
32
|
+
this.is_internal = is_internal;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.EmployeeCardChat = EmployeeCardChat;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], EmployeeCardChat.prototype, "employee_card_request_id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], EmployeeCardChat.prototype, "content", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], EmployeeCardChat.prototype, "sender_user_id", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], EmployeeCardChat.prototype, "service_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], EmployeeCardChat.prototype, "sub_service_id", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], EmployeeCardChat.prototype, "role_id", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], EmployeeCardChat.prototype, "status", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
|
+
], EmployeeCardChat.prototype, "department_id", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
70
|
+
__metadata("design:type", Object)
|
|
71
|
+
], EmployeeCardChat.prototype, "section_id", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false, nullable: true }),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], EmployeeCardChat.prototype, "is_internal", void 0);
|
|
76
|
+
exports.EmployeeCardChat = EmployeeCardChat = __decorate([
|
|
77
|
+
(0, typeorm_1.Entity)({ name: 'employee_card_chats' }),
|
|
78
|
+
__metadata("design:paramtypes", [Number, String, Number, Object, Object, Object, Object, Object, Object, Object])
|
|
79
|
+
], EmployeeCardChat);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
/**
|
|
3
|
+
* Employee Card Request Status Enum
|
|
4
|
+
*/
|
|
5
|
+
export declare enum EmployeeCardRequestStatus {
|
|
6
|
+
PENDING = "Pending",
|
|
7
|
+
APPROVED = "Approved",
|
|
8
|
+
REJECTED = "Rejected",
|
|
9
|
+
CANCELLED = "Cancelled"
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Access Type Enum - Normal or Special
|
|
13
|
+
*/
|
|
14
|
+
export declare enum AccessType {
|
|
15
|
+
NORMAL = "Normal",
|
|
16
|
+
SPECIAL = "Special"
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Main Employee Card Request Table (FM020)
|
|
20
|
+
* This table stores the primary employee card request data
|
|
21
|
+
*/
|
|
22
|
+
export declare class EmployeeCardRequests extends BaseModel {
|
|
23
|
+
user_id: number;
|
|
24
|
+
req_user_department_id: number | null;
|
|
25
|
+
req_user_section_id: number | null;
|
|
26
|
+
service_id: number | null;
|
|
27
|
+
sub_service_id: number | null;
|
|
28
|
+
status: EmployeeCardRequestStatus;
|
|
29
|
+
workflow_execution_id: string | null;
|
|
30
|
+
number: string | null;
|
|
31
|
+
name: string | null;
|
|
32
|
+
job_title: string | null;
|
|
33
|
+
reason_for_request: string | null;
|
|
34
|
+
date_of_joining: Date | null;
|
|
35
|
+
date_of_issue: Date | null;
|
|
36
|
+
access_type: AccessType;
|
|
37
|
+
photo_url: string | null;
|
|
38
|
+
photo_file_name: string | null;
|
|
39
|
+
constructor(user_id: number, req_user_department_id: number | null, req_user_section_id: number | null, service_id: number | null, sub_service_id: number | null, status: EmployeeCardRequestStatus, workflow_execution_id: string | null, number: string | null, name: string | null, job_title: string | null, reason_for_request: string | null, date_of_joining: Date | null, date_of_issue: Date | null, access_type: AccessType, photo_url: string | null, photo_file_name: string | null);
|
|
40
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
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.EmployeeCardRequests = exports.AccessType = exports.EmployeeCardRequestStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
/**
|
|
16
|
+
* Employee Card Request Status Enum
|
|
17
|
+
*/
|
|
18
|
+
var EmployeeCardRequestStatus;
|
|
19
|
+
(function (EmployeeCardRequestStatus) {
|
|
20
|
+
EmployeeCardRequestStatus["PENDING"] = "Pending";
|
|
21
|
+
EmployeeCardRequestStatus["APPROVED"] = "Approved";
|
|
22
|
+
EmployeeCardRequestStatus["REJECTED"] = "Rejected";
|
|
23
|
+
EmployeeCardRequestStatus["CANCELLED"] = "Cancelled";
|
|
24
|
+
})(EmployeeCardRequestStatus || (exports.EmployeeCardRequestStatus = EmployeeCardRequestStatus = {}));
|
|
25
|
+
/**
|
|
26
|
+
* Access Type Enum - Normal or Special
|
|
27
|
+
*/
|
|
28
|
+
var AccessType;
|
|
29
|
+
(function (AccessType) {
|
|
30
|
+
AccessType["NORMAL"] = "Normal";
|
|
31
|
+
AccessType["SPECIAL"] = "Special";
|
|
32
|
+
})(AccessType || (exports.AccessType = AccessType = {}));
|
|
33
|
+
/**
|
|
34
|
+
* Main Employee Card Request Table (FM020)
|
|
35
|
+
* This table stores the primary employee card request data
|
|
36
|
+
*/
|
|
37
|
+
let EmployeeCardRequests = class EmployeeCardRequests extends BaseModel_1.BaseModel {
|
|
38
|
+
constructor(user_id, req_user_department_id, req_user_section_id, service_id, sub_service_id, status, workflow_execution_id, number, name, job_title, reason_for_request, date_of_joining, date_of_issue, access_type, photo_url, photo_file_name) {
|
|
39
|
+
super();
|
|
40
|
+
this.user_id = user_id;
|
|
41
|
+
this.req_user_department_id = req_user_department_id;
|
|
42
|
+
this.req_user_section_id = req_user_section_id;
|
|
43
|
+
this.service_id = service_id;
|
|
44
|
+
this.sub_service_id = sub_service_id;
|
|
45
|
+
this.status = status;
|
|
46
|
+
this.workflow_execution_id = workflow_execution_id;
|
|
47
|
+
this.number = number;
|
|
48
|
+
this.name = name;
|
|
49
|
+
this.job_title = job_title;
|
|
50
|
+
this.reason_for_request = reason_for_request;
|
|
51
|
+
this.date_of_joining = date_of_joining;
|
|
52
|
+
this.date_of_issue = date_of_issue;
|
|
53
|
+
this.access_type = access_type;
|
|
54
|
+
this.photo_url = photo_url;
|
|
55
|
+
this.photo_file_name = photo_file_name;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
exports.EmployeeCardRequests = EmployeeCardRequests;
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
61
|
+
__metadata("design:type", Number)
|
|
62
|
+
], EmployeeCardRequests.prototype, "user_id", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], EmployeeCardRequests.prototype, "req_user_department_id", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
69
|
+
__metadata("design:type", Object)
|
|
70
|
+
], EmployeeCardRequests.prototype, "req_user_section_id", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], EmployeeCardRequests.prototype, "service_id", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], EmployeeCardRequests.prototype, "sub_service_id", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: EmployeeCardRequestStatus, default: EmployeeCardRequestStatus.PENDING, nullable: false }),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], EmployeeCardRequests.prototype, "status", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
85
|
+
__metadata("design:type", Object)
|
|
86
|
+
], EmployeeCardRequests.prototype, "workflow_execution_id", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
89
|
+
__metadata("design:type", Object)
|
|
90
|
+
], EmployeeCardRequests.prototype, "number", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
93
|
+
__metadata("design:type", Object)
|
|
94
|
+
], EmployeeCardRequests.prototype, "name", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
97
|
+
__metadata("design:type", Object)
|
|
98
|
+
], EmployeeCardRequests.prototype, "job_title", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
101
|
+
__metadata("design:type", Object)
|
|
102
|
+
], EmployeeCardRequests.prototype, "reason_for_request", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
105
|
+
__metadata("design:type", Object)
|
|
106
|
+
], EmployeeCardRequests.prototype, "date_of_joining", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
109
|
+
__metadata("design:type", Object)
|
|
110
|
+
], EmployeeCardRequests.prototype, "date_of_issue", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: AccessType, default: AccessType.NORMAL, nullable: false }),
|
|
113
|
+
__metadata("design:type", String)
|
|
114
|
+
], EmployeeCardRequests.prototype, "access_type", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
117
|
+
__metadata("design:type", Object)
|
|
118
|
+
], EmployeeCardRequests.prototype, "photo_url", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
121
|
+
__metadata("design:type", Object)
|
|
122
|
+
], EmployeeCardRequests.prototype, "photo_file_name", void 0);
|
|
123
|
+
exports.EmployeeCardRequests = EmployeeCardRequests = __decorate([
|
|
124
|
+
(0, typeorm_1.Entity)({ name: 'employee_card_requests' }),
|
|
125
|
+
__metadata("design:paramtypes", [Number, Object, Object, Object, Object, String, Object, Object, Object, Object, Object, Object, Object, String, Object, Object])
|
|
126
|
+
], EmployeeCardRequests);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
/**
|
|
3
|
+
* Workflow Status Enum
|
|
4
|
+
*/
|
|
5
|
+
export declare enum EmployeeCardWorkFlowStatus {
|
|
6
|
+
COMPLETED = "Completed",
|
|
7
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
8
|
+
PENDING = "Pending",
|
|
9
|
+
IN_PROGRESS = "In Progress"
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Employee Card Workflow Table
|
|
13
|
+
* Tracks the progress of the request through different workflow stages
|
|
14
|
+
* Provides a timeline/audit trail of the approval process
|
|
15
|
+
*
|
|
16
|
+
* Workflow paths:
|
|
17
|
+
* - Normal: Employee → Department Admin Office → Security
|
|
18
|
+
* - Special: Employee → Department Admin Office → US → Security
|
|
19
|
+
*/
|
|
20
|
+
export declare class EmployeeCardWorkFlow extends BaseModel {
|
|
21
|
+
employee_card_request_id: number;
|
|
22
|
+
employee_card_approval_details_id: number;
|
|
23
|
+
content: string;
|
|
24
|
+
status: EmployeeCardWorkFlowStatus;
|
|
25
|
+
user_id: number | null;
|
|
26
|
+
role_id: number | null;
|
|
27
|
+
department_id: number | null;
|
|
28
|
+
section_id: number | null;
|
|
29
|
+
level: number;
|
|
30
|
+
access_type: string | null;
|
|
31
|
+
action_taken: string | null;
|
|
32
|
+
action_date: Date | null;
|
|
33
|
+
constructor(employee_card_request_id: number, employee_card_approval_details_id: number, content: string, status: EmployeeCardWorkFlowStatus, user_id: number | null, role_id: number | null, department_id: number | null, section_id: number | null, level: number, access_type: string | null, action_taken: string | null, action_date: Date | null);
|
|
34
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
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.EmployeeCardWorkFlow = exports.EmployeeCardWorkFlowStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
/**
|
|
16
|
+
* Workflow Status Enum
|
|
17
|
+
*/
|
|
18
|
+
var EmployeeCardWorkFlowStatus;
|
|
19
|
+
(function (EmployeeCardWorkFlowStatus) {
|
|
20
|
+
EmployeeCardWorkFlowStatus["COMPLETED"] = "Completed";
|
|
21
|
+
EmployeeCardWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
22
|
+
EmployeeCardWorkFlowStatus["PENDING"] = "Pending";
|
|
23
|
+
EmployeeCardWorkFlowStatus["IN_PROGRESS"] = "In Progress";
|
|
24
|
+
})(EmployeeCardWorkFlowStatus || (exports.EmployeeCardWorkFlowStatus = EmployeeCardWorkFlowStatus = {}));
|
|
25
|
+
/**
|
|
26
|
+
* Employee Card Workflow Table
|
|
27
|
+
* Tracks the progress of the request through different workflow stages
|
|
28
|
+
* Provides a timeline/audit trail of the approval process
|
|
29
|
+
*
|
|
30
|
+
* Workflow paths:
|
|
31
|
+
* - Normal: Employee → Department Admin Office → Security
|
|
32
|
+
* - Special: Employee → Department Admin Office → US → Security
|
|
33
|
+
*/
|
|
34
|
+
let EmployeeCardWorkFlow = class EmployeeCardWorkFlow extends BaseModel_1.BaseModel {
|
|
35
|
+
constructor(employee_card_request_id, employee_card_approval_details_id, content, status, user_id, role_id, department_id, section_id, level, access_type, action_taken, action_date) {
|
|
36
|
+
super();
|
|
37
|
+
this.employee_card_request_id = employee_card_request_id;
|
|
38
|
+
this.employee_card_approval_details_id = employee_card_approval_details_id;
|
|
39
|
+
this.content = content;
|
|
40
|
+
this.status = status;
|
|
41
|
+
this.user_id = user_id;
|
|
42
|
+
this.role_id = role_id;
|
|
43
|
+
this.department_id = department_id;
|
|
44
|
+
this.section_id = section_id;
|
|
45
|
+
this.level = level;
|
|
46
|
+
this.access_type = access_type;
|
|
47
|
+
this.action_taken = action_taken;
|
|
48
|
+
this.action_date = action_date;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.EmployeeCardWorkFlow = EmployeeCardWorkFlow;
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], EmployeeCardWorkFlow.prototype, "employee_card_request_id", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false, default: 0 }),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], EmployeeCardWorkFlow.prototype, "employee_card_approval_details_id", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], EmployeeCardWorkFlow.prototype, "content", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: EmployeeCardWorkFlowStatus, default: EmployeeCardWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], EmployeeCardWorkFlow.prototype, "status", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
70
|
+
__metadata("design:type", Object)
|
|
71
|
+
], EmployeeCardWorkFlow.prototype, "user_id", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], EmployeeCardWorkFlow.prototype, "role_id", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], EmployeeCardWorkFlow.prototype, "department_id", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], EmployeeCardWorkFlow.prototype, "section_id", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false, default: 1 }),
|
|
86
|
+
__metadata("design:type", Number)
|
|
87
|
+
], EmployeeCardWorkFlow.prototype, "level", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
90
|
+
__metadata("design:type", Object)
|
|
91
|
+
], EmployeeCardWorkFlow.prototype, "access_type", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
94
|
+
__metadata("design:type", Object)
|
|
95
|
+
], EmployeeCardWorkFlow.prototype, "action_taken", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
|
|
98
|
+
__metadata("design:type", Object)
|
|
99
|
+
], EmployeeCardWorkFlow.prototype, "action_date", void 0);
|
|
100
|
+
exports.EmployeeCardWorkFlow = EmployeeCardWorkFlow = __decorate([
|
|
101
|
+
(0, typeorm_1.Entity)({ name: 'employee_card_work_flows' }),
|
|
102
|
+
__metadata("design:paramtypes", [Number, Number, String, String, Object, Object, Object, Object, Number, Object, Object, Object])
|
|
103
|
+
], EmployeeCardWorkFlow);
|