@platform-modules/foreign-ministry 1.0.90 → 1.0.92
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 +7 -1
- package/dist/data-source.js +1 -27
- package/dist/index.d.ts +0 -13
- package/dist/index.js +0 -13
- package/dist/models/LeaveApprovalDetailsModel.d.ts +13 -0
- package/dist/models/LeaveApprovalDetailsModel.js +51 -0
- package/dist/models/LeaveApprovalMatrixModel.d.ts +7 -0
- package/dist/models/LeaveApprovalMatrixModel.js +40 -0
- package/dist/models/userRolesModel.d.ts +1 -2
- package/dist/models/userRolesModel.js +2 -7
- package/package.json +1 -1
- package/src/data-source.ts +10 -0
- package/src/index.ts +4 -0
- package/src/models/FinancialRequestsModel.ts +3 -10
- package/src/models/LeaveApprovalsModel.ts +10 -2
- package/src/models/LeaveRequestModel.ts +13 -1
- package/src/models/WorkflowDefinitions.ts +71 -0
- package/src/models/WorkflowHierarchy.ts +67 -0
- package/src/models/WorkflowTask.ts +26 -0
- package/src/models/WorkflowTaskNames.ts +31 -0
- package/dist/models/AllowanceRequestsModel.d.ts +0 -13
- package/dist/models/AllowanceRequestsModel.js +0 -64
- package/dist/models/AllowanceTypesModel.d.ts +0 -8
- package/dist/models/AllowanceTypesModel.js +0 -43
- package/dist/models/BankAccountChangeRequestsModel.d.ts +0 -12
- package/dist/models/BankAccountChangeRequestsModel.js +0 -62
- package/dist/models/FinancialApprovalsModel.d.ts +0 -22
- package/dist/models/FinancialApprovalsModel.js +0 -84
- package/dist/models/FinancialAttachmentsModel.d.ts +0 -10
- package/dist/models/FinancialAttachmentsModel.js +0 -50
- package/dist/models/FinancialChatsModel.d.ts +0 -9
- package/dist/models/FinancialChatsModel.js +0 -45
- package/dist/models/FinancialRequestsModel.d.ts +0 -53
- package/dist/models/FinancialRequestsModel.js +0 -164
- package/dist/models/FinancialSettingsModel.d.ts +0 -11
- package/dist/models/FinancialSettingsModel.js +0 -59
- package/dist/models/FinancialWorkFlowModel.d.ts +0 -18
- package/dist/models/FinancialWorkFlowModel.js +0 -67
- package/dist/models/NotificationModel.d.ts +0 -18
- package/dist/models/NotificationModel.js +0 -79
- package/dist/models/PayslipRequestsModel.d.ts +0 -10
- package/dist/models/PayslipRequestsModel.js +0 -50
- package/dist/models/ReimbursementRequestsModel.d.ts +0 -16
- package/dist/models/ReimbursementRequestsModel.js +0 -78
- package/dist/models/RequestTypeMasterModel.d.ts +0 -13
- package/dist/models/RequestTypeMasterModel.js +0 -59
- package/dist/models/SalaryCertificateRequestsModel.d.ts +0 -9
- package/dist/models/SalaryCertificateRequestsModel.js +0 -45
- package/dist/models/questionTagsModel.d.ts +0 -6
- package/dist/models/questionTagsModel.js +0 -34
package/.env
CHANGED
package/dist/data-source.js
CHANGED
|
@@ -53,19 +53,6 @@ const HolidaysModel_1 = require("./models/HolidaysModel");
|
|
|
53
53
|
const userRolesModel_1 = require("./models/userRolesModel");
|
|
54
54
|
const roleRightsModel_1 = require("./models/roleRightsModel");
|
|
55
55
|
const PortalFeedbackModel_1 = require("./models/PortalFeedbackModel");
|
|
56
|
-
const NotificationModel_1 = require("./models/NotificationModel");
|
|
57
|
-
const FinancialRequestsModel_1 = require("./models/FinancialRequestsModel");
|
|
58
|
-
const FinancialApprovalsModel_1 = require("./models/FinancialApprovalsModel");
|
|
59
|
-
const FinancialSettingsModel_1 = require("./models/FinancialSettingsModel");
|
|
60
|
-
const PayslipRequestsModel_1 = require("./models/PayslipRequestsModel");
|
|
61
|
-
const SalaryCertificateRequestsModel_1 = require("./models/SalaryCertificateRequestsModel");
|
|
62
|
-
const AllowanceRequestsModel_1 = require("./models/AllowanceRequestsModel");
|
|
63
|
-
const ReimbursementRequestsModel_1 = require("./models/ReimbursementRequestsModel");
|
|
64
|
-
const BankAccountChangeRequestsModel_1 = require("./models/BankAccountChangeRequestsModel");
|
|
65
|
-
const FinancialChatsModel_1 = require("./models/FinancialChatsModel");
|
|
66
|
-
const FinancialWorkFlowModel_1 = require("./models/FinancialWorkFlowModel");
|
|
67
|
-
const FinancialAttachmentsModel_1 = require("./models/FinancialAttachmentsModel");
|
|
68
|
-
const RequestTypeMasterModel_1 = require("./models/RequestTypeMasterModel");
|
|
69
56
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
70
57
|
type: 'postgres',
|
|
71
58
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -123,19 +110,6 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
123
110
|
HolidaysModel_1.Holidays,
|
|
124
111
|
userRolesModel_1.UserRole,
|
|
125
112
|
roleRightsModel_1.RoleRights,
|
|
126
|
-
PortalFeedbackModel_1.PortalFeedback
|
|
127
|
-
NotificationModel_1.Notification,
|
|
128
|
-
FinancialRequestsModel_1.FinancialRequests,
|
|
129
|
-
FinancialApprovalsModel_1.FinancialApprovals,
|
|
130
|
-
FinancialSettingsModel_1.FinancialSettings,
|
|
131
|
-
PayslipRequestsModel_1.PayslipRequests,
|
|
132
|
-
SalaryCertificateRequestsModel_1.SalaryCertificateRequests,
|
|
133
|
-
AllowanceRequestsModel_1.AllowanceRequests,
|
|
134
|
-
ReimbursementRequestsModel_1.ReimbursementRequests,
|
|
135
|
-
BankAccountChangeRequestsModel_1.BankAccountChangeRequests,
|
|
136
|
-
FinancialChatsModel_1.FinancialChats,
|
|
137
|
-
FinancialWorkFlowModel_1.FinancialWorkFlow,
|
|
138
|
-
FinancialAttachmentsModel_1.FinancialAttachments,
|
|
139
|
-
RequestTypeMasterModel_1.RequestTypeMaster,
|
|
113
|
+
PortalFeedbackModel_1.PortalFeedback
|
|
140
114
|
],
|
|
141
115
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -46,16 +46,3 @@ export * from './models/HolidaysModel';
|
|
|
46
46
|
export * from './models/userRolesModel';
|
|
47
47
|
export * from './models/roleRightsModel';
|
|
48
48
|
export * from './models/PortalFeedbackModel';
|
|
49
|
-
export * from './models/NotificationModel';
|
|
50
|
-
export * from './models/FinancialRequestsModel';
|
|
51
|
-
export * from './models/FinancialApprovalsModel';
|
|
52
|
-
export * from './models/FinancialSettingsModel';
|
|
53
|
-
export * from './models/PayslipRequestsModel';
|
|
54
|
-
export * from './models/SalaryCertificateRequestsModel';
|
|
55
|
-
export * from './models/AllowanceRequestsModel';
|
|
56
|
-
export * from './models/ReimbursementRequestsModel';
|
|
57
|
-
export * from './models/BankAccountChangeRequestsModel';
|
|
58
|
-
export * from './models/FinancialChatsModel';
|
|
59
|
-
export * from './models/FinancialAttachmentsModel';
|
|
60
|
-
export * from './models/FinancialWorkFlowModel';
|
|
61
|
-
export * from './models/RequestTypeMasterModel';
|
package/dist/index.js
CHANGED
|
@@ -62,16 +62,3 @@ __exportStar(require("./models/HolidaysModel"), exports);
|
|
|
62
62
|
__exportStar(require("./models/userRolesModel"), exports);
|
|
63
63
|
__exportStar(require("./models/roleRightsModel"), exports);
|
|
64
64
|
__exportStar(require("./models/PortalFeedbackModel"), exports);
|
|
65
|
-
__exportStar(require("./models/NotificationModel"), exports);
|
|
66
|
-
__exportStar(require("./models/FinancialRequestsModel"), exports);
|
|
67
|
-
__exportStar(require("./models/FinancialApprovalsModel"), exports);
|
|
68
|
-
__exportStar(require("./models/FinancialSettingsModel"), exports);
|
|
69
|
-
__exportStar(require("./models/PayslipRequestsModel"), exports);
|
|
70
|
-
__exportStar(require("./models/SalaryCertificateRequestsModel"), exports);
|
|
71
|
-
__exportStar(require("./models/AllowanceRequestsModel"), exports);
|
|
72
|
-
__exportStar(require("./models/ReimbursementRequestsModel"), exports);
|
|
73
|
-
__exportStar(require("./models/BankAccountChangeRequestsModel"), exports);
|
|
74
|
-
__exportStar(require("./models/FinancialChatsModel"), exports);
|
|
75
|
-
__exportStar(require("./models/FinancialAttachmentsModel"), exports);
|
|
76
|
-
__exportStar(require("./models/FinancialWorkFlowModel"), exports);
|
|
77
|
-
__exportStar(require("./models/RequestTypeMasterModel"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum ApprovalStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
APPROVED = "Approved",
|
|
5
|
+
REJECTED = "Rejected"
|
|
6
|
+
}
|
|
7
|
+
export declare class LeaveApprovalDetails extends BaseModel {
|
|
8
|
+
leave_request_id: number;
|
|
9
|
+
level: number;
|
|
10
|
+
approver_id: number;
|
|
11
|
+
approval_status: ApprovalStatus;
|
|
12
|
+
constructor(leave_request_id: number, approver_id: number, approval_status: ApprovalStatus, level: number);
|
|
13
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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.LeaveApprovalDetails = exports.ApprovalStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var ApprovalStatus;
|
|
16
|
+
(function (ApprovalStatus) {
|
|
17
|
+
ApprovalStatus["PENDING"] = "Pending";
|
|
18
|
+
ApprovalStatus["APPROVED"] = "Approved";
|
|
19
|
+
ApprovalStatus["REJECTED"] = "Rejected";
|
|
20
|
+
})(ApprovalStatus || (exports.ApprovalStatus = ApprovalStatus = {}));
|
|
21
|
+
//This model is used to store the store the leave apporval details of the user for the leave request
|
|
22
|
+
let LeaveApprovalDetails = class LeaveApprovalDetails extends BaseModel_1.BaseModel {
|
|
23
|
+
constructor(leave_request_id, approver_id, approval_status, level) {
|
|
24
|
+
super();
|
|
25
|
+
this.leave_request_id = leave_request_id;
|
|
26
|
+
this.approver_id = approver_id;
|
|
27
|
+
this.approval_status = approval_status;
|
|
28
|
+
this.level = level;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.LeaveApprovalDetails = LeaveApprovalDetails;
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], LeaveApprovalDetails.prototype, "leave_request_id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], LeaveApprovalDetails.prototype, "level", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], LeaveApprovalDetails.prototype, "approver_id", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: ApprovalStatus, default: ApprovalStatus.PENDING, nullable: false }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], LeaveApprovalDetails.prototype, "approval_status", void 0);
|
|
48
|
+
exports.LeaveApprovalDetails = LeaveApprovalDetails = __decorate([
|
|
49
|
+
(0, typeorm_1.Entity)({ name: 'leave_approval_details' }),
|
|
50
|
+
__metadata("design:paramtypes", [Number, Number, String, Number])
|
|
51
|
+
], LeaveApprovalDetails);
|
|
@@ -0,0 +1,40 @@
|
|
|
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.LeaveApprovalMatrix = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
//This model is used to store the store the leave apporval matrix(HOD, Manager, HR, Director) based on leave type along with the levels
|
|
16
|
+
let LeaveApprovalMatrix = class LeaveApprovalMatrix extends BaseModel_1.BaseModel {
|
|
17
|
+
constructor(leave_type, level, approval_matrix) {
|
|
18
|
+
super();
|
|
19
|
+
this.leave_type = leave_type;
|
|
20
|
+
this.level = level;
|
|
21
|
+
this.approval_matrix = approval_matrix;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.LeaveApprovalMatrix = LeaveApprovalMatrix;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], LeaveApprovalMatrix.prototype, "leave_type", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], LeaveApprovalMatrix.prototype, "level", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], LeaveApprovalMatrix.prototype, "approval_matrix", void 0);
|
|
37
|
+
exports.LeaveApprovalMatrix = LeaveApprovalMatrix = __decorate([
|
|
38
|
+
(0, typeorm_1.Entity)({ name: 'leave_approval_matrix' }),
|
|
39
|
+
__metadata("design:paramtypes", [Number, Number, String])
|
|
40
|
+
], LeaveApprovalMatrix);
|
|
@@ -14,6 +14,5 @@ export declare class UserRole extends BaseModel {
|
|
|
14
14
|
user_id: number;
|
|
15
15
|
department_id: number;
|
|
16
16
|
section_id: number;
|
|
17
|
-
|
|
18
|
-
constructor(role_id: number, user_id: number, department_id: number, section_id: number, is_active?: boolean);
|
|
17
|
+
constructor(role_id: number, user_id: number, department_id: number, section_id: number);
|
|
19
18
|
}
|
|
@@ -23,13 +23,12 @@ exports.UserRole = void 0;
|
|
|
23
23
|
const typeorm_1 = require("typeorm");
|
|
24
24
|
const BaseModel_1 = require("./BaseModel");
|
|
25
25
|
let UserRole = class UserRole extends BaseModel_1.BaseModel {
|
|
26
|
-
constructor(role_id, user_id, department_id, section_id
|
|
26
|
+
constructor(role_id, user_id, department_id, section_id) {
|
|
27
27
|
super();
|
|
28
28
|
this.role_id = role_id;
|
|
29
29
|
this.user_id = user_id;
|
|
30
30
|
this.department_id = department_id;
|
|
31
31
|
this.section_id = section_id;
|
|
32
|
-
this.is_active = is_active;
|
|
33
32
|
}
|
|
34
33
|
};
|
|
35
34
|
exports.UserRole = UserRole;
|
|
@@ -49,11 +48,7 @@ __decorate([
|
|
|
49
48
|
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
50
49
|
__metadata("design:type", Number)
|
|
51
50
|
], UserRole.prototype, "section_id", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
54
|
-
__metadata("design:type", Boolean)
|
|
55
|
-
], UserRole.prototype, "is_active", void 0);
|
|
56
51
|
exports.UserRole = UserRole = __decorate([
|
|
57
52
|
(0, typeorm_1.Entity)({ name: 'user_role' }),
|
|
58
|
-
__metadata("design:paramtypes", [Number, Number, Number, Number
|
|
53
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number])
|
|
59
54
|
], UserRole);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -70,6 +70,12 @@ import { FinancialAttachments } from './models/FinancialAttachmentsModel';
|
|
|
70
70
|
import { RequestTypeMaster } from './models/RequestTypeMasterModel';
|
|
71
71
|
|
|
72
72
|
|
|
73
|
+
import { WorkflowTask } from './models/WorkflowTask';
|
|
74
|
+
import { WorkflowTaskNames } from './models/WorkflowTaskNames';
|
|
75
|
+
import { WorkflowDefinitions } from './models/WorkflowDefinitions';
|
|
76
|
+
import { WorkflowHierarchy } from './models/WorkflowHierarchy';
|
|
77
|
+
|
|
78
|
+
|
|
73
79
|
|
|
74
80
|
export const AppDataSource = new DataSource({
|
|
75
81
|
type: 'postgres',
|
|
@@ -142,5 +148,9 @@ export const AppDataSource = new DataSource({
|
|
|
142
148
|
FinancialWorkFlow,
|
|
143
149
|
FinancialAttachments,
|
|
144
150
|
RequestTypeMaster,
|
|
151
|
+
WorkflowTask,
|
|
152
|
+
WorkflowTaskNames,
|
|
153
|
+
WorkflowDefinitions,
|
|
154
|
+
WorkflowHierarchy,
|
|
145
155
|
],
|
|
146
156
|
});
|
package/src/index.ts
CHANGED
|
@@ -59,3 +59,7 @@ export * from './models/FinancialChatsModel';
|
|
|
59
59
|
export * from './models/FinancialAttachmentsModel';
|
|
60
60
|
export * from './models/FinancialWorkFlowModel';
|
|
61
61
|
export * from './models/RequestTypeMasterModel';
|
|
62
|
+
export * from './models/WorkflowTask';
|
|
63
|
+
export * from './models/WorkflowTaskNames';
|
|
64
|
+
export * from './models/WorkflowDefinitions';
|
|
65
|
+
export * from './models/WorkflowHierarchy';
|
|
@@ -11,7 +11,6 @@ import type { FinancialChats } from './FinancialChatsModel';
|
|
|
11
11
|
import type { FinancialApprovals } from './FinancialApprovalsModel';
|
|
12
12
|
import type { FinancialWorkFlow } from './FinancialWorkFlowModel';
|
|
13
13
|
import type { FinancialAttachments } from './FinancialAttachmentsModel';
|
|
14
|
-
import type { RequestTypeMaster } from './RequestTypeMasterModel';
|
|
15
14
|
|
|
16
15
|
export enum FinancialRequestStatus {
|
|
17
16
|
DRAFT = "Draft",
|
|
@@ -50,9 +49,6 @@ export class FinancialRequests extends BaseModel {
|
|
|
50
49
|
@Column({ type: 'varchar', length: 20 })
|
|
51
50
|
contact_number: string;
|
|
52
51
|
|
|
53
|
-
@Column({ type: 'int' })
|
|
54
|
-
request_type_id: number;
|
|
55
|
-
|
|
56
52
|
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
57
53
|
request_date: Date;
|
|
58
54
|
|
|
@@ -83,6 +79,9 @@ export class FinancialRequests extends BaseModel {
|
|
|
83
79
|
@Column({ type: 'int', nullable: true })
|
|
84
80
|
reporting_manager: number | null;
|
|
85
81
|
|
|
82
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
83
|
+
workflow_execution_id: string | null;
|
|
84
|
+
|
|
86
85
|
@OneToOne('PayslipRequests', 'financialRequest', { nullable: true })
|
|
87
86
|
payslipRequest?: PayslipRequests;
|
|
88
87
|
|
|
@@ -110,17 +109,12 @@ export class FinancialRequests extends BaseModel {
|
|
|
110
109
|
@OneToMany('FinancialAttachments', 'financialRequest')
|
|
111
110
|
attachments?: FinancialAttachments[];
|
|
112
111
|
|
|
113
|
-
@ManyToOne('RequestTypeMaster')
|
|
114
|
-
@JoinColumn({ name: 'request_type_id' })
|
|
115
|
-
requestType?: RequestTypeMaster;
|
|
116
|
-
|
|
117
112
|
constructor(
|
|
118
113
|
user_id: number,
|
|
119
114
|
employee_id: string,
|
|
120
115
|
employee_name: string,
|
|
121
116
|
email_address: string,
|
|
122
117
|
contact_number: string,
|
|
123
|
-
request_type_id: number,
|
|
124
118
|
service_id: number | null,
|
|
125
119
|
sub_service_id: number | null,
|
|
126
120
|
section_id: number | null,
|
|
@@ -132,7 +126,6 @@ export class FinancialRequests extends BaseModel {
|
|
|
132
126
|
this.employee_name = employee_name;
|
|
133
127
|
this.email_address = email_address;
|
|
134
128
|
this.contact_number = contact_number;
|
|
135
|
-
this.request_type_id = request_type_id;
|
|
136
129
|
this.request_date = new Date();
|
|
137
130
|
this.request_status = FinancialRequestStatus.PENDING;
|
|
138
131
|
this.service_id = service_id;
|
|
@@ -20,20 +20,28 @@ export class LeaveApprovalDetails extends BaseModel {
|
|
|
20
20
|
@Column({ type: 'int', nullable: true })
|
|
21
21
|
approver_user_id: number;
|
|
22
22
|
|
|
23
|
-
@Column({ type: 'int', nullable:
|
|
23
|
+
@Column({ type: 'int', nullable: true })
|
|
24
24
|
approver_role_id: number;
|
|
25
25
|
|
|
26
|
+
@Column({ type: 'int', nullable: true })
|
|
27
|
+
department_id: number;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'int', nullable: true })
|
|
30
|
+
section_id: number;
|
|
31
|
+
|
|
26
32
|
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
27
33
|
comment: string;
|
|
28
34
|
|
|
29
35
|
@Column({ type: 'enum', enum: ApprovalStatus,default: ApprovalStatus.PENDING, nullable: false })
|
|
30
36
|
approval_status: ApprovalStatus;
|
|
31
37
|
|
|
32
|
-
constructor(leave_request_id: number, approver_user_id: number, approver_role_id: number, comment: string, approval_status: ApprovalStatus, level: number) {
|
|
38
|
+
constructor(leave_request_id: number, approver_user_id: number, approver_role_id: number, comment: string, approval_status: ApprovalStatus, level: number, department_id: number, section_id: number) {
|
|
33
39
|
super();
|
|
34
40
|
this.leave_request_id = leave_request_id;
|
|
35
41
|
this.approver_user_id = approver_user_id;
|
|
36
42
|
this.approver_role_id = approver_role_id;
|
|
43
|
+
this.department_id = department_id;
|
|
44
|
+
this.section_id = section_id;
|
|
37
45
|
this.comment = comment;
|
|
38
46
|
this.approval_status = approval_status;
|
|
39
47
|
this.level = level;
|
|
@@ -85,8 +85,17 @@ export class LeaveRequests extends BaseModel {
|
|
|
85
85
|
@Column({ type: 'int', nullable: true })
|
|
86
86
|
mounring_leave_relation: number;
|
|
87
87
|
|
|
88
|
+
@Column({ type: 'int', nullable: true })
|
|
89
|
+
service_id: number | null;
|
|
90
|
+
|
|
91
|
+
@Column({ type: 'int', nullable: true })
|
|
92
|
+
sub_service_id: number | null;
|
|
93
|
+
|
|
94
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
95
|
+
workflow_execution_id: string | null;
|
|
96
|
+
|
|
88
97
|
|
|
89
|
-
constructor(user_id: string, leave_for: Leave_For, leave_type: number, department: string, status: status, leave_start_date: Date, leave_end_date: Date, leave_duration: number, remaining_leave_balance: number, contact_number_during_leave: string, address_during_leave: string, notes: string, delegated_to: string, number_of_escort_instances_per_year: number, accompanying_the_patient: boolean, treatment_place: string, emergency_leaves_available: number, unpaid_leave_type: string, country_or_state_being_visited: string, leave_balance_summary: string, representation: string, activity_title: string, relationship: string, mounring_leave_relation: number) {
|
|
98
|
+
constructor(user_id: string, leave_for: Leave_For, leave_type: number, department: string, status: status, leave_start_date: Date, leave_end_date: Date, leave_duration: number, remaining_leave_balance: number, contact_number_during_leave: string, address_during_leave: string, notes: string, delegated_to: string, number_of_escort_instances_per_year: number, accompanying_the_patient: boolean, treatment_place: string, emergency_leaves_available: number, unpaid_leave_type: string, country_or_state_being_visited: string, leave_balance_summary: string, representation: string, activity_title: string, relationship: string, mounring_leave_relation: number, service_id: number, sub_service_id: number, workflow_execution_id: string) {
|
|
90
99
|
super();
|
|
91
100
|
this.user_id = user_id;
|
|
92
101
|
this.leave_for = leave_for;
|
|
@@ -112,5 +121,8 @@ export class LeaveRequests extends BaseModel {
|
|
|
112
121
|
this.activity_title = activity_title;
|
|
113
122
|
this.relationship = relationship;
|
|
114
123
|
this.mounring_leave_relation = mounring_leave_relation;
|
|
124
|
+
this.service_id = service_id;
|
|
125
|
+
this.sub_service_id = sub_service_id;
|
|
126
|
+
this.workflow_execution_id = workflow_execution_id;
|
|
115
127
|
}
|
|
116
128
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { FMServices } from './FMServices';
|
|
4
|
+
import { FMSubServices } from './FMSubservices';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'workflow_definitions' })
|
|
7
|
+
export class WorkflowDefinitions extends BaseModel {
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'varchar', length: 100, nullable: false})
|
|
10
|
+
name: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'text', nullable: true })
|
|
13
|
+
description: string;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'integer', default: 1 })
|
|
16
|
+
version: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'boolean', default: true })
|
|
19
|
+
is_active: boolean;
|
|
20
|
+
|
|
21
|
+
@Column({
|
|
22
|
+
type: 'varchar',
|
|
23
|
+
length: 20,
|
|
24
|
+
nullable: true,
|
|
25
|
+
enum: ['internal', 'external', 'none']
|
|
26
|
+
})
|
|
27
|
+
service_type: 'internal' | 'external' | 'none';
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'bigint', nullable: true })
|
|
30
|
+
service_id: number | null;
|
|
31
|
+
|
|
32
|
+
@ManyToOne(() => FMServices)
|
|
33
|
+
@JoinColumn({ name: 'service_id' })
|
|
34
|
+
service: FMServices;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'bigint', nullable: true })
|
|
37
|
+
sub_service_id: number | null;
|
|
38
|
+
|
|
39
|
+
@ManyToOne(() => FMSubServices)
|
|
40
|
+
@JoinColumn({ name: 'sub_service_id' })
|
|
41
|
+
sub_service: FMSubServices;
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@Column({
|
|
45
|
+
type: 'varchar',
|
|
46
|
+
length: 20,
|
|
47
|
+
default: 'draft',
|
|
48
|
+
enum: ['draft', 'published']
|
|
49
|
+
})
|
|
50
|
+
status: 'draft' | 'published' ;
|
|
51
|
+
constructor(
|
|
52
|
+
name: string,
|
|
53
|
+
description?: string,
|
|
54
|
+
version?: number,
|
|
55
|
+
is_active?: boolean,
|
|
56
|
+
service_id?: number | null,
|
|
57
|
+
sub_service_id?: number | null,
|
|
58
|
+
status?: 'draft' | 'published',
|
|
59
|
+
service_type?: 'internal' | 'external' | 'none'
|
|
60
|
+
) {
|
|
61
|
+
super();
|
|
62
|
+
this.name = name;
|
|
63
|
+
this.description = description || '';
|
|
64
|
+
this.version = version || 1;
|
|
65
|
+
this.is_active = is_active !== undefined ? is_active : true;
|
|
66
|
+
this.service_id = service_id || null;
|
|
67
|
+
this.sub_service_id = sub_service_id || null;
|
|
68
|
+
this.status = status || 'draft';
|
|
69
|
+
this.service_type = service_type || 'none';
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn, Unique } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { WorkflowDefinitions } from './WorkflowDefinitions';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'workflow_hierarchy' })
|
|
6
|
+
@Unique(['workflow_definition_id', 'step_order'])
|
|
7
|
+
export class WorkflowHierarchy extends BaseModel {
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'integer', nullable: false })
|
|
10
|
+
workflow_definition_id: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'integer', nullable: true })
|
|
13
|
+
department_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'integer', nullable: true })
|
|
16
|
+
section_id: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'integer', nullable: true })
|
|
19
|
+
approval_role_id: number;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'integer', nullable: true })
|
|
22
|
+
approval_user_id: number;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
25
|
+
taskname: string | null;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
28
|
+
status: string | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'jsonb', nullable: true })
|
|
31
|
+
task: any | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'integer', nullable: false })
|
|
34
|
+
step_order: number;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'boolean', default: true })
|
|
37
|
+
is_required: boolean;
|
|
38
|
+
|
|
39
|
+
@ManyToOne(() => WorkflowDefinitions, { onDelete: 'CASCADE' })
|
|
40
|
+
@JoinColumn({ name: 'workflow_definition_id' })
|
|
41
|
+
workflow_definition: WorkflowDefinitions;
|
|
42
|
+
|
|
43
|
+
constructor(
|
|
44
|
+
workflow_definition_id: number,
|
|
45
|
+
department_id: number,
|
|
46
|
+
section_id: number,
|
|
47
|
+
approval_role_id: number,
|
|
48
|
+
approval_user_id: number,
|
|
49
|
+
step_order: number,
|
|
50
|
+
is_required?: boolean,
|
|
51
|
+
taskname?: string,
|
|
52
|
+
status?: string,
|
|
53
|
+
task?: any
|
|
54
|
+
) {
|
|
55
|
+
super();
|
|
56
|
+
this.workflow_definition_id = workflow_definition_id;
|
|
57
|
+
this.department_id = department_id;
|
|
58
|
+
this.section_id = section_id;
|
|
59
|
+
this.approval_role_id = approval_role_id;
|
|
60
|
+
this.approval_user_id = approval_user_id;
|
|
61
|
+
this.step_order = step_order;
|
|
62
|
+
this.is_required = is_required !== undefined ? is_required : true;
|
|
63
|
+
this.taskname = taskname || null;
|
|
64
|
+
this.status = status || null;
|
|
65
|
+
this.task = task || null;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'workflow_tasks' })
|
|
5
|
+
export class WorkflowTask extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@PrimaryGeneratedColumn()
|
|
8
|
+
task_id: number;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
11
|
+
name: string;
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'varchar', length: 200, nullable: true })
|
|
14
|
+
task_type: string;
|
|
15
|
+
|
|
16
|
+
constructor(
|
|
17
|
+
name: string,
|
|
18
|
+
task_id?: number,
|
|
19
|
+
task_type?: string
|
|
20
|
+
) {
|
|
21
|
+
super();
|
|
22
|
+
this.name = name;
|
|
23
|
+
this.task_id = task_id || 0;
|
|
24
|
+
this.task_type = task_type || '';
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'workflow_task_names' })
|
|
5
|
+
export class WorkflowTaskNames extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
8
|
+
name: string;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'integer', nullable: false })
|
|
11
|
+
task_id: number;
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'varchar', length: 200, nullable: true })
|
|
14
|
+
description: string;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'varchar', length: 200, nullable: true })
|
|
17
|
+
task_type: string;
|
|
18
|
+
|
|
19
|
+
constructor(
|
|
20
|
+
name: string,
|
|
21
|
+
task_id: number,
|
|
22
|
+
description: string,
|
|
23
|
+
task_type: string
|
|
24
|
+
) {
|
|
25
|
+
super();
|
|
26
|
+
this.name = name;
|
|
27
|
+
this.task_id = task_id;
|
|
28
|
+
this.description = description;
|
|
29
|
+
this.task_type = task_type;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
import { FinancialRequests } from "./FinancialRequestsModel";
|
|
3
|
-
export declare class AllowanceRequests extends BaseModel {
|
|
4
|
-
financial_request_id: number;
|
|
5
|
-
allowance_type_id: number;
|
|
6
|
-
allowance_amount: number;
|
|
7
|
-
approved_allowance_amount: number;
|
|
8
|
-
currency: string;
|
|
9
|
-
contact_number: string;
|
|
10
|
-
description: string;
|
|
11
|
-
financialRequest?: FinancialRequests;
|
|
12
|
-
constructor(financial_request_id: number, allowance_type_id: number, allowance_amount: number, approved_allowance_amount: number, currency: string, contact_number: string, description: string);
|
|
13
|
-
}
|