@classytic/payroll 1.0.2 → 2.0.0
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/README.md +168 -489
- package/dist/core/index.d.ts +480 -0
- package/dist/core/index.js +971 -0
- package/dist/core/index.js.map +1 -0
- package/dist/index-CTjHlCzz.d.ts +721 -0
- package/dist/index.d.ts +967 -0
- package/dist/index.js +4352 -0
- package/dist/index.js.map +1 -0
- package/dist/payroll.d.ts +233 -0
- package/dist/payroll.js +2103 -0
- package/dist/payroll.js.map +1 -0
- package/dist/plugin-D9mOr3_d.d.ts +333 -0
- package/dist/schemas/index.d.ts +2869 -0
- package/dist/schemas/index.js +440 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/services/index.d.ts +3 -0
- package/dist/services/index.js +1696 -0
- package/dist/services/index.js.map +1 -0
- package/dist/types-BSYyX2KJ.d.ts +671 -0
- package/dist/utils/index.d.ts +873 -0
- package/dist/utils/index.js +1046 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +54 -37
- package/dist/types/config.d.ts +0 -162
- package/dist/types/core/compensation.manager.d.ts +0 -54
- package/dist/types/core/employment.manager.d.ts +0 -49
- package/dist/types/core/payroll.manager.d.ts +0 -60
- package/dist/types/enums.d.ts +0 -117
- package/dist/types/factories/compensation.factory.d.ts +0 -196
- package/dist/types/factories/employee.factory.d.ts +0 -149
- package/dist/types/factories/payroll.factory.d.ts +0 -319
- package/dist/types/hrm.orchestrator.d.ts +0 -47
- package/dist/types/index.d.ts +0 -20
- package/dist/types/init.d.ts +0 -30
- package/dist/types/models/payroll-record.model.d.ts +0 -3
- package/dist/types/plugins/employee.plugin.d.ts +0 -2
- package/dist/types/schemas/employment.schema.d.ts +0 -959
- package/dist/types/services/compensation.service.d.ts +0 -94
- package/dist/types/services/employee.service.d.ts +0 -28
- package/dist/types/services/payroll.service.d.ts +0 -30
- package/dist/types/utils/calculation.utils.d.ts +0 -26
- package/dist/types/utils/date.utils.d.ts +0 -35
- package/dist/types/utils/logger.d.ts +0 -12
- package/dist/types/utils/query-builders.d.ts +0 -83
- package/dist/types/utils/validation.utils.d.ts +0 -33
- package/payroll.d.ts +0 -241
- package/src/config.js +0 -177
- package/src/core/compensation.manager.js +0 -242
- package/src/core/employment.manager.js +0 -224
- package/src/core/payroll.manager.js +0 -499
- package/src/enums.js +0 -141
- package/src/factories/compensation.factory.js +0 -198
- package/src/factories/employee.factory.js +0 -173
- package/src/factories/payroll.factory.js +0 -413
- package/src/hrm.orchestrator.js +0 -139
- package/src/index.js +0 -172
- package/src/init.js +0 -62
- package/src/models/payroll-record.model.js +0 -126
- package/src/plugins/employee.plugin.js +0 -164
- package/src/schemas/employment.schema.js +0 -126
- package/src/services/compensation.service.js +0 -231
- package/src/services/employee.service.js +0 -162
- package/src/services/payroll.service.js +0 -213
- package/src/utils/calculation.utils.js +0 -91
- package/src/utils/date.utils.js +0 -120
- package/src/utils/logger.js +0 -36
- package/src/utils/query-builders.js +0 -185
- package/src/utils/validation.utils.js +0 -122
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
export function processSalary({ EmployeeModel, PayrollRecordModel, TransactionModel, AttendanceModel, employeeId, month, year, paymentDate, paymentMethod, context, session }: {
|
|
2
|
-
EmployeeModel: any;
|
|
3
|
-
PayrollRecordModel: any;
|
|
4
|
-
TransactionModel: any;
|
|
5
|
-
AttendanceModel?: any;
|
|
6
|
-
employeeId: any;
|
|
7
|
-
month: any;
|
|
8
|
-
year: any;
|
|
9
|
-
paymentDate?: Date;
|
|
10
|
-
paymentMethod?: string;
|
|
11
|
-
context?: {};
|
|
12
|
-
session?: any;
|
|
13
|
-
}): Promise<{
|
|
14
|
-
payrollRecord: any;
|
|
15
|
-
transaction: any;
|
|
16
|
-
employee: any;
|
|
17
|
-
}>;
|
|
18
|
-
export function processBulkPayroll({ EmployeeModel, PayrollRecordModel, TransactionModel, AttendanceModel, organizationId, month, year, employeeIds, paymentDate, paymentMethod, context, session: providedSession }: {
|
|
19
|
-
EmployeeModel: any;
|
|
20
|
-
PayrollRecordModel: any;
|
|
21
|
-
TransactionModel: any;
|
|
22
|
-
AttendanceModel?: any;
|
|
23
|
-
organizationId: any;
|
|
24
|
-
month: any;
|
|
25
|
-
year: any;
|
|
26
|
-
employeeIds?: any[];
|
|
27
|
-
paymentDate?: Date;
|
|
28
|
-
paymentMethod?: string;
|
|
29
|
-
context?: {};
|
|
30
|
-
session?: any;
|
|
31
|
-
}): Promise<{
|
|
32
|
-
successful: any[];
|
|
33
|
-
failed: any[];
|
|
34
|
-
total: any;
|
|
35
|
-
}>;
|
|
36
|
-
export function getPayrollHistory({ PayrollRecordModel, employeeId, organizationId, month, year, status, pagination, session }: {
|
|
37
|
-
PayrollRecordModel: any;
|
|
38
|
-
employeeId?: any;
|
|
39
|
-
organizationId?: any;
|
|
40
|
-
month?: any;
|
|
41
|
-
year?: any;
|
|
42
|
-
status?: any;
|
|
43
|
-
pagination?: {};
|
|
44
|
-
session?: any;
|
|
45
|
-
}): Promise<any>;
|
|
46
|
-
export function getPayrollSummary({ PayrollRecordModel, organizationId, month, year, session }: {
|
|
47
|
-
PayrollRecordModel: any;
|
|
48
|
-
organizationId: any;
|
|
49
|
-
month?: any;
|
|
50
|
-
year?: any;
|
|
51
|
-
session?: any;
|
|
52
|
-
}): Promise<any>;
|
|
53
|
-
export function exportPayrollData({ PayrollRecordModel, organizationId, startDate, endDate, format, session }: {
|
|
54
|
-
PayrollRecordModel: any;
|
|
55
|
-
organizationId: any;
|
|
56
|
-
startDate: any;
|
|
57
|
-
endDate: any;
|
|
58
|
-
format?: string;
|
|
59
|
-
session?: any;
|
|
60
|
-
}): Promise<any>;
|
package/dist/types/enums.d.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if category is HRM-managed (created by HRM workflows only)
|
|
3
|
-
*/
|
|
4
|
-
export function isHRMManagedCategory(category: any): boolean;
|
|
5
|
-
export namespace EMPLOYMENT_TYPE {
|
|
6
|
-
let FULL_TIME: string;
|
|
7
|
-
let PART_TIME: string;
|
|
8
|
-
let CONTRACT: string;
|
|
9
|
-
let INTERN: string;
|
|
10
|
-
let CONSULTANT: string;
|
|
11
|
-
}
|
|
12
|
-
export const EMPLOYMENT_TYPE_VALUES: string[];
|
|
13
|
-
export namespace EMPLOYEE_STATUS {
|
|
14
|
-
let ACTIVE: string;
|
|
15
|
-
let ON_LEAVE: string;
|
|
16
|
-
let SUSPENDED: string;
|
|
17
|
-
let TERMINATED: string;
|
|
18
|
-
}
|
|
19
|
-
export const EMPLOYEE_STATUS_VALUES: string[];
|
|
20
|
-
export namespace DEPARTMENT {
|
|
21
|
-
let MANAGEMENT: string;
|
|
22
|
-
let TRAINING: string;
|
|
23
|
-
let SALES: string;
|
|
24
|
-
let OPERATIONS: string;
|
|
25
|
-
let SUPPORT: string;
|
|
26
|
-
let HR: string;
|
|
27
|
-
let MAINTENANCE: string;
|
|
28
|
-
let MARKETING: string;
|
|
29
|
-
}
|
|
30
|
-
export const DEPARTMENT_VALUES: string[];
|
|
31
|
-
export namespace PAYMENT_FREQUENCY {
|
|
32
|
-
let MONTHLY: string;
|
|
33
|
-
let BI_WEEKLY: string;
|
|
34
|
-
let WEEKLY: string;
|
|
35
|
-
let HOURLY: string;
|
|
36
|
-
let DAILY: string;
|
|
37
|
-
}
|
|
38
|
-
export const PAYMENT_FREQUENCY_VALUES: string[];
|
|
39
|
-
export namespace ALLOWANCE_TYPE {
|
|
40
|
-
let HOUSING: string;
|
|
41
|
-
let TRANSPORT: string;
|
|
42
|
-
let MEAL: string;
|
|
43
|
-
let MOBILE: string;
|
|
44
|
-
let MEDICAL: string;
|
|
45
|
-
let EDUCATION: string;
|
|
46
|
-
let OTHER: string;
|
|
47
|
-
}
|
|
48
|
-
export const ALLOWANCE_TYPE_VALUES: string[];
|
|
49
|
-
export namespace DEDUCTION_TYPE {
|
|
50
|
-
export let TAX: string;
|
|
51
|
-
export let LOAN: string;
|
|
52
|
-
export let ADVANCE: string;
|
|
53
|
-
export let PROVIDENT_FUND: string;
|
|
54
|
-
export let INSURANCE: string;
|
|
55
|
-
export let ABSENCE: string;
|
|
56
|
-
let OTHER_1: string;
|
|
57
|
-
export { OTHER_1 as OTHER };
|
|
58
|
-
}
|
|
59
|
-
export const DEDUCTION_TYPE_VALUES: string[];
|
|
60
|
-
export namespace PAYROLL_STATUS {
|
|
61
|
-
let PENDING: string;
|
|
62
|
-
let PROCESSING: string;
|
|
63
|
-
let PAID: string;
|
|
64
|
-
let FAILED: string;
|
|
65
|
-
let CANCELLED: string;
|
|
66
|
-
}
|
|
67
|
-
export const PAYROLL_STATUS_VALUES: string[];
|
|
68
|
-
export namespace TERMINATION_REASON {
|
|
69
|
-
export let RESIGNATION: string;
|
|
70
|
-
export let RETIREMENT: string;
|
|
71
|
-
export let TERMINATION: string;
|
|
72
|
-
export let CONTRACT_END: string;
|
|
73
|
-
export let MUTUAL_AGREEMENT: string;
|
|
74
|
-
let OTHER_2: string;
|
|
75
|
-
export { OTHER_2 as OTHER };
|
|
76
|
-
}
|
|
77
|
-
export const TERMINATION_REASON_VALUES: string[];
|
|
78
|
-
export namespace PAYMENT_METHOD {
|
|
79
|
-
let BANK: string;
|
|
80
|
-
let CASH: string;
|
|
81
|
-
let BKASH: string;
|
|
82
|
-
let NAGAD: string;
|
|
83
|
-
let ROCKET: string;
|
|
84
|
-
}
|
|
85
|
-
export const PAYMENT_METHOD_VALUES: string[];
|
|
86
|
-
export namespace HRM_TRANSACTION_CATEGORIES {
|
|
87
|
-
let SALARY: string;
|
|
88
|
-
let BONUS: string;
|
|
89
|
-
let COMMISSION: string;
|
|
90
|
-
let OVERTIME: string;
|
|
91
|
-
let SEVERANCE: string;
|
|
92
|
-
}
|
|
93
|
-
export const HRM_CATEGORY_VALUES: string[];
|
|
94
|
-
declare namespace _default {
|
|
95
|
-
export { EMPLOYMENT_TYPE };
|
|
96
|
-
export { EMPLOYMENT_TYPE_VALUES };
|
|
97
|
-
export { EMPLOYEE_STATUS };
|
|
98
|
-
export { EMPLOYEE_STATUS_VALUES };
|
|
99
|
-
export { DEPARTMENT };
|
|
100
|
-
export { DEPARTMENT_VALUES };
|
|
101
|
-
export { PAYMENT_FREQUENCY };
|
|
102
|
-
export { PAYMENT_FREQUENCY_VALUES };
|
|
103
|
-
export { PAYMENT_METHOD };
|
|
104
|
-
export { PAYMENT_METHOD_VALUES };
|
|
105
|
-
export { ALLOWANCE_TYPE };
|
|
106
|
-
export { ALLOWANCE_TYPE_VALUES };
|
|
107
|
-
export { DEDUCTION_TYPE };
|
|
108
|
-
export { DEDUCTION_TYPE_VALUES };
|
|
109
|
-
export { PAYROLL_STATUS };
|
|
110
|
-
export { PAYROLL_STATUS_VALUES };
|
|
111
|
-
export { TERMINATION_REASON };
|
|
112
|
-
export { TERMINATION_REASON_VALUES };
|
|
113
|
-
export { HRM_TRANSACTION_CATEGORIES };
|
|
114
|
-
export { HRM_CATEGORY_VALUES };
|
|
115
|
-
export { isHRMManagedCategory };
|
|
116
|
-
}
|
|
117
|
-
export default _default;
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
export class CompensationFactory {
|
|
2
|
-
static create({ baseAmount, frequency, currency, allowances, deductions, effectiveFrom, }: {
|
|
3
|
-
baseAmount: any;
|
|
4
|
-
frequency?: string;
|
|
5
|
-
currency?: string;
|
|
6
|
-
allowances?: any[];
|
|
7
|
-
deductions?: any[];
|
|
8
|
-
effectiveFrom?: Date;
|
|
9
|
-
}): {
|
|
10
|
-
baseAmount: any;
|
|
11
|
-
frequency: string;
|
|
12
|
-
currency: string;
|
|
13
|
-
allowances: {
|
|
14
|
-
type: any;
|
|
15
|
-
name: any;
|
|
16
|
-
value: any;
|
|
17
|
-
isPercentage: boolean;
|
|
18
|
-
}[];
|
|
19
|
-
deductions: {
|
|
20
|
-
type: any;
|
|
21
|
-
name: any;
|
|
22
|
-
value: any;
|
|
23
|
-
isPercentage: boolean;
|
|
24
|
-
}[];
|
|
25
|
-
effectiveFrom: Date;
|
|
26
|
-
lastUpdated: Date;
|
|
27
|
-
};
|
|
28
|
-
static createAllowance({ type, name, value, isPercentage }: {
|
|
29
|
-
type: any;
|
|
30
|
-
name: any;
|
|
31
|
-
value: any;
|
|
32
|
-
isPercentage?: boolean;
|
|
33
|
-
}): {
|
|
34
|
-
type: any;
|
|
35
|
-
name: any;
|
|
36
|
-
value: any;
|
|
37
|
-
isPercentage: boolean;
|
|
38
|
-
};
|
|
39
|
-
static createDeduction({ type, name, value, isPercentage }: {
|
|
40
|
-
type: any;
|
|
41
|
-
name: any;
|
|
42
|
-
value: any;
|
|
43
|
-
isPercentage?: boolean;
|
|
44
|
-
}): {
|
|
45
|
-
type: any;
|
|
46
|
-
name: any;
|
|
47
|
-
value: any;
|
|
48
|
-
isPercentage: boolean;
|
|
49
|
-
};
|
|
50
|
-
static updateBaseAmount(compensation: any, newAmount: any, effectiveFrom?: Date): any;
|
|
51
|
-
static addAllowance(compensation: any, allowance: any): any;
|
|
52
|
-
static removeAllowance(compensation: any, allowanceType: any): any;
|
|
53
|
-
static addDeduction(compensation: any, deduction: any): any;
|
|
54
|
-
static removeDeduction(compensation: any, deductionType: any): any;
|
|
55
|
-
static calculateBreakdown(compensation: any): {
|
|
56
|
-
baseAmount: any;
|
|
57
|
-
allowances: any;
|
|
58
|
-
deductions: any;
|
|
59
|
-
grossAmount: any;
|
|
60
|
-
netAmount: number;
|
|
61
|
-
};
|
|
62
|
-
static applyIncrement(compensation: any, { percentage, amount, effectiveFrom }: {
|
|
63
|
-
percentage: any;
|
|
64
|
-
amount: any;
|
|
65
|
-
effectiveFrom?: Date;
|
|
66
|
-
}): any;
|
|
67
|
-
}
|
|
68
|
-
export class CompensationBuilder {
|
|
69
|
-
data: {
|
|
70
|
-
allowances: any[];
|
|
71
|
-
deductions: any[];
|
|
72
|
-
frequency: string;
|
|
73
|
-
currency: string;
|
|
74
|
-
};
|
|
75
|
-
withBase(amount: any, frequency?: string, currency?: string): this;
|
|
76
|
-
addAllowance(type: any, value: any, isPercentage?: boolean, name?: any): this;
|
|
77
|
-
addDeduction(type: any, value: any, isPercentage?: boolean, name?: any): this;
|
|
78
|
-
effectiveFrom(date: any): this;
|
|
79
|
-
build(): {
|
|
80
|
-
baseAmount: any;
|
|
81
|
-
frequency: string;
|
|
82
|
-
currency: string;
|
|
83
|
-
allowances: {
|
|
84
|
-
type: any;
|
|
85
|
-
name: any;
|
|
86
|
-
value: any;
|
|
87
|
-
isPercentage: boolean;
|
|
88
|
-
}[];
|
|
89
|
-
deductions: {
|
|
90
|
-
type: any;
|
|
91
|
-
name: any;
|
|
92
|
-
value: any;
|
|
93
|
-
isPercentage: boolean;
|
|
94
|
-
}[];
|
|
95
|
-
effectiveFrom: Date;
|
|
96
|
-
lastUpdated: Date;
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
export function createCompensation(): CompensationBuilder;
|
|
100
|
-
export namespace CompensationPresets {
|
|
101
|
-
function basic(baseAmount: any): {
|
|
102
|
-
baseAmount: any;
|
|
103
|
-
frequency: string;
|
|
104
|
-
currency: string;
|
|
105
|
-
allowances: {
|
|
106
|
-
type: any;
|
|
107
|
-
name: any;
|
|
108
|
-
value: any;
|
|
109
|
-
isPercentage: boolean;
|
|
110
|
-
}[];
|
|
111
|
-
deductions: {
|
|
112
|
-
type: any;
|
|
113
|
-
name: any;
|
|
114
|
-
value: any;
|
|
115
|
-
isPercentage: boolean;
|
|
116
|
-
}[];
|
|
117
|
-
effectiveFrom: Date;
|
|
118
|
-
lastUpdated: Date;
|
|
119
|
-
};
|
|
120
|
-
function withHouseRent(baseAmount: any, rentPercentage?: number): {
|
|
121
|
-
baseAmount: any;
|
|
122
|
-
frequency: string;
|
|
123
|
-
currency: string;
|
|
124
|
-
allowances: {
|
|
125
|
-
type: any;
|
|
126
|
-
name: any;
|
|
127
|
-
value: any;
|
|
128
|
-
isPercentage: boolean;
|
|
129
|
-
}[];
|
|
130
|
-
deductions: {
|
|
131
|
-
type: any;
|
|
132
|
-
name: any;
|
|
133
|
-
value: any;
|
|
134
|
-
isPercentage: boolean;
|
|
135
|
-
}[];
|
|
136
|
-
effectiveFrom: Date;
|
|
137
|
-
lastUpdated: Date;
|
|
138
|
-
};
|
|
139
|
-
function withMedical(baseAmount: any, medicalPercentage?: number): {
|
|
140
|
-
baseAmount: any;
|
|
141
|
-
frequency: string;
|
|
142
|
-
currency: string;
|
|
143
|
-
allowances: {
|
|
144
|
-
type: any;
|
|
145
|
-
name: any;
|
|
146
|
-
value: any;
|
|
147
|
-
isPercentage: boolean;
|
|
148
|
-
}[];
|
|
149
|
-
deductions: {
|
|
150
|
-
type: any;
|
|
151
|
-
name: any;
|
|
152
|
-
value: any;
|
|
153
|
-
isPercentage: boolean;
|
|
154
|
-
}[];
|
|
155
|
-
effectiveFrom: Date;
|
|
156
|
-
lastUpdated: Date;
|
|
157
|
-
};
|
|
158
|
-
function standard(baseAmount: any): {
|
|
159
|
-
baseAmount: any;
|
|
160
|
-
frequency: string;
|
|
161
|
-
currency: string;
|
|
162
|
-
allowances: {
|
|
163
|
-
type: any;
|
|
164
|
-
name: any;
|
|
165
|
-
value: any;
|
|
166
|
-
isPercentage: boolean;
|
|
167
|
-
}[];
|
|
168
|
-
deductions: {
|
|
169
|
-
type: any;
|
|
170
|
-
name: any;
|
|
171
|
-
value: any;
|
|
172
|
-
isPercentage: boolean;
|
|
173
|
-
}[];
|
|
174
|
-
effectiveFrom: Date;
|
|
175
|
-
lastUpdated: Date;
|
|
176
|
-
};
|
|
177
|
-
function withProvidentFund(baseAmount: any, pfPercentage?: number): {
|
|
178
|
-
baseAmount: any;
|
|
179
|
-
frequency: string;
|
|
180
|
-
currency: string;
|
|
181
|
-
allowances: {
|
|
182
|
-
type: any;
|
|
183
|
-
name: any;
|
|
184
|
-
value: any;
|
|
185
|
-
isPercentage: boolean;
|
|
186
|
-
}[];
|
|
187
|
-
deductions: {
|
|
188
|
-
type: any;
|
|
189
|
-
name: any;
|
|
190
|
-
value: any;
|
|
191
|
-
isPercentage: boolean;
|
|
192
|
-
}[];
|
|
193
|
-
effectiveFrom: Date;
|
|
194
|
-
lastUpdated: Date;
|
|
195
|
-
};
|
|
196
|
-
}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
export class EmployeeFactory {
|
|
2
|
-
static create({ userId, organizationId, employment, compensation, bankDetails, }: {
|
|
3
|
-
userId: any;
|
|
4
|
-
organizationId: any;
|
|
5
|
-
employment?: {};
|
|
6
|
-
compensation?: {};
|
|
7
|
-
bankDetails?: {};
|
|
8
|
-
}): {
|
|
9
|
-
userId: any;
|
|
10
|
-
organizationId: any;
|
|
11
|
-
employeeId: any;
|
|
12
|
-
employmentType: any;
|
|
13
|
-
status: string;
|
|
14
|
-
department: any;
|
|
15
|
-
position: any;
|
|
16
|
-
hireDate: any;
|
|
17
|
-
probationEndDate: Date;
|
|
18
|
-
compensation: {
|
|
19
|
-
baseAmount: any;
|
|
20
|
-
frequency: string;
|
|
21
|
-
currency: string;
|
|
22
|
-
allowances: {
|
|
23
|
-
type: any;
|
|
24
|
-
name: any;
|
|
25
|
-
amount: any;
|
|
26
|
-
isPercentage: boolean;
|
|
27
|
-
}[];
|
|
28
|
-
deductions: {
|
|
29
|
-
type: any;
|
|
30
|
-
name: any;
|
|
31
|
-
amount: any;
|
|
32
|
-
isPercentage: boolean;
|
|
33
|
-
}[];
|
|
34
|
-
};
|
|
35
|
-
workSchedule: any;
|
|
36
|
-
bankDetails: {};
|
|
37
|
-
};
|
|
38
|
-
static createCompensation({ baseAmount, frequency, currency, allowances, deductions, }: {
|
|
39
|
-
baseAmount: any;
|
|
40
|
-
frequency?: string;
|
|
41
|
-
currency?: string;
|
|
42
|
-
allowances?: any[];
|
|
43
|
-
deductions?: any[];
|
|
44
|
-
}): {
|
|
45
|
-
baseAmount: any;
|
|
46
|
-
frequency: string;
|
|
47
|
-
currency: string;
|
|
48
|
-
allowances: {
|
|
49
|
-
type: any;
|
|
50
|
-
name: any;
|
|
51
|
-
amount: any;
|
|
52
|
-
isPercentage: boolean;
|
|
53
|
-
}[];
|
|
54
|
-
deductions: {
|
|
55
|
-
type: any;
|
|
56
|
-
name: any;
|
|
57
|
-
amount: any;
|
|
58
|
-
isPercentage: boolean;
|
|
59
|
-
}[];
|
|
60
|
-
};
|
|
61
|
-
static createAllowance({ type, name, amount, isPercentage }: {
|
|
62
|
-
type: any;
|
|
63
|
-
name: any;
|
|
64
|
-
amount: any;
|
|
65
|
-
isPercentage?: boolean;
|
|
66
|
-
}): {
|
|
67
|
-
type: any;
|
|
68
|
-
name: any;
|
|
69
|
-
amount: any;
|
|
70
|
-
isPercentage: boolean;
|
|
71
|
-
};
|
|
72
|
-
static createDeduction({ type, name, amount, isPercentage }: {
|
|
73
|
-
type: any;
|
|
74
|
-
name: any;
|
|
75
|
-
amount: any;
|
|
76
|
-
isPercentage?: boolean;
|
|
77
|
-
}): {
|
|
78
|
-
type: any;
|
|
79
|
-
name: any;
|
|
80
|
-
amount: any;
|
|
81
|
-
isPercentage: boolean;
|
|
82
|
-
};
|
|
83
|
-
static defaultWorkSchedule(): {
|
|
84
|
-
hoursPerWeek: number;
|
|
85
|
-
daysPerWeek: number;
|
|
86
|
-
workDays: string[];
|
|
87
|
-
};
|
|
88
|
-
static createTermination({ reason, date, notes, context }: {
|
|
89
|
-
reason: any;
|
|
90
|
-
date?: Date;
|
|
91
|
-
notes: any;
|
|
92
|
-
context?: {};
|
|
93
|
-
}): {
|
|
94
|
-
terminatedAt: Date;
|
|
95
|
-
terminationReason: any;
|
|
96
|
-
terminationNotes: any;
|
|
97
|
-
terminatedBy: {
|
|
98
|
-
userId: any;
|
|
99
|
-
name: any;
|
|
100
|
-
role: any;
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
export class EmployeeBuilder {
|
|
105
|
-
data: {};
|
|
106
|
-
forUser(userId: any): this;
|
|
107
|
-
inOrganization(organizationId: any): this;
|
|
108
|
-
withEmployeeId(employeeId: any): this;
|
|
109
|
-
asDepartment(department: any): this;
|
|
110
|
-
asPosition(position: any): this;
|
|
111
|
-
withEmploymentType(type: any): this;
|
|
112
|
-
hiredOn(date: any): this;
|
|
113
|
-
withProbation(months: any): this;
|
|
114
|
-
withBaseSalary(amount: any, frequency?: string, currency?: string): this;
|
|
115
|
-
addAllowance(type: any, amount: any, name: any): this;
|
|
116
|
-
addDeduction(type: any, amount: any, name: any): this;
|
|
117
|
-
withBankDetails(bankDetails: any): this;
|
|
118
|
-
build(): {
|
|
119
|
-
userId: any;
|
|
120
|
-
organizationId: any;
|
|
121
|
-
employeeId: any;
|
|
122
|
-
employmentType: any;
|
|
123
|
-
status: string;
|
|
124
|
-
department: any;
|
|
125
|
-
position: any;
|
|
126
|
-
hireDate: any;
|
|
127
|
-
probationEndDate: Date;
|
|
128
|
-
compensation: {
|
|
129
|
-
baseAmount: any;
|
|
130
|
-
frequency: string;
|
|
131
|
-
currency: string;
|
|
132
|
-
allowances: {
|
|
133
|
-
type: any;
|
|
134
|
-
name: any;
|
|
135
|
-
amount: any;
|
|
136
|
-
isPercentage: boolean;
|
|
137
|
-
}[];
|
|
138
|
-
deductions: {
|
|
139
|
-
type: any;
|
|
140
|
-
name: any;
|
|
141
|
-
amount: any;
|
|
142
|
-
isPercentage: boolean;
|
|
143
|
-
}[];
|
|
144
|
-
};
|
|
145
|
-
workSchedule: any;
|
|
146
|
-
bankDetails: {};
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
export function createEmployee(): EmployeeBuilder;
|