@platform-modules/foreign-ministry 1.0.79 → 1.0.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/dist/data-source.js +2 -10
- package/dist/index.d.ts +13 -4
- package/dist/index.js +13 -4
- package/dist/models/AllowanceRequestsModel.d.ts +9 -0
- package/dist/models/AllowanceRequestsModel.js +49 -0
- package/dist/models/AllowanceTypesModel.d.ts +8 -0
- package/dist/models/AllowanceTypesModel.js +43 -0
- package/dist/models/BankAccountChangeRequestsModel.d.ts +12 -0
- package/dist/models/BankAccountChangeRequestsModel.js +62 -0
- package/dist/models/FMServices.js +1 -1
- package/dist/models/FinancialApprovalsModel.d.ts +17 -0
- package/dist/models/FinancialApprovalsModel.js +63 -0
- package/dist/models/FinancialAttachmentsModel.d.ts +8 -0
- package/dist/models/FinancialAttachmentsModel.js +44 -0
- package/dist/models/FinancialChatsModel.d.ts +7 -0
- package/dist/models/{roleRightsModel.js → FinancialChatsModel.js} +19 -24
- package/dist/models/FinancialRequestsModel.d.ts +29 -0
- package/dist/models/FinancialRequestsModel.js +103 -0
- package/dist/models/FinancialSettingsModel.d.ts +8 -0
- package/dist/models/{userRolesModel.js → FinancialSettingsModel.js} +21 -31
- package/dist/models/FinancialWorkFlowModel.d.ts +16 -0
- package/dist/models/FinancialWorkFlowModel.js +61 -0
- package/dist/models/PayslipRequestsModel.d.ts +8 -0
- package/dist/models/PayslipRequestsModel.js +44 -0
- package/dist/models/ReimbursementRequestsModel.d.ts +14 -0
- package/dist/models/ReimbursementRequestsModel.js +73 -0
- package/dist/models/RequestTypeMasterModel.d.ts +11 -0
- package/dist/models/RequestTypeMasterModel.js +55 -0
- package/dist/models/SalaryCertificateRequestsModel.d.ts +12 -0
- package/dist/models/SalaryCertificateRequestsModel.js +62 -0
- package/dist/models/questionTagsModel.d.ts +6 -0
- package/dist/models/{PortalFeedbackModel.js → questionTagsModel.js} +12 -22
- package/dist/models/role.d.ts +7 -1
- package/dist/models/role.js +2 -2
- package/dist/models/user.d.ts +1 -5
- package/dist/models/user.js +2 -22
- package/package.json +1 -1
- package/src/data-source.ts +2 -10
- package/src/index.ts +13 -4
- package/src/models/AllowanceRequestsModel.ts +38 -0
- package/src/models/AllowanceTypesModel.ts +26 -0
- package/src/models/BankAccountChangeRequestsModel.ts +50 -0
- package/src/models/FMServices.ts +1 -1
- package/src/models/FinancialApprovalsModel.ts +47 -0
- package/src/models/FinancialAttachmentsModel.ts +30 -0
- package/src/models/FinancialChatsModel.ts +22 -0
- package/src/models/FinancialRequestsModel.ts +81 -0
- package/src/models/FinancialSettingsModel.ts +30 -0
- package/src/models/FinancialWorkFlowModel.ts +46 -0
- package/src/models/PayslipRequestsModel.ts +26 -0
- package/src/models/ReimbursementRequestsModel.ts +58 -0
- package/src/models/RequestTypeMasterModel.ts +36 -0
- package/src/models/SalaryCertificateRequestsModel.ts +40 -0
- package/src/models/role.ts +7 -1
- package/src/models/user.ts +0 -21
- package/dist/models/HolidaysModel.d.ts +0 -11
- package/dist/models/HolidaysModel.js +0 -59
- 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/PortalFeedbackModel.d.ts +0 -8
- package/dist/models/roleRightsModel.d.ts +0 -16
- package/dist/models/userRolesModel.d.ts +0 -18
- package/src/models/HolidaysModel.ts +0 -46
- package/src/models/PortalFeedbackModel.ts +0 -33
- package/src/models/roleRightsModel.ts +0 -31
- package/src/models/userRolesModel.ts +0 -38
package/src/index.ts
CHANGED
|
@@ -42,7 +42,16 @@ export * from './models/ShifttimesModel';
|
|
|
42
42
|
export * from './models/AttendanceModel';
|
|
43
43
|
export * from './models/contactInfoModel';
|
|
44
44
|
export * from './models/UserShiftModel';
|
|
45
|
-
export * from './models/
|
|
46
|
-
export * from './models/
|
|
47
|
-
export * from './models/
|
|
48
|
-
export * from './models/
|
|
45
|
+
export * from './models/FinancialRequestsModel';
|
|
46
|
+
export * from './models/PayslipRequestsModel';
|
|
47
|
+
export * from './models/SalaryCertificateRequestsModel';
|
|
48
|
+
export * from './models/AllowanceRequestsModel';
|
|
49
|
+
export * from './models/ReimbursementRequestsModel';
|
|
50
|
+
export * from './models/BankAccountChangeRequestsModel';
|
|
51
|
+
export * from './models/FinancialChatsModel';
|
|
52
|
+
export * from './models/FinancialApprovalsModel';
|
|
53
|
+
export * from './models/FinancialWorkFlowModel';
|
|
54
|
+
export * from './models/FinancialAttachmentsModel';
|
|
55
|
+
export * from './models/RequestTypeMasterModel';
|
|
56
|
+
export * from './models/FinancialSettingsModel';
|
|
57
|
+
export * from './models/AllowanceTypesModel';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Column, Entity, OneToOne, JoinColumn, ManyToOne } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'allowance_requests' })
|
|
5
|
+
export class AllowanceRequests extends BaseModel {
|
|
6
|
+
@Column({ type: 'int', unique: true })
|
|
7
|
+
financial_request_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'int' })
|
|
10
|
+
allowance_type_id: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'decimal', precision: 10, scale: 2 })
|
|
13
|
+
allowance_amount: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
16
|
+
approved_allowance_amount: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'boolean', default: false })
|
|
19
|
+
currency : string;
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
constructor(
|
|
23
|
+
financial_request_id: number,
|
|
24
|
+
allowance_type_id: number,
|
|
25
|
+
allowance_amount: number,
|
|
26
|
+
approved_allowance_amount: number,
|
|
27
|
+
currency: string
|
|
28
|
+
|
|
29
|
+
) {
|
|
30
|
+
super();
|
|
31
|
+
this.financial_request_id = financial_request_id;
|
|
32
|
+
this.allowance_type_id = allowance_type_id;
|
|
33
|
+
this.allowance_amount = allowance_amount;
|
|
34
|
+
this.approved_allowance_amount = approved_allowance_amount;
|
|
35
|
+
this.currency = currency;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'allowance_types' })
|
|
5
|
+
export class AllowanceTypes extends BaseModel {
|
|
6
|
+
@Column({ type: 'varchar', length: 100, unique: true })
|
|
7
|
+
allowance_code: string; // HOUSING, TRANSPORT, EDUCATION, etc.
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'varchar', length: 255 })
|
|
10
|
+
allowance_name: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'text', nullable: true })
|
|
13
|
+
description: string;
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'boolean', default: true })
|
|
17
|
+
is_active: boolean;
|
|
18
|
+
|
|
19
|
+
constructor(allowance_code: string, allowance_name: string) {
|
|
20
|
+
super();
|
|
21
|
+
this.allowance_code = allowance_code;
|
|
22
|
+
this.allowance_name = allowance_name;
|
|
23
|
+
this.is_active = true;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Column, Entity, OneToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'bank_account_change_requests' })
|
|
5
|
+
export class BankAccountChangeRequests extends BaseModel {
|
|
6
|
+
@Column({ type: 'int', unique: true })
|
|
7
|
+
financial_request_id: number;
|
|
8
|
+
|
|
9
|
+
// Old Bank Details
|
|
10
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
11
|
+
old_bank_name: string;
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
14
|
+
old_account_number: string;
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
// New Bank Details
|
|
18
|
+
@Column({ type: 'varchar', length: 100 })
|
|
19
|
+
new_bank_name: string;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'varchar', length: 50 })
|
|
22
|
+
new_account_number: string;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
25
|
+
new_account_name: string;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
28
|
+
new_branch_ifsc_code: string;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'text' })
|
|
31
|
+
reason_for_change: string;
|
|
32
|
+
|
|
33
|
+
constructor(
|
|
34
|
+
financial_request_id: number,
|
|
35
|
+
new_bank_name: string,
|
|
36
|
+
new_account_number: string,
|
|
37
|
+
new_account_name: string,
|
|
38
|
+
new_branch_ifsc_code: string,
|
|
39
|
+
reason_for_change: string,
|
|
40
|
+
) {
|
|
41
|
+
super();
|
|
42
|
+
this.financial_request_id = financial_request_id;
|
|
43
|
+
this.new_bank_name = new_bank_name;
|
|
44
|
+
this.new_account_number = new_account_number;
|
|
45
|
+
this.new_account_name = new_account_name;
|
|
46
|
+
this.new_branch_ifsc_code = new_branch_ifsc_code;
|
|
47
|
+
this.reason_for_change = reason_for_change;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
package/src/models/FMServices.ts
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum FinancialApprovalStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
APPROVED = "Approved",
|
|
7
|
+
REJECTED = "Rejected",
|
|
8
|
+
SKIPPED = "Skipped"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Entity({ name: 'financial_approvals' })
|
|
12
|
+
export class FinancialApprovals extends BaseModel {
|
|
13
|
+
@Column({ type: 'int' })
|
|
14
|
+
financial_request_id: number;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'int' })
|
|
17
|
+
level: number;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'int', nullable: true })
|
|
20
|
+
approver_user_id: number;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'int' })
|
|
23
|
+
approver_role_id: number;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'text', nullable: true })
|
|
26
|
+
comment: string;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'enum', enum: FinancialApprovalStatus, default: FinancialApprovalStatus.PENDING })
|
|
29
|
+
approval_status: FinancialApprovalStatus;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'timestamp', nullable: true })
|
|
32
|
+
action_date: Date;
|
|
33
|
+
|
|
34
|
+
constructor(
|
|
35
|
+
financial_request_id: number,
|
|
36
|
+
level: number,
|
|
37
|
+
approver_role_id: number,
|
|
38
|
+
approval_status: FinancialApprovalStatus
|
|
39
|
+
) {
|
|
40
|
+
super();
|
|
41
|
+
this.financial_request_id = financial_request_id;
|
|
42
|
+
this.level = level;
|
|
43
|
+
this.approver_role_id = approver_role_id;
|
|
44
|
+
this.approval_status = approval_status;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'financial_attachments' })
|
|
5
|
+
export class FinancialAttachments extends BaseModel {
|
|
6
|
+
@Column({ type: 'int' })
|
|
7
|
+
financial_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
|
+
constructor(
|
|
19
|
+
financial_request_id: number,
|
|
20
|
+
file_url: string,
|
|
21
|
+
file_name: string
|
|
22
|
+
) {
|
|
23
|
+
super();
|
|
24
|
+
this.financial_request_id = financial_request_id;
|
|
25
|
+
this.file_url = file_url;
|
|
26
|
+
this.file_name = file_name;
|
|
27
|
+
this.file_type = 'PDF';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'financial_chats' })
|
|
5
|
+
export class FinancialChats extends BaseModel {
|
|
6
|
+
@Column({ type: 'int' })
|
|
7
|
+
financial_request_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'text' })
|
|
10
|
+
content: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'int' })
|
|
13
|
+
sender_user_id: number;
|
|
14
|
+
|
|
15
|
+
constructor(financial_request_id: number, content: string, sender_user_id: number) {
|
|
16
|
+
super();
|
|
17
|
+
this.financial_request_id = financial_request_id;
|
|
18
|
+
this.content = content;
|
|
19
|
+
this.sender_user_id = sender_user_id;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Column, Entity, OneToOne, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum FinancialRequestStatus {
|
|
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: 'financial_requests' })
|
|
16
|
+
export class FinancialRequests 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;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'int', nullable: true })
|
|
30
|
+
designation_id: number;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'int', nullable: true })
|
|
33
|
+
department_id: number;
|
|
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: 'int' })
|
|
42
|
+
request_type_id: number;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
45
|
+
request_date: Date;
|
|
46
|
+
|
|
47
|
+
@Column({ type: 'enum', enum: FinancialRequestStatus, default: FinancialRequestStatus.PENDING })
|
|
48
|
+
request_status: FinancialRequestStatus;
|
|
49
|
+
|
|
50
|
+
@Column({ type: 'timestamp', nullable: true })
|
|
51
|
+
request_close_date: Date;
|
|
52
|
+
|
|
53
|
+
@Column({ type: 'text', nullable: true })
|
|
54
|
+
remarks: string;
|
|
55
|
+
|
|
56
|
+
@Column({ type: 'int', nullable: true })
|
|
57
|
+
current_approval_level: number;
|
|
58
|
+
|
|
59
|
+
@Column({ type: 'int', nullable: true })
|
|
60
|
+
current_approver_id: number;
|
|
61
|
+
|
|
62
|
+
constructor(
|
|
63
|
+
user_id: number,
|
|
64
|
+
employee_id: string,
|
|
65
|
+
employee_name: string,
|
|
66
|
+
email_address: string,
|
|
67
|
+
contact_number: string,
|
|
68
|
+
request_type_id: number
|
|
69
|
+
) {
|
|
70
|
+
super();
|
|
71
|
+
this.user_id = user_id;
|
|
72
|
+
this.employee_id = employee_id;
|
|
73
|
+
this.employee_name = employee_name;
|
|
74
|
+
this.email_address = email_address;
|
|
75
|
+
this.contact_number = contact_number;
|
|
76
|
+
this.request_type_id = request_type_id;
|
|
77
|
+
this.request_date = new Date();
|
|
78
|
+
this.request_status = FinancialRequestStatus.PENDING;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'financial_settings' })
|
|
5
|
+
export class FinancialSettings extends BaseModel {
|
|
6
|
+
@Column({ type: 'int' })
|
|
7
|
+
service_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'int' })
|
|
10
|
+
approval_level: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'int' })
|
|
13
|
+
approver_role_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'boolean', default: true })
|
|
16
|
+
is_active: boolean;
|
|
17
|
+
|
|
18
|
+
constructor(
|
|
19
|
+
service_id: number,
|
|
20
|
+
approval_level: number,
|
|
21
|
+
approver_role_id: number,
|
|
22
|
+
) {
|
|
23
|
+
super();
|
|
24
|
+
this.service_id = service_id;
|
|
25
|
+
this.approval_level = approval_level;
|
|
26
|
+
this.approver_role_id = approver_role_id;
|
|
27
|
+
this.is_active = true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum FinancialWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending",
|
|
8
|
+
IN_PROGRESS = "In Progress"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Entity({ name: 'financial_work_flows' })
|
|
12
|
+
export class FinancialWorkFlow extends BaseModel {
|
|
13
|
+
@Column({ type: 'int' })
|
|
14
|
+
financial_request_id: number;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'int', nullable: true, default: 0 })
|
|
17
|
+
financial_approval_id: number;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'enum', enum: FinancialWorkFlowStatus, default: FinancialWorkFlowStatus.NOT_YET_STARTED })
|
|
20
|
+
status: FinancialWorkFlowStatus;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'int', nullable: true })
|
|
23
|
+
approved_by_user_id: number;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'varchar', length: 500 })
|
|
26
|
+
content: string;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
29
|
+
activity_date: Date;
|
|
30
|
+
|
|
31
|
+
constructor(
|
|
32
|
+
financial_request_id: number,
|
|
33
|
+
status: FinancialWorkFlowStatus,
|
|
34
|
+
approved_by_user_id: number,
|
|
35
|
+
content: string
|
|
36
|
+
) {
|
|
37
|
+
super();
|
|
38
|
+
this.financial_request_id = financial_request_id;
|
|
39
|
+
this.status = status;
|
|
40
|
+
this.approved_by_user_id = approved_by_user_id;
|
|
41
|
+
this.content = content;
|
|
42
|
+
this.financial_approval_id = 0;
|
|
43
|
+
this.activity_date = new Date();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Column, Entity, OneToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'payslip_requests' })
|
|
5
|
+
export class PayslipRequests extends BaseModel {
|
|
6
|
+
@Column({ type: 'int', unique: true })
|
|
7
|
+
financial_request_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'varchar', length: 7 })
|
|
10
|
+
payslip_month: string; // Format: 2025-01
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'int', nullable: true })
|
|
13
|
+
payslip_year: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
16
|
+
payslip_url: string;
|
|
17
|
+
|
|
18
|
+
constructor(financial_request_id: number, payslip_month: string, payslip_year: number, payslip_url: string) {
|
|
19
|
+
super();
|
|
20
|
+
this.financial_request_id = financial_request_id;
|
|
21
|
+
this.payslip_month = payslip_month;
|
|
22
|
+
this.payslip_year = payslip_year;
|
|
23
|
+
this.payslip_url = payslip_url;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Column, Entity, OneToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'reimbursement_requests' })
|
|
5
|
+
export class ReimbursementRequests extends BaseModel {
|
|
6
|
+
@Column({ type: 'int', unique: true })
|
|
7
|
+
financial_request_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'text' })
|
|
10
|
+
expense_description: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'decimal', precision: 10, scale: 2 })
|
|
13
|
+
price: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'decimal', precision: 10, scale: 2 })
|
|
16
|
+
quantity: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'decimal', precision: 10, scale: 2 })
|
|
19
|
+
amount: number;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'decimal', precision: 10, scale: 2 })
|
|
22
|
+
total_amount: number;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
25
|
+
approved_amount: number;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'boolean', default: false })
|
|
28
|
+
payment_processed: boolean;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
31
|
+
payment_mode: string;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'date', nullable: true })
|
|
34
|
+
payment_date: Date;
|
|
35
|
+
|
|
36
|
+
constructor(
|
|
37
|
+
financial_request_id: number,
|
|
38
|
+
amount: number,
|
|
39
|
+
quantity: number,
|
|
40
|
+
total_amount: number,
|
|
41
|
+
approved_amount: number,
|
|
42
|
+
payment_mode: string,
|
|
43
|
+
payment_date: Date,
|
|
44
|
+
expense_description: string
|
|
45
|
+
) {
|
|
46
|
+
super();
|
|
47
|
+
this.financial_request_id = financial_request_id;
|
|
48
|
+
this.amount = amount;
|
|
49
|
+
this.quantity = quantity;
|
|
50
|
+
this.total_amount = total_amount;
|
|
51
|
+
this.approved_amount = approved_amount;
|
|
52
|
+
this.payment_mode = payment_mode;
|
|
53
|
+
this.payment_date = payment_date;
|
|
54
|
+
this.expense_description = expense_description;
|
|
55
|
+
this.payment_processed = false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'request_type_master' })
|
|
5
|
+
export class RequestTypeMaster extends BaseModel {
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@Column({ type: 'varchar', length: 255 })
|
|
9
|
+
request_name: string;
|
|
10
|
+
|
|
11
|
+
@Column({ type: 'text', nullable: true })
|
|
12
|
+
description: string;
|
|
13
|
+
|
|
14
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
15
|
+
specific_table_name: string; // payslip_requests, salary_certificate_requests, etc.
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'boolean', default: true })
|
|
18
|
+
is_active: boolean;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
21
|
+
icon: string;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'int', nullable: true })
|
|
24
|
+
max_sla_days: number;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'int', default: 0 })
|
|
27
|
+
display_order: number;
|
|
28
|
+
|
|
29
|
+
constructor(request_name: string) {
|
|
30
|
+
super();
|
|
31
|
+
this.request_name = request_name;
|
|
32
|
+
this.is_active = true;
|
|
33
|
+
this.display_order = 0;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Column, Entity, OneToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'salary_certificate_requests' })
|
|
5
|
+
export class SalaryCertificateRequests extends BaseModel {
|
|
6
|
+
@Column({ type: 'int', unique: true })
|
|
7
|
+
financial_request_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'varchar', length: 255 })
|
|
10
|
+
certificate_purpose: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
13
|
+
certificate_url: string;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
16
|
+
addressee_name: string;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'text', nullable: true })
|
|
19
|
+
addressee_details: string;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'boolean', default: false })
|
|
22
|
+
include_salary_details: boolean;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'boolean', default: false })
|
|
25
|
+
include_allowances: boolean;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
28
|
+
certificate_language: string; // English, Arabic
|
|
29
|
+
|
|
30
|
+
constructor(financial_request_id: number, certificate_purpose: string, certificate_url: string) {
|
|
31
|
+
super();
|
|
32
|
+
this.financial_request_id = financial_request_id;
|
|
33
|
+
this.certificate_purpose = certificate_purpose;
|
|
34
|
+
this.certificate_url = certificate_url;
|
|
35
|
+
this.include_salary_details = false;
|
|
36
|
+
this.include_allowances = false;
|
|
37
|
+
this.certificate_language = 'English';
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
package/src/models/role.ts
CHANGED
|
@@ -12,6 +12,12 @@ Userrole Information will store
|
|
|
12
12
|
import { Column, Entity } from "typeorm";
|
|
13
13
|
import { BaseModel } from './BaseModel';
|
|
14
14
|
|
|
15
|
+
export interface Irole {
|
|
16
|
+
name: string;
|
|
17
|
+
id?: number;
|
|
18
|
+
is_deleted?: boolean;
|
|
19
|
+
created_by?: number;
|
|
20
|
+
}
|
|
15
21
|
@Entity({ name: 'role' })
|
|
16
22
|
export class Role extends BaseModel {
|
|
17
23
|
|
|
@@ -22,7 +28,7 @@ export class Role extends BaseModel {
|
|
|
22
28
|
is_deleted?: boolean;
|
|
23
29
|
|
|
24
30
|
|
|
25
|
-
constructor(name: string,
|
|
31
|
+
constructor(name: string,is_deleted:boolean,userId: number) {
|
|
26
32
|
super();
|
|
27
33
|
this.name = name
|
|
28
34
|
this.is_deleted = is_deleted
|
package/src/models/user.ts
CHANGED
|
@@ -106,19 +106,6 @@ export class User extends BaseModel {
|
|
|
106
106
|
@Column({ nullable: true })
|
|
107
107
|
qualification?: string;
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
@Column({ nullable: true })
|
|
111
|
-
father_name?: string;
|
|
112
|
-
|
|
113
|
-
@Column({ nullable: true })
|
|
114
|
-
spouse_name?: string;
|
|
115
|
-
|
|
116
|
-
@Column({ nullable: true })
|
|
117
|
-
children1_name?: string;
|
|
118
|
-
|
|
119
|
-
@Column({ nullable: true })
|
|
120
|
-
children2_name?: string;
|
|
121
|
-
|
|
122
109
|
constructor(
|
|
123
110
|
employee_id?: number,
|
|
124
111
|
employee_name?: string,
|
|
@@ -154,10 +141,6 @@ export class User extends BaseModel {
|
|
|
154
141
|
diplomatic_name?: string,
|
|
155
142
|
civil_employee_id?: number,
|
|
156
143
|
qualification?: string,
|
|
157
|
-
father_name?: string,
|
|
158
|
-
spouse_name?: string,
|
|
159
|
-
children1_name?: string,
|
|
160
|
-
children2_name?: string,
|
|
161
144
|
) {
|
|
162
145
|
super();
|
|
163
146
|
this.employee_id = employee_id;
|
|
@@ -194,9 +177,5 @@ export class User extends BaseModel {
|
|
|
194
177
|
this.diplomatic_name = diplomatic_name;
|
|
195
178
|
this.civil_employee_id = civil_employee_id;
|
|
196
179
|
this.qualification = qualification;
|
|
197
|
-
this.father_name = father_name;
|
|
198
|
-
this.spouse_name = spouse_name;
|
|
199
|
-
this.children1_name = children1_name;
|
|
200
|
-
this.children2_name = children2_name;
|
|
201
180
|
}
|
|
202
181
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare class Holidays extends BaseModel {
|
|
3
|
-
title: string;
|
|
4
|
-
holiday_date: Date;
|
|
5
|
-
description?: string;
|
|
6
|
-
region?: string;
|
|
7
|
-
is_optional: boolean;
|
|
8
|
-
holiday_type: string;
|
|
9
|
-
year?: number;
|
|
10
|
-
constructor(title: string, holiday_date: Date, description?: string, region?: string, is_optional?: boolean, holiday_type?: string, year?: number);
|
|
11
|
-
}
|