@platform-modules/foreign-ministry 1.1.7 → 1.1.9
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/models/FinancialWorkFlowModel.d.ts +2 -1
- package/dist/models/FinancialWorkFlowModel.js +1 -0
- 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/LeaveRequestModel.d.ts +2 -1
- package/dist/models/LeaveRequestModel.js +7 -2
- package/package.json +1 -1
- package/src/models/FinancialWorkFlowModel.ts +2 -1
- package/src/models/LeaveRequestModel.ts +5 -1
|
@@ -4,7 +4,8 @@ export declare enum FinancialWorkFlowStatus {
|
|
|
4
4
|
COMPLETED = "Completed",
|
|
5
5
|
NOT_YET_STARTED = "Not Yet Started",
|
|
6
6
|
PENDING = "Pending",
|
|
7
|
-
IN_PROGRESS = "In Progress"
|
|
7
|
+
IN_PROGRESS = "In Progress",
|
|
8
|
+
FAILED = "Failed"
|
|
8
9
|
}
|
|
9
10
|
export declare class FinancialWorkFlow extends BaseModel {
|
|
10
11
|
financial_request_id: number;
|
|
@@ -19,6 +19,7 @@ var FinancialWorkFlowStatus;
|
|
|
19
19
|
FinancialWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
20
20
|
FinancialWorkFlowStatus["PENDING"] = "Pending";
|
|
21
21
|
FinancialWorkFlowStatus["IN_PROGRESS"] = "In Progress";
|
|
22
|
+
FinancialWorkFlowStatus["FAILED"] = "Failed";
|
|
22
23
|
})(FinancialWorkFlowStatus || (exports.FinancialWorkFlowStatus = FinancialWorkFlowStatus = {}));
|
|
23
24
|
let FinancialWorkFlow = class FinancialWorkFlow extends BaseModel_1.BaseModel {
|
|
24
25
|
constructor(financial_request_id, status, approved_by_user_id, content) {
|
|
@@ -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);
|
|
@@ -12,6 +12,7 @@ export declare class LeaveRequests extends BaseModel {
|
|
|
12
12
|
user_id: string;
|
|
13
13
|
leave_for: Leave_For;
|
|
14
14
|
leave_type: number;
|
|
15
|
+
study_leave_degree: number;
|
|
15
16
|
department: string;
|
|
16
17
|
status: status;
|
|
17
18
|
leave_start_date: Date;
|
|
@@ -36,5 +37,5 @@ export declare class LeaveRequests extends BaseModel {
|
|
|
36
37
|
service_id: number | null;
|
|
37
38
|
sub_service_id: number | null;
|
|
38
39
|
workflow_execution_id: string | null;
|
|
39
|
-
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);
|
|
40
|
+
constructor(user_id: string, leave_for: Leave_For, leave_type: number, study_leave_degree: 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);
|
|
40
41
|
}
|
|
@@ -25,11 +25,12 @@ var status;
|
|
|
25
25
|
status["REJECTED"] = "Rejected";
|
|
26
26
|
})(status || (exports.status = status = {}));
|
|
27
27
|
let LeaveRequests = class LeaveRequests extends BaseModel_1.BaseModel {
|
|
28
|
-
constructor(user_id, leave_for, leave_type, department, status, leave_start_date, leave_end_date, leave_duration, remaining_leave_balance, contact_number_during_leave, address_during_leave, notes, delegated_to, number_of_escort_instances_per_year, accompanying_the_patient, treatment_place, emergency_leaves_available, unpaid_leave_type, country_or_state_being_visited, leave_balance_summary, representation, activity_title, relationship, mounring_leave_relation, service_id, sub_service_id, workflow_execution_id) {
|
|
28
|
+
constructor(user_id, leave_for, leave_type, study_leave_degree, department, status, leave_start_date, leave_end_date, leave_duration, remaining_leave_balance, contact_number_during_leave, address_during_leave, notes, delegated_to, number_of_escort_instances_per_year, accompanying_the_patient, treatment_place, emergency_leaves_available, unpaid_leave_type, country_or_state_being_visited, leave_balance_summary, representation, activity_title, relationship, mounring_leave_relation, service_id, sub_service_id, workflow_execution_id) {
|
|
29
29
|
super();
|
|
30
30
|
this.user_id = user_id;
|
|
31
31
|
this.leave_for = leave_for;
|
|
32
32
|
this.leave_type = leave_type;
|
|
33
|
+
this.study_leave_degree = study_leave_degree;
|
|
33
34
|
this.department = department;
|
|
34
35
|
this.status = status;
|
|
35
36
|
this.leave_start_date = leave_start_date;
|
|
@@ -69,6 +70,10 @@ __decorate([
|
|
|
69
70
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
70
71
|
__metadata("design:type", Number)
|
|
71
72
|
], LeaveRequests.prototype, "leave_type", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
75
|
+
__metadata("design:type", Number)
|
|
76
|
+
], LeaveRequests.prototype, "study_leave_degree", void 0);
|
|
72
77
|
__decorate([
|
|
73
78
|
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
74
79
|
__metadata("design:type", String)
|
|
@@ -167,5 +172,5 @@ __decorate([
|
|
|
167
172
|
], LeaveRequests.prototype, "workflow_execution_id", void 0);
|
|
168
173
|
exports.LeaveRequests = LeaveRequests = __decorate([
|
|
169
174
|
(0, typeorm_1.Entity)({ name: 'leave_requests' }),
|
|
170
|
-
__metadata("design:paramtypes", [String, String, Number, String, String, Date, Date, Number, Number, String, String, String, String, Number, Boolean, String, Number, String, String, String, String, String, String, Number, Number, Number, String])
|
|
175
|
+
__metadata("design:paramtypes", [String, String, Number, Number, String, String, Date, Date, Number, Number, String, String, String, String, Number, Boolean, String, Number, String, String, String, String, String, String, Number, Number, Number, String])
|
|
171
176
|
], LeaveRequests);
|
package/package.json
CHANGED
|
@@ -22,6 +22,9 @@ export class LeaveRequests extends BaseModel {
|
|
|
22
22
|
@Column({ type: 'int', nullable: true })
|
|
23
23
|
leave_type: number;
|
|
24
24
|
|
|
25
|
+
@Column({ type: 'int', nullable: true })
|
|
26
|
+
study_leave_degree: number;
|
|
27
|
+
|
|
25
28
|
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
26
29
|
department: string;
|
|
27
30
|
|
|
@@ -95,11 +98,12 @@ export class LeaveRequests extends BaseModel {
|
|
|
95
98
|
workflow_execution_id: string | null;
|
|
96
99
|
|
|
97
100
|
|
|
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) {
|
|
101
|
+
constructor(user_id: string, leave_for: Leave_For, leave_type: number, study_leave_degree: 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) {
|
|
99
102
|
super();
|
|
100
103
|
this.user_id = user_id;
|
|
101
104
|
this.leave_for = leave_for;
|
|
102
105
|
this.leave_type = leave_type;
|
|
106
|
+
this.study_leave_degree = study_leave_degree;
|
|
103
107
|
this.department = department;
|
|
104
108
|
this.status = status;
|
|
105
109
|
this.leave_start_date = leave_start_date;
|