@platform-modules/foreign-ministry 1.2.30 → 1.2.32
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 +4 -9
- package/dist/index.d.ts +13 -0
- package/dist/index.js +22 -1
- package/dist/models/MissionTravelApprovalModel.d.ts +25 -0
- package/dist/models/MissionTravelApprovalModel.js +106 -0
- package/dist/models/MissionTravelAttachmentModel.d.ts +13 -0
- package/dist/models/MissionTravelAttachmentModel.js +69 -0
- package/dist/models/MissionTravelChatModel.d.ts +12 -0
- package/dist/models/MissionTravelChatModel.js +64 -0
- package/dist/models/MissionTravelClassConfigModel.d.ts +10 -0
- package/dist/models/MissionTravelClassConfigModel.js +50 -0
- package/dist/models/MissionTravelCostModel.d.ts +14 -0
- package/dist/models/MissionTravelCostModel.js +74 -0
- package/dist/models/MissionTravelPerdiemModel.d.ts +10 -0
- package/dist/models/MissionTravelPerdiemModel.js +54 -0
- package/dist/models/MissionTravelPersonModel.d.ts +26 -0
- package/dist/models/MissionTravelPersonModel.js +115 -0
- package/dist/models/MissionTravelRequestModel.d.ts +36 -0
- package/dist/models/MissionTravelRequestModel.js +118 -0
- package/dist/models/MissionTravelWorkflowModel.d.ts +19 -0
- package/dist/models/MissionTravelWorkflowModel.js +80 -0
- package/dist/models/TravelClassEnum.d.ts +5 -0
- package/dist/models/TravelClassEnum.js +9 -0
- package/package.json +1 -1
- package/src/index.ts +14 -0
- package/src/models/LeaveConfigModel.ts +71 -71
- package/src/models/MissionTravelApprovalModel.ts +94 -0
- package/src/models/MissionTravelAttachmentModel.ts +56 -0
- package/src/models/MissionTravelChatModel.ts +52 -0
- package/src/models/MissionTravelCostModel.ts +62 -0
- package/src/models/MissionTravelPersonModel.ts +105 -0
- package/src/models/MissionTravelRequestModel.ts +108 -0
- package/src/models/MissionTravelWorkflowModel.ts +55 -0
- package/src/models/TravelClassEnum.ts +7 -0
- package/dist/models/LeaveApprovalDetailsModel.d.ts +0 -13
- package/dist/models/LeaveApprovalDetailsModel.js +0 -51
- package/dist/models/LeaveApprovalMatrixModel.d.ts +0 -7
- package/dist/models/LeaveApprovalMatrixModel.js +0 -40
- package/dist/models/UpdateAttendenceRequestModel.d.ts +0 -28
- package/dist/models/UpdateAttendenceRequestModel.js +0 -86
|
@@ -0,0 +1,115 @@
|
|
|
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.MissionTravelPersons = exports.AllowanceRatio = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var AllowanceRatio;
|
|
16
|
+
(function (AllowanceRatio) {
|
|
17
|
+
AllowanceRatio["RATIO_100"] = "100";
|
|
18
|
+
AllowanceRatio["RATIO_75"] = "75";
|
|
19
|
+
AllowanceRatio["RATIO_50"] = "50";
|
|
20
|
+
})(AllowanceRatio || (exports.AllowanceRatio = AllowanceRatio = {}));
|
|
21
|
+
let MissionTravelPersons = class MissionTravelPersons extends BaseModel_1.BaseModel {
|
|
22
|
+
constructor(request_id, service_id, sub_service_id, travel_person_name, user_id, country_id, allowance_ratio, travel_from_date, travel_to_date, travel_class, number_of_days, hotel_name, hotel_rating, hotel_price, travel_agent_name, allowance_amount, grade) {
|
|
23
|
+
super();
|
|
24
|
+
this.request_id = request_id;
|
|
25
|
+
this.service_id = service_id;
|
|
26
|
+
this.sub_service_id = sub_service_id;
|
|
27
|
+
this.travel_person_name = travel_person_name;
|
|
28
|
+
this.user_id = user_id;
|
|
29
|
+
this.country_id = country_id;
|
|
30
|
+
this.allowance_ratio = allowance_ratio;
|
|
31
|
+
this.travel_from_date = travel_from_date;
|
|
32
|
+
this.travel_to_date = travel_to_date;
|
|
33
|
+
this.travel_class = travel_class;
|
|
34
|
+
this.number_of_days = number_of_days;
|
|
35
|
+
this.hotel_name = hotel_name;
|
|
36
|
+
this.hotel_rating = hotel_rating;
|
|
37
|
+
this.hotel_price = hotel_price;
|
|
38
|
+
this.travel_agent_name = travel_agent_name;
|
|
39
|
+
this.allowance_amount = allowance_amount;
|
|
40
|
+
this.grade = grade;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.MissionTravelPersons = MissionTravelPersons;
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], MissionTravelPersons.prototype, "request_id", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], MissionTravelPersons.prototype, "service_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], MissionTravelPersons.prototype, "sub_service_id", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], MissionTravelPersons.prototype, "travel_person_name", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], MissionTravelPersons.prototype, "user_id", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
|
+
], MissionTravelPersons.prototype, "country_id", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 10, nullable: true }),
|
|
70
|
+
__metadata("design:type", Object)
|
|
71
|
+
], MissionTravelPersons.prototype, "allowance_ratio", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], MissionTravelPersons.prototype, "travel_from_date", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], MissionTravelPersons.prototype, "travel_to_date", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], MissionTravelPersons.prototype, "travel_class", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
86
|
+
__metadata("design:type", Object)
|
|
87
|
+
], MissionTravelPersons.prototype, "number_of_days", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
90
|
+
__metadata("design:type", Object)
|
|
91
|
+
], MissionTravelPersons.prototype, "hotel_name", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
94
|
+
__metadata("design:type", Object)
|
|
95
|
+
], MissionTravelPersons.prototype, "hotel_rating", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: true }),
|
|
98
|
+
__metadata("design:type", Object)
|
|
99
|
+
], MissionTravelPersons.prototype, "hotel_price", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
102
|
+
__metadata("design:type", Object)
|
|
103
|
+
], MissionTravelPersons.prototype, "travel_agent_name", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: true }),
|
|
106
|
+
__metadata("design:type", Object)
|
|
107
|
+
], MissionTravelPersons.prototype, "allowance_amount", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
110
|
+
__metadata("design:type", Object)
|
|
111
|
+
], MissionTravelPersons.prototype, "grade", void 0);
|
|
112
|
+
exports.MissionTravelPersons = MissionTravelPersons = __decorate([
|
|
113
|
+
(0, typeorm_1.Entity)({ name: 'mission_travel_persons' }),
|
|
114
|
+
__metadata("design:paramtypes", [Number, Object, Object, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])
|
|
115
|
+
], MissionTravelPersons);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum MissionTravelStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
APPROVED = "Approved",
|
|
5
|
+
REJECTED = "Rejected",
|
|
6
|
+
COMPLETED = "Completed",
|
|
7
|
+
CANCELLED = "Cancelled"
|
|
8
|
+
}
|
|
9
|
+
export declare enum MissionType {
|
|
10
|
+
INTERNAL = "Internal",
|
|
11
|
+
EXTERNAL = "External"
|
|
12
|
+
}
|
|
13
|
+
export declare enum DecisionType {
|
|
14
|
+
OFFICIAL_MISSION = "Official Mission",
|
|
15
|
+
TRAINING_COURSE = "Training Course",
|
|
16
|
+
SUMMON = "Summon",
|
|
17
|
+
ATTACHMENT = "Attachment"
|
|
18
|
+
}
|
|
19
|
+
export declare class MissionTravelRequests extends BaseModel {
|
|
20
|
+
user_id: number;
|
|
21
|
+
service_id: number | null;
|
|
22
|
+
sub_service_id: number | null;
|
|
23
|
+
department_participation: boolean;
|
|
24
|
+
mission_type: MissionType | null;
|
|
25
|
+
decision_type: DecisionType | null;
|
|
26
|
+
from_date: Date | null;
|
|
27
|
+
to_date: Date | null;
|
|
28
|
+
purpose_of_mission: string | null;
|
|
29
|
+
exchange_ratio: string | null;
|
|
30
|
+
number_of_days: number | null;
|
|
31
|
+
mission_allowance_cost: number | null;
|
|
32
|
+
status: MissionTravelStatus;
|
|
33
|
+
workflow_execution_id: string | null;
|
|
34
|
+
request_type: string | null;
|
|
35
|
+
constructor(user_id: number, service_id: number | null, sub_service_id: number | null, department_participation: boolean, mission_type: MissionType | null, decision_type: DecisionType | null, from_date: Date | null, to_date: Date | null, purpose_of_mission: string | null, exchange_ratio: string | null, number_of_days: number | null, mission_allowance_cost: number | null, request_type: string | null);
|
|
36
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
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.MissionTravelRequests = exports.DecisionType = exports.MissionType = exports.MissionTravelStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var MissionTravelStatus;
|
|
16
|
+
(function (MissionTravelStatus) {
|
|
17
|
+
MissionTravelStatus["PENDING"] = "Pending";
|
|
18
|
+
MissionTravelStatus["APPROVED"] = "Approved";
|
|
19
|
+
MissionTravelStatus["REJECTED"] = "Rejected";
|
|
20
|
+
MissionTravelStatus["COMPLETED"] = "Completed";
|
|
21
|
+
MissionTravelStatus["CANCELLED"] = "Cancelled";
|
|
22
|
+
})(MissionTravelStatus || (exports.MissionTravelStatus = MissionTravelStatus = {}));
|
|
23
|
+
var MissionType;
|
|
24
|
+
(function (MissionType) {
|
|
25
|
+
MissionType["INTERNAL"] = "Internal";
|
|
26
|
+
MissionType["EXTERNAL"] = "External";
|
|
27
|
+
})(MissionType || (exports.MissionType = MissionType = {}));
|
|
28
|
+
var DecisionType;
|
|
29
|
+
(function (DecisionType) {
|
|
30
|
+
DecisionType["OFFICIAL_MISSION"] = "Official Mission";
|
|
31
|
+
DecisionType["TRAINING_COURSE"] = "Training Course";
|
|
32
|
+
DecisionType["SUMMON"] = "Summon";
|
|
33
|
+
DecisionType["ATTACHMENT"] = "Attachment";
|
|
34
|
+
})(DecisionType || (exports.DecisionType = DecisionType = {}));
|
|
35
|
+
let MissionTravelRequests = class MissionTravelRequests extends BaseModel_1.BaseModel {
|
|
36
|
+
constructor(user_id, service_id, sub_service_id, department_participation, mission_type, decision_type, from_date, to_date, purpose_of_mission, exchange_ratio, number_of_days, mission_allowance_cost, request_type) {
|
|
37
|
+
super();
|
|
38
|
+
this.user_id = user_id;
|
|
39
|
+
this.service_id = service_id;
|
|
40
|
+
this.sub_service_id = sub_service_id;
|
|
41
|
+
this.department_participation = department_participation;
|
|
42
|
+
this.mission_type = mission_type;
|
|
43
|
+
this.decision_type = decision_type;
|
|
44
|
+
this.from_date = from_date;
|
|
45
|
+
this.to_date = to_date;
|
|
46
|
+
this.purpose_of_mission = purpose_of_mission;
|
|
47
|
+
this.exchange_ratio = exchange_ratio;
|
|
48
|
+
this.number_of_days = number_of_days;
|
|
49
|
+
this.mission_allowance_cost = mission_allowance_cost;
|
|
50
|
+
this.status = MissionTravelStatus.PENDING;
|
|
51
|
+
this.request_type = request_type;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
exports.MissionTravelRequests = MissionTravelRequests;
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], MissionTravelRequests.prototype, "user_id", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], MissionTravelRequests.prototype, "service_id", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], MissionTravelRequests.prototype, "sub_service_id", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: 'boolean', nullable: true, default: false }),
|
|
69
|
+
__metadata("design:type", Boolean)
|
|
70
|
+
], MissionTravelRequests.prototype, "department_participation", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: MissionType, nullable: true }),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], MissionTravelRequests.prototype, "mission_type", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: DecisionType, nullable: true }),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], MissionTravelRequests.prototype, "decision_type", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
81
|
+
__metadata("design:type", Object)
|
|
82
|
+
], MissionTravelRequests.prototype, "from_date", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
85
|
+
__metadata("design:type", Object)
|
|
86
|
+
], MissionTravelRequests.prototype, "to_date", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
89
|
+
__metadata("design:type", Object)
|
|
90
|
+
], MissionTravelRequests.prototype, "purpose_of_mission", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
93
|
+
__metadata("design:type", Object)
|
|
94
|
+
], MissionTravelRequests.prototype, "exchange_ratio", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
97
|
+
__metadata("design:type", Object)
|
|
98
|
+
], MissionTravelRequests.prototype, "number_of_days", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: true }),
|
|
101
|
+
__metadata("design:type", Object)
|
|
102
|
+
], MissionTravelRequests.prototype, "mission_allowance_cost", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: MissionTravelStatus, default: MissionTravelStatus.PENDING, nullable: false }),
|
|
105
|
+
__metadata("design:type", String)
|
|
106
|
+
], MissionTravelRequests.prototype, "status", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
109
|
+
__metadata("design:type", Object)
|
|
110
|
+
], MissionTravelRequests.prototype, "workflow_execution_id", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
113
|
+
__metadata("design:type", Object)
|
|
114
|
+
], MissionTravelRequests.prototype, "request_type", void 0);
|
|
115
|
+
exports.MissionTravelRequests = MissionTravelRequests = __decorate([
|
|
116
|
+
(0, typeorm_1.Entity)({ name: 'mission_travel_requests' }),
|
|
117
|
+
__metadata("design:paramtypes", [Number, Object, Object, Boolean, Object, Object, Object, Object, Object, Object, Object, Object, Object])
|
|
118
|
+
], MissionTravelRequests);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum MissionTravelWorkFlowStatus {
|
|
3
|
+
COMPLETED = "Completed",
|
|
4
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
5
|
+
PENDING = "Pending"
|
|
6
|
+
}
|
|
7
|
+
export declare class MissionTravelWorkFlow extends BaseModel {
|
|
8
|
+
request_id: number;
|
|
9
|
+
service_id: number | null;
|
|
10
|
+
sub_service_id: number | null;
|
|
11
|
+
order: number | null;
|
|
12
|
+
content: string;
|
|
13
|
+
status: MissionTravelWorkFlowStatus;
|
|
14
|
+
user_id: number | null;
|
|
15
|
+
role_id: number | null;
|
|
16
|
+
department_id: number | null;
|
|
17
|
+
section_id: number | null;
|
|
18
|
+
constructor(request_id: number, content: string, status: MissionTravelWorkFlowStatus, order?: number, service_id?: number | null, sub_service_id?: number | null, user_id?: number | null, role_id?: number | null, department_id?: number | null, section_id?: number | null);
|
|
19
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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.MissionTravelWorkFlow = exports.MissionTravelWorkFlowStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var MissionTravelWorkFlowStatus;
|
|
16
|
+
(function (MissionTravelWorkFlowStatus) {
|
|
17
|
+
MissionTravelWorkFlowStatus["COMPLETED"] = "Completed";
|
|
18
|
+
MissionTravelWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
19
|
+
MissionTravelWorkFlowStatus["PENDING"] = "Pending";
|
|
20
|
+
})(MissionTravelWorkFlowStatus || (exports.MissionTravelWorkFlowStatus = MissionTravelWorkFlowStatus = {}));
|
|
21
|
+
let MissionTravelWorkFlow = class MissionTravelWorkFlow extends BaseModel_1.BaseModel {
|
|
22
|
+
constructor(request_id, content, status, order, service_id, sub_service_id, user_id, role_id, department_id, section_id) {
|
|
23
|
+
super();
|
|
24
|
+
this.request_id = request_id;
|
|
25
|
+
this.content = content;
|
|
26
|
+
this.status = status;
|
|
27
|
+
this.order = order || null;
|
|
28
|
+
this.service_id = service_id ?? null;
|
|
29
|
+
this.sub_service_id = sub_service_id ?? null;
|
|
30
|
+
this.user_id = user_id || null;
|
|
31
|
+
this.role_id = role_id || null;
|
|
32
|
+
this.department_id = department_id || null;
|
|
33
|
+
this.section_id = section_id || null;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.MissionTravelWorkFlow = MissionTravelWorkFlow;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], MissionTravelWorkFlow.prototype, "request_id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], MissionTravelWorkFlow.prototype, "service_id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], MissionTravelWorkFlow.prototype, "sub_service_id", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], MissionTravelWorkFlow.prototype, "order", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], MissionTravelWorkFlow.prototype, "content", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: MissionTravelWorkFlowStatus, default: MissionTravelWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], MissionTravelWorkFlow.prototype, "status", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], MissionTravelWorkFlow.prototype, "user_id", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], MissionTravelWorkFlow.prototype, "role_id", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
71
|
+
__metadata("design:type", Object)
|
|
72
|
+
], MissionTravelWorkFlow.prototype, "department_id", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
75
|
+
__metadata("design:type", Object)
|
|
76
|
+
], MissionTravelWorkFlow.prototype, "section_id", void 0);
|
|
77
|
+
exports.MissionTravelWorkFlow = MissionTravelWorkFlow = __decorate([
|
|
78
|
+
(0, typeorm_1.Entity)({ name: 'mission_travel_workflows' }),
|
|
79
|
+
__metadata("design:paramtypes", [Number, String, String, Number, Object, Object, Object, Object, Object, Object])
|
|
80
|
+
], MissionTravelWorkFlow);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TravelClass = void 0;
|
|
4
|
+
var TravelClass;
|
|
5
|
+
(function (TravelClass) {
|
|
6
|
+
TravelClass["ECONOMY"] = "Economy class";
|
|
7
|
+
TravelClass["BUSINESS"] = "Business class";
|
|
8
|
+
TravelClass["FIRST"] = "First class";
|
|
9
|
+
})(TravelClass || (exports.TravelClass = TravelClass = {}));
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -169,3 +169,17 @@ export * from './models/EmployeeCardApprovalsModel';
|
|
|
169
169
|
export * from './models/EmployeeCardWorkFlowModel';
|
|
170
170
|
export * from './models/EmployeeCardChatsModel';
|
|
171
171
|
export * from './models/EmployeeCardAttachmentsModel';
|
|
172
|
+
// Mission Travel Models
|
|
173
|
+
export * from './models/MissionTravelRequestModel';
|
|
174
|
+
export { MissionTravelStatus, MissionType, DecisionType } from './models/MissionTravelRequestModel';
|
|
175
|
+
export * from './models/MissionTravelPersonModel';
|
|
176
|
+
export { AllowanceRatio } from './models/MissionTravelPersonModel';
|
|
177
|
+
export * from './models/MissionTravelCostModel';
|
|
178
|
+
export * from './models/MissionTravelApprovalModel';
|
|
179
|
+
export { MissionTravelApprovalStatus } from './models/MissionTravelApprovalModel';
|
|
180
|
+
export * from './models/MissionTravelAttachmentModel';
|
|
181
|
+
export * from './models/MissionTravelWorkflowModel';
|
|
182
|
+
export { MissionTravelWorkFlowStatus } from './models/MissionTravelWorkflowModel';
|
|
183
|
+
export * from './models/MissionTravelChatModel';
|
|
184
|
+
export * from './models/TravelClassEnum';
|
|
185
|
+
export { TravelClass } from './models/TravelClassEnum';
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
export enum enumFrequency {
|
|
5
|
-
Monthly = 'Monthly',
|
|
6
|
-
Yearly = 'Yearly',
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
//This model is used to store the Financial Grade declaration on the Admin Side
|
|
10
|
-
@Entity({ name: 'leave_configuration' })
|
|
11
|
-
export class LeaveConfiguration extends BaseModel {
|
|
12
|
-
|
|
13
|
-
@Column({ type: 'varchar', nullable: true })
|
|
14
|
-
category: string;
|
|
15
|
-
|
|
16
|
-
@Column({ type: 'int', nullable: true })
|
|
17
|
-
MandC_id: number;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'int', nullable: true })
|
|
20
|
-
leave_type_id: number;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'varchar', nullable: true })
|
|
23
|
-
frequency: enumFrequency;
|
|
24
|
-
|
|
25
|
-
@Column({ type: 'varchar', nullable: true })
|
|
26
|
-
region: string;
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'varchar', nullable: true })
|
|
29
|
-
country: string;
|
|
30
|
-
|
|
31
|
-
@Column({ type: 'varchar', nullable: true })
|
|
32
|
-
location: string;
|
|
33
|
-
|
|
34
|
-
@Column({ nullable: true, default: false })
|
|
35
|
-
is_carryforward: boolean;
|
|
36
|
-
|
|
37
|
-
@Column({ type: 'int', nullable: true, default: 0 })
|
|
38
|
-
carryforward_limit: number;
|
|
39
|
-
|
|
40
|
-
@Column({ type: 'date', nullable: true })
|
|
41
|
-
from_date: Date;
|
|
42
|
-
|
|
43
|
-
@Column({ type: 'date', nullable: true })
|
|
44
|
-
to_date: Date;
|
|
45
|
-
|
|
46
|
-
@Column({ type: 'varchar', nullable: true })
|
|
47
|
-
reason: string;
|
|
48
|
-
|
|
49
|
-
@Column({ type: 'int', nullable: true })
|
|
50
|
-
emergency_balance_days: number | null;
|
|
51
|
-
|
|
52
|
-
@Column({ type: 'date', nullable: true })
|
|
53
|
-
last_credited: Date | null;
|
|
54
|
-
|
|
55
|
-
constructor(category: string, MandC_id: number, leave_type_id: number, frequency: enumFrequency, region: string, country: string, location: string, is_carryforward: boolean, carryforward_limit: number, from_date: Date, to_date: Date, reason: string, emergency_balance_days?: number|null, last_credited?: Date|null) {
|
|
56
|
-
super();
|
|
57
|
-
this.category = category;
|
|
58
|
-
this.MandC_id = MandC_id;
|
|
59
|
-
this.leave_type_id = leave_type_id;
|
|
60
|
-
this.frequency = frequency;
|
|
61
|
-
this.region = region;
|
|
62
|
-
this.country = country;
|
|
63
|
-
this.location = location;
|
|
64
|
-
this.is_carryforward = is_carryforward;
|
|
65
|
-
this.carryforward_limit = carryforward_limit;
|
|
66
|
-
this.from_date = from_date;
|
|
67
|
-
this.to_date = to_date;
|
|
68
|
-
this.reason = reason;
|
|
69
|
-
this.emergency_balance_days = emergency_balance_days ?? null;
|
|
70
|
-
this.last_credited = last_credited ?? null;
|
|
71
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum enumFrequency {
|
|
5
|
+
Monthly = 'Monthly',
|
|
6
|
+
Yearly = 'Yearly',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//This model is used to store the Financial Grade declaration on the Admin Side
|
|
10
|
+
@Entity({ name: 'leave_configuration' })
|
|
11
|
+
export class LeaveConfiguration extends BaseModel {
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'varchar', nullable: true })
|
|
14
|
+
category: string;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'int', nullable: true })
|
|
17
|
+
MandC_id: number;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'int', nullable: true })
|
|
20
|
+
leave_type_id: number;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', nullable: true })
|
|
23
|
+
frequency: enumFrequency;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'varchar', nullable: true })
|
|
26
|
+
region: string;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'varchar', nullable: true })
|
|
29
|
+
country: string;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'varchar', nullable: true })
|
|
32
|
+
location: string;
|
|
33
|
+
|
|
34
|
+
@Column({ nullable: true, default: false })
|
|
35
|
+
is_carryforward: boolean;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'int', nullable: true, default: 0 })
|
|
38
|
+
carryforward_limit: number;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'date', nullable: true })
|
|
41
|
+
from_date: Date;
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'date', nullable: true })
|
|
44
|
+
to_date: Date;
|
|
45
|
+
|
|
46
|
+
@Column({ type: 'varchar', nullable: true })
|
|
47
|
+
reason: string;
|
|
48
|
+
|
|
49
|
+
@Column({ type: 'int', nullable: true })
|
|
50
|
+
emergency_balance_days: number | null;
|
|
51
|
+
|
|
52
|
+
@Column({ type: 'date', nullable: true })
|
|
53
|
+
last_credited: Date | null;
|
|
54
|
+
|
|
55
|
+
constructor(category: string, MandC_id: number, leave_type_id: number, frequency: enumFrequency, region: string, country: string, location: string, is_carryforward: boolean, carryforward_limit: number, from_date: Date, to_date: Date, reason: string, emergency_balance_days?: number|null, last_credited?: Date|null) {
|
|
56
|
+
super();
|
|
57
|
+
this.category = category;
|
|
58
|
+
this.MandC_id = MandC_id;
|
|
59
|
+
this.leave_type_id = leave_type_id;
|
|
60
|
+
this.frequency = frequency;
|
|
61
|
+
this.region = region;
|
|
62
|
+
this.country = country;
|
|
63
|
+
this.location = location;
|
|
64
|
+
this.is_carryforward = is_carryforward;
|
|
65
|
+
this.carryforward_limit = carryforward_limit;
|
|
66
|
+
this.from_date = from_date;
|
|
67
|
+
this.to_date = to_date;
|
|
68
|
+
this.reason = reason;
|
|
69
|
+
this.emergency_balance_days = emergency_balance_days ?? null;
|
|
70
|
+
this.last_credited = last_credited ?? null;
|
|
71
|
+
}
|
|
72
72
|
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum MissionTravelApprovalStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
APPROVED = "Approved",
|
|
7
|
+
REJECTED = "Rejected",
|
|
8
|
+
RFC = "RFC" // Request for Change
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Entity({ name: 'mission_travel_approvals' })
|
|
12
|
+
export class MissionTravelApprovalDetails extends BaseModel {
|
|
13
|
+
@Column({ type: 'integer', nullable: false })
|
|
14
|
+
request_id: number;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'integer', nullable: true })
|
|
17
|
+
service_id: number | null;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
sub_service_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'integer', nullable: false })
|
|
23
|
+
level: number;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'integer', nullable: true })
|
|
26
|
+
approver_role_id: number;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
department_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'integer', nullable: true })
|
|
32
|
+
section_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'integer', nullable: true })
|
|
35
|
+
approver_user_id: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'integer', nullable: true })
|
|
38
|
+
delegate_user_id: number | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'integer', nullable: true })
|
|
41
|
+
approved_by: number | null;
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'varchar', length: 500, nullable: true, default: '' })
|
|
44
|
+
comment: string;
|
|
45
|
+
|
|
46
|
+
@Column({ type: 'enum', enum: MissionTravelApprovalStatus, default: MissionTravelApprovalStatus.PENDING, nullable: false })
|
|
47
|
+
approval_status: MissionTravelApprovalStatus;
|
|
48
|
+
|
|
49
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
50
|
+
is_allowed: boolean;
|
|
51
|
+
|
|
52
|
+
@Column({ type: 'boolean', default: false, nullable: false })
|
|
53
|
+
is_reassign: boolean;
|
|
54
|
+
|
|
55
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
56
|
+
is_approval: boolean;
|
|
57
|
+
|
|
58
|
+
constructor(
|
|
59
|
+
request_id: number,
|
|
60
|
+
service_id: number | null,
|
|
61
|
+
sub_service_id: number | null,
|
|
62
|
+
level: number,
|
|
63
|
+
approver_role_id: number,
|
|
64
|
+
department_id: number | null,
|
|
65
|
+
section_id: number | null,
|
|
66
|
+
approver_user_id: number | null,
|
|
67
|
+
delegate_user_id: number | null,
|
|
68
|
+
approved_by: number | null,
|
|
69
|
+
comment: string,
|
|
70
|
+
approval_status: MissionTravelApprovalStatus,
|
|
71
|
+
is_allowed: boolean,
|
|
72
|
+
is_reassign: boolean,
|
|
73
|
+
is_approval: boolean
|
|
74
|
+
) {
|
|
75
|
+
super();
|
|
76
|
+
this.request_id = request_id;
|
|
77
|
+
this.service_id = service_id;
|
|
78
|
+
this.sub_service_id = sub_service_id;
|
|
79
|
+
this.level = level;
|
|
80
|
+
this.approver_role_id = approver_role_id;
|
|
81
|
+
this.department_id = department_id;
|
|
82
|
+
this.section_id = section_id;
|
|
83
|
+
this.approver_user_id = approver_user_id;
|
|
84
|
+
this.delegate_user_id = delegate_user_id;
|
|
85
|
+
this.approved_by = approved_by;
|
|
86
|
+
this.comment = comment;
|
|
87
|
+
this.approval_status = approval_status;
|
|
88
|
+
this.is_allowed = is_allowed;
|
|
89
|
+
this.is_reassign = is_reassign;
|
|
90
|
+
this.is_approval = is_approval;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|