@platform-modules/foreign-ministry 1.0.76 → 1.0.78
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 +2 -2
- package/dist/data-source.js +12 -2
- package/dist/index.d.ts +5 -13
- package/dist/index.js +5 -13
- package/dist/models/FMServices.js +1 -1
- 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/HolidaysModel.d.ts +11 -0
- package/dist/models/HolidaysModel.js +59 -0
- package/dist/models/NotificationModel.d.ts +18 -0
- package/dist/models/NotificationModel.js +79 -0
- package/dist/models/PortalFeedbackModel.d.ts +8 -0
- package/dist/models/{FinancialChatsModel.js → PortalFeedbackModel.js} +24 -19
- package/dist/models/role.d.ts +1 -7
- package/dist/models/role.js +2 -2
- package/dist/models/roleRightsModel.d.ts +16 -0
- package/dist/models/roleRightsModel.js +44 -0
- package/dist/models/user.d.ts +5 -1
- package/dist/models/user.js +22 -2
- package/dist/models/userRolesModel.d.ts +18 -0
- package/dist/models/{FinancialSettingsModel.js → userRolesModel.js} +31 -21
- package/package.json +1 -1
- package/src/data-source.ts +12 -2
- package/src/index.ts +5 -13
- package/src/models/FMServices.ts +1 -1
- package/src/models/HolidaysModel.ts +46 -0
- package/src/models/NotificationModel.ts +68 -0
- package/src/models/PortalFeedbackModel.ts +33 -0
- package/src/models/role.ts +1 -7
- package/src/models/roleRightsModel.ts +31 -0
- package/src/models/user.ts +21 -0
- package/src/models/userRolesModel.ts +38 -0
- package/FINANCIAL_MODELS_SUMMARY.md +0 -144
- package/FINANCIAL_SERVICES_MODELS.md +0 -236
- package/dist/models/AllowanceRequestsModel.d.ts +0 -9
- package/dist/models/AllowanceRequestsModel.js +0 -49
- package/dist/models/AllowanceTypesModel.d.ts +0 -8
- package/dist/models/AllowanceTypesModel.js +0 -43
- package/dist/models/BankAccountChangeRequestsModel.d.ts +0 -12
- package/dist/models/BankAccountChangeRequestsModel.js +0 -62
- package/dist/models/FinancialApprovalsModel.d.ts +0 -20
- package/dist/models/FinancialApprovalsModel.js +0 -76
- package/dist/models/FinancialAttachmentsModel.d.ts +0 -8
- package/dist/models/FinancialAttachmentsModel.js +0 -43
- package/dist/models/FinancialChatsModel.d.ts +0 -7
- package/dist/models/FinancialRequestsModel.d.ts +0 -29
- package/dist/models/FinancialRequestsModel.js +0 -103
- package/dist/models/FinancialSettingsModel.d.ts +0 -8
- package/dist/models/FinancialWorkFlowModel.d.ts +0 -16
- package/dist/models/FinancialWorkFlowModel.js +0 -61
- package/dist/models/PayslipRequestsModel.d.ts +0 -8
- package/dist/models/PayslipRequestsModel.js +0 -44
- package/dist/models/ReimbursementRequestsModel.d.ts +0 -14
- package/dist/models/ReimbursementRequestsModel.js +0 -73
- package/dist/models/RequestTypeMasterModel.d.ts +0 -12
- package/dist/models/RequestTypeMasterModel.js +0 -60
- package/dist/models/SalaryCertificateRequestsModel.d.ts +0 -7
- package/dist/models/SalaryCertificateRequestsModel.js +0 -39
- package/src/models/AllowanceRequestsModel.ts +0 -38
- package/src/models/AllowanceTypesModel.ts +0 -26
- package/src/models/BankAccountChangeRequestsModel.ts +0 -50
- package/src/models/FinancialApprovalsModel.ts +0 -57
- package/src/models/FinancialAttachmentsModel.ts +0 -30
- package/src/models/FinancialChatsModel.ts +0 -23
- package/src/models/FinancialRequestsModel.ts +0 -81
- package/src/models/FinancialSettingsModel.ts +0 -30
- package/src/models/FinancialWorkFlowModel.ts +0 -47
- package/src/models/PayslipRequestsModel.ts +0 -29
- package/src/models/ReimbursementRequestsModel.ts +0 -58
- package/src/models/RequestTypeMasterModel.ts +0 -38
- package/src/models/SalaryCertificateRequestsModel.ts +0 -24
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
|
|
16
|
-
constructor(financial_request_id: number, content: string, sender_user_id: number) {
|
|
17
|
-
super();
|
|
18
|
-
this.financial_request_id = financial_request_id;
|
|
19
|
-
this.content = content;
|
|
20
|
-
this.sender_user_id = sender_user_id;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
@@ -1,81 +0,0 @@
|
|
|
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: 'datetime', 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: 'datetime', 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
|
-
|
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,47 +0,0 @@
|
|
|
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
|
-
|
|
20
|
-
@Column({ type: 'enum', enum: FinancialWorkFlowStatus, default: FinancialWorkFlowStatus.NOT_YET_STARTED })
|
|
21
|
-
status: FinancialWorkFlowStatus;
|
|
22
|
-
|
|
23
|
-
@Column({ type: 'int', nullable: true })
|
|
24
|
-
approved_by_user_id: number;
|
|
25
|
-
|
|
26
|
-
@Column({ type: 'int', nullable: true })
|
|
27
|
-
content: string;
|
|
28
|
-
|
|
29
|
-
@Column({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
|
|
30
|
-
activity_date: Date;
|
|
31
|
-
|
|
32
|
-
constructor(
|
|
33
|
-
financial_request_id: number,
|
|
34
|
-
status: FinancialWorkFlowStatus,
|
|
35
|
-
approved_by_user_id: number,
|
|
36
|
-
content: string
|
|
37
|
-
) {
|
|
38
|
-
super();
|
|
39
|
-
this.financial_request_id = financial_request_id;
|
|
40
|
-
this.status = status;
|
|
41
|
-
this.financial_approval_id = 0;
|
|
42
|
-
this.activity_date = new Date();
|
|
43
|
-
this.approved_by_user_id = approved_by_user_id;
|
|
44
|
-
this.content = content;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
18
|
-
payslip_url: string;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
constructor(financial_request_id: number, payslip_month: string, payslip_year: number, payslip_url: string) {
|
|
22
|
-
super();
|
|
23
|
-
this.financial_request_id = financial_request_id;
|
|
24
|
-
this.payslip_month = payslip_month;
|
|
25
|
-
this.payslip_year = payslip_year;
|
|
26
|
-
this.payslip_url = payslip_url;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
@@ -1,58 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
@Column({ type: 'varchar', length: 10, unique: true })
|
|
7
|
-
request_code: string; // FM001, FM002, FM003, FM004, FM005
|
|
8
|
-
|
|
9
|
-
@Column({ type: 'varchar', length: 255 })
|
|
10
|
-
request_name: string;
|
|
11
|
-
|
|
12
|
-
@Column({ type: 'text', nullable: true })
|
|
13
|
-
description: string;
|
|
14
|
-
|
|
15
|
-
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
16
|
-
specific_table_name: string; // payslip_requests, salary_certificate_requests, etc.
|
|
17
|
-
|
|
18
|
-
@Column({ type: 'boolean', default: true })
|
|
19
|
-
is_active: boolean;
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
22
|
-
icon: string;
|
|
23
|
-
|
|
24
|
-
@Column({ type: 'int', nullable: true })
|
|
25
|
-
max_sla_days: number;
|
|
26
|
-
|
|
27
|
-
@Column({ type: 'int', default: 0 })
|
|
28
|
-
display_order: number;
|
|
29
|
-
|
|
30
|
-
constructor(request_code: string, request_name: string) {
|
|
31
|
-
super();
|
|
32
|
-
this.request_code = request_code;
|
|
33
|
-
this.request_name = request_name;
|
|
34
|
-
this.is_active = true;
|
|
35
|
-
this.display_order = 0;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
constructor(financial_request_id: number, certificate_purpose: string, certificate_url: string) {
|
|
18
|
-
super();
|
|
19
|
-
this.financial_request_id = financial_request_id;
|
|
20
|
-
this.certificate_purpose = certificate_purpose;
|
|
21
|
-
this.certificate_url = certificate_url;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|