@platform-modules/foreign-ministry 1.1.29 → 1.1.31
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/EarlyCheckoutChatModel.d.ts +4 -0
- package/dist/models/EarlyCheckoutChatModel.js +28 -2
- 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 +8 -0
- package/dist/models/LeaveRequestModel.js +32 -0
- package/dist/models/ReimbursementRequestsModel.js +1 -1
- package/dist/models/StayAfterHoursChatModel.d.ts +4 -0
- package/dist/models/StayAfterHoursChatModel.js +28 -2
- package/dist/models/UpdateAttendenceRequestModel.d.ts +28 -0
- package/dist/models/UpdateAttendenceRequestModel.js +86 -0
- package/package.json +1 -1
- package/src/models/EarlyCheckoutChatModel.ts +34 -1
- package/src/models/LeaveRequestModel.ts +25 -0
- package/src/models/ReimbursementRequestsModel.ts +1 -1
- package/src/models/StayAfterHoursChatModel.ts +34 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { EarlyCheckoutApprovalStatus } from './EarlyCheckoutApprovalModel';
|
|
2
3
|
export declare enum EarlyCheckoutMessageType {
|
|
3
4
|
TEXT = "text",
|
|
4
5
|
IMAGE = "image",
|
|
@@ -11,6 +12,9 @@ export declare class EarlyCheckoutRequestChat extends BaseModel {
|
|
|
11
12
|
service_id: number | null;
|
|
12
13
|
sub_service_id: number | null;
|
|
13
14
|
user_id: number;
|
|
15
|
+
role_id: number;
|
|
14
16
|
message: string;
|
|
15
17
|
messageType: EarlyCheckoutMessageType;
|
|
18
|
+
status: EarlyCheckoutApprovalStatus;
|
|
19
|
+
constructor(request_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: EarlyCheckoutMessageType, status?: EarlyCheckoutApprovalStatus);
|
|
16
20
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.EarlyCheckoutRequestChat = exports.EarlyCheckoutMessageType = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const EarlyCheckoutApprovalModel_1 = require("./EarlyCheckoutApprovalModel");
|
|
15
16
|
var EarlyCheckoutMessageType;
|
|
16
17
|
(function (EarlyCheckoutMessageType) {
|
|
17
18
|
EarlyCheckoutMessageType["TEXT"] = "text";
|
|
@@ -21,6 +22,17 @@ var EarlyCheckoutMessageType;
|
|
|
21
22
|
EarlyCheckoutMessageType["LINK"] = "link";
|
|
22
23
|
})(EarlyCheckoutMessageType || (exports.EarlyCheckoutMessageType = EarlyCheckoutMessageType = {}));
|
|
23
24
|
let EarlyCheckoutRequestChat = class EarlyCheckoutRequestChat extends BaseModel_1.BaseModel {
|
|
25
|
+
constructor(request_id, user_id, role_id, message, service_id, sub_service_id, messageType, status) {
|
|
26
|
+
super();
|
|
27
|
+
this.request_id = request_id;
|
|
28
|
+
this.service_id = service_id || null;
|
|
29
|
+
this.sub_service_id = sub_service_id || null;
|
|
30
|
+
this.user_id = user_id;
|
|
31
|
+
this.role_id = role_id;
|
|
32
|
+
this.message = message;
|
|
33
|
+
this.messageType = messageType || EarlyCheckoutMessageType.TEXT;
|
|
34
|
+
this.status = status || EarlyCheckoutApprovalModel_1.EarlyCheckoutApprovalStatus.PENDING;
|
|
35
|
+
}
|
|
24
36
|
};
|
|
25
37
|
exports.EarlyCheckoutRequestChat = EarlyCheckoutRequestChat;
|
|
26
38
|
__decorate([
|
|
@@ -39,14 +51,28 @@ __decorate([
|
|
|
39
51
|
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
40
52
|
__metadata("design:type", Number)
|
|
41
53
|
], EarlyCheckoutRequestChat.prototype, "user_id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], EarlyCheckoutRequestChat.prototype, "role_id", void 0);
|
|
42
58
|
__decorate([
|
|
43
59
|
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
44
60
|
__metadata("design:type", String)
|
|
45
61
|
], EarlyCheckoutRequestChat.prototype, "message", void 0);
|
|
46
62
|
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({
|
|
63
|
+
(0, typeorm_1.Column)({
|
|
64
|
+
type: 'enum',
|
|
65
|
+
enum: EarlyCheckoutMessageType,
|
|
66
|
+
default: EarlyCheckoutMessageType.TEXT,
|
|
67
|
+
nullable: false
|
|
68
|
+
}),
|
|
48
69
|
__metadata("design:type", String)
|
|
49
70
|
], EarlyCheckoutRequestChat.prototype, "messageType", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: EarlyCheckoutApprovalModel_1.EarlyCheckoutApprovalStatus, default: EarlyCheckoutApprovalModel_1.EarlyCheckoutApprovalStatus.PENDING, nullable: false }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], EarlyCheckoutRequestChat.prototype, "status", void 0);
|
|
50
75
|
exports.EarlyCheckoutRequestChat = EarlyCheckoutRequestChat = __decorate([
|
|
51
|
-
(0, typeorm_1.Entity)({ name: 'early_checkout_chats' })
|
|
76
|
+
(0, typeorm_1.Entity)({ name: 'early_checkout_chats' }),
|
|
77
|
+
__metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, String])
|
|
52
78
|
], EarlyCheckoutRequestChat);
|
|
@@ -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);
|
|
@@ -37,5 +37,13 @@ export declare class LeaveRequests extends BaseModel {
|
|
|
37
37
|
service_id: number | null;
|
|
38
38
|
sub_service_id: number | null;
|
|
39
39
|
workflow_execution_id: string | null;
|
|
40
|
+
reference_leave_request_id: number | null;
|
|
41
|
+
leave_extension_date: Date | null;
|
|
42
|
+
cancel_leave_date: Date | null;
|
|
43
|
+
return_notification_date: Date | null;
|
|
44
|
+
actual_leave_start_date: Date | null;
|
|
45
|
+
actual_leave_end_date: Date | null;
|
|
46
|
+
actual_leave_duration: string | null;
|
|
47
|
+
no_of_days_delayed: number | null;
|
|
40
48
|
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);
|
|
41
49
|
}
|
|
@@ -170,6 +170,38 @@ __decorate([
|
|
|
170
170
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
171
171
|
__metadata("design:type", Object)
|
|
172
172
|
], LeaveRequests.prototype, "workflow_execution_id", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true, default: null }),
|
|
175
|
+
__metadata("design:type", Object)
|
|
176
|
+
], LeaveRequests.prototype, "reference_leave_request_id", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true, default: null }),
|
|
179
|
+
__metadata("design:type", Object)
|
|
180
|
+
], LeaveRequests.prototype, "leave_extension_date", void 0);
|
|
181
|
+
__decorate([
|
|
182
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true, default: null }),
|
|
183
|
+
__metadata("design:type", Object)
|
|
184
|
+
], LeaveRequests.prototype, "cancel_leave_date", void 0);
|
|
185
|
+
__decorate([
|
|
186
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true, default: null }),
|
|
187
|
+
__metadata("design:type", Object)
|
|
188
|
+
], LeaveRequests.prototype, "return_notification_date", void 0);
|
|
189
|
+
__decorate([
|
|
190
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true, default: null }),
|
|
191
|
+
__metadata("design:type", Object)
|
|
192
|
+
], LeaveRequests.prototype, "actual_leave_start_date", void 0);
|
|
193
|
+
__decorate([
|
|
194
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true, default: null }),
|
|
195
|
+
__metadata("design:type", Object)
|
|
196
|
+
], LeaveRequests.prototype, "actual_leave_end_date", void 0);
|
|
197
|
+
__decorate([
|
|
198
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true, default: null }),
|
|
199
|
+
__metadata("design:type", Object)
|
|
200
|
+
], LeaveRequests.prototype, "actual_leave_duration", void 0);
|
|
201
|
+
__decorate([
|
|
202
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true, default: null }),
|
|
203
|
+
__metadata("design:type", Object)
|
|
204
|
+
], LeaveRequests.prototype, "no_of_days_delayed", void 0);
|
|
173
205
|
exports.LeaveRequests = LeaveRequests = __decorate([
|
|
174
206
|
(0, typeorm_1.Entity)({ name: 'leave_requests' }),
|
|
175
207
|
__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])
|
|
@@ -69,7 +69,7 @@ __decorate([
|
|
|
69
69
|
__metadata("design:type", Date)
|
|
70
70
|
], ReimbursementRequests.prototype, "payment_date", void 0);
|
|
71
71
|
__decorate([
|
|
72
|
-
(0, typeorm_1.Column)({ type: 'varchar', nullable:
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
73
73
|
__metadata("design:type", String)
|
|
74
74
|
], ReimbursementRequests.prototype, "currency", void 0);
|
|
75
75
|
__decorate([
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { StayAfterHoursApprovalStatus } from './StayAfterHoursApprovalModel';
|
|
2
3
|
export declare enum StayAfterHoursMessageType {
|
|
3
4
|
TEXT = "text",
|
|
4
5
|
IMAGE = "image",
|
|
@@ -11,6 +12,9 @@ export declare class StayAfterHoursRequestChat extends BaseModel {
|
|
|
11
12
|
service_id: number | null;
|
|
12
13
|
sub_service_id: number | null;
|
|
13
14
|
user_id: number;
|
|
15
|
+
role_id: number;
|
|
14
16
|
message: string;
|
|
15
17
|
messageType: StayAfterHoursMessageType;
|
|
18
|
+
status: StayAfterHoursApprovalStatus;
|
|
19
|
+
constructor(request_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: StayAfterHoursMessageType, status?: StayAfterHoursApprovalStatus);
|
|
16
20
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.StayAfterHoursRequestChat = exports.StayAfterHoursMessageType = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const StayAfterHoursApprovalModel_1 = require("./StayAfterHoursApprovalModel");
|
|
15
16
|
var StayAfterHoursMessageType;
|
|
16
17
|
(function (StayAfterHoursMessageType) {
|
|
17
18
|
StayAfterHoursMessageType["TEXT"] = "text";
|
|
@@ -21,6 +22,17 @@ var StayAfterHoursMessageType;
|
|
|
21
22
|
StayAfterHoursMessageType["LINK"] = "link";
|
|
22
23
|
})(StayAfterHoursMessageType || (exports.StayAfterHoursMessageType = StayAfterHoursMessageType = {}));
|
|
23
24
|
let StayAfterHoursRequestChat = class StayAfterHoursRequestChat extends BaseModel_1.BaseModel {
|
|
25
|
+
constructor(request_id, user_id, role_id, message, service_id, sub_service_id, messageType, status) {
|
|
26
|
+
super();
|
|
27
|
+
this.request_id = request_id;
|
|
28
|
+
this.service_id = service_id || null;
|
|
29
|
+
this.sub_service_id = sub_service_id || null;
|
|
30
|
+
this.user_id = user_id;
|
|
31
|
+
this.role_id = role_id;
|
|
32
|
+
this.message = message;
|
|
33
|
+
this.messageType = messageType || StayAfterHoursMessageType.TEXT;
|
|
34
|
+
this.status = status || StayAfterHoursApprovalModel_1.StayAfterHoursApprovalStatus.PENDING;
|
|
35
|
+
}
|
|
24
36
|
};
|
|
25
37
|
exports.StayAfterHoursRequestChat = StayAfterHoursRequestChat;
|
|
26
38
|
__decorate([
|
|
@@ -39,14 +51,28 @@ __decorate([
|
|
|
39
51
|
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
40
52
|
__metadata("design:type", Number)
|
|
41
53
|
], StayAfterHoursRequestChat.prototype, "user_id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], StayAfterHoursRequestChat.prototype, "role_id", void 0);
|
|
42
58
|
__decorate([
|
|
43
59
|
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
44
60
|
__metadata("design:type", String)
|
|
45
61
|
], StayAfterHoursRequestChat.prototype, "message", void 0);
|
|
46
62
|
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({
|
|
63
|
+
(0, typeorm_1.Column)({
|
|
64
|
+
type: 'enum',
|
|
65
|
+
enum: StayAfterHoursMessageType,
|
|
66
|
+
default: StayAfterHoursMessageType.TEXT,
|
|
67
|
+
nullable: false
|
|
68
|
+
}),
|
|
48
69
|
__metadata("design:type", String)
|
|
49
70
|
], StayAfterHoursRequestChat.prototype, "messageType", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: StayAfterHoursApprovalModel_1.StayAfterHoursApprovalStatus, default: StayAfterHoursApprovalModel_1.StayAfterHoursApprovalStatus.PENDING, nullable: false }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], StayAfterHoursRequestChat.prototype, "status", void 0);
|
|
50
75
|
exports.StayAfterHoursRequestChat = StayAfterHoursRequestChat = __decorate([
|
|
51
|
-
(0, typeorm_1.Entity)({ name: 'stay_after_hours_chats' })
|
|
76
|
+
(0, typeorm_1.Entity)({ name: 'stay_after_hours_chats' }),
|
|
77
|
+
__metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, String])
|
|
52
78
|
], StayAfterHoursRequestChat);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum UpdateAttendenceStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
ASSIGNED = "Assigned",
|
|
5
|
+
IN_PROGRESS = "In Progress",
|
|
6
|
+
APPROVED = "Approved",
|
|
7
|
+
REJECTED = "Rejected"
|
|
8
|
+
}
|
|
9
|
+
export declare enum UpdateAttendenceReason {
|
|
10
|
+
MEETING = "Meeting",
|
|
11
|
+
EARLY_CHECKOUT = "Early Checkout",
|
|
12
|
+
SPECIAL_REASON = "Special Reason"
|
|
13
|
+
}
|
|
14
|
+
export declare class UpdateAttendenceRequests extends BaseModel {
|
|
15
|
+
req_user_department_id: number | null;
|
|
16
|
+
req_user_section_id: number | null;
|
|
17
|
+
service_id: number | null;
|
|
18
|
+
sub_service_id: number | null;
|
|
19
|
+
user_id: number;
|
|
20
|
+
from_date: string | null;
|
|
21
|
+
to_date: string | null;
|
|
22
|
+
from_time: string | null;
|
|
23
|
+
to_time: string | null;
|
|
24
|
+
reason: UpdateAttendenceReason;
|
|
25
|
+
comments: string | null;
|
|
26
|
+
status: UpdateAttendenceStatus;
|
|
27
|
+
workflow_execution_id: string | null;
|
|
28
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
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.UpdateAttendenceRequests = exports.UpdateAttendenceReason = exports.UpdateAttendenceStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var UpdateAttendenceStatus;
|
|
16
|
+
(function (UpdateAttendenceStatus) {
|
|
17
|
+
UpdateAttendenceStatus["PENDING"] = "Pending";
|
|
18
|
+
UpdateAttendenceStatus["ASSIGNED"] = "Assigned";
|
|
19
|
+
UpdateAttendenceStatus["IN_PROGRESS"] = "In Progress";
|
|
20
|
+
UpdateAttendenceStatus["APPROVED"] = "Approved";
|
|
21
|
+
UpdateAttendenceStatus["REJECTED"] = "Rejected";
|
|
22
|
+
})(UpdateAttendenceStatus || (exports.UpdateAttendenceStatus = UpdateAttendenceStatus = {}));
|
|
23
|
+
var UpdateAttendenceReason;
|
|
24
|
+
(function (UpdateAttendenceReason) {
|
|
25
|
+
UpdateAttendenceReason["MEETING"] = "Meeting";
|
|
26
|
+
UpdateAttendenceReason["EARLY_CHECKOUT"] = "Early Checkout";
|
|
27
|
+
UpdateAttendenceReason["SPECIAL_REASON"] = "Special Reason";
|
|
28
|
+
})(UpdateAttendenceReason || (exports.UpdateAttendenceReason = UpdateAttendenceReason = {}));
|
|
29
|
+
let UpdateAttendenceRequests = class UpdateAttendenceRequests extends BaseModel_1.BaseModel {
|
|
30
|
+
};
|
|
31
|
+
exports.UpdateAttendenceRequests = UpdateAttendenceRequests;
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], UpdateAttendenceRequests.prototype, "req_user_department_id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], UpdateAttendenceRequests.prototype, "req_user_section_id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], UpdateAttendenceRequests.prototype, "service_id", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], UpdateAttendenceRequests.prototype, "sub_service_id", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], UpdateAttendenceRequests.prototype, "user_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], UpdateAttendenceRequests.prototype, "from_date", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], UpdateAttendenceRequests.prototype, "to_date", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'time', nullable: true }),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], UpdateAttendenceRequests.prototype, "from_time", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ type: 'time', nullable: true }),
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
|
+
], UpdateAttendenceRequests.prototype, "to_time", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: UpdateAttendenceReason, nullable: false }),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], UpdateAttendenceRequests.prototype, "reason", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], UpdateAttendenceRequests.prototype, "comments", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: UpdateAttendenceStatus, default: UpdateAttendenceStatus.PENDING, nullable: false }),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], UpdateAttendenceRequests.prototype, "status", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], UpdateAttendenceRequests.prototype, "workflow_execution_id", void 0);
|
|
84
|
+
exports.UpdateAttendenceRequests = UpdateAttendenceRequests = __decorate([
|
|
85
|
+
(0, typeorm_1.Entity)({ name: 'update_attendence_requests' })
|
|
86
|
+
], UpdateAttendenceRequests);
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { EarlyCheckoutApprovalStatus } from './EarlyCheckoutApprovalModel';
|
|
3
4
|
|
|
4
5
|
export enum EarlyCheckoutMessageType {
|
|
5
6
|
TEXT = "text",
|
|
@@ -24,11 +25,43 @@ export class EarlyCheckoutRequestChat extends BaseModel {
|
|
|
24
25
|
@Column({ type: 'integer', nullable: false })
|
|
25
26
|
user_id: number;
|
|
26
27
|
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
role_id: number;
|
|
30
|
+
|
|
27
31
|
@Column({ type: 'text', nullable: false })
|
|
28
32
|
message: string;
|
|
29
33
|
|
|
30
|
-
@Column({
|
|
34
|
+
@Column({
|
|
35
|
+
type: 'enum',
|
|
36
|
+
enum: EarlyCheckoutMessageType,
|
|
37
|
+
default: EarlyCheckoutMessageType.TEXT,
|
|
38
|
+
nullable: false
|
|
39
|
+
})
|
|
31
40
|
messageType: EarlyCheckoutMessageType;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'enum', enum: EarlyCheckoutApprovalStatus, default: EarlyCheckoutApprovalStatus.PENDING, nullable: false })
|
|
43
|
+
status: EarlyCheckoutApprovalStatus;
|
|
44
|
+
|
|
45
|
+
constructor(
|
|
46
|
+
request_id: number,
|
|
47
|
+
user_id: number,
|
|
48
|
+
role_id: number,
|
|
49
|
+
message: string,
|
|
50
|
+
service_id?: number,
|
|
51
|
+
sub_service_id?: number,
|
|
52
|
+
messageType?: EarlyCheckoutMessageType,
|
|
53
|
+
status?: EarlyCheckoutApprovalStatus
|
|
54
|
+
) {
|
|
55
|
+
super();
|
|
56
|
+
this.request_id = request_id;
|
|
57
|
+
this.service_id = service_id || null;
|
|
58
|
+
this.sub_service_id = sub_service_id || null;
|
|
59
|
+
this.user_id = user_id;
|
|
60
|
+
this.role_id = role_id;
|
|
61
|
+
this.message = message;
|
|
62
|
+
this.messageType = messageType || EarlyCheckoutMessageType.TEXT;
|
|
63
|
+
this.status = status || EarlyCheckoutApprovalStatus.PENDING;
|
|
64
|
+
}
|
|
32
65
|
}
|
|
33
66
|
|
|
34
67
|
|
|
@@ -97,6 +97,31 @@ export class LeaveRequests extends BaseModel {
|
|
|
97
97
|
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
98
98
|
workflow_execution_id: string | null;
|
|
99
99
|
|
|
100
|
+
//new column for extension leave,cancel leave, return notification
|
|
101
|
+
@Column({ type: 'int', nullable: true, default: null })
|
|
102
|
+
reference_leave_request_id: number | null;
|
|
103
|
+
|
|
104
|
+
@Column({ type: 'date', nullable: true ,default: null})
|
|
105
|
+
leave_extension_date: Date | null;
|
|
106
|
+
|
|
107
|
+
@Column({ type: 'date', nullable: true ,default: null})
|
|
108
|
+
cancel_leave_date: Date | null;
|
|
109
|
+
|
|
110
|
+
@Column({ type: 'date', nullable: true ,default: null})
|
|
111
|
+
return_notification_date: Date | null;
|
|
112
|
+
|
|
113
|
+
@Column({ type: 'date', nullable: true ,default: null})
|
|
114
|
+
actual_leave_start_date: Date | null;
|
|
115
|
+
|
|
116
|
+
@Column({ type: 'date', nullable: true ,default: null})
|
|
117
|
+
actual_leave_end_date: Date | null;
|
|
118
|
+
|
|
119
|
+
@Column({ type: 'varchar', length: 255, nullable: true, default: null})
|
|
120
|
+
actual_leave_duration: string | null;
|
|
121
|
+
|
|
122
|
+
@Column({ type: 'int', nullable: true ,default: null})
|
|
123
|
+
no_of_days_delayed: number | null;
|
|
124
|
+
|
|
100
125
|
|
|
101
126
|
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) {
|
|
102
127
|
super();
|
|
@@ -34,7 +34,7 @@ export class ReimbursementRequests extends BaseModel {
|
|
|
34
34
|
@Column({ type: 'date', nullable: true })
|
|
35
35
|
payment_date: Date;
|
|
36
36
|
|
|
37
|
-
@Column({ type: 'varchar', nullable:
|
|
37
|
+
@Column({ type: 'varchar', nullable: true })
|
|
38
38
|
currency : string;
|
|
39
39
|
|
|
40
40
|
@ManyToOne(() => FinancialRequests, fr => fr.reimbursementRequests)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { StayAfterHoursApprovalStatus } from './StayAfterHoursApprovalModel';
|
|
3
4
|
|
|
4
5
|
export enum StayAfterHoursMessageType {
|
|
5
6
|
TEXT = "text",
|
|
@@ -24,10 +25,42 @@ export class StayAfterHoursRequestChat extends BaseModel {
|
|
|
24
25
|
@Column({ type: 'integer', nullable: false })
|
|
25
26
|
user_id: number;
|
|
26
27
|
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
role_id: number;
|
|
30
|
+
|
|
27
31
|
@Column({ type: 'text', nullable: false })
|
|
28
32
|
message: string;
|
|
29
33
|
|
|
30
|
-
@Column({
|
|
34
|
+
@Column({
|
|
35
|
+
type: 'enum',
|
|
36
|
+
enum: StayAfterHoursMessageType,
|
|
37
|
+
default: StayAfterHoursMessageType.TEXT,
|
|
38
|
+
nullable: false
|
|
39
|
+
})
|
|
31
40
|
messageType: StayAfterHoursMessageType;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'enum', enum: StayAfterHoursApprovalStatus, default: StayAfterHoursApprovalStatus.PENDING, nullable: false })
|
|
43
|
+
status: StayAfterHoursApprovalStatus;
|
|
44
|
+
|
|
45
|
+
constructor(
|
|
46
|
+
request_id: number,
|
|
47
|
+
user_id: number,
|
|
48
|
+
role_id: number,
|
|
49
|
+
message: string,
|
|
50
|
+
service_id?: number,
|
|
51
|
+
sub_service_id?: number,
|
|
52
|
+
messageType?: StayAfterHoursMessageType,
|
|
53
|
+
status?: StayAfterHoursApprovalStatus
|
|
54
|
+
) {
|
|
55
|
+
super();
|
|
56
|
+
this.request_id = request_id;
|
|
57
|
+
this.service_id = service_id || null;
|
|
58
|
+
this.sub_service_id = sub_service_id || null;
|
|
59
|
+
this.user_id = user_id;
|
|
60
|
+
this.role_id = role_id;
|
|
61
|
+
this.message = message;
|
|
62
|
+
this.messageType = messageType || StayAfterHoursMessageType.TEXT;
|
|
63
|
+
this.status = status || StayAfterHoursApprovalStatus.PENDING;
|
|
64
|
+
}
|
|
32
65
|
}
|
|
33
66
|
|