@platform-modules/foreign-ministry 1.3.79 → 1.3.81
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 +6 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -0
- package/dist/models/DocumentTranslationApprovalModel.d.ts +22 -0
- package/dist/models/DocumentTranslationApprovalModel.js +79 -0
- package/dist/models/DocumentTranslationAttachmentModel.d.ts +11 -0
- package/dist/models/DocumentTranslationAttachmentModel.js +52 -0
- package/dist/models/DocumentTranslationChatModel.d.ts +19 -0
- package/dist/models/DocumentTranslationChatModel.js +78 -0
- package/dist/models/DocumentTranslationRequestModel.d.ts +25 -0
- package/dist/models/DocumentTranslationRequestModel.js +74 -0
- package/dist/models/DocumentTranslationWorkflowModel.d.ts +17 -0
- package/dist/models/DocumentTranslationWorkflowModel.js +62 -0
- 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/dist/models/UserEmploymentDetailsModel.d.ts +0 -2
- package/dist/models/UserEmploymentDetailsModel.js +0 -8
- package/package.json +1 -1
- package/src/index.ts +7 -1
- package/src/models/DocumentTranslationApprovalModel.ts +52 -0
- package/src/models/DocumentTranslationAttachmentModel.ts +31 -0
- package/src/models/DocumentTranslationChatModel.ts +66 -0
- package/src/models/DocumentTranslationRequestModel.ts +54 -0
- package/src/models/DocumentTranslationWorkflowModel.ts +39 -0
- 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 +0 -6
|
@@ -76,10 +76,6 @@ __decorate([
|
|
|
76
76
|
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
77
77
|
__metadata("design:type", Object)
|
|
78
78
|
], UserEmploymentDetails.prototype, "retirement_start_date", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
81
|
-
__metadata("design:type", Object)
|
|
82
|
-
], UserEmploymentDetails.prototype, "retirement_end_date", void 0);
|
|
83
79
|
__decorate([
|
|
84
80
|
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
85
81
|
__metadata("design:type", Object)
|
|
@@ -136,10 +132,6 @@ __decorate([
|
|
|
136
132
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
137
133
|
__metadata("design:type", Object)
|
|
138
134
|
], UserEmploymentDetails.prototype, "works_in_department", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
141
|
-
__metadata("design:type", Object)
|
|
142
|
-
], UserEmploymentDetails.prototype, "office", void 0);
|
|
143
135
|
__decorate([
|
|
144
136
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
145
137
|
__metadata("design:type", Object)
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -217,4 +217,10 @@ export * from './models/MissionTravelWorkflowModel';
|
|
|
217
217
|
export { MissionTravelWorkFlowStatus } from './models/MissionTravelWorkflowModel';
|
|
218
218
|
export * from './models/MissionTravelChatModel';
|
|
219
219
|
export * from './models/TravelClassEnum';
|
|
220
|
-
export { TravelClass } from './models/TravelClassEnum';
|
|
220
|
+
export { TravelClass } from './models/TravelClassEnum';
|
|
221
|
+
// Document Translation Models
|
|
222
|
+
export * from './models/DocumentTranslationRequestModel';
|
|
223
|
+
export * from './models/DocumentTranslationApprovalModel';
|
|
224
|
+
export * from './models/DocumentTranslationAttachmentModel';
|
|
225
|
+
export * from './models/DocumentTranslationChatModel';
|
|
226
|
+
export * from './models/DocumentTranslationWorkflowModel';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum DocumentTranslationApprovalStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
IN_PROGRESS = "In Progress",
|
|
7
|
+
APPROVED = "Approved",
|
|
8
|
+
REJECTED = "Rejected"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Entity({ name: 'document_translation_approvals' })
|
|
12
|
+
export class DocumentTranslationApprovalDetails 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: DocumentTranslationApprovalStatus, default: DocumentTranslationApprovalStatus.PENDING, nullable: false })
|
|
47
|
+
approval_status: DocumentTranslationApprovalStatus;
|
|
48
|
+
|
|
49
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
50
|
+
is_allowed: boolean;
|
|
51
|
+
}
|
|
52
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'document_translation_attachments' })
|
|
5
|
+
export class DocumentTranslationRequestAttachment 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: 'varchar', length: 500, nullable: false })
|
|
17
|
+
file_url: string;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
20
|
+
file_name: string;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
23
|
+
file_type: string;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'bigint', nullable: true })
|
|
26
|
+
file_size: number | null;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
chat_id: number | null;
|
|
30
|
+
}
|
|
31
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { DocumentTranslationApprovalStatus } from './DocumentTranslationApprovalModel';
|
|
4
|
+
|
|
5
|
+
export enum DocumentTranslationMessageType {
|
|
6
|
+
TEXT = "text",
|
|
7
|
+
IMAGE = "image",
|
|
8
|
+
VIDEO = "video",
|
|
9
|
+
FILE = "file",
|
|
10
|
+
LINK = "link"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@Entity({ name: 'document_translation_chats' })
|
|
14
|
+
export class DocumentTranslationRequestChat extends BaseModel {
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'integer', nullable: false })
|
|
17
|
+
request_id: number;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
service_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'integer', nullable: true })
|
|
23
|
+
sub_service_id: number | null;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'integer', nullable: false })
|
|
26
|
+
user_id: number;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
role_id: number;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'text', nullable: false })
|
|
32
|
+
message: string;
|
|
33
|
+
|
|
34
|
+
@Column({
|
|
35
|
+
type: 'enum',
|
|
36
|
+
enum: DocumentTranslationMessageType,
|
|
37
|
+
default: DocumentTranslationMessageType.TEXT,
|
|
38
|
+
nullable: false
|
|
39
|
+
})
|
|
40
|
+
messageType: DocumentTranslationMessageType;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'text', nullable: true })
|
|
43
|
+
status: string;
|
|
44
|
+
|
|
45
|
+
constructor(
|
|
46
|
+
request_id: number,
|
|
47
|
+
user_id: number,
|
|
48
|
+
role_id: number,
|
|
49
|
+
message: string,
|
|
50
|
+
service_id?: number,
|
|
51
|
+
sub_service_id?: number,
|
|
52
|
+
messageType?: DocumentTranslationMessageType,
|
|
53
|
+
status?: string
|
|
54
|
+
) {
|
|
55
|
+
super();
|
|
56
|
+
this.request_id = request_id;
|
|
57
|
+
this.service_id = service_id || null;
|
|
58
|
+
this.sub_service_id = sub_service_id || null;
|
|
59
|
+
this.user_id = user_id;
|
|
60
|
+
this.role_id = role_id;
|
|
61
|
+
this.message = message;
|
|
62
|
+
this.messageType = messageType || DocumentTranslationMessageType.TEXT;
|
|
63
|
+
this.status = status || DocumentTranslationApprovalStatus.PENDING;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum DocumentTranslationStatus {
|
|
5
|
+
SUBMITTED = "Submitted",
|
|
6
|
+
PENDING = "Pending",
|
|
7
|
+
ASSIGNED = "Assigned",
|
|
8
|
+
IN_PROGRESS = "In Progress",
|
|
9
|
+
APPROVED = "Approved",
|
|
10
|
+
REJECTED = "Rejected"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum DocumentClassificationType {
|
|
14
|
+
NORMAL = "Normal",
|
|
15
|
+
CONFIDENTIAL = "Confidential"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@Entity({ name: 'document_translation_requests' })
|
|
19
|
+
export class DocumentTranslationRequests extends BaseModel {
|
|
20
|
+
|
|
21
|
+
// Common columns
|
|
22
|
+
@Column({ type: 'int', nullable: true })
|
|
23
|
+
req_user_department_id: number | null;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'int', nullable: true })
|
|
26
|
+
req_user_section_id: number | null;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'int', nullable: true })
|
|
29
|
+
service_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'int', nullable: true })
|
|
32
|
+
sub_service_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'int', nullable: false })
|
|
35
|
+
user_id: number;
|
|
36
|
+
|
|
37
|
+
// Document Translation specific columns
|
|
38
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
39
|
+
document_type: string;
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
42
|
+
document_name: string;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'enum', enum: DocumentClassificationType, nullable: false })
|
|
45
|
+
document_classification: DocumentClassificationType;
|
|
46
|
+
|
|
47
|
+
@Column({ type: 'enum', enum: DocumentTranslationStatus, default: DocumentTranslationStatus.SUBMITTED, nullable: false })
|
|
48
|
+
status: DocumentTranslationStatus;
|
|
49
|
+
|
|
50
|
+
@Column({ type: 'varchar', nullable: true })
|
|
51
|
+
workflow_execution_id: string | null;
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum DocumentTranslationWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@Entity({ name: 'document_translation_workflows' })
|
|
11
|
+
export class DocumentTranslationWorkFlow extends BaseModel {
|
|
12
|
+
@Column({ type: 'integer', nullable: false })
|
|
13
|
+
request_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'integer', nullable: true })
|
|
16
|
+
service_id: number | null;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'integer', nullable: true })
|
|
19
|
+
sub_service_id: number | null;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
22
|
+
content: string;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'enum', enum: DocumentTranslationWorkFlowStatus, default: DocumentTranslationWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
25
|
+
status: DocumentTranslationWorkFlowStatus;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'integer', nullable: true })
|
|
28
|
+
user_id: number | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'integer', nullable: true })
|
|
31
|
+
role_id: number | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'integer', nullable: true })
|
|
34
|
+
department_id: number | null;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'integer', nullable: true })
|
|
37
|
+
section_id: number | null;
|
|
38
|
+
}
|
|
39
|
+
|
|
@@ -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
|
+
|