@platform-modules/foreign-ministry 1.3.1 → 1.3.3
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 +3 -17
- package/dist/models/MissionTravelApprovalModel.d.ts +4 -2
- package/dist/models/MissionTravelApprovalModel.js +9 -3
- package/dist/models/MissionTravelClassConfigModel.d.ts +10 -0
- package/dist/models/MissionTravelClassConfigModel.js +50 -0
- package/dist/models/MissionTravelPerdiemModel.d.ts +10 -0
- package/dist/models/MissionTravelPerdiemModel.js +54 -0
- package/package.json +1 -1
- package/src/models/LeaveConfigModel.ts +71 -71
- package/src/models/MissionTravelApprovalModel.ts +100 -94
- package/src/models/MissionTravelAttachmentModel.ts +56 -56
- package/src/models/MissionTravelChatModel.ts +52 -52
- package/src/models/MissionTravelPersonModel.ts +105 -105
- package/src/models/MissionTravelRequestModel.ts +1 -0
- package/src/models/MissionTravelWorkflowModel.ts +54 -54
- package/dist/models/HelpContentMappedCategoriesModel.d.ts +0 -6
- package/dist/models/HelpContentMappedCategoriesModel.js +0 -34
- package/dist/models/HelpContentMappedTagsModel.d.ts +0 -6
- package/dist/models/HelpContentMappedTagsModel.js +0 -34
- package/dist/models/HelpContentTagsModel.d.ts +0 -5
- package/dist/models/HelpContentTagsModel.js +0 -29
- package/dist/models/questionTagsModel.d.ts +0 -6
- package/dist/models/questionTagsModel.js +0 -34
- /package/src/models/{LeaveConfigGradesModel.ts → LeaveConfigGradesModel.Ts} +0 -0
package/.env
CHANGED
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
# DB_PORT=5433
|
|
3
|
-
# DB_USER=postgres
|
|
4
|
-
# DB_PASS=123
|
|
5
|
-
# DB_NAME=FM
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
DB_HOST=164.52.222.169
|
|
1
|
+
DB_HOST=localhost
|
|
10
2
|
DB_PORT=5432
|
|
11
|
-
DB_USER=
|
|
12
|
-
DB_PASS=
|
|
3
|
+
DB_USER=postgres
|
|
4
|
+
DB_PASS=stevejobs
|
|
13
5
|
DB_NAME=FM
|
|
14
|
-
|
|
15
|
-
# DB_HOST=216.48.187.46
|
|
16
|
-
# DB_PORT=5432
|
|
17
|
-
# DB_USER=adminuser
|
|
18
|
-
# DB_PASS=postgres_caa_fm_qa_34567
|
|
19
|
-
# DB_NAME=FM_QA
|
|
@@ -3,7 +3,8 @@ export declare enum MissionTravelApprovalStatus {
|
|
|
3
3
|
PENDING = "Pending",
|
|
4
4
|
APPROVED = "Approved",
|
|
5
5
|
REJECTED = "Rejected",
|
|
6
|
-
RFC = "RFC"
|
|
6
|
+
RFC = "RFC",// Request for Change
|
|
7
|
+
IN_PROGRESS = "In Progress"
|
|
7
8
|
}
|
|
8
9
|
export declare class MissionTravelApprovalDetails extends BaseModel {
|
|
9
10
|
request_id: number;
|
|
@@ -21,5 +22,6 @@ export declare class MissionTravelApprovalDetails extends BaseModel {
|
|
|
21
22
|
is_allowed: boolean;
|
|
22
23
|
is_reassign: boolean;
|
|
23
24
|
is_approval: boolean;
|
|
24
|
-
|
|
25
|
+
is_review: boolean;
|
|
26
|
+
constructor(request_id: number, service_id: number | null, sub_service_id: number | null, level: number, approver_role_id: number, department_id: number | null, section_id: number | null, approver_user_id: number | null, delegate_user_id: number | null, approved_by: number | null, comment: string, approval_status: MissionTravelApprovalStatus, is_allowed: boolean, is_reassign: boolean, is_approval: boolean, is_review?: boolean);
|
|
25
27
|
}
|
|
@@ -17,10 +17,11 @@ var MissionTravelApprovalStatus;
|
|
|
17
17
|
MissionTravelApprovalStatus["PENDING"] = "Pending";
|
|
18
18
|
MissionTravelApprovalStatus["APPROVED"] = "Approved";
|
|
19
19
|
MissionTravelApprovalStatus["REJECTED"] = "Rejected";
|
|
20
|
-
MissionTravelApprovalStatus["RFC"] = "RFC";
|
|
20
|
+
MissionTravelApprovalStatus["RFC"] = "RFC";
|
|
21
|
+
MissionTravelApprovalStatus["IN_PROGRESS"] = "In Progress";
|
|
21
22
|
})(MissionTravelApprovalStatus || (exports.MissionTravelApprovalStatus = MissionTravelApprovalStatus = {}));
|
|
22
23
|
let MissionTravelApprovalDetails = class MissionTravelApprovalDetails extends BaseModel_1.BaseModel {
|
|
23
|
-
constructor(request_id, service_id, sub_service_id, level, approver_role_id, department_id, section_id, approver_user_id, delegate_user_id, approved_by, comment, approval_status, is_allowed, is_reassign, is_approval) {
|
|
24
|
+
constructor(request_id, service_id, sub_service_id, level, approver_role_id, department_id, section_id, approver_user_id, delegate_user_id, approved_by, comment, approval_status, is_allowed, is_reassign, is_approval, is_review) {
|
|
24
25
|
super();
|
|
25
26
|
this.request_id = request_id;
|
|
26
27
|
this.service_id = service_id;
|
|
@@ -37,6 +38,7 @@ let MissionTravelApprovalDetails = class MissionTravelApprovalDetails extends Ba
|
|
|
37
38
|
this.is_allowed = is_allowed;
|
|
38
39
|
this.is_reassign = is_reassign;
|
|
39
40
|
this.is_approval = is_approval;
|
|
41
|
+
this.is_review = is_review ?? false;
|
|
40
42
|
}
|
|
41
43
|
};
|
|
42
44
|
exports.MissionTravelApprovalDetails = MissionTravelApprovalDetails;
|
|
@@ -100,7 +102,11 @@ __decorate([
|
|
|
100
102
|
(0, typeorm_1.Column)({ type: 'boolean', default: true, nullable: false }),
|
|
101
103
|
__metadata("design:type", Boolean)
|
|
102
104
|
], MissionTravelApprovalDetails.prototype, "is_approval", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false, nullable: false }),
|
|
107
|
+
__metadata("design:type", Boolean)
|
|
108
|
+
], MissionTravelApprovalDetails.prototype, "is_review", void 0);
|
|
103
109
|
exports.MissionTravelApprovalDetails = MissionTravelApprovalDetails = __decorate([
|
|
104
110
|
(0, typeorm_1.Entity)({ name: 'mission_travel_approvals' }),
|
|
105
|
-
__metadata("design:paramtypes", [Number, Object, Object, Number, Number, Object, Object, Object, Object, Object, String, String, Boolean, Boolean, Boolean])
|
|
111
|
+
__metadata("design:paramtypes", [Number, Object, Object, Number, Number, Object, Object, Object, Object, Object, String, String, Boolean, Boolean, Boolean, Boolean])
|
|
106
112
|
], MissionTravelApprovalDetails);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { TravelClass } from './MissionTravelPersonModel';
|
|
3
|
+
export declare class MissionTravelClassConfig extends BaseModel {
|
|
4
|
+
grade: number | null;
|
|
5
|
+
position: string | null;
|
|
6
|
+
travel_class: TravelClass;
|
|
7
|
+
is_active: boolean;
|
|
8
|
+
description: string | null;
|
|
9
|
+
constructor(grade: number | null, position: string | null, travel_class: TravelClass, description: string | null);
|
|
10
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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.MissionTravelClassConfig = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const MissionTravelPersonModel_1 = require("./MissionTravelPersonModel");
|
|
16
|
+
let MissionTravelClassConfig = class MissionTravelClassConfig extends BaseModel_1.BaseModel {
|
|
17
|
+
constructor(grade, position, travel_class, description) {
|
|
18
|
+
super();
|
|
19
|
+
this.grade = grade;
|
|
20
|
+
this.position = position;
|
|
21
|
+
this.travel_class = travel_class;
|
|
22
|
+
this.description = description;
|
|
23
|
+
this.is_active = true;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.MissionTravelClassConfig = MissionTravelClassConfig;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
|
+
], MissionTravelClassConfig.prototype, "grade", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], MissionTravelClassConfig.prototype, "position", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: MissionTravelPersonModel_1.TravelClass, nullable: false }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], MissionTravelClassConfig.prototype, "travel_class", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
41
|
+
__metadata("design:type", Boolean)
|
|
42
|
+
], MissionTravelClassConfig.prototype, "is_active", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], MissionTravelClassConfig.prototype, "description", void 0);
|
|
47
|
+
exports.MissionTravelClassConfig = MissionTravelClassConfig = __decorate([
|
|
48
|
+
(0, typeorm_1.Entity)({ name: 'mission_travel_class_config' }),
|
|
49
|
+
__metadata("design:paramtypes", [Object, Object, String, Object])
|
|
50
|
+
], MissionTravelClassConfig);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class MissionTravelPerdiem extends BaseModel {
|
|
3
|
+
grade: number;
|
|
4
|
+
perdiem_amount: number;
|
|
5
|
+
currency: string | null;
|
|
6
|
+
effective_from: Date | null;
|
|
7
|
+
effective_to: Date | null;
|
|
8
|
+
is_active: boolean;
|
|
9
|
+
constructor(grade: number, perdiem_amount: number, currency: string | null, effective_from: Date | null, effective_to: Date | null);
|
|
10
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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.MissionTravelPerdiem = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let MissionTravelPerdiem = class MissionTravelPerdiem extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(grade, perdiem_amount, currency, effective_from, effective_to) {
|
|
17
|
+
super();
|
|
18
|
+
this.grade = grade;
|
|
19
|
+
this.perdiem_amount = perdiem_amount;
|
|
20
|
+
this.currency = currency;
|
|
21
|
+
this.effective_from = effective_from;
|
|
22
|
+
this.effective_to = effective_to;
|
|
23
|
+
this.is_active = true;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.MissionTravelPerdiem = MissionTravelPerdiem;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], MissionTravelPerdiem.prototype, "grade", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: false }),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], MissionTravelPerdiem.prototype, "perdiem_amount", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], MissionTravelPerdiem.prototype, "currency", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], MissionTravelPerdiem.prototype, "effective_from", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], MissionTravelPerdiem.prototype, "effective_to", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
49
|
+
__metadata("design:type", Boolean)
|
|
50
|
+
], MissionTravelPerdiem.prototype, "is_active", void 0);
|
|
51
|
+
exports.MissionTravelPerdiem = MissionTravelPerdiem = __decorate([
|
|
52
|
+
(0, typeorm_1.Entity)({ name: 'mission_travel_perdiem' }),
|
|
53
|
+
__metadata("design:paramtypes", [Number, Number, Object, Object, Object])
|
|
54
|
+
], MissionTravelPerdiem);
|
package/package.json
CHANGED
|
@@ -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
|
}
|
|
@@ -1,94 +1,100 @@
|
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
this.
|
|
82
|
-
this.
|
|
83
|
-
this.
|
|
84
|
-
this.
|
|
85
|
-
this.
|
|
86
|
-
this.
|
|
87
|
-
this.
|
|
88
|
-
this.
|
|
89
|
-
this.
|
|
90
|
-
this.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
+
IN_PROGRESS = "In Progress"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Entity({ name: 'mission_travel_approvals' })
|
|
13
|
+
export class MissionTravelApprovalDetails extends BaseModel {
|
|
14
|
+
@Column({ type: 'integer', nullable: false })
|
|
15
|
+
request_id: number;
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'integer', nullable: true })
|
|
18
|
+
service_id: number | null;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'integer', nullable: true })
|
|
21
|
+
sub_service_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'integer', nullable: false })
|
|
24
|
+
level: number;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'integer', nullable: true })
|
|
27
|
+
approver_role_id: number;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'integer', nullable: true })
|
|
30
|
+
department_id: number | null;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'integer', nullable: true })
|
|
33
|
+
section_id: number | null;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'integer', nullable: true })
|
|
36
|
+
approver_user_id: number | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'integer', nullable: true })
|
|
39
|
+
delegate_user_id: number | null;
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'integer', nullable: true })
|
|
42
|
+
approved_by: number | null;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'varchar', length: 500, nullable: true, default: '' })
|
|
45
|
+
comment: string;
|
|
46
|
+
|
|
47
|
+
@Column({ type: 'enum', enum: MissionTravelApprovalStatus, default: MissionTravelApprovalStatus.PENDING, nullable: false })
|
|
48
|
+
approval_status: MissionTravelApprovalStatus;
|
|
49
|
+
|
|
50
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
51
|
+
is_allowed: boolean;
|
|
52
|
+
|
|
53
|
+
@Column({ type: 'boolean', default: false, nullable: false })
|
|
54
|
+
is_reassign: boolean;
|
|
55
|
+
|
|
56
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
57
|
+
is_approval: boolean;
|
|
58
|
+
|
|
59
|
+
@Column({ type: 'boolean', default: false, nullable: false })
|
|
60
|
+
is_review: boolean;
|
|
61
|
+
|
|
62
|
+
constructor(
|
|
63
|
+
request_id: number,
|
|
64
|
+
service_id: number | null,
|
|
65
|
+
sub_service_id: number | null,
|
|
66
|
+
level: number,
|
|
67
|
+
approver_role_id: number,
|
|
68
|
+
department_id: number | null,
|
|
69
|
+
section_id: number | null,
|
|
70
|
+
approver_user_id: number | null,
|
|
71
|
+
delegate_user_id: number | null,
|
|
72
|
+
approved_by: number | null,
|
|
73
|
+
comment: string,
|
|
74
|
+
approval_status: MissionTravelApprovalStatus,
|
|
75
|
+
is_allowed: boolean,
|
|
76
|
+
is_reassign: boolean,
|
|
77
|
+
is_approval: boolean,
|
|
78
|
+
is_review?: boolean
|
|
79
|
+
) {
|
|
80
|
+
super();
|
|
81
|
+
this.request_id = request_id;
|
|
82
|
+
this.service_id = service_id;
|
|
83
|
+
this.sub_service_id = sub_service_id;
|
|
84
|
+
this.level = level;
|
|
85
|
+
this.approver_role_id = approver_role_id;
|
|
86
|
+
this.department_id = department_id;
|
|
87
|
+
this.section_id = section_id;
|
|
88
|
+
this.approver_user_id = approver_user_id;
|
|
89
|
+
this.delegate_user_id = delegate_user_id;
|
|
90
|
+
this.approved_by = approved_by;
|
|
91
|
+
this.comment = comment;
|
|
92
|
+
this.approval_status = approval_status;
|
|
93
|
+
this.is_allowed = is_allowed;
|
|
94
|
+
this.is_reassign = is_reassign;
|
|
95
|
+
this.is_approval = is_approval;
|
|
96
|
+
this.is_review = is_review ?? false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
@Entity({ name: 'mission_travel_attachments' })
|
|
5
|
-
export class MissionTravelRequestAttachment extends BaseModel {
|
|
6
|
-
@Column({ type: 'integer', nullable: false })
|
|
7
|
-
request_id: number;
|
|
8
|
-
|
|
9
|
-
@Column({ type: 'integer', nullable: true })
|
|
10
|
-
service_id: number | null;
|
|
11
|
-
|
|
12
|
-
@Column({ type: 'integer', nullable: true })
|
|
13
|
-
sub_service_id: number | null;
|
|
14
|
-
|
|
15
|
-
@Column({ type: 'integer', nullable: false })
|
|
16
|
-
uploaded_by: number;
|
|
17
|
-
|
|
18
|
-
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
19
|
-
file_url: string;
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
22
|
-
file_name: string;
|
|
23
|
-
|
|
24
|
-
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
25
|
-
file_type: string;
|
|
26
|
-
|
|
27
|
-
@Column({ type: 'bigint', nullable: true })
|
|
28
|
-
file_size: number | null;
|
|
29
|
-
|
|
30
|
-
@Column({ type: 'text', nullable: true })
|
|
31
|
-
description: string;
|
|
32
|
-
|
|
33
|
-
constructor(
|
|
34
|
-
request_id: number,
|
|
35
|
-
uploaded_by: number,
|
|
36
|
-
file_url: string,
|
|
37
|
-
file_name?: string,
|
|
38
|
-
file_type?: string,
|
|
39
|
-
file_size?: number,
|
|
40
|
-
description?: string,
|
|
41
|
-
service_id?: number | null,
|
|
42
|
-
sub_service_id?: number | null
|
|
43
|
-
) {
|
|
44
|
-
super();
|
|
45
|
-
this.request_id = request_id;
|
|
46
|
-
this.uploaded_by = uploaded_by;
|
|
47
|
-
this.file_url = file_url;
|
|
48
|
-
this.file_name = file_name || '';
|
|
49
|
-
this.file_type = file_type || '';
|
|
50
|
-
this.file_size = file_size || null;
|
|
51
|
-
this.description = description || '';
|
|
52
|
-
this.service_id = service_id ?? null;
|
|
53
|
-
this.sub_service_id = sub_service_id ?? null;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'mission_travel_attachments' })
|
|
5
|
+
export class MissionTravelRequestAttachment extends BaseModel {
|
|
6
|
+
@Column({ type: 'integer', nullable: false })
|
|
7
|
+
request_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'integer', nullable: true })
|
|
10
|
+
service_id: number | null;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'integer', nullable: true })
|
|
13
|
+
sub_service_id: number | null;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'integer', nullable: false })
|
|
16
|
+
uploaded_by: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
19
|
+
file_url: string;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
22
|
+
file_name: string;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
25
|
+
file_type: string;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'bigint', nullable: true })
|
|
28
|
+
file_size: number | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'text', nullable: true })
|
|
31
|
+
description: string;
|
|
32
|
+
|
|
33
|
+
constructor(
|
|
34
|
+
request_id: number,
|
|
35
|
+
uploaded_by: number,
|
|
36
|
+
file_url: string,
|
|
37
|
+
file_name?: string,
|
|
38
|
+
file_type?: string,
|
|
39
|
+
file_size?: number,
|
|
40
|
+
description?: string,
|
|
41
|
+
service_id?: number | null,
|
|
42
|
+
sub_service_id?: number | null
|
|
43
|
+
) {
|
|
44
|
+
super();
|
|
45
|
+
this.request_id = request_id;
|
|
46
|
+
this.uploaded_by = uploaded_by;
|
|
47
|
+
this.file_url = file_url;
|
|
48
|
+
this.file_name = file_name || '';
|
|
49
|
+
this.file_type = file_type || '';
|
|
50
|
+
this.file_size = file_size || null;
|
|
51
|
+
this.description = description || '';
|
|
52
|
+
this.service_id = service_id ?? null;
|
|
53
|
+
this.sub_service_id = sub_service_id ?? null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
@Entity({ name: 'mission_travel_chats' })
|
|
5
|
-
export class MissionTravelRequestChat extends BaseModel {
|
|
6
|
-
|
|
7
|
-
@Column({ type: 'integer', nullable: false })
|
|
8
|
-
request_id: number;
|
|
9
|
-
|
|
10
|
-
@Column({ type: 'integer', nullable: true })
|
|
11
|
-
service_id: number | null;
|
|
12
|
-
|
|
13
|
-
@Column({ type: 'integer', nullable: true })
|
|
14
|
-
sub_service_id: number | null;
|
|
15
|
-
|
|
16
|
-
@Column({ type: 'integer', nullable: false })
|
|
17
|
-
user_id: number;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'integer', nullable: true })
|
|
20
|
-
role_id: number | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'text', nullable: false })
|
|
23
|
-
message: string;
|
|
24
|
-
|
|
25
|
-
@Column({ type: 'text', nullable: true })
|
|
26
|
-
status: string | null;
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'boolean', default: false })
|
|
29
|
-
is_internal: boolean;
|
|
30
|
-
|
|
31
|
-
constructor(
|
|
32
|
-
request_id: number,
|
|
33
|
-
user_id: number,
|
|
34
|
-
message: string,
|
|
35
|
-
is_internal?: boolean,
|
|
36
|
-
service_id?: number | null,
|
|
37
|
-
sub_service_id?: number | null,
|
|
38
|
-
role_id?: number | null,
|
|
39
|
-
status?: string | null
|
|
40
|
-
) {
|
|
41
|
-
super();
|
|
42
|
-
this.request_id = request_id;
|
|
43
|
-
this.service_id = service_id || null;
|
|
44
|
-
this.sub_service_id = sub_service_id || null;
|
|
45
|
-
this.user_id = user_id;
|
|
46
|
-
this.role_id = role_id || null;
|
|
47
|
-
this.message = message;
|
|
48
|
-
this.status = status || null;
|
|
49
|
-
this.is_internal = is_internal || false;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'mission_travel_chats' })
|
|
5
|
+
export class MissionTravelRequestChat extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'integer', nullable: false })
|
|
8
|
+
request_id: number;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'integer', nullable: true })
|
|
11
|
+
service_id: number | null;
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'integer', nullable: true })
|
|
14
|
+
sub_service_id: number | null;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'integer', nullable: false })
|
|
17
|
+
user_id: number;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
role_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'text', nullable: false })
|
|
23
|
+
message: string;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'text', nullable: true })
|
|
26
|
+
status: string | null;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'boolean', default: false })
|
|
29
|
+
is_internal: boolean;
|
|
30
|
+
|
|
31
|
+
constructor(
|
|
32
|
+
request_id: number,
|
|
33
|
+
user_id: number,
|
|
34
|
+
message: string,
|
|
35
|
+
is_internal?: boolean,
|
|
36
|
+
service_id?: number | null,
|
|
37
|
+
sub_service_id?: number | null,
|
|
38
|
+
role_id?: number | null,
|
|
39
|
+
status?: string | null
|
|
40
|
+
) {
|
|
41
|
+
super();
|
|
42
|
+
this.request_id = request_id;
|
|
43
|
+
this.service_id = service_id || null;
|
|
44
|
+
this.sub_service_id = sub_service_id || null;
|
|
45
|
+
this.user_id = user_id;
|
|
46
|
+
this.role_id = role_id || null;
|
|
47
|
+
this.message = message;
|
|
48
|
+
this.status = status || null;
|
|
49
|
+
this.is_internal = is_internal || false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
export enum AllowanceRatio {
|
|
5
|
-
RATIO_100 = "100",
|
|
6
|
-
RATIO_75 = "75",
|
|
7
|
-
RATIO_50 = "50"
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@Entity({ name: 'mission_travel_persons' })
|
|
11
|
-
export class MissionTravelPersons extends BaseModel {
|
|
12
|
-
|
|
13
|
-
@Column({ type: 'int', nullable: false })
|
|
14
|
-
request_id: number;
|
|
15
|
-
|
|
16
|
-
@Column({ type: 'int', nullable: true })
|
|
17
|
-
service_id: number | null;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'int', nullable: true })
|
|
20
|
-
sub_service_id: number | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
23
|
-
travel_person_name: string;
|
|
24
|
-
|
|
25
|
-
@Column({ type: 'int', nullable: true })
|
|
26
|
-
user_id: number | null; // If employee, link to user table
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'int', nullable: true })
|
|
29
|
-
country_id: number | null;
|
|
30
|
-
|
|
31
|
-
@Column({ type: 'varchar', length: 10, nullable: true })
|
|
32
|
-
allowance_ratio: AllowanceRatio | null; // 100, 75, or 50
|
|
33
|
-
|
|
34
|
-
@Column({ type: 'date', nullable: true })
|
|
35
|
-
travel_from_date: Date | null;
|
|
36
|
-
|
|
37
|
-
@Column({ type: 'date', nullable: true })
|
|
38
|
-
travel_to_date: Date | null;
|
|
39
|
-
|
|
40
|
-
@Column({ type: 'varchar', nullable: true })
|
|
41
|
-
travel_class: string | null;
|
|
42
|
-
|
|
43
|
-
@Column({ type: 'int', nullable: true })
|
|
44
|
-
number_of_days: number | null;
|
|
45
|
-
|
|
46
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
47
|
-
hotel_name: string | null;
|
|
48
|
-
|
|
49
|
-
@Column({ type: 'int', nullable: true })
|
|
50
|
-
hotel_rating: number | null;
|
|
51
|
-
|
|
52
|
-
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
53
|
-
hotel_price: number | null;
|
|
54
|
-
|
|
55
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
56
|
-
travel_agent_name: string | null;
|
|
57
|
-
|
|
58
|
-
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
59
|
-
allowance_amount: number | null; // Auto-calculated based on ratio & perdiem
|
|
60
|
-
|
|
61
|
-
@Column({ type: 'int', nullable: true })
|
|
62
|
-
grade: number | null; // Employee grade for perdiem calculation
|
|
63
|
-
|
|
64
|
-
constructor(
|
|
65
|
-
request_id: number,
|
|
66
|
-
service_id: number | null,
|
|
67
|
-
sub_service_id: number | null,
|
|
68
|
-
travel_person_name: string,
|
|
69
|
-
user_id: number | null,
|
|
70
|
-
country_id: number | null,
|
|
71
|
-
allowance_ratio: AllowanceRatio | null,
|
|
72
|
-
travel_from_date: Date | null,
|
|
73
|
-
travel_to_date: Date | null,
|
|
74
|
-
travel_class: string | null,
|
|
75
|
-
number_of_days: number | null,
|
|
76
|
-
hotel_name: string | null,
|
|
77
|
-
hotel_rating: number | null,
|
|
78
|
-
hotel_price: number | null,
|
|
79
|
-
travel_agent_name: string | null,
|
|
80
|
-
allowance_amount: number | null,
|
|
81
|
-
grade: number | null
|
|
82
|
-
) {
|
|
83
|
-
super();
|
|
84
|
-
this.request_id = request_id;
|
|
85
|
-
this.service_id = service_id;
|
|
86
|
-
this.sub_service_id = sub_service_id;
|
|
87
|
-
this.travel_person_name = travel_person_name;
|
|
88
|
-
this.user_id = user_id;
|
|
89
|
-
this.country_id = country_id;
|
|
90
|
-
this.allowance_ratio = allowance_ratio;
|
|
91
|
-
this.travel_from_date = travel_from_date;
|
|
92
|
-
this.travel_to_date = travel_to_date;
|
|
93
|
-
this.travel_class = travel_class;
|
|
94
|
-
this.number_of_days = number_of_days;
|
|
95
|
-
this.hotel_name = hotel_name;
|
|
96
|
-
this.hotel_rating = hotel_rating;
|
|
97
|
-
this.hotel_price = hotel_price;
|
|
98
|
-
this.travel_agent_name = travel_agent_name;
|
|
99
|
-
this.allowance_amount = allowance_amount;
|
|
100
|
-
this.grade = grade;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum AllowanceRatio {
|
|
5
|
+
RATIO_100 = "100",
|
|
6
|
+
RATIO_75 = "75",
|
|
7
|
+
RATIO_50 = "50"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@Entity({ name: 'mission_travel_persons' })
|
|
11
|
+
export class MissionTravelPersons extends BaseModel {
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'int', nullable: false })
|
|
14
|
+
request_id: number;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'int', nullable: true })
|
|
17
|
+
service_id: number | null;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'int', nullable: true })
|
|
20
|
+
sub_service_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
23
|
+
travel_person_name: string;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'int', nullable: true })
|
|
26
|
+
user_id: number | null; // If employee, link to user table
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'int', nullable: true })
|
|
29
|
+
country_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'varchar', length: 10, nullable: true })
|
|
32
|
+
allowance_ratio: AllowanceRatio | null; // 100, 75, or 50
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'date', nullable: true })
|
|
35
|
+
travel_from_date: Date | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'date', nullable: true })
|
|
38
|
+
travel_to_date: Date | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'varchar', nullable: true })
|
|
41
|
+
travel_class: string | null;
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'int', nullable: true })
|
|
44
|
+
number_of_days: number | null;
|
|
45
|
+
|
|
46
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
47
|
+
hotel_name: string | null;
|
|
48
|
+
|
|
49
|
+
@Column({ type: 'int', nullable: true })
|
|
50
|
+
hotel_rating: number | null;
|
|
51
|
+
|
|
52
|
+
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
53
|
+
hotel_price: number | null;
|
|
54
|
+
|
|
55
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
56
|
+
travel_agent_name: string | null;
|
|
57
|
+
|
|
58
|
+
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
59
|
+
allowance_amount: number | null; // Auto-calculated based on ratio & perdiem
|
|
60
|
+
|
|
61
|
+
@Column({ type: 'int', nullable: true })
|
|
62
|
+
grade: number | null; // Employee grade for perdiem calculation
|
|
63
|
+
|
|
64
|
+
constructor(
|
|
65
|
+
request_id: number,
|
|
66
|
+
service_id: number | null,
|
|
67
|
+
sub_service_id: number | null,
|
|
68
|
+
travel_person_name: string,
|
|
69
|
+
user_id: number | null,
|
|
70
|
+
country_id: number | null,
|
|
71
|
+
allowance_ratio: AllowanceRatio | null,
|
|
72
|
+
travel_from_date: Date | null,
|
|
73
|
+
travel_to_date: Date | null,
|
|
74
|
+
travel_class: string | null,
|
|
75
|
+
number_of_days: number | null,
|
|
76
|
+
hotel_name: string | null,
|
|
77
|
+
hotel_rating: number | null,
|
|
78
|
+
hotel_price: number | null,
|
|
79
|
+
travel_agent_name: string | null,
|
|
80
|
+
allowance_amount: number | null,
|
|
81
|
+
grade: number | null
|
|
82
|
+
) {
|
|
83
|
+
super();
|
|
84
|
+
this.request_id = request_id;
|
|
85
|
+
this.service_id = service_id;
|
|
86
|
+
this.sub_service_id = sub_service_id;
|
|
87
|
+
this.travel_person_name = travel_person_name;
|
|
88
|
+
this.user_id = user_id;
|
|
89
|
+
this.country_id = country_id;
|
|
90
|
+
this.allowance_ratio = allowance_ratio;
|
|
91
|
+
this.travel_from_date = travel_from_date;
|
|
92
|
+
this.travel_to_date = travel_to_date;
|
|
93
|
+
this.travel_class = travel_class;
|
|
94
|
+
this.number_of_days = number_of_days;
|
|
95
|
+
this.hotel_name = hotel_name;
|
|
96
|
+
this.hotel_rating = hotel_rating;
|
|
97
|
+
this.hotel_price = hotel_price;
|
|
98
|
+
this.travel_agent_name = travel_agent_name;
|
|
99
|
+
this.allowance_amount = allowance_amount;
|
|
100
|
+
this.grade = grade;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
export enum MissionTravelWorkFlowStatus {
|
|
5
|
-
COMPLETED = "Completed",
|
|
6
|
-
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
-
PENDING = "Pending"
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@Entity({ name: 'mission_travel_workflows' })
|
|
11
|
-
export class MissionTravelWorkFlow extends BaseModel {
|
|
12
|
-
@Column({ type: 'int', nullable: false })
|
|
13
|
-
request_id: number;
|
|
14
|
-
|
|
15
|
-
@Column({ type: 'int', nullable: true })
|
|
16
|
-
service_id: number | null;
|
|
17
|
-
|
|
18
|
-
@Column({ type: 'int', nullable: true })
|
|
19
|
-
sub_service_id: number | null;
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'int', nullable: true })
|
|
22
|
-
order: number | null;
|
|
23
|
-
|
|
24
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
25
|
-
content: string;
|
|
26
|
-
|
|
27
|
-
@Column({ type: 'enum', enum: MissionTravelWorkFlowStatus, default: MissionTravelWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
28
|
-
status: MissionTravelWorkFlowStatus;
|
|
29
|
-
|
|
30
|
-
@Column({ type: 'integer', nullable: true })
|
|
31
|
-
user_id: number | null;
|
|
32
|
-
|
|
33
|
-
@Column({ type: 'integer', nullable: true })
|
|
34
|
-
role_id: number | null;
|
|
35
|
-
|
|
36
|
-
@Column({ type: 'integer', nullable: true })
|
|
37
|
-
department_id: number | null;
|
|
38
|
-
|
|
39
|
-
@Column({ type: 'integer', nullable: true })
|
|
40
|
-
section_id: number | null;
|
|
41
|
-
|
|
42
|
-
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) {
|
|
43
|
-
super();
|
|
44
|
-
this.request_id = request_id;
|
|
45
|
-
this.content = content;
|
|
46
|
-
this.status = status;
|
|
47
|
-
this.order = order || null;
|
|
48
|
-
this.service_id = service_id ?? null;
|
|
49
|
-
this.sub_service_id = sub_service_id ?? null;
|
|
50
|
-
this.user_id = user_id || null;
|
|
51
|
-
this.role_id = role_id || null;
|
|
52
|
-
this.department_id = department_id || null;
|
|
53
|
-
this.section_id = section_id || null;
|
|
54
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum MissionTravelWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@Entity({ name: 'mission_travel_workflows' })
|
|
11
|
+
export class MissionTravelWorkFlow extends BaseModel {
|
|
12
|
+
@Column({ type: 'int', nullable: false })
|
|
13
|
+
request_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'int', nullable: true })
|
|
16
|
+
service_id: number | null;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'int', nullable: true })
|
|
19
|
+
sub_service_id: number | null;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'int', nullable: true })
|
|
22
|
+
order: number | null;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
25
|
+
content: string;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'enum', enum: MissionTravelWorkFlowStatus, default: MissionTravelWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
28
|
+
status: MissionTravelWorkFlowStatus;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'integer', nullable: true })
|
|
31
|
+
user_id: number | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'integer', nullable: true })
|
|
34
|
+
role_id: number | null;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'integer', nullable: true })
|
|
37
|
+
department_id: number | null;
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'integer', nullable: true })
|
|
40
|
+
section_id: number | null;
|
|
41
|
+
|
|
42
|
+
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) {
|
|
43
|
+
super();
|
|
44
|
+
this.request_id = request_id;
|
|
45
|
+
this.content = content;
|
|
46
|
+
this.status = status;
|
|
47
|
+
this.order = order || null;
|
|
48
|
+
this.service_id = service_id ?? null;
|
|
49
|
+
this.sub_service_id = sub_service_id ?? null;
|
|
50
|
+
this.user_id = user_id || null;
|
|
51
|
+
this.role_id = role_id || null;
|
|
52
|
+
this.department_id = department_id || null;
|
|
53
|
+
this.section_id = section_id || null;
|
|
54
|
+
}
|
|
55
55
|
}
|
|
@@ -1,34 +0,0 @@
|
|
|
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.HelpContentMappedCategories = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let HelpContentMappedCategories = class HelpContentMappedCategories extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(help_content_category_Id, help_content_Id) {
|
|
17
|
-
super();
|
|
18
|
-
this.help_content_category_Id = help_content_category_Id,
|
|
19
|
-
this.help_content_Id = help_content_Id;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.HelpContentMappedCategories = HelpContentMappedCategories;
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
-
__metadata("design:type", Number)
|
|
26
|
-
], HelpContentMappedCategories.prototype, "help_content_category_Id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
-
__metadata("design:type", Number)
|
|
30
|
-
], HelpContentMappedCategories.prototype, "help_content_Id", void 0);
|
|
31
|
-
exports.HelpContentMappedCategories = HelpContentMappedCategories = __decorate([
|
|
32
|
-
(0, typeorm_1.Entity)({ name: 'help_content_mapped_categories' }),
|
|
33
|
-
__metadata("design:paramtypes", [Number, Number])
|
|
34
|
-
], HelpContentMappedCategories);
|
|
@@ -1,34 +0,0 @@
|
|
|
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.HelpContentMappedTags = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let HelpContentMappedTags = class HelpContentMappedTags extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(help_content_tag_Id, help_content_Id) {
|
|
17
|
-
super();
|
|
18
|
-
this.help_content_tag_Id = help_content_tag_Id,
|
|
19
|
-
this.help_content_Id = help_content_Id;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.HelpContentMappedTags = HelpContentMappedTags;
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
-
__metadata("design:type", Number)
|
|
26
|
-
], HelpContentMappedTags.prototype, "help_content_tag_Id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
-
__metadata("design:type", Number)
|
|
30
|
-
], HelpContentMappedTags.prototype, "help_content_Id", void 0);
|
|
31
|
-
exports.HelpContentMappedTags = HelpContentMappedTags = __decorate([
|
|
32
|
-
(0, typeorm_1.Entity)({ name: 'help_content_mapped_tags' }),
|
|
33
|
-
__metadata("design:paramtypes", [Number, Number])
|
|
34
|
-
], HelpContentMappedTags);
|
|
@@ -1,29 +0,0 @@
|
|
|
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.HelpContentTags = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let HelpContentTags = class HelpContentTags extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(name) {
|
|
17
|
-
super();
|
|
18
|
-
this.name = name;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
exports.HelpContentTags = HelpContentTags;
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], HelpContentTags.prototype, "name", void 0);
|
|
26
|
-
exports.HelpContentTags = HelpContentTags = __decorate([
|
|
27
|
-
(0, typeorm_1.Entity)({ name: 'help_content_tags' }),
|
|
28
|
-
__metadata("design:paramtypes", [String])
|
|
29
|
-
], HelpContentTags);
|
|
@@ -1,34 +0,0 @@
|
|
|
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.QuestionTags = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let QuestionTags = class QuestionTags extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(name, question_Id) {
|
|
17
|
-
super();
|
|
18
|
-
this.name = name,
|
|
19
|
-
this.question_Id = question_Id;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.QuestionTags = QuestionTags;
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], QuestionTags.prototype, "name", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
-
__metadata("design:type", Number)
|
|
30
|
-
], QuestionTags.prototype, "question_Id", void 0);
|
|
31
|
-
exports.QuestionTags = QuestionTags = __decorate([
|
|
32
|
-
(0, typeorm_1.Entity)({ name: 'question_tags' }),
|
|
33
|
-
__metadata("design:paramtypes", [String, Number])
|
|
34
|
-
], QuestionTags);
|
|
File without changes
|