@platform-modules/foreign-ministry 1.1.52 → 1.1.54
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 -11
- package/dist/data-source.js +18 -34
- package/dist/index.d.ts +9 -24
- package/dist/index.js +9 -24
- package/dist/models/AttendanceModel.d.ts +1 -2
- package/dist/models/AttendanceModel.js +1 -2
- package/dist/models/DiplomaticApprovalsModel.d.ts +25 -0
- package/dist/models/DiplomaticApprovalsModel.js +95 -0
- package/dist/models/DiplomaticAttachmentsModel.d.ts +12 -0
- package/dist/models/{GeneralServiceAttachmentsModel.js → DiplomaticAttachmentsModel.js} +22 -18
- package/dist/models/DiplomaticChatsModel.d.ts +11 -0
- package/dist/models/{GeneralServiceChatsModel.js → DiplomaticChatsModel.js} +21 -17
- package/dist/models/DiplomaticClubCardApprovalModel.d.ts +16 -0
- package/dist/models/DiplomaticClubCardApprovalModel.js +58 -0
- package/dist/models/DiplomaticClubCardAttachmentModel.d.ts +9 -0
- package/dist/models/{HelpdeskCategoriesModel.js → DiplomaticClubCardAttachmentModel.js} +22 -27
- package/dist/models/DiplomaticClubCardChatModel.d.ts +7 -0
- package/dist/models/{JobsModel.js → DiplomaticClubCardChatModel.js} +16 -29
- package/dist/models/DiplomaticClubCardMemberModel.d.ts +13 -0
- package/dist/models/DiplomaticClubCardMemberModel.js +60 -0
- package/dist/models/DiplomaticClubCardRequestModel.d.ts +33 -0
- package/dist/models/DiplomaticClubCardRequestModel.js +98 -0
- package/dist/models/DiplomaticClubCardWorkFlowModel.d.ts +12 -0
- package/dist/models/DiplomaticClubCardWorkFlowModel.js +42 -0
- package/dist/models/DiplomaticRequestsModel.d.ts +43 -0
- package/dist/models/DiplomaticRequestsModel.js +142 -0
- package/dist/models/DiplomaticServiceDetailsModel.d.ts +20 -0
- package/dist/models/DiplomaticServiceDetailsModel.js +65 -0
- package/dist/models/DiplomaticSettingsModel.d.ts +11 -0
- package/dist/models/DiplomaticSettingsModel.js +59 -0
- package/dist/models/DiplomaticTitleModel.d.ts +12 -0
- package/dist/models/DiplomaticTitleModel.js +45 -0
- package/dist/models/DiplomaticWorkFlowModel.d.ts +21 -0
- package/dist/models/DiplomaticWorkFlowModel.js +78 -0
- package/dist/models/EarlyCheckoutApprovalModel.d.ts +0 -1
- package/dist/models/EarlyCheckoutApprovalModel.js +0 -4
- package/dist/models/EarlyCheckoutChatModel.d.ts +0 -4
- package/dist/models/EarlyCheckoutChatModel.js +2 -28
- package/dist/models/EarlyCheckoutWorkflowModel.d.ts +0 -4
- package/dist/models/EarlyCheckoutWorkflowModel.js +0 -16
- package/dist/models/FinancialChatsModel.d.ts +1 -16
- package/dist/models/FinancialChatsModel.js +3 -33
- package/dist/models/FinancialRequestsModel.d.ts +1 -1
- package/dist/models/FinancialRequestsModel.js +3 -3
- package/dist/models/FinancialWorkFlowModel.d.ts +1 -3
- package/dist/models/FinancialWorkFlowModel.js +2 -11
- package/dist/models/LeaveApprovalsModel.d.ts +1 -4
- package/dist/models/LeaveApprovalsModel.js +0 -9
- package/dist/models/LeaveAttachmentsModel.d.ts +2 -6
- package/dist/models/LeaveAttachmentsModel.js +7 -27
- package/dist/models/LeaveChatModel.d.ts +1 -5
- package/dist/models/LeaveChatModel.js +2 -22
- package/dist/models/LeaveRequestModel.d.ts +1 -12
- package/dist/models/LeaveRequestModel.js +0 -35
- package/dist/models/LeaveWorkFlowModel.d.ts +1 -5
- package/dist/models/LeaveWorkFlowModel.js +2 -22
- package/dist/models/MounringLeaveRelationModel.d.ts +1 -2
- package/dist/models/MounringLeaveRelationModel.js +2 -7
- package/dist/models/PassportRequestApprovalModel.d.ts +22 -0
- package/dist/models/PassportRequestApprovalModel.js +91 -0
- package/dist/models/PassportRequestAttachmentModel.d.ts +10 -0
- package/dist/models/{HelpdeskSubCategoriesModel.js → PassportRequestAttachmentModel.js} +29 -29
- package/dist/models/PassportRequestChatModel.d.ts +8 -0
- package/dist/models/PassportRequestChatModel.js +44 -0
- package/dist/models/PassportRequestDependentModel.d.ts +20 -0
- package/dist/models/PassportRequestDependentModel.js +85 -0
- package/dist/models/PassportRequestModel.d.ts +40 -0
- package/dist/models/PassportRequestModel.js +128 -0
- package/dist/models/PassportRequestWorkFlowModel.d.ts +15 -0
- package/dist/models/PassportRequestWorkFlowModel.js +60 -0
- package/dist/models/ReimbursementRequestsModel.d.ts +1 -2
- package/dist/models/ReimbursementRequestsModel.js +4 -9
- package/dist/models/StayAfterHoursApprovalModel.d.ts +0 -1
- package/dist/models/StayAfterHoursApprovalModel.js +0 -4
- package/dist/models/StayAfterHoursChatModel.d.ts +0 -4
- package/dist/models/StayAfterHoursChatModel.js +2 -28
- package/dist/models/StayAfterHoursWorkflowModel.d.ts +0 -4
- package/dist/models/StayAfterHoursWorkflowModel.js +0 -16
- package/dist/models/SubscriptionAmountModel.d.ts +13 -0
- package/dist/models/SubscriptionAmountModel.js +49 -0
- package/dist/models/WorkflowTask.d.ts +2 -5
- package/dist/models/WorkflowTask.js +4 -28
- package/dist/models/WorkflowTaskNames.d.ts +3 -12
- package/dist/models/WorkflowTaskNames.js +9 -28
- package/package.json +1 -1
- package/src/data-source.ts +30 -45
- package/src/index.ts +9 -24
- package/src/models/AttendanceModel.ts +1 -2
- package/src/models/DiplomaticApprovalsModel.ts +78 -0
- package/src/models/DiplomaticAttachmentsModel.ts +45 -0
- package/src/models/DiplomaticChatsModel.ts +41 -0
- package/src/models/DiplomaticRequestsModel.ts +121 -0
- package/src/models/DiplomaticServiceDetailsModel.ts +51 -0
- package/src/models/DiplomaticSettingsModel.ts +45 -0
- package/src/models/DiplomaticTitleModel.ts +27 -0
- package/src/models/DiplomaticWorkFlowModel.ts +62 -0
- package/src/models/EarlyCheckoutApprovalModel.ts +0 -3
- package/src/models/EarlyCheckoutChatModel.ts +1 -34
- package/src/models/EarlyCheckoutWorkflowModel.ts +0 -12
- package/src/models/FinancialChatsModel.ts +1 -27
- package/src/models/FinancialRequestsModel.ts +2 -2
- package/src/models/FinancialWorkFlowModel.ts +1 -9
- package/src/models/LeaveApprovalsModel.ts +1 -8
- package/src/models/LeaveAttachmentsModel.ts +5 -21
- package/src/models/LeaveChatModel.ts +1 -17
- package/src/models/LeaveRequestModel.ts +1 -29
- package/src/models/LeaveWorkFlowModel.ts +1 -17
- package/src/models/MounringLeaveRelationModel.ts +1 -5
- package/src/models/ReimbursementRequestsModel.ts +6 -8
- package/src/models/StayAfterHoursApprovalModel.ts +0 -3
- package/src/models/StayAfterHoursChatModel.ts +1 -34
- package/src/models/StayAfterHoursWorkflowModel.ts +0 -12
- package/src/models/SubscriptionAmountModel.ts +30 -0
- package/src/models/WorkflowTask.ts +4 -31
- package/src/models/WorkflowTaskNames.ts +8 -27
- package/dist/models/CurrencyModel.d.ts +0 -10
- package/dist/models/CurrencyModel.js +0 -53
- package/dist/models/GeneralServiceApprovalsModel.d.ts +0 -26
- package/dist/models/GeneralServiceApprovalsModel.js +0 -109
- package/dist/models/GeneralServiceAttachmentsModel.d.ts +0 -10
- package/dist/models/GeneralServiceChatsModel.d.ts +0 -9
- package/dist/models/GeneralServiceRequestsModel.d.ts +0 -36
- package/dist/models/GeneralServiceRequestsModel.js +0 -137
- package/dist/models/GeneralServiceWorkFlowModel.d.ts +0 -21
- package/dist/models/GeneralServiceWorkFlowModel.js +0 -80
- package/dist/models/GroupModel.d.ts +0 -16
- package/dist/models/GroupModel.js +0 -44
- package/dist/models/GroupNamesModel.d.ts +0 -6
- package/dist/models/GroupNamesModel.js +0 -34
- 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/HelpdeskCategoriesModel.d.ts +0 -9
- package/dist/models/HelpdeskSubCategoriesModel.d.ts +0 -10
- package/dist/models/IssueTypesModel.d.ts +0 -10
- package/dist/models/IssueTypesModel.js +0 -54
- package/dist/models/JobsModel.d.ts +0 -17
- package/dist/models/RoutingGroupsModel.d.ts +0 -13
- package/dist/models/RoutingGroupsModel.js +0 -67
- package/dist/models/TelephoneDirectoryModel.d.ts +0 -21
- package/dist/models/TelephoneDirectoryModel.js +0 -108
- package/dist/models/TransferMissionApprovalModel.d.ts +0 -21
- package/dist/models/TransferMissionApprovalModel.js +0 -75
- package/dist/models/TransferMissionAttachmentModel.d.ts +0 -11
- package/dist/models/TransferMissionAttachmentModel.js +0 -52
- package/dist/models/TransferMissionChatModel.d.ts +0 -19
- package/dist/models/TransferMissionChatModel.js +0 -78
- package/dist/models/TransferMissionRequestModel.d.ts +0 -36
- package/dist/models/TransferMissionRequestModel.js +0 -132
- package/dist/models/TransferMissionWorkflowModel.d.ts +0 -17
- package/dist/models/TransferMissionWorkflowModel.js +0 -62
- package/dist/models/UpdateAttendanceApprovalModel.d.ts +0 -21
- package/dist/models/UpdateAttendanceApprovalModel.js +0 -75
- package/dist/models/UpdateAttendanceChatModel.d.ts +0 -16
- package/dist/models/UpdateAttendanceChatModel.js +0 -52
- package/dist/models/UpdateAttendanceRequestModel.d.ts +0 -28
- package/dist/models/UpdateAttendanceRequestModel.js +0 -86
- package/dist/models/UpdateAttendanceWorkflowModel.d.ts +0 -13
- package/dist/models/UpdateAttendanceWorkflowModel.js +0 -46
- package/dist/models/WorkScheduleModel.d.ts +0 -19
- package/dist/models/WorkScheduleModel.js +0 -60
- package/dist/models/questionTagsModel.d.ts +0 -6
- package/dist/models/questionTagsModel.js +0 -34
- package/src/models/CurrencyModel.ts +0 -38
- package/src/models/GeneralServiceApprovalsModel.ts +0 -95
- package/src/models/GeneralServiceAttachmentsModel.ts +0 -43
- package/src/models/GeneralServiceChatsModel.ts +0 -39
- package/src/models/GeneralServiceRequestsModel.ts +0 -113
- package/src/models/GeneralServiceWorkFlowModel.ts +0 -78
- package/src/models/GroupModel.ts +0 -30
- package/src/models/GroupNamesModel.ts +0 -22
- package/src/models/HelpdeskCategoriesModel.ts +0 -35
- package/src/models/HelpdeskSubCategoriesModel.ts +0 -40
- package/src/models/IssueTypesModel.ts +0 -47
- package/src/models/JobsModel.ts +0 -37
- package/src/models/RoutingGroupsModel.ts +0 -64
- package/src/models/TelephoneDirectoryModel.ts +0 -84
- package/src/models/TransferMissionApprovalModel.ts +0 -49
- package/src/models/TransferMissionAttachmentModel.ts +0 -31
- package/src/models/TransferMissionChatModel.ts +0 -66
- package/src/models/TransferMissionRequestModel.ts +0 -94
- package/src/models/TransferMissionWorkflowModel.ts +0 -39
- package/src/models/UpdateAttendanceApprovalModel.ts +0 -50
- package/src/models/UpdateAttendanceChatModel.ts +0 -35
- package/src/models/UpdateAttendanceRequestModel.ts +0 -63
- package/src/models/UpdateAttendanceWorkflowModel.ts +0 -28
- package/src/models/WorkScheduleModel.ts +0 -47
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
-
import { EarlyCheckoutApprovalStatus } from './EarlyCheckoutApprovalModel';
|
|
4
3
|
|
|
5
4
|
export enum EarlyCheckoutMessageType {
|
|
6
5
|
TEXT = "text",
|
|
@@ -25,43 +24,11 @@ export class EarlyCheckoutRequestChat extends BaseModel {
|
|
|
25
24
|
@Column({ type: 'integer', nullable: false })
|
|
26
25
|
user_id: number;
|
|
27
26
|
|
|
28
|
-
@Column({ type: 'integer', nullable: true })
|
|
29
|
-
role_id: number;
|
|
30
|
-
|
|
31
27
|
@Column({ type: 'text', nullable: false })
|
|
32
28
|
message: string;
|
|
33
29
|
|
|
34
|
-
@Column({
|
|
35
|
-
type: 'enum',
|
|
36
|
-
enum: EarlyCheckoutMessageType,
|
|
37
|
-
default: EarlyCheckoutMessageType.TEXT,
|
|
38
|
-
nullable: false
|
|
39
|
-
})
|
|
30
|
+
@Column({ type: 'enum', enum: EarlyCheckoutMessageType, default: EarlyCheckoutMessageType.TEXT, nullable: false })
|
|
40
31
|
messageType: EarlyCheckoutMessageType;
|
|
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?: EarlyCheckoutMessageType,
|
|
53
|
-
status?: EarlyCheckoutApprovalStatus
|
|
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 || EarlyCheckoutMessageType.TEXT;
|
|
63
|
-
this.status = status || EarlyCheckoutApprovalStatus.PENDING;
|
|
64
|
-
}
|
|
65
32
|
}
|
|
66
33
|
|
|
67
34
|
|
|
@@ -23,18 +23,6 @@ export class EarlyCheckoutWorkFlow extends BaseModel {
|
|
|
23
23
|
|
|
24
24
|
@Column({ type: 'enum', enum: EarlyCheckoutWorkFlowStatus, default: EarlyCheckoutWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
25
25
|
status: EarlyCheckoutWorkFlowStatus;
|
|
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
26
|
}
|
|
39
27
|
|
|
40
28
|
|
|
@@ -2,19 +2,6 @@ import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
import { FinancialRequests } from './FinancialRequestsModel';
|
|
4
4
|
|
|
5
|
-
export enum statusEnum {
|
|
6
|
-
PENDING = "Pending",
|
|
7
|
-
APPROVED = "Approved",
|
|
8
|
-
REJECTED = "Rejected"
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export enum messageTypeEnum {
|
|
12
|
-
TEXT = "text",
|
|
13
|
-
IMAGE = "image",
|
|
14
|
-
AUDIO = "audio",
|
|
15
|
-
VIDEO = "video"
|
|
16
|
-
}
|
|
17
|
-
|
|
18
5
|
@Entity({ name: 'financial_chats' })
|
|
19
6
|
export class FinancialChats extends BaseModel {
|
|
20
7
|
@Column({ type: 'int' })
|
|
@@ -26,28 +13,15 @@ export class FinancialChats extends BaseModel {
|
|
|
26
13
|
@Column({ type: 'int' })
|
|
27
14
|
sender_user_id: number;
|
|
28
15
|
|
|
29
|
-
@Column({ type: 'int', nullable: true })
|
|
30
|
-
role_id: number | null;
|
|
31
|
-
|
|
32
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
33
|
-
status: statusEnum | null;
|
|
34
|
-
|
|
35
|
-
@Column({ type: 'varchar',length: 255, nullable: true })
|
|
36
|
-
message_type: messageTypeEnum | null;
|
|
37
|
-
|
|
38
|
-
@Column({ type: 'int', nullable: true })
|
|
39
|
-
sender_role_id: number | null;
|
|
40
|
-
|
|
41
16
|
@ManyToOne(() => FinancialRequests, fr => fr.chats)
|
|
42
17
|
@JoinColumn({ name: 'financial_request_id' })
|
|
43
18
|
financialRequest?: FinancialRequests;
|
|
44
19
|
|
|
45
|
-
constructor(financial_request_id: number, content: string, sender_user_id: number
|
|
20
|
+
constructor(financial_request_id: number, content: string, sender_user_id: number) {
|
|
46
21
|
super();
|
|
47
22
|
this.financial_request_id = financial_request_id;
|
|
48
23
|
this.content = content;
|
|
49
24
|
this.sender_user_id = sender_user_id;
|
|
50
|
-
this.sender_role_id = sender_role_id;
|
|
51
25
|
}
|
|
52
26
|
}
|
|
53
27
|
|
|
@@ -91,8 +91,8 @@ export class FinancialRequests extends BaseModel {
|
|
|
91
91
|
@OneToOne('AllowanceRequests', 'financialRequest', { nullable: true })
|
|
92
92
|
allowanceRequest?: AllowanceRequests;
|
|
93
93
|
|
|
94
|
-
@
|
|
95
|
-
|
|
94
|
+
@OneToOne('ReimbursementRequests', 'financialRequest', { nullable: true })
|
|
95
|
+
reimbursementRequest?: ReimbursementRequests;
|
|
96
96
|
|
|
97
97
|
@OneToOne('BankAccountChangeRequests', 'financialRequest', { nullable: true })
|
|
98
98
|
bankAccountChangeRequest?: BankAccountChangeRequests;
|
|
@@ -30,12 +30,6 @@ export class FinancialWorkFlow extends BaseModel {
|
|
|
30
30
|
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
31
31
|
activity_date: Date;
|
|
32
32
|
|
|
33
|
-
@Column({ type: 'int', nullable: true })
|
|
34
|
-
approved_by_role_id: number;
|
|
35
|
-
|
|
36
|
-
@Column({ type: 'int', nullable: true })
|
|
37
|
-
step_order: number;
|
|
38
|
-
|
|
39
33
|
@ManyToOne(() => FinancialRequests, fr => fr.workflows)
|
|
40
34
|
@JoinColumn({ name: 'financial_request_id' })
|
|
41
35
|
financialRequest?: FinancialRequests;
|
|
@@ -44,8 +38,7 @@ export class FinancialWorkFlow extends BaseModel {
|
|
|
44
38
|
financial_request_id: number,
|
|
45
39
|
status: FinancialWorkFlowStatus,
|
|
46
40
|
approved_by_user_id: number,
|
|
47
|
-
content: string
|
|
48
|
-
step_order:number
|
|
41
|
+
content: string
|
|
49
42
|
) {
|
|
50
43
|
super();
|
|
51
44
|
this.financial_request_id = financial_request_id;
|
|
@@ -54,7 +47,6 @@ export class FinancialWorkFlow extends BaseModel {
|
|
|
54
47
|
this.content = content;
|
|
55
48
|
this.financial_approval_id = 0;
|
|
56
49
|
this.activity_date = new Date();
|
|
57
|
-
this.step_order = step_order
|
|
58
50
|
}
|
|
59
51
|
}
|
|
60
52
|
|
|
@@ -5,8 +5,7 @@ import { BaseModel } from './BaseModel';
|
|
|
5
5
|
export enum ApprovalStatus {
|
|
6
6
|
PENDING = "Pending",
|
|
7
7
|
APPROVED = "Approved",
|
|
8
|
-
REJECTED = "Rejected"
|
|
9
|
-
IN_PROGRESS = "In Progress"
|
|
8
|
+
REJECTED = "Rejected"
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
//This model is used to store the store the leave apporval details of the user for the leave request
|
|
@@ -24,12 +23,6 @@ export class LeaveApprovalDetails extends BaseModel {
|
|
|
24
23
|
@Column({ type: 'int', nullable: true })
|
|
25
24
|
approver_role_id: number;
|
|
26
25
|
|
|
27
|
-
@Column({ type: 'integer', nullable: true })
|
|
28
|
-
delegate_user_id: number | null;
|
|
29
|
-
|
|
30
|
-
@Column({ type: 'integer', nullable: true })
|
|
31
|
-
approved_by: number | null;
|
|
32
|
-
|
|
33
26
|
@Column({ type: 'int', nullable: true })
|
|
34
27
|
department_id: number;
|
|
35
28
|
|
|
@@ -5,33 +5,17 @@ import { BaseModel } from './BaseModel';
|
|
|
5
5
|
export class LeaveAttachments extends BaseModel {
|
|
6
6
|
@Column({ type: 'int', nullable: false })
|
|
7
7
|
leave_request_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
10
|
+
files: string;
|
|
8
11
|
|
|
9
12
|
@Column({ type: 'int', nullable: false })
|
|
10
13
|
attached_by_user_id: number;
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
file_url: string;
|
|
14
|
-
|
|
15
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
16
|
-
file_name: string;
|
|
17
|
-
|
|
18
|
-
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
19
|
-
file_type: string;
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'bigint', nullable: true })
|
|
22
|
-
file_size: number | null;
|
|
23
|
-
|
|
24
|
-
@Column({ type: 'integer', nullable: true })
|
|
25
|
-
chat_id: number | null;
|
|
26
|
-
|
|
27
|
-
constructor(leave_request_id: number, file_url: string, file_name: string, file_type: string, file_size: number | null, chat_id: number | null, attached_by_user_id: number) {
|
|
15
|
+
constructor(leave_request_id: number, files: string, attached_by_user_id: number) {
|
|
28
16
|
super();
|
|
29
17
|
this.leave_request_id = leave_request_id;
|
|
30
|
-
this.
|
|
31
|
-
this.file_name = file_name;
|
|
32
|
-
this.file_type = file_type;
|
|
33
|
-
this.file_size = file_size;
|
|
34
|
-
this.chat_id = chat_id;
|
|
18
|
+
this.files = files;
|
|
35
19
|
this.attached_by_user_id = attached_by_user_id;
|
|
36
20
|
}
|
|
37
21
|
}
|
|
@@ -12,26 +12,10 @@ export class LeaveChat extends BaseModel {
|
|
|
12
12
|
@Column({ type: 'int', nullable: false })
|
|
13
13
|
sender_user_id: number;
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
service_id: number | null;
|
|
17
|
-
|
|
18
|
-
@Column({ type: 'integer', nullable: true })
|
|
19
|
-
sub_service_id: number | null;
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'integer', nullable: true })
|
|
22
|
-
role_id: number;
|
|
23
|
-
|
|
24
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
25
|
-
status: string;
|
|
26
|
-
|
|
27
|
-
constructor(leave_request_id: number, content: string, sender_user_id: number, service_id: number | null, sub_service_id: number | null, role_id: number, status: string) {
|
|
15
|
+
constructor(leave_request_id: number, content: string, sender_user_id: number) {
|
|
28
16
|
super();
|
|
29
17
|
this.leave_request_id = leave_request_id;
|
|
30
18
|
this.content = content;
|
|
31
19
|
this.sender_user_id = sender_user_id;
|
|
32
|
-
this.status = status;
|
|
33
|
-
this.service_id = service_id;
|
|
34
|
-
this.sub_service_id = sub_service_id;
|
|
35
|
-
this.role_id = role_id;
|
|
36
20
|
}
|
|
37
21
|
}
|
|
@@ -9,10 +9,7 @@ export enum Leave_For {
|
|
|
9
9
|
export enum status {
|
|
10
10
|
PENDING = "Pending",
|
|
11
11
|
APPROVED = "Approved",
|
|
12
|
-
REJECTED = "Rejected"
|
|
13
|
-
EXTENDED = "Extended",
|
|
14
|
-
CANCELLED = "Cancelled",
|
|
15
|
-
RETURNED = "Returned"
|
|
12
|
+
REJECTED = "Rejected"
|
|
16
13
|
}
|
|
17
14
|
@Entity({ name: 'leave_requests' })
|
|
18
15
|
export class LeaveRequests extends BaseModel {
|
|
@@ -100,31 +97,6 @@ export class LeaveRequests extends BaseModel {
|
|
|
100
97
|
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
101
98
|
workflow_execution_id: string | null;
|
|
102
99
|
|
|
103
|
-
//new column for extension leave,cancel leave, return notification
|
|
104
|
-
@Column({ type: 'int', nullable: true, default: null })
|
|
105
|
-
reference_leave_request_id: number | null;
|
|
106
|
-
|
|
107
|
-
@Column({ type: 'date', nullable: true ,default: null})
|
|
108
|
-
leave_extension_date: Date | null;
|
|
109
|
-
|
|
110
|
-
@Column({ type: 'date', nullable: true ,default: null})
|
|
111
|
-
cancel_leave_date: Date | null;
|
|
112
|
-
|
|
113
|
-
@Column({ type: 'date', nullable: true ,default: null})
|
|
114
|
-
return_notification_date: Date | null;
|
|
115
|
-
|
|
116
|
-
@Column({ type: 'date', nullable: true ,default: null})
|
|
117
|
-
actual_leave_start_date: Date | null;
|
|
118
|
-
|
|
119
|
-
@Column({ type: 'date', nullable: true ,default: null})
|
|
120
|
-
actual_leave_end_date: Date | null;
|
|
121
|
-
|
|
122
|
-
@Column({ type: 'varchar', length: 255, nullable: true, default: null})
|
|
123
|
-
actual_leave_duration: string | null;
|
|
124
|
-
|
|
125
|
-
@Column({ type: 'int', nullable: true ,default: null})
|
|
126
|
-
no_of_days_delayed: number | null;
|
|
127
|
-
|
|
128
100
|
|
|
129
101
|
constructor(user_id: string, leave_for: Leave_For, leave_type: number, study_leave_degree: number, department: string, status: status, leave_start_date: Date, leave_end_date: Date, leave_duration: number, remaining_leave_balance: number, contact_number_during_leave: string, address_during_leave: string, notes: string, delegated_to: string, number_of_escort_instances_per_year: number, accompanying_the_patient: boolean, treatment_place: string, emergency_leaves_available: number, unpaid_leave_type: string, country_or_state_being_visited: string, leave_balance_summary: string, representation: string, activity_title: string, relationship: string, mounring_leave_relation: number, service_id: number, sub_service_id: number, workflow_execution_id: string) {
|
|
130
102
|
super();
|
|
@@ -22,27 +22,11 @@ export class LeaveWorkFlow extends BaseModel {
|
|
|
22
22
|
@Column({ type: 'enum', enum: workFlowStatus, default: workFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
23
23
|
status: workFlowStatus;
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
user_id: number | null;
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'integer', nullable: true })
|
|
29
|
-
role_id: number | null;
|
|
30
|
-
|
|
31
|
-
@Column({ type: 'integer', nullable: true })
|
|
32
|
-
department_id: number | null;
|
|
33
|
-
|
|
34
|
-
@Column({ type: 'integer', nullable: true })
|
|
35
|
-
section_id: number | null;
|
|
36
|
-
|
|
37
|
-
constructor(leave_request_id: number, leave_approval_details_id: number, content: string, status: workFlowStatus, user_id: number, role_id: number, department_id: number, section_id: number) {
|
|
25
|
+
constructor(leave_request_id: number, leave_approval_details_id: number, content: string, status: workFlowStatus) {
|
|
38
26
|
super();
|
|
39
27
|
this.leave_request_id = leave_request_id;
|
|
40
28
|
this.leave_approval_details_id = leave_approval_details_id;
|
|
41
29
|
this.content = content;
|
|
42
30
|
this.status = status;
|
|
43
|
-
this.user_id = user_id;
|
|
44
|
-
this.role_id = role_id;
|
|
45
|
-
this.department_id = department_id;
|
|
46
|
-
this.section_id = section_id;
|
|
47
31
|
}
|
|
48
32
|
}
|
|
@@ -7,12 +7,8 @@ export class MounringLeaveRelations extends BaseModel {
|
|
|
7
7
|
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
8
8
|
mounring_leave_relation: string;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
days_allowed: number;
|
|
12
|
-
|
|
13
|
-
constructor(mounring_leave_relation: string, days_allowed: number) {
|
|
10
|
+
constructor(mounring_leave_relation: string) {
|
|
14
11
|
super();
|
|
15
12
|
this.mounring_leave_relation = mounring_leave_relation;
|
|
16
|
-
this.days_allowed = days_allowed;
|
|
17
13
|
}
|
|
18
14
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Column, Entity,
|
|
1
|
+
import { Column, Entity, OneToOne, JoinColumn } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
import { FinancialRequests } from "./FinancialRequestsModel";
|
|
4
4
|
|
|
5
5
|
@Entity({ name: 'reimbursement_requests' })
|
|
6
6
|
export class ReimbursementRequests extends BaseModel {
|
|
7
|
-
@Column({ type: 'int' })
|
|
7
|
+
@Column({ type: 'int', unique: true })
|
|
8
8
|
financial_request_id: number;
|
|
9
9
|
|
|
10
10
|
@Column({ type: 'text' })
|
|
@@ -34,10 +34,10 @@ export class ReimbursementRequests extends BaseModel {
|
|
|
34
34
|
@Column({ type: 'date', nullable: true })
|
|
35
35
|
payment_date: Date;
|
|
36
36
|
|
|
37
|
-
@
|
|
38
|
-
|
|
37
|
+
// @OneToOne('FinancialRequests', 'reimbursementRequest')
|
|
38
|
+
// financialRequest?: FinancialRequests;
|
|
39
39
|
|
|
40
|
-
@
|
|
40
|
+
@OneToOne(() => FinancialRequests, fr => fr.reimbursementRequest)
|
|
41
41
|
@JoinColumn({ name: 'financial_request_id' })
|
|
42
42
|
financialRequest?: FinancialRequests;
|
|
43
43
|
|
|
@@ -49,8 +49,7 @@ export class ReimbursementRequests extends BaseModel {
|
|
|
49
49
|
approved_amount: number,
|
|
50
50
|
payment_mode: string,
|
|
51
51
|
payment_date: Date,
|
|
52
|
-
expense_description: string
|
|
53
|
-
currency :string
|
|
52
|
+
expense_description: string
|
|
54
53
|
) {
|
|
55
54
|
super();
|
|
56
55
|
this.financial_request_id = financial_request_id;
|
|
@@ -62,7 +61,6 @@ export class ReimbursementRequests extends BaseModel {
|
|
|
62
61
|
this.payment_date = payment_date;
|
|
63
62
|
this.expense_description = expense_description;
|
|
64
63
|
this.payment_processed = false;
|
|
65
|
-
this.currency = currency
|
|
66
64
|
}
|
|
67
65
|
}
|
|
68
66
|
|
|
@@ -45,8 +45,5 @@ export class StayAfterHoursApprovalDetails extends BaseModel {
|
|
|
45
45
|
|
|
46
46
|
@Column({ type: 'enum', enum: StayAfterHoursApprovalStatus, default: StayAfterHoursApprovalStatus.PENDING, nullable: false })
|
|
47
47
|
approval_status: StayAfterHoursApprovalStatus;
|
|
48
|
-
|
|
49
|
-
@Column({ type: 'boolean', default: true, nullable: false })
|
|
50
|
-
is_allowed: boolean;
|
|
51
48
|
}
|
|
52
49
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
-
import { StayAfterHoursApprovalStatus } from './StayAfterHoursApprovalModel';
|
|
4
3
|
|
|
5
4
|
export enum StayAfterHoursMessageType {
|
|
6
5
|
TEXT = "text",
|
|
@@ -25,42 +24,10 @@ export class StayAfterHoursRequestChat extends BaseModel {
|
|
|
25
24
|
@Column({ type: 'integer', nullable: false })
|
|
26
25
|
user_id: number;
|
|
27
26
|
|
|
28
|
-
@Column({ type: 'integer', nullable: true })
|
|
29
|
-
role_id: number;
|
|
30
|
-
|
|
31
27
|
@Column({ type: 'text', nullable: false })
|
|
32
28
|
message: string;
|
|
33
29
|
|
|
34
|
-
@Column({
|
|
35
|
-
type: 'enum',
|
|
36
|
-
enum: StayAfterHoursMessageType,
|
|
37
|
-
default: StayAfterHoursMessageType.TEXT,
|
|
38
|
-
nullable: false
|
|
39
|
-
})
|
|
30
|
+
@Column({ type: 'enum', enum: StayAfterHoursMessageType, default: StayAfterHoursMessageType.TEXT, nullable: false })
|
|
40
31
|
messageType: StayAfterHoursMessageType;
|
|
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?: StayAfterHoursMessageType,
|
|
53
|
-
status?: StayAfterHoursApprovalStatus
|
|
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 || StayAfterHoursMessageType.TEXT;
|
|
63
|
-
this.status = status || StayAfterHoursApprovalStatus.PENDING;
|
|
64
|
-
}
|
|
65
32
|
}
|
|
66
33
|
|
|
@@ -23,17 +23,5 @@ export class StayAfterHoursWorkFlow extends BaseModel {
|
|
|
23
23
|
|
|
24
24
|
@Column({ type: 'enum', enum: StayAfterHoursWorkFlowStatus, default: StayAfterHoursWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
25
25
|
status: StayAfterHoursWorkFlowStatus;
|
|
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
26
|
}
|
|
39
27
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum MembershipType {
|
|
5
|
+
SINGLE = "Single",
|
|
6
|
+
FAMILY = "Family"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@Entity({ name: 'subscription_amounts' })
|
|
10
|
+
export class SubscriptionAmounts extends BaseModel {
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'enum', enum: MembershipType, nullable: false })
|
|
13
|
+
membership_type: MembershipType; // Single or Family
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: false })
|
|
16
|
+
amount: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
19
|
+
description: string | null;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
22
|
+
is_active: boolean;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'date', nullable: true })
|
|
25
|
+
effective_from: Date | null;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'date', nullable: true })
|
|
28
|
+
effective_to: Date | null;
|
|
29
|
+
}
|
|
30
|
+
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
-
import { TaskType } from "./WorkflowTaskNames";
|
|
4
|
-
import { CategoryType } from "./WorkflowTaskNames";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// export enum TaskNameType {
|
|
8
|
-
// SIMPLE = 'SIMPLE',
|
|
9
|
-
// HUMAN = 'HUMAN'
|
|
10
|
-
// }
|
|
11
|
-
|
|
12
|
-
// export enum CategoryNameType {
|
|
13
|
-
// CREATE = 'CREATE',
|
|
14
|
-
// APPROVAL = 'APPROVAL',
|
|
15
|
-
// NOTIFICATION = 'NOTIFICATION'
|
|
16
|
-
// }
|
|
17
3
|
|
|
18
4
|
@Entity({ name: 'workflow_tasks' })
|
|
19
5
|
export class WorkflowTask extends BaseModel {
|
|
@@ -24,30 +10,17 @@ export class WorkflowTask extends BaseModel {
|
|
|
24
10
|
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
25
11
|
name: string;
|
|
26
12
|
|
|
27
|
-
@Column({
|
|
28
|
-
|
|
29
|
-
enum: TaskType,
|
|
30
|
-
nullable: true
|
|
31
|
-
})
|
|
32
|
-
task_type: TaskType;
|
|
33
|
-
|
|
34
|
-
@Column({
|
|
35
|
-
type: 'enum',
|
|
36
|
-
enum: CategoryType,
|
|
37
|
-
nullable: true
|
|
38
|
-
})
|
|
39
|
-
category: CategoryType;
|
|
13
|
+
@Column({ type: 'varchar', length: 200, nullable: true })
|
|
14
|
+
task_type: string;
|
|
40
15
|
|
|
41
16
|
constructor(
|
|
42
17
|
name: string,
|
|
43
18
|
task_id?: number,
|
|
44
|
-
task_type?:
|
|
45
|
-
category?: CategoryType
|
|
19
|
+
task_type?: string
|
|
46
20
|
) {
|
|
47
21
|
super();
|
|
48
22
|
this.name = name;
|
|
49
23
|
this.task_id = task_id || 0;
|
|
50
|
-
this.task_type = task_type ||
|
|
51
|
-
this.category = category || CategoryType.CREATE;
|
|
24
|
+
this.task_type = task_type || '';
|
|
52
25
|
}
|
|
53
26
|
}
|
|
@@ -1,50 +1,31 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
-
export enum TaskType {
|
|
5
|
-
SIMPLE = 'SIMPLE',
|
|
6
|
-
HUMAN = 'HUMAN'
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export enum CategoryType {
|
|
10
|
-
CREATE = 'CREATE',
|
|
11
|
-
APPROVAL = 'APPROVAL',
|
|
12
|
-
NOTIFICATION = 'NOTIFICATION'
|
|
13
|
-
}
|
|
14
|
-
|
|
15
4
|
@Entity({ name: 'workflow_task_names' })
|
|
16
5
|
export class WorkflowTaskNames extends BaseModel {
|
|
17
6
|
|
|
18
7
|
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
19
8
|
name: string;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'integer', nullable: false })
|
|
11
|
+
task_id: number;
|
|
20
12
|
|
|
21
13
|
@Column({ type: 'varchar', length: 200, nullable: true })
|
|
22
14
|
description: string;
|
|
23
15
|
|
|
24
|
-
@Column({
|
|
25
|
-
|
|
26
|
-
enum: TaskType,
|
|
27
|
-
nullable: true
|
|
28
|
-
})
|
|
29
|
-
task_type: TaskType;
|
|
30
|
-
|
|
31
|
-
@Column({
|
|
32
|
-
type: 'enum',
|
|
33
|
-
enum: CategoryType,
|
|
34
|
-
nullable: true
|
|
35
|
-
})
|
|
36
|
-
category: CategoryType;
|
|
16
|
+
@Column({ type: 'varchar', length: 200, nullable: true })
|
|
17
|
+
task_type: string;
|
|
37
18
|
|
|
38
19
|
constructor(
|
|
39
20
|
name: string,
|
|
21
|
+
task_id: number,
|
|
40
22
|
description: string,
|
|
41
|
-
task_type:
|
|
42
|
-
category: CategoryType
|
|
23
|
+
task_type: string
|
|
43
24
|
) {
|
|
44
25
|
super();
|
|
45
26
|
this.name = name;
|
|
27
|
+
this.task_id = task_id;
|
|
46
28
|
this.description = description;
|
|
47
29
|
this.task_type = task_type;
|
|
48
|
-
this.category = category;
|
|
49
30
|
}
|
|
50
31
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare class Currency extends BaseModel {
|
|
3
|
-
id: number;
|
|
4
|
-
code: string;
|
|
5
|
-
name: string;
|
|
6
|
-
symbol: string;
|
|
7
|
-
countries: string;
|
|
8
|
-
is_active: boolean;
|
|
9
|
-
constructor(code: string, name: string, symbol?: string, countries?: string);
|
|
10
|
-
}
|