@platform-modules/foreign-ministry 1.3.143 → 1.3.145
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 +15 -6
- package/dist/data-source.js +15 -1
- package/dist/index.d.ts +11 -0
- package/dist/index.js +24 -1
- package/dist/models/AppointmentApprovalModel.d.ts +22 -0
- package/dist/models/AppointmentApprovalModel.js +84 -0
- package/dist/models/AppointmentAttachmentModel.d.ts +11 -0
- package/dist/models/AppointmentAttachmentModel.js +52 -0
- package/dist/models/AppointmentAttendeeModel.d.ts +14 -0
- package/dist/models/AppointmentAttendeeModel.js +47 -0
- package/dist/models/AppointmentChatModel.d.ts +19 -0
- package/dist/models/AppointmentChatModel.js +77 -0
- package/dist/models/AppointmentRequestModel.d.ts +47 -0
- package/dist/models/AppointmentRequestModel.js +126 -0
- package/dist/models/AppointmentWorkflowModel.d.ts +17 -0
- package/dist/models/AppointmentWorkflowModel.js +62 -0
- package/dist/models/HelpContentMappedCategoriesModel.d.ts +6 -0
- package/dist/models/HelpContentMappedCategoriesModel.js +34 -0
- package/dist/models/HelpContentMappedTagsModel.d.ts +6 -0
- package/dist/models/HelpContentMappedTagsModel.js +34 -0
- package/dist/models/HelpContentTagsModel.d.ts +5 -0
- package/dist/models/HelpContentTagsModel.js +29 -0
- package/dist/models/LMSExternalCourseParticipationRequestModel.d.ts +1 -0
- package/dist/models/LMSExternalCourseParticipationRequestModel.js +4 -0
- package/dist/models/TemplateModel.d.ts +8 -0
- package/dist/models/TemplateModel.js +44 -0
- package/dist/models/questionTagsModel.d.ts +6 -0
- package/dist/models/questionTagsModel.js +34 -0
- package/package.json +1 -1
- package/src/data-source.ts +15 -3
- package/src/index.ts +13 -0
- package/src/models/AppointmentApprovalModel.ts +57 -0
- package/src/models/AppointmentAttachmentModel.ts +30 -0
- package/src/models/AppointmentAttendeeModel.ts +28 -0
- package/src/models/AppointmentChatModel.ts +64 -0
- package/src/models/AppointmentRequestModel.ts +93 -0
- package/src/models/AppointmentWorkflowModel.ts +39 -0
- package/src/models/DocumentTranslationRequestModel.ts +54 -54
- package/src/models/LMSExternalCourseParticipationRequestModel.ts +3 -0
- package/src/models/LeaveConfigModel.ts +71 -71
- package/src/models/MissionTravelApprovalModel.ts +101 -101
- 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/RegisterCandidateRequestModel.ts +177 -177
- package/src/models/SectionModel.ts +35 -35
- package/src/models/ServicesNotificationConfigsModel.ts +55 -55
- package/src/models/TemplateModel.ts +30 -0
- 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/src/models/{LeaveConfigGradesModel.Ts → LeaveConfigGradesModel.ts} +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum AppointmentMessageType {
|
|
5
|
+
TEXT = 'text',
|
|
6
|
+
IMAGE = 'image',
|
|
7
|
+
VIDEO = 'video',
|
|
8
|
+
FILE = 'file',
|
|
9
|
+
LINK = 'link',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Entity({ name: 'appointment_chats' })
|
|
13
|
+
export class AppointmentRequestChat extends BaseModel {
|
|
14
|
+
@Column({ type: 'integer', nullable: false })
|
|
15
|
+
appointment_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
|
+
user_id: number;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'integer', nullable: true })
|
|
27
|
+
role_id: number;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'text', nullable: false })
|
|
30
|
+
message: string;
|
|
31
|
+
|
|
32
|
+
@Column({
|
|
33
|
+
type: 'enum',
|
|
34
|
+
enum: AppointmentMessageType,
|
|
35
|
+
default: AppointmentMessageType.TEXT,
|
|
36
|
+
nullable: false,
|
|
37
|
+
})
|
|
38
|
+
messageType: AppointmentMessageType;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'text', nullable: true })
|
|
41
|
+
status: string;
|
|
42
|
+
|
|
43
|
+
constructor(
|
|
44
|
+
appointment_id: number,
|
|
45
|
+
user_id: number,
|
|
46
|
+
role_id: number,
|
|
47
|
+
message: string,
|
|
48
|
+
service_id?: number,
|
|
49
|
+
sub_service_id?: number,
|
|
50
|
+
messageType?: AppointmentMessageType,
|
|
51
|
+
status?: string
|
|
52
|
+
) {
|
|
53
|
+
super();
|
|
54
|
+
this.appointment_id = appointment_id;
|
|
55
|
+
this.service_id = service_id ?? null;
|
|
56
|
+
this.sub_service_id = sub_service_id ?? null;
|
|
57
|
+
this.user_id = user_id;
|
|
58
|
+
this.role_id = role_id;
|
|
59
|
+
this.message = message;
|
|
60
|
+
this.messageType = messageType ?? AppointmentMessageType.TEXT;
|
|
61
|
+
this.status = status ?? 'Pending';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum AppointmentRequestStatus {
|
|
5
|
+
PENDING = 'Pending',
|
|
6
|
+
ASSIGNED = 'Assigned',
|
|
7
|
+
IN_PROGRESS = 'In Progress',
|
|
8
|
+
APPROVED = 'Approved',
|
|
9
|
+
REJECTED = 'Rejected',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum AppointmentRequestType {
|
|
13
|
+
INTERNAL = 'Internal',
|
|
14
|
+
EXTERNAL = 'External',
|
|
15
|
+
OTHER_MINISTERS = 'Other Ministers',
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export enum AppointmentType {
|
|
19
|
+
PHYSICAL = 'Physical',
|
|
20
|
+
ONLINE = 'Online',
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export enum AppointmentYesNo {
|
|
24
|
+
YES = 'Yes',
|
|
25
|
+
NO = 'No',
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export enum AppointmentLocation {
|
|
29
|
+
EMBASSY = 'Embassy',
|
|
30
|
+
MINISTRY = 'Ministry',
|
|
31
|
+
EXTERNAL_VENUE = 'External Venue',
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@Entity({ name: 'appointment_requests' })
|
|
35
|
+
export class AppointmentRequests extends BaseModel {
|
|
36
|
+
@Column({ type: 'int', nullable: true })
|
|
37
|
+
req_user_department_id: number | null;
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'int', nullable: true })
|
|
40
|
+
req_user_section_id: number | null;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'int', nullable: true })
|
|
43
|
+
service_id: number | null;
|
|
44
|
+
|
|
45
|
+
@Column({ type: 'int', nullable: true })
|
|
46
|
+
sub_service_id: number | null;
|
|
47
|
+
|
|
48
|
+
@Column({ type: 'int', nullable: false })
|
|
49
|
+
user_id: number;
|
|
50
|
+
|
|
51
|
+
@Column({ type: 'int', nullable: true })
|
|
52
|
+
department_id: number | null;
|
|
53
|
+
|
|
54
|
+
@Column({ type: 'int', nullable: true })
|
|
55
|
+
receiving_department_id: number | null;
|
|
56
|
+
|
|
57
|
+
@Column({ type: 'enum', enum: AppointmentRequestType, nullable: true })
|
|
58
|
+
request_type: AppointmentRequestType | null;
|
|
59
|
+
|
|
60
|
+
@Column({ type: 'enum', enum: AppointmentType, nullable: true })
|
|
61
|
+
appointment_type: AppointmentType | null;
|
|
62
|
+
|
|
63
|
+
@Column({ type: 'date', nullable: true })
|
|
64
|
+
appointment_date: string | null;
|
|
65
|
+
|
|
66
|
+
@Column({ type: 'time', nullable: true })
|
|
67
|
+
from_time: string | null;
|
|
68
|
+
|
|
69
|
+
@Column({ type: 'time', nullable: true })
|
|
70
|
+
to_time: string | null;
|
|
71
|
+
|
|
72
|
+
@Column({ type: 'text', nullable: true })
|
|
73
|
+
comments: string | null;
|
|
74
|
+
|
|
75
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
76
|
+
person_name: string | null;
|
|
77
|
+
|
|
78
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
79
|
+
contact_number: string | null;
|
|
80
|
+
|
|
81
|
+
@Column({ type: 'text', nullable: true })
|
|
82
|
+
agenda: string | null;
|
|
83
|
+
|
|
84
|
+
@Column({ type: 'enum', enum: AppointmentLocation, nullable: true })
|
|
85
|
+
appointment_location: AppointmentLocation | null;
|
|
86
|
+
|
|
87
|
+
@Column({ type: 'enum', enum: AppointmentRequestStatus, default: AppointmentRequestStatus.PENDING, nullable: false })
|
|
88
|
+
status: AppointmentRequestStatus;
|
|
89
|
+
|
|
90
|
+
@Column({ type: 'varchar', nullable: true })
|
|
91
|
+
workflow_execution_id: string | null;
|
|
92
|
+
}
|
|
93
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum AppointmentWorkFlowStatus {
|
|
5
|
+
COMPLETED = 'Completed',
|
|
6
|
+
NOT_YET_STARTED = 'Not Yet Started',
|
|
7
|
+
PENDING = 'Pending',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@Entity({ name: 'appointment_workflows' })
|
|
11
|
+
export class AppointmentWorkFlow extends BaseModel {
|
|
12
|
+
@Column({ type: 'integer', nullable: false })
|
|
13
|
+
appointment_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: AppointmentWorkFlowStatus, default: AppointmentWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
25
|
+
status: AppointmentWorkFlowStatus;
|
|
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,54 +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.PENDING, nullable: false })
|
|
48
|
-
status: DocumentTranslationStatus;
|
|
49
|
-
|
|
50
|
-
@Column({ type: 'varchar', nullable: true })
|
|
51
|
-
workflow_execution_id: string | null;
|
|
52
|
-
|
|
53
|
-
}
|
|
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.PENDING, nullable: false })
|
|
48
|
+
status: DocumentTranslationStatus;
|
|
49
|
+
|
|
50
|
+
@Column({ type: 'varchar', nullable: true })
|
|
51
|
+
workflow_execution_id: string | null;
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
|
|
@@ -15,6 +15,9 @@ export class LMSExternalCourseParticipationRequests extends BaseModel {
|
|
|
15
15
|
@Column({ type: 'int', nullable: true })
|
|
16
16
|
req_user_department_id: number | null;
|
|
17
17
|
|
|
18
|
+
@Column({ type: 'int', nullable: true })
|
|
19
|
+
department_id: number | null;
|
|
20
|
+
|
|
18
21
|
@Column({ type: 'int', nullable: true })
|
|
19
22
|
req_user_section_id: number | null;
|
|
20
23
|
|
|
@@ -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,101 +1,101 @@
|
|
|
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
|
-
CANCELLED = "Cancelled"
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@Entity({ name: 'mission_travel_approvals' })
|
|
14
|
-
export class MissionTravelApprovalDetails extends BaseModel {
|
|
15
|
-
@Column({ type: 'integer', nullable: false })
|
|
16
|
-
request_id: number;
|
|
17
|
-
|
|
18
|
-
@Column({ type: 'integer', nullable: true })
|
|
19
|
-
service_id: number | null;
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'integer', nullable: true })
|
|
22
|
-
sub_service_id: number | null;
|
|
23
|
-
|
|
24
|
-
@Column({ type: 'integer', nullable: false })
|
|
25
|
-
level: number;
|
|
26
|
-
|
|
27
|
-
@Column({ type: 'integer', nullable: true })
|
|
28
|
-
approver_role_id: number;
|
|
29
|
-
|
|
30
|
-
@Column({ type: 'integer', nullable: true })
|
|
31
|
-
department_id: number | null;
|
|
32
|
-
|
|
33
|
-
@Column({ type: 'integer', nullable: true })
|
|
34
|
-
section_id: number | null;
|
|
35
|
-
|
|
36
|
-
@Column({ type: 'integer', nullable: true })
|
|
37
|
-
approver_user_id: number | null;
|
|
38
|
-
|
|
39
|
-
@Column({ type: 'integer', nullable: true })
|
|
40
|
-
delegate_user_id: number | null;
|
|
41
|
-
|
|
42
|
-
@Column({ type: 'integer', nullable: true })
|
|
43
|
-
approved_by: number | null;
|
|
44
|
-
|
|
45
|
-
@Column({ type: 'varchar', length: 500, nullable: true, default: '' })
|
|
46
|
-
comment: string;
|
|
47
|
-
|
|
48
|
-
@Column({ type: 'enum', enum: MissionTravelApprovalStatus, default: MissionTravelApprovalStatus.PENDING, nullable: false })
|
|
49
|
-
approval_status: MissionTravelApprovalStatus;
|
|
50
|
-
|
|
51
|
-
@Column({ type: 'boolean', default: true, nullable: false })
|
|
52
|
-
is_allowed: boolean;
|
|
53
|
-
|
|
54
|
-
@Column({ type: 'boolean', default: false, nullable: false })
|
|
55
|
-
is_reassign: boolean;
|
|
56
|
-
|
|
57
|
-
@Column({ type: 'boolean', default: true, nullable: false })
|
|
58
|
-
is_approval: boolean;
|
|
59
|
-
|
|
60
|
-
@Column({ type: 'boolean', default: false, nullable: false })
|
|
61
|
-
is_review: boolean;
|
|
62
|
-
|
|
63
|
-
constructor(
|
|
64
|
-
request_id: number,
|
|
65
|
-
service_id: number | null,
|
|
66
|
-
sub_service_id: number | null,
|
|
67
|
-
level: number,
|
|
68
|
-
approver_role_id: number,
|
|
69
|
-
department_id: number | null,
|
|
70
|
-
section_id: number | null,
|
|
71
|
-
approver_user_id: number | null,
|
|
72
|
-
delegate_user_id: number | null,
|
|
73
|
-
approved_by: number | null,
|
|
74
|
-
comment: string,
|
|
75
|
-
approval_status: MissionTravelApprovalStatus,
|
|
76
|
-
is_allowed: boolean,
|
|
77
|
-
is_reassign: boolean,
|
|
78
|
-
is_approval: boolean,
|
|
79
|
-
is_review?: boolean
|
|
80
|
-
) {
|
|
81
|
-
super();
|
|
82
|
-
this.request_id = request_id;
|
|
83
|
-
this.service_id = service_id;
|
|
84
|
-
this.sub_service_id = sub_service_id;
|
|
85
|
-
this.level = level;
|
|
86
|
-
this.approver_role_id = approver_role_id;
|
|
87
|
-
this.department_id = department_id;
|
|
88
|
-
this.section_id = section_id;
|
|
89
|
-
this.approver_user_id = approver_user_id;
|
|
90
|
-
this.delegate_user_id = delegate_user_id;
|
|
91
|
-
this.approved_by = approved_by;
|
|
92
|
-
this.comment = comment;
|
|
93
|
-
this.approval_status = approval_status;
|
|
94
|
-
this.is_allowed = is_allowed;
|
|
95
|
-
this.is_reassign = is_reassign;
|
|
96
|
-
this.is_approval = is_approval;
|
|
97
|
-
this.is_review = is_review ?? false;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
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
|
+
CANCELLED = "Cancelled"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@Entity({ name: 'mission_travel_approvals' })
|
|
14
|
+
export class MissionTravelApprovalDetails extends BaseModel {
|
|
15
|
+
@Column({ type: 'integer', nullable: false })
|
|
16
|
+
request_id: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'integer', nullable: true })
|
|
19
|
+
service_id: number | null;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'integer', nullable: true })
|
|
22
|
+
sub_service_id: number | null;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'integer', nullable: false })
|
|
25
|
+
level: number;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'integer', nullable: true })
|
|
28
|
+
approver_role_id: number;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'integer', nullable: true })
|
|
31
|
+
department_id: number | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'integer', nullable: true })
|
|
34
|
+
section_id: number | null;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'integer', nullable: true })
|
|
37
|
+
approver_user_id: number | null;
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'integer', nullable: true })
|
|
40
|
+
delegate_user_id: number | null;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'integer', nullable: true })
|
|
43
|
+
approved_by: number | null;
|
|
44
|
+
|
|
45
|
+
@Column({ type: 'varchar', length: 500, nullable: true, default: '' })
|
|
46
|
+
comment: string;
|
|
47
|
+
|
|
48
|
+
@Column({ type: 'enum', enum: MissionTravelApprovalStatus, default: MissionTravelApprovalStatus.PENDING, nullable: false })
|
|
49
|
+
approval_status: MissionTravelApprovalStatus;
|
|
50
|
+
|
|
51
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
52
|
+
is_allowed: boolean;
|
|
53
|
+
|
|
54
|
+
@Column({ type: 'boolean', default: false, nullable: false })
|
|
55
|
+
is_reassign: boolean;
|
|
56
|
+
|
|
57
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
58
|
+
is_approval: boolean;
|
|
59
|
+
|
|
60
|
+
@Column({ type: 'boolean', default: false, nullable: false })
|
|
61
|
+
is_review: boolean;
|
|
62
|
+
|
|
63
|
+
constructor(
|
|
64
|
+
request_id: number,
|
|
65
|
+
service_id: number | null,
|
|
66
|
+
sub_service_id: number | null,
|
|
67
|
+
level: number,
|
|
68
|
+
approver_role_id: number,
|
|
69
|
+
department_id: number | null,
|
|
70
|
+
section_id: number | null,
|
|
71
|
+
approver_user_id: number | null,
|
|
72
|
+
delegate_user_id: number | null,
|
|
73
|
+
approved_by: number | null,
|
|
74
|
+
comment: string,
|
|
75
|
+
approval_status: MissionTravelApprovalStatus,
|
|
76
|
+
is_allowed: boolean,
|
|
77
|
+
is_reassign: boolean,
|
|
78
|
+
is_approval: boolean,
|
|
79
|
+
is_review?: boolean
|
|
80
|
+
) {
|
|
81
|
+
super();
|
|
82
|
+
this.request_id = request_id;
|
|
83
|
+
this.service_id = service_id;
|
|
84
|
+
this.sub_service_id = sub_service_id;
|
|
85
|
+
this.level = level;
|
|
86
|
+
this.approver_role_id = approver_role_id;
|
|
87
|
+
this.department_id = department_id;
|
|
88
|
+
this.section_id = section_id;
|
|
89
|
+
this.approver_user_id = approver_user_id;
|
|
90
|
+
this.delegate_user_id = delegate_user_id;
|
|
91
|
+
this.approved_by = approved_by;
|
|
92
|
+
this.comment = comment;
|
|
93
|
+
this.approval_status = approval_status;
|
|
94
|
+
this.is_allowed = is_allowed;
|
|
95
|
+
this.is_reassign = is_reassign;
|
|
96
|
+
this.is_approval = is_approval;
|
|
97
|
+
this.is_review = is_review ?? false;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|