@platform-modules/foreign-ministry 1.3.81 → 1.3.82
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 +1 -6
- package/dist/models/UserEmploymentDetailsModel.d.ts +5 -0
- package/dist/models/UserEmploymentDetailsModel.js +20 -0
- package/dist/models/user.d.ts +12 -3
- package/dist/models/user.js +23 -8
- package/package.json +1 -1
- package/src/models/LeaveConfigModel.ts +71 -71
- package/src/models/MissionTravelApprovalModel.ts +100 -100
- package/src/models/MissionTravelAttachmentModel.ts +56 -56
- package/src/models/MissionTravelChatModel.ts +52 -52
- package/src/models/MissionTravelPersonModel.ts +105 -105
- package/src/models/MissionTravelWorkflowModel.ts +54 -54
- package/src/models/SectionModel.ts +35 -35
- package/src/models/UserEmploymentDetailsModel.ts +15 -0
- package/src/models/user.ts +24 -8
- package/dist/models/MissionTravelClassConfigModel.d.ts +0 -10
- package/dist/models/MissionTravelClassConfigModel.js +0 -50
- package/dist/models/MissionTravelPerdiemModel.d.ts +0 -10
- package/dist/models/MissionTravelPerdiemModel.js +0 -54
package/.env
CHANGED
|
@@ -6,6 +6,8 @@ import { BaseModel } from './BaseModel';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class UserEmploymentDetails extends BaseModel {
|
|
8
8
|
user_id: number;
|
|
9
|
+
job_title: string | null;
|
|
10
|
+
man_power_number: string | null;
|
|
9
11
|
date_of_decree_issuance: Date | null;
|
|
10
12
|
civil_service_number: string | null;
|
|
11
13
|
information_number: string | null;
|
|
@@ -19,6 +21,7 @@ export declare class UserEmploymentDetails extends BaseModel {
|
|
|
19
21
|
secondment_end_date: Date | null;
|
|
20
22
|
disability_type: string | null;
|
|
21
23
|
retirement_start_date: Date | null;
|
|
24
|
+
retirement_end_date: Date | null;
|
|
22
25
|
contract_end_date: Date | null;
|
|
23
26
|
job_type_group: string | null;
|
|
24
27
|
entity_transferred_from: string | null;
|
|
@@ -26,6 +29,7 @@ export declare class UserEmploymentDetails extends BaseModel {
|
|
|
26
29
|
entity_transferred_to: string | null;
|
|
27
30
|
date_of_transfer_to: Date | null;
|
|
28
31
|
job_description: string | null;
|
|
32
|
+
country_of_appointment: string | null;
|
|
29
33
|
date_of_appointment: Date | null;
|
|
30
34
|
appointment_grade: string | null;
|
|
31
35
|
type_of_appointment: string | null;
|
|
@@ -33,6 +37,7 @@ export declare class UserEmploymentDetails extends BaseModel {
|
|
|
33
37
|
mc_work: boolean | null;
|
|
34
38
|
governorate_name: string | null;
|
|
35
39
|
works_in_department: string | null;
|
|
40
|
+
office: string | null;
|
|
36
41
|
full_name_of_mission: string | null;
|
|
37
42
|
mission: string | null;
|
|
38
43
|
description_of_mission: string | null;
|
|
@@ -24,6 +24,14 @@ __decorate([
|
|
|
24
24
|
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
25
25
|
__metadata("design:type", Number)
|
|
26
26
|
], UserEmploymentDetails.prototype, "user_id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
|
+
], UserEmploymentDetails.prototype, "job_title", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], UserEmploymentDetails.prototype, "man_power_number", void 0);
|
|
27
35
|
__decorate([
|
|
28
36
|
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
29
37
|
__metadata("design:type", Object)
|
|
@@ -76,6 +84,10 @@ __decorate([
|
|
|
76
84
|
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
77
85
|
__metadata("design:type", Object)
|
|
78
86
|
], UserEmploymentDetails.prototype, "retirement_start_date", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
89
|
+
__metadata("design:type", Object)
|
|
90
|
+
], UserEmploymentDetails.prototype, "retirement_end_date", void 0);
|
|
79
91
|
__decorate([
|
|
80
92
|
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
81
93
|
__metadata("design:type", Object)
|
|
@@ -104,6 +116,10 @@ __decorate([
|
|
|
104
116
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
105
117
|
__metadata("design:type", Object)
|
|
106
118
|
], UserEmploymentDetails.prototype, "job_description", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
121
|
+
__metadata("design:type", Object)
|
|
122
|
+
], UserEmploymentDetails.prototype, "country_of_appointment", void 0);
|
|
107
123
|
__decorate([
|
|
108
124
|
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
109
125
|
__metadata("design:type", Object)
|
|
@@ -132,6 +148,10 @@ __decorate([
|
|
|
132
148
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
133
149
|
__metadata("design:type", Object)
|
|
134
150
|
], UserEmploymentDetails.prototype, "works_in_department", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
153
|
+
__metadata("design:type", Object)
|
|
154
|
+
], UserEmploymentDetails.prototype, "office", void 0);
|
|
135
155
|
__decorate([
|
|
136
156
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
137
157
|
__metadata("design:type", Object)
|
package/dist/models/user.d.ts
CHANGED
|
@@ -38,11 +38,20 @@ export declare class User extends BaseModel {
|
|
|
38
38
|
qualification?: string;
|
|
39
39
|
father_name?: string;
|
|
40
40
|
spouse_name?: string;
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
father_age?: number;
|
|
42
|
+
mother_name?: string;
|
|
43
|
+
mother_age?: number;
|
|
44
|
+
spouse_age?: number;
|
|
45
|
+
children?: {
|
|
46
|
+
name: string;
|
|
47
|
+
age: number;
|
|
48
|
+
}[];
|
|
43
49
|
language_preferences?: string;
|
|
44
50
|
category: "FM" | "Embassy";
|
|
45
51
|
mandc_number: number;
|
|
46
52
|
is_services_blocked?: boolean;
|
|
47
|
-
constructor(employee_id?: number, employee_name?: string, employee_arabic_name?: string, date_of_birth?: string, region_of_birth?: string, country_of_birth?: string, date_of_joining?: string, last_promotion_date?: string, gender?: string, marital_status?: string, nationality?: string, email?: string, blood_group?: string, national_id?: number, mobile?: string, office_number?: string, department?: number, section?: number, grade?: number, location?: string, country?: string, is_admin?: boolean, division?: number, reporting_to?: number, address?: string, residential_status?: string, religion?: string, designation?: number, avatar?: string, passport_number?: string, personal_email?: string, extension_number?: number, fax_number?: string, diplomatic_name?: string, civil_employee_id?: number, qualification?: string, father_name?: string,
|
|
53
|
+
constructor(employee_id?: number, employee_name?: string, employee_arabic_name?: string, date_of_birth?: string, region_of_birth?: string, country_of_birth?: string, date_of_joining?: string, last_promotion_date?: string, gender?: string, marital_status?: string, nationality?: string, email?: string, blood_group?: string, national_id?: number, mobile?: string, office_number?: string, department?: number, section?: number, grade?: number, location?: string, country?: string, is_admin?: boolean, division?: number, reporting_to?: number, address?: string, residential_status?: string, religion?: string, designation?: number, avatar?: string, passport_number?: string, personal_email?: string, extension_number?: number, fax_number?: string, diplomatic_name?: string, civil_employee_id?: number, qualification?: string, father_name?: string, father_age?: number, mother_name?: string, mother_age?: number, spouse_name?: string, spouse_age?: number, children?: {
|
|
54
|
+
name: string;
|
|
55
|
+
age: number;
|
|
56
|
+
}[], language_preferences?: string, category?: "FM" | "Embassy", mandc_number?: number, is_services_blocked?: boolean);
|
|
48
57
|
}
|
package/dist/models/user.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.User = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
let User = class User extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(employee_id, employee_name, employee_arabic_name, date_of_birth, region_of_birth, country_of_birth, date_of_joining, last_promotion_date, gender, marital_status, nationality, email, blood_group, national_id, mobile, office_number, department, section, grade, location, country, is_admin, division, reporting_to, address, residential_status, religion, designation, avatar, passport_number, personal_email, extension_number, fax_number, diplomatic_name, civil_employee_id, qualification, father_name, spouse_name,
|
|
16
|
+
constructor(employee_id, employee_name, employee_arabic_name, date_of_birth, region_of_birth, country_of_birth, date_of_joining, last_promotion_date, gender, marital_status, nationality, email, blood_group, national_id, mobile, office_number, department, section, grade, location, country, is_admin, division, reporting_to, address, residential_status, religion, designation, avatar, passport_number, personal_email, extension_number, fax_number, diplomatic_name, civil_employee_id, qualification, father_name, father_age, mother_name, mother_age, spouse_name, spouse_age, children, language_preferences, category, mandc_number, is_services_blocked) {
|
|
17
17
|
super();
|
|
18
18
|
this.employee_id = employee_id;
|
|
19
19
|
this.employee_name = employee_name;
|
|
@@ -52,9 +52,12 @@ let User = class User extends BaseModel_1.BaseModel {
|
|
|
52
52
|
this.civil_employee_id = civil_employee_id;
|
|
53
53
|
this.qualification = qualification;
|
|
54
54
|
this.father_name = father_name;
|
|
55
|
+
this.father_age = father_age;
|
|
56
|
+
this.mother_name = mother_name;
|
|
57
|
+
this.mother_age = mother_age;
|
|
55
58
|
this.spouse_name = spouse_name;
|
|
56
|
-
this.
|
|
57
|
-
this.
|
|
59
|
+
this.spouse_age = spouse_age;
|
|
60
|
+
this.children = children;
|
|
58
61
|
this.language_preferences = language_preferences;
|
|
59
62
|
this.category = category || "FM";
|
|
60
63
|
this.mandc_number = mandc_number || 0;
|
|
@@ -215,13 +218,25 @@ __decorate([
|
|
|
215
218
|
__metadata("design:type", String)
|
|
216
219
|
], User.prototype, "spouse_name", void 0);
|
|
217
220
|
__decorate([
|
|
218
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
219
|
-
__metadata("design:type",
|
|
220
|
-
], User.prototype, "
|
|
221
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
222
|
+
__metadata("design:type", Number)
|
|
223
|
+
], User.prototype, "father_age", void 0);
|
|
221
224
|
__decorate([
|
|
222
225
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
223
226
|
__metadata("design:type", String)
|
|
224
|
-
], User.prototype, "
|
|
227
|
+
], User.prototype, "mother_name", void 0);
|
|
228
|
+
__decorate([
|
|
229
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
230
|
+
__metadata("design:type", Number)
|
|
231
|
+
], User.prototype, "mother_age", void 0);
|
|
232
|
+
__decorate([
|
|
233
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
234
|
+
__metadata("design:type", Number)
|
|
235
|
+
], User.prototype, "spouse_age", void 0);
|
|
236
|
+
__decorate([
|
|
237
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
238
|
+
__metadata("design:type", Array)
|
|
239
|
+
], User.prototype, "children", void 0);
|
|
225
240
|
__decorate([
|
|
226
241
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
227
242
|
__metadata("design:type", String)
|
|
@@ -240,5 +255,5 @@ __decorate([
|
|
|
240
255
|
], User.prototype, "is_services_blocked", void 0);
|
|
241
256
|
exports.User = User = __decorate([
|
|
242
257
|
(0, typeorm_1.Entity)({ name: 'users' }),
|
|
243
|
-
__metadata("design:paramtypes", [Number, String, String, String, String, String, String, String, String, String, String, String, String, Number, String, String, Number, Number, Number, String, String, Boolean, Number, Number, String, String, String, Number, String, String, String, Number, String, String, Number, String, String,
|
|
258
|
+
__metadata("design:paramtypes", [Number, String, String, String, String, String, String, String, String, String, String, String, String, Number, String, String, Number, Number, Number, String, String, Boolean, Number, Number, String, String, String, Number, String, String, String, Number, String, String, Number, String, String, Number, String, Number, String, Number, Array, String, String, Number, Boolean])
|
|
244
259
|
], User);
|
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,100 +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
|
-
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
|
+
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
|
+
|