@platform-modules/foreign-ministry 1.1.16 → 1.1.18
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/HELPDESK_SCHEMA_DESIGN.md +479 -0
- package/dist/data-source.js +15 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/models/IssueTypesModel.d.ts +14 -0
- package/dist/models/IssueTypesModel.js +66 -0
- package/dist/models/LeaveApprovalsModel.d.ts +2 -1
- package/dist/models/LeaveApprovalsModel.js +1 -0
- package/dist/models/RoutingGroupsModel.d.ts +19 -0
- package/dist/models/RoutingGroupsModel.js +85 -0
- package/dist/models/ServiceApprovalsModel.d.ts +23 -0
- package/dist/models/ServiceApprovalsModel.js +91 -0
- package/dist/models/ServiceAttachmentsModel.d.ts +10 -0
- package/dist/models/ServiceAttachmentsModel.js +56 -0
- package/dist/models/ServiceChatsModel.d.ts +9 -0
- package/dist/models/ServiceChatsModel.js +51 -0
- package/dist/models/ServiceRequestsModel.d.ts +36 -0
- package/dist/models/ServiceRequestsModel.js +136 -0
- package/dist/models/ServiceWorkFlowModel.d.ts +19 -0
- package/dist/models/ServiceWorkFlowModel.js +71 -0
- package/package.json +1 -1
- package/src/data-source.ts +14 -0
- package/src/index.ts +7 -0
- package/src/models/IssueTypesModel.ts +50 -0
- package/src/models/LeaveApprovalsModel.ts +2 -1
- package/src/models/RoutingGroupsModel.ts +66 -0
- package/src/models/ServiceApprovalsModel.ts +76 -0
- package/src/models/ServiceAttachmentsModel.ts +43 -0
- package/src/models/ServiceChatsModel.ts +39 -0
- package/src/models/ServiceRequestsModel.ts +111 -0
- package/src/models/ServiceWorkFlowModel.ts +57 -0
- package/dist/models/LeaveApprovalDetailsModel.d.ts +0 -13
- package/dist/models/LeaveApprovalDetailsModel.js +0 -51
- package/dist/models/LeaveApprovalMatrixModel.d.ts +0 -7
- package/dist/models/LeaveApprovalMatrixModel.js +0 -40
- package/dist/models/UpdateAttendenceRequestModel.d.ts +0 -28
- package/dist/models/UpdateAttendenceRequestModel.js +0 -86
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { FMServices } from './FMServices';
|
|
4
|
+
import { FMSubServices } from './FMSubservices';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'issue_types' })
|
|
7
|
+
export class IssueTypes extends BaseModel {
|
|
8
|
+
@Column({ type: 'varchar', length: 100 })
|
|
9
|
+
name: string; // e.g., "Hardware Issue", "Software Issue", "Network Problem"
|
|
10
|
+
|
|
11
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
12
|
+
description: string | null;
|
|
13
|
+
|
|
14
|
+
@Column({ type: 'int' })
|
|
15
|
+
service_id: number; // Category
|
|
16
|
+
|
|
17
|
+
@ManyToOne(() => FMServices)
|
|
18
|
+
@JoinColumn({ name: 'service_id' })
|
|
19
|
+
service?: FMServices;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'int' })
|
|
22
|
+
sub_service_id: number; // Subcategory
|
|
23
|
+
|
|
24
|
+
@ManyToOne(() => FMSubServices)
|
|
25
|
+
@JoinColumn({ name: 'sub_service_id' })
|
|
26
|
+
sub_service?: FMSubServices;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'boolean', default: true })
|
|
29
|
+
is_active: boolean;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'int', nullable: true })
|
|
32
|
+
priority: number | null; // 1=High, 2=Medium, 3=Low
|
|
33
|
+
|
|
34
|
+
constructor(
|
|
35
|
+
name: string,
|
|
36
|
+
service_id: number,
|
|
37
|
+
sub_service_id: number,
|
|
38
|
+
description?: string,
|
|
39
|
+
priority?: number | null
|
|
40
|
+
) {
|
|
41
|
+
super();
|
|
42
|
+
this.name = name;
|
|
43
|
+
this.service_id = service_id;
|
|
44
|
+
this.sub_service_id = sub_service_id;
|
|
45
|
+
this.description = description || null;
|
|
46
|
+
this.is_active = true;
|
|
47
|
+
this.priority = priority || null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
@@ -5,7 +5,8 @@ import { BaseModel } from './BaseModel';
|
|
|
5
5
|
export enum ApprovalStatus {
|
|
6
6
|
PENDING = "Pending",
|
|
7
7
|
APPROVED = "Approved",
|
|
8
|
-
REJECTED = "Rejected"
|
|
8
|
+
REJECTED = "Rejected",
|
|
9
|
+
IN_PROGRESS = "In Progress"
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
//This model is used to store the store the leave apporval details of the user for the leave request
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { FMServices } from './FMServices';
|
|
4
|
+
import { FMSubServices } from './FMSubservices';
|
|
5
|
+
import { IssueTypes } from './IssueTypesModel';
|
|
6
|
+
|
|
7
|
+
@Entity({ name: 'routing_groups' })
|
|
8
|
+
export class RoutingGroups extends BaseModel {
|
|
9
|
+
@Column({ type: 'varchar', length: 255 })
|
|
10
|
+
group_name: string; // e.g., "IT-Hardware-Support", "HR-Payroll-Team"
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
13
|
+
description: string | null;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'int' })
|
|
16
|
+
service_id: number;
|
|
17
|
+
|
|
18
|
+
@ManyToOne(() => FMServices)
|
|
19
|
+
@JoinColumn({ name: 'service_id' })
|
|
20
|
+
service?: FMServices;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'int' })
|
|
23
|
+
sub_service_id: number;
|
|
24
|
+
|
|
25
|
+
@ManyToOne(() => FMSubServices)
|
|
26
|
+
@JoinColumn({ name: 'sub_service_id' })
|
|
27
|
+
sub_service?: FMSubServices;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'int', nullable: true })
|
|
30
|
+
issue_type_id: number | null; // If null, applies to all issue types in sub-service
|
|
31
|
+
|
|
32
|
+
@ManyToOne(() => IssueTypes, { nullable: true })
|
|
33
|
+
@JoinColumn({ name: 'issue_type_id' })
|
|
34
|
+
issue_type?: IssueTypes;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'int', nullable: true })
|
|
37
|
+
assigned_role_id: number | null; // Single role ID assigned to this group
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'int', nullable: true })
|
|
40
|
+
department_id: number | null; // If specific to department
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'int', nullable: true })
|
|
43
|
+
section_id: number | null; // If specific to section
|
|
44
|
+
|
|
45
|
+
@Column({ type: 'boolean', default: true })
|
|
46
|
+
is_active: boolean;
|
|
47
|
+
|
|
48
|
+
constructor(
|
|
49
|
+
group_name: string,
|
|
50
|
+
service_id: number,
|
|
51
|
+
sub_service_id: number,
|
|
52
|
+
issue_type_id?: number | null,
|
|
53
|
+
assigned_role_id?: number | null,
|
|
54
|
+
description?: string
|
|
55
|
+
) {
|
|
56
|
+
super();
|
|
57
|
+
this.group_name = group_name;
|
|
58
|
+
this.service_id = service_id;
|
|
59
|
+
this.sub_service_id = sub_service_id;
|
|
60
|
+
this.issue_type_id = issue_type_id || null;
|
|
61
|
+
this.assigned_role_id = assigned_role_id || null;
|
|
62
|
+
this.description = description || null;
|
|
63
|
+
this.is_active = true;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum GeneralServiceApprovalStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
APPROVED = "Approved",
|
|
7
|
+
REJECTED = "Rejected",
|
|
8
|
+
SKIPPED = "Skipped",
|
|
9
|
+
IN_PROGRESS = "In Progress"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Entity({ name: 'general_service_approvals' })
|
|
13
|
+
export class GeneralServiceApprovals extends BaseModel {
|
|
14
|
+
@Column({ type: 'int' })
|
|
15
|
+
request_id: number;
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'int' })
|
|
18
|
+
level: number;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'int', nullable: true })
|
|
21
|
+
approver_user_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'int' })
|
|
24
|
+
approver_role_id: number;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'text', nullable: true })
|
|
27
|
+
comment: string | null;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'enum', enum: GeneralServiceApprovalStatus, default: GeneralServiceApprovalStatus.PENDING })
|
|
30
|
+
approval_status: GeneralServiceApprovalStatus;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'timestamp', nullable: true })
|
|
33
|
+
action_date: Date;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'int', nullable: true })
|
|
36
|
+
department_id: number | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'int', nullable: true })
|
|
39
|
+
section_id: number | null;
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'int', nullable: true })
|
|
42
|
+
approved_by: number | null;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'int', nullable: true })
|
|
45
|
+
service_id: number | null; // For filtering and multi-service support
|
|
46
|
+
|
|
47
|
+
@Column({ type: 'int', nullable: true })
|
|
48
|
+
sub_service_id: number | null; // For filtering and multi-service support
|
|
49
|
+
|
|
50
|
+
// Note: No relationship mapping - this table is generic and can be used with any request table
|
|
51
|
+
// Use request_id to join manually when needed
|
|
52
|
+
|
|
53
|
+
constructor(
|
|
54
|
+
request_id: number,
|
|
55
|
+
level: number,
|
|
56
|
+
approver_role_id: number,
|
|
57
|
+
approval_status: GeneralServiceApprovalStatus,
|
|
58
|
+
department_id: number | null,
|
|
59
|
+
section_id: number | null,
|
|
60
|
+
approved_by: number | null,
|
|
61
|
+
service_id?: number | null,
|
|
62
|
+
sub_service_id?: number | null
|
|
63
|
+
) {
|
|
64
|
+
super();
|
|
65
|
+
this.request_id = request_id;
|
|
66
|
+
this.level = level;
|
|
67
|
+
this.approver_role_id = approver_role_id;
|
|
68
|
+
this.approval_status = approval_status;
|
|
69
|
+
this.department_id = department_id;
|
|
70
|
+
this.section_id = section_id;
|
|
71
|
+
this.approved_by = approved_by;
|
|
72
|
+
this.service_id = service_id || null;
|
|
73
|
+
this.sub_service_id = sub_service_id || null;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'general_service_attachments' })
|
|
5
|
+
export class GeneralServiceAttachments extends BaseModel {
|
|
6
|
+
@Column({ type: 'int' })
|
|
7
|
+
request_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'varchar', length: 500 })
|
|
10
|
+
file_url: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'varchar', length: 255 })
|
|
13
|
+
file_name: string;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
16
|
+
file_type: string; // PDF, JPG, PNG, etc.
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'int', nullable: true })
|
|
19
|
+
service_id: number | null; // For filtering and multi-service support
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'int', nullable: true })
|
|
22
|
+
sub_service_id: number | null; // For filtering and multi-service support
|
|
23
|
+
|
|
24
|
+
// Note: No relationship mapping - this table is generic and can be used with any request table
|
|
25
|
+
// Use request_id to join manually when needed
|
|
26
|
+
|
|
27
|
+
constructor(
|
|
28
|
+
request_id: number,
|
|
29
|
+
file_url: string,
|
|
30
|
+
file_name: string,
|
|
31
|
+
service_id?: number | null,
|
|
32
|
+
sub_service_id?: number | null
|
|
33
|
+
) {
|
|
34
|
+
super();
|
|
35
|
+
this.request_id = request_id;
|
|
36
|
+
this.file_url = file_url;
|
|
37
|
+
this.file_name = file_name;
|
|
38
|
+
this.file_type = 'PDF';
|
|
39
|
+
this.service_id = service_id || null;
|
|
40
|
+
this.sub_service_id = sub_service_id || null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'general_service_chats' })
|
|
5
|
+
export class GeneralServiceChats extends BaseModel {
|
|
6
|
+
@Column({ type: 'int' })
|
|
7
|
+
request_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'text' })
|
|
10
|
+
content: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'int' })
|
|
13
|
+
sender_user_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'int', nullable: true })
|
|
16
|
+
service_id: number | null; // For filtering and multi-service support
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'int', nullable: true })
|
|
19
|
+
sub_service_id: number | null; // For filtering and multi-service support
|
|
20
|
+
|
|
21
|
+
// Note: No relationship mapping - this table is generic and can be used with any request table
|
|
22
|
+
// Use request_id to join manually when needed
|
|
23
|
+
|
|
24
|
+
constructor(
|
|
25
|
+
request_id: number,
|
|
26
|
+
content: string,
|
|
27
|
+
sender_user_id: number,
|
|
28
|
+
service_id?: number | null,
|
|
29
|
+
sub_service_id?: number | null
|
|
30
|
+
) {
|
|
31
|
+
super();
|
|
32
|
+
this.request_id = request_id;
|
|
33
|
+
this.content = content;
|
|
34
|
+
this.sender_user_id = sender_user_id;
|
|
35
|
+
this.service_id = service_id || null;
|
|
36
|
+
this.sub_service_id = sub_service_id || null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum GeneralServiceRequestStatus {
|
|
5
|
+
DRAFT = "Draft",
|
|
6
|
+
SUBMITTED = "Submitted",
|
|
7
|
+
PENDING = "Pending",
|
|
8
|
+
IN_PROGRESS = "In Progress",
|
|
9
|
+
APPROVED = "Approved",
|
|
10
|
+
REJECTED = "Rejected",
|
|
11
|
+
COMPLETED = "Completed",
|
|
12
|
+
CANCELLED = "Cancelled"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@Entity({ name: 'general_service_requests' })
|
|
16
|
+
export class GeneralServiceRequests extends BaseModel {
|
|
17
|
+
@Column({ type: 'int' })
|
|
18
|
+
user_id: number;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'varchar', length: 100 })
|
|
21
|
+
employee_id: string;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'varchar', length: 255 })
|
|
24
|
+
employee_name: string;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
27
|
+
grade: string | null;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'int', nullable: true })
|
|
30
|
+
designation_id: number | null;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'int', nullable: true })
|
|
33
|
+
department_id: number | null;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'varchar', length: 255 })
|
|
36
|
+
email_address: string;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'varchar', length: 20 })
|
|
39
|
+
contact_number: string;
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
42
|
+
request_date: Date;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'enum', enum: GeneralServiceRequestStatus, default: GeneralServiceRequestStatus.PENDING })
|
|
45
|
+
request_status: GeneralServiceRequestStatus;
|
|
46
|
+
|
|
47
|
+
@Column({ type: 'timestamp', nullable: true })
|
|
48
|
+
request_close_date: Date | null;
|
|
49
|
+
|
|
50
|
+
@Column({ type: 'text', nullable: true })
|
|
51
|
+
remarks: string | null;
|
|
52
|
+
|
|
53
|
+
@Column({ type: 'int', nullable: true })
|
|
54
|
+
current_approval_level: number | null;
|
|
55
|
+
|
|
56
|
+
@Column({ type: 'int', nullable: true })
|
|
57
|
+
current_approver_id: number | null;
|
|
58
|
+
|
|
59
|
+
@Column({ type: 'int', nullable: true })
|
|
60
|
+
service_id: number | null;
|
|
61
|
+
|
|
62
|
+
@Column({ type: 'int', nullable: true })
|
|
63
|
+
sub_service_id: number | null;
|
|
64
|
+
|
|
65
|
+
@Column({ type: 'int', nullable: true })
|
|
66
|
+
section_id: number | null;
|
|
67
|
+
|
|
68
|
+
@Column({ type: 'int', nullable: true })
|
|
69
|
+
reporting_manager: number | null;
|
|
70
|
+
|
|
71
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
72
|
+
workflow_execution_id: string | null;
|
|
73
|
+
|
|
74
|
+
@Column({ type: 'int', nullable: true })
|
|
75
|
+
issue_type_id: number | null; // Reference to issue types table
|
|
76
|
+
|
|
77
|
+
@Column({ type: 'int', nullable: true })
|
|
78
|
+
assigned_group_id: number | null; // Reference to routing groups table
|
|
79
|
+
|
|
80
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
81
|
+
group_name: string | null; // Auto-populated routing group name
|
|
82
|
+
|
|
83
|
+
// Note: No relationship mappings - these 4 tables (approvals, workflows, chats, attachments)
|
|
84
|
+
// are generic and can be used with any request table. Use request_id to join manually when needed.
|
|
85
|
+
|
|
86
|
+
constructor(
|
|
87
|
+
user_id: number,
|
|
88
|
+
employee_id: string,
|
|
89
|
+
employee_name: string,
|
|
90
|
+
email_address: string,
|
|
91
|
+
contact_number: string,
|
|
92
|
+
service_id: number | null,
|
|
93
|
+
sub_service_id: number | null,
|
|
94
|
+
section_id: number | null,
|
|
95
|
+
reporting_manager: number | null
|
|
96
|
+
) {
|
|
97
|
+
super();
|
|
98
|
+
this.user_id = user_id;
|
|
99
|
+
this.employee_id = employee_id;
|
|
100
|
+
this.employee_name = employee_name;
|
|
101
|
+
this.email_address = email_address;
|
|
102
|
+
this.contact_number = contact_number;
|
|
103
|
+
this.request_date = new Date();
|
|
104
|
+
this.request_status = GeneralServiceRequestStatus.PENDING;
|
|
105
|
+
this.service_id = service_id;
|
|
106
|
+
this.sub_service_id = sub_service_id;
|
|
107
|
+
this.section_id = section_id;
|
|
108
|
+
this.reporting_manager = reporting_manager;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum GeneralServiceWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending",
|
|
8
|
+
IN_PROGRESS = "In Progress",
|
|
9
|
+
FAILED = "Failed"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Entity({ name: 'general_service_work_flows' })
|
|
13
|
+
export class GeneralServiceWorkFlow extends BaseModel {
|
|
14
|
+
@Column({ type: 'int' })
|
|
15
|
+
request_id: number;
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'int', nullable: true, default: 0 })
|
|
18
|
+
approval_id: number;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'enum', enum: GeneralServiceWorkFlowStatus, default: GeneralServiceWorkFlowStatus.NOT_YET_STARTED })
|
|
21
|
+
status: GeneralServiceWorkFlowStatus;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'int', nullable: true })
|
|
24
|
+
approved_by_user_id: number;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'varchar', length: 500 })
|
|
27
|
+
content: string;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
30
|
+
date: Date;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'int', nullable: true })
|
|
33
|
+
service_id: number | null; // For filtering and multi-service support
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'int', nullable: true })
|
|
36
|
+
sub_service_id: number | null; // For filtering and multi-service support
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
constructor(
|
|
40
|
+
request_id: number,
|
|
41
|
+
status: GeneralServiceWorkFlowStatus,
|
|
42
|
+
approved_by_user_id: number,
|
|
43
|
+
content: string,
|
|
44
|
+
service_id?: number | null,
|
|
45
|
+
sub_service_id?: number | null
|
|
46
|
+
) {
|
|
47
|
+
super();
|
|
48
|
+
this.request_id = request_id;
|
|
49
|
+
this.status = status;
|
|
50
|
+
this.approved_by_user_id = approved_by_user_id;
|
|
51
|
+
this.content = content;
|
|
52
|
+
this.date = new Date();
|
|
53
|
+
this.service_id = service_id || null;
|
|
54
|
+
this.sub_service_id = sub_service_id || null;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare enum ApprovalStatus {
|
|
3
|
-
PENDING = "Pending",
|
|
4
|
-
APPROVED = "Approved",
|
|
5
|
-
REJECTED = "Rejected"
|
|
6
|
-
}
|
|
7
|
-
export declare class LeaveApprovalDetails extends BaseModel {
|
|
8
|
-
leave_request_id: number;
|
|
9
|
-
level: number;
|
|
10
|
-
approver_id: number;
|
|
11
|
-
approval_status: ApprovalStatus;
|
|
12
|
-
constructor(leave_request_id: number, approver_id: number, approval_status: ApprovalStatus, level: number);
|
|
13
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.LeaveApprovalDetails = exports.ApprovalStatus = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
var ApprovalStatus;
|
|
16
|
-
(function (ApprovalStatus) {
|
|
17
|
-
ApprovalStatus["PENDING"] = "Pending";
|
|
18
|
-
ApprovalStatus["APPROVED"] = "Approved";
|
|
19
|
-
ApprovalStatus["REJECTED"] = "Rejected";
|
|
20
|
-
})(ApprovalStatus || (exports.ApprovalStatus = ApprovalStatus = {}));
|
|
21
|
-
//This model is used to store the store the leave apporval details of the user for the leave request
|
|
22
|
-
let LeaveApprovalDetails = class LeaveApprovalDetails extends BaseModel_1.BaseModel {
|
|
23
|
-
constructor(leave_request_id, approver_id, approval_status, level) {
|
|
24
|
-
super();
|
|
25
|
-
this.leave_request_id = leave_request_id;
|
|
26
|
-
this.approver_id = approver_id;
|
|
27
|
-
this.approval_status = approval_status;
|
|
28
|
-
this.level = level;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
exports.LeaveApprovalDetails = LeaveApprovalDetails;
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
34
|
-
__metadata("design:type", Number)
|
|
35
|
-
], LeaveApprovalDetails.prototype, "leave_request_id", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
38
|
-
__metadata("design:type", Number)
|
|
39
|
-
], LeaveApprovalDetails.prototype, "level", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
42
|
-
__metadata("design:type", Number)
|
|
43
|
-
], LeaveApprovalDetails.prototype, "approver_id", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({ type: 'enum', enum: ApprovalStatus, default: ApprovalStatus.PENDING, nullable: false }),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], LeaveApprovalDetails.prototype, "approval_status", void 0);
|
|
48
|
-
exports.LeaveApprovalDetails = LeaveApprovalDetails = __decorate([
|
|
49
|
-
(0, typeorm_1.Entity)({ name: 'leave_approval_details' }),
|
|
50
|
-
__metadata("design:paramtypes", [Number, Number, String, Number])
|
|
51
|
-
], LeaveApprovalDetails);
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.LeaveApprovalMatrix = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
//This model is used to store the store the leave apporval matrix(HOD, Manager, HR, Director) based on leave type along with the levels
|
|
16
|
-
let LeaveApprovalMatrix = class LeaveApprovalMatrix extends BaseModel_1.BaseModel {
|
|
17
|
-
constructor(leave_type, level, approval_matrix) {
|
|
18
|
-
super();
|
|
19
|
-
this.leave_type = leave_type;
|
|
20
|
-
this.level = level;
|
|
21
|
-
this.approval_matrix = approval_matrix;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
exports.LeaveApprovalMatrix = LeaveApprovalMatrix;
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
27
|
-
__metadata("design:type", Number)
|
|
28
|
-
], LeaveApprovalMatrix.prototype, "leave_type", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
31
|
-
__metadata("design:type", Number)
|
|
32
|
-
], LeaveApprovalMatrix.prototype, "level", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], LeaveApprovalMatrix.prototype, "approval_matrix", void 0);
|
|
37
|
-
exports.LeaveApprovalMatrix = LeaveApprovalMatrix = __decorate([
|
|
38
|
-
(0, typeorm_1.Entity)({ name: 'leave_approval_matrix' }),
|
|
39
|
-
__metadata("design:paramtypes", [Number, Number, String])
|
|
40
|
-
], LeaveApprovalMatrix);
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare enum UpdateAttendenceStatus {
|
|
3
|
-
PENDING = "Pending",
|
|
4
|
-
ASSIGNED = "Assigned",
|
|
5
|
-
IN_PROGRESS = "In Progress",
|
|
6
|
-
APPROVED = "Approved",
|
|
7
|
-
REJECTED = "Rejected"
|
|
8
|
-
}
|
|
9
|
-
export declare enum UpdateAttendenceReason {
|
|
10
|
-
MEETING = "Meeting",
|
|
11
|
-
EARLY_CHECKOUT = "Early Checkout",
|
|
12
|
-
SPECIAL_REASON = "Special Reason"
|
|
13
|
-
}
|
|
14
|
-
export declare class UpdateAttendenceRequests extends BaseModel {
|
|
15
|
-
req_user_department_id: number | null;
|
|
16
|
-
req_user_section_id: number | null;
|
|
17
|
-
service_id: number | null;
|
|
18
|
-
sub_service_id: number | null;
|
|
19
|
-
user_id: number;
|
|
20
|
-
from_date: string | null;
|
|
21
|
-
to_date: string | null;
|
|
22
|
-
from_time: string | null;
|
|
23
|
-
to_time: string | null;
|
|
24
|
-
reason: UpdateAttendenceReason;
|
|
25
|
-
comments: string | null;
|
|
26
|
-
status: UpdateAttendenceStatus;
|
|
27
|
-
workflow_execution_id: string | null;
|
|
28
|
-
}
|