@managesome/eposmatic-toolkit 0.2.773 → 0.2.775
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/lib/constants/ENUMS.d.ts +12 -0
- package/lib/constants/ENUMS.js +15 -1
- package/lib/helpers/utils/hr-helpers.d.ts +29 -0
- package/lib/helpers/utils/hr-helpers.js +60 -0
- package/lib/helpers/utils/index.d.ts +1 -0
- package/lib/helpers/utils/index.js +1 -0
- package/lib/schemas/models/index.d.ts +1 -0
- package/lib/schemas/models/index.js +1 -0
- package/lib/schemas/models/tenant_hr_attendance_records.d.ts +3 -3
- package/lib/schemas/models/tenant_hr_documents.d.ts +63 -0
- package/lib/schemas/models/tenant_hr_documents.js +74 -0
- package/lib/schemas/models/tenant_hr_employees.d.ts +21 -12
- package/lib/schemas/models/tenant_hr_employees.js +15 -0
- package/lib/schemas/models/tenant_hr_payrolls.d.ts +12 -12
- package/lib/schemas/models/tenant_hr_payrolls.js +3 -3
- package/lib/schemas/models/tenants.d.ts +0 -9
- package/lib/schemas/models/tenants.js +0 -16
- package/lib/schemas/types/index.d.ts +1 -0
- package/lib/schemas/types/index.js +1 -0
- package/lib/schemas/types/tenant_hr_documents.d.ts +16 -0
- package/lib/schemas/types/tenant_hr_documents.js +2 -0
- package/lib/schemas/types/tenant_hr_employees.d.ts +3 -0
- package/lib/schemas/types/tenants.d.ts +0 -3
- package/package.json +1 -1
package/lib/constants/ENUMS.d.ts
CHANGED
|
@@ -1218,3 +1218,15 @@ export declare enum HR_PAYMENT_METHOD_ENUM {
|
|
|
1218
1218
|
CHEQUE = "CHEQUE"
|
|
1219
1219
|
}
|
|
1220
1220
|
export declare const ALL_HR_PAYMENT_METHOD_NAMES: HR_PAYMENT_METHOD_ENUM[];
|
|
1221
|
+
export declare enum HR_DOCUMENT_TYPE_ENUM {
|
|
1222
|
+
CONTRACT = "CONTRACT",
|
|
1223
|
+
ID_COPY = "ID_COPY",
|
|
1224
|
+
CERTIFICATE = "CERTIFICATE",
|
|
1225
|
+
OTHER = "OTHER"
|
|
1226
|
+
}
|
|
1227
|
+
export declare const ALL_HR_DOCUMENT_TYPE_NAMES: HR_DOCUMENT_TYPE_ENUM[];
|
|
1228
|
+
export declare enum HR_DOCUMENT_STATUS_ENUM {
|
|
1229
|
+
ACTIVE = "ACTIVE",
|
|
1230
|
+
ARCHIVED = "ARCHIVED"
|
|
1231
|
+
}
|
|
1232
|
+
export declare const ALL_HR_DOCUMENT_STATUS_NAMES: HR_DOCUMENT_STATUS_ENUM[];
|
package/lib/constants/ENUMS.js
CHANGED
|
@@ -5,7 +5,7 @@ exports.ALL_EMAIL_DOCUMENT_KINDS = exports.EMAIL_DOCUMENT_KIND_ENUM = exports.AL
|
|
|
5
5
|
exports.PRINTER_INTERFACE_ENUM = exports.RECEIPT_WIDTHS = exports.ALL_NUM_OF_COLUMNS = exports.NUM_OF_COLUMNS_ENUM = exports.SPLIT_SYNC_SOURCE_ENUM = exports.ALL_SPLIT_BILL_TYPES = exports.SPLIT_BILL_TYPE_ENUM = exports.ALL_RIDER_FEE_TYPES = exports.RIDER_FEE_TYPE_ENUM = exports.ALL_DELIVERY_AREAS_SEARCH_TYPES = exports.DELIVERY_AREAS_SEARCH_TYPE_ENUM = exports.ALL_WEB_AUTH_TYPES = exports.WEB_AUTH_TYPE_ENUM = exports.KITCHEN_RECEIPT_TYPE_ENUM = exports.PRINTER_EVENT_TYPE_ENUM = exports.SORT_TYPE_ENUM = exports.WHITELISTED_API_SMS_COUNTRY_CODES = exports.BLACKLISTED_SMS_COUNTRY_CODES = exports.ALL_OTP_TYPES = exports.OTP_TYPE_ENUM = exports.ALL_TAX_INVOICE_PROVIDERS = exports.TAX_INVOICE_PROVIDER_ENUM = exports.ALL_RESERVATION_STATUS_TYPES = exports.RESERVATION_STATUS_ENUM = exports.TENANT_AMOUNT_DUE_TYPE_ENUM = exports.ALL_KITCHEN_DOCKET_FONT_TYPES = exports.KITCHEN_DOCKET_FONT_TYPE_ENUM = exports.ALL_SORT_ORDER_BY_TYPES = exports.SORT_ORDER_BY_ENUM = exports.RECEIPT_IMAGE_TYPE_ENUM = exports.ALL_RECEIPT_TYPES = exports.RECEIPT_TYPE_ENUM = exports.ALL_PRINTING_PREFERENCES = exports.PRINTING_PREFERENCE_ENUM = exports.ALL_PRINTER_BRAND_TYPES = exports.PRINTER_BRAND_TYPE_ENUM = exports.ALL_ORDER_ITEM_TYPES = exports.ORDER_ITEM_TYPE_ENUM = exports.ALL_PLATFORM_PROVIDER_IDS = exports.PLATFORM_PROVIDER_IDS_ENUM = exports.ALL_MARKETING_RECEIPIENT_TYPES = exports.MARKETING_RECEIPIENT_ENUM = exports.ALL_MARKETING_TYPES = exports.MARKETING_TYPE_ENUM = exports.ALL_TOKEN_TYPES = exports.TOKEN_TYPE_ENUM = exports.ALL_EMAIL_STATUS = exports.EMAIL_STATUS_ENUM = exports.ALL_COMMUNICATION_CHANNELS = exports.COMMUNICATION_CHANNEL_ENUM = void 0;
|
|
6
6
|
exports.ALL_ONLINE_ORDERING_DESIGN_TYPES = exports.ONLINE_ORDERING_DESIGN_TYPE_ENUM = exports.ALL_NOTIFICATION_PROVIDERS = exports.NOTIFICATION_PROVIDER_ENUM = exports.ALL_ORDER_COMPLETION_TYPES = exports.ORDER_COMPLETION_TYPE_ENUM = exports.ITEM_COMPARISON_FIELD_ENUM = exports.VOID_ITEM_STAFF_REPORT_ENUM = exports.ALL_DISCOUNT_APPLICABILITY_TYPES = exports.DISCOUNT_APPLICABILITY_ENUM = exports.ALL_DISCOUNT_TYPES = exports.DISCOUNT_TYPE_ENUM = exports.EMAIL_TEMPLATES_TYPE_ENUM = exports.ALL_ALERT_NOTIFICATIONS_TYPES = exports.ALERT_NOTIFICATIONS_TYPE_ENUM = exports.ALL_WALLET_TRANSACTION_STATUS = exports.WALLET_TRANSACTION_STATUS_ENUM = exports.ALL_WALLET_TRANSACTION_CATEGORIES = exports.WALLET_TRANSACTION_CATEGORY_ENUM = exports.ALL_WALLET_TRANSACTION_TYPES = exports.WALLET_TRANSACTION_TYPE_ENUM = exports.ALL_DELIVERY_STATUS = exports.DELIVERY_STATUS_ENUM = exports.ALL_INVENTORY_ITEM_TYPES = exports.INVENTORY_ITEM_TYPE_ENUM = exports.ALL_RATING_TYPES = exports.RATING_TYPE_ENUM = exports.ALL_SUBSCRIPTION_STATUS = exports.SUBSCRIPTION_STATUS_ENUM = exports.ALL_VOID_PURCHASE_ORDER_ITEM_TYPES = exports.VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM = exports.ALL_VOID_ORDER_ITEM_TYPES = exports.VOID_ORDER_ITEM_TYPE_ENUM = exports.COMPARISON_REPORT_TYPE_ENUM = exports.ALL_MULTI_TENANT_WEBSITE_TYPES = exports.MULTI_TENANT_WEBSITE_TYPE_ENUM = exports.ALL_ITEM_TRANSACTION_TYPES = exports.ITEM_TRANSACTION_TYPE_ENUM = exports.INVENTORY_OUTBOUND_TRANSACTIONS = exports.INVENTORY_INBOUND_TRANSACTIONS = exports.ALL_INVENTORY_TRANSACTION_CATEGORIES = exports.INVENTORY_TRANSACTION_CATEGORY_ENUM = exports.ALL_INVENTORY_TRANSACTION_TYPES = exports.INVENTORY_TRANSACTION_TYPE_ENUM = exports.ALL_GST_TYPES = exports.GST_TYPE_ENUM = exports.ALL_EXPENSE_REACCURING_TYPES = exports.EXPENSE_REACCURING_TYPE_ENUM = exports.PAYMENT_EXTENSION_ENUM = exports.ALL_PRINTER_INTERFACES = void 0;
|
|
7
7
|
exports.ALL_HR_CHECK_IN_METHOD_NAMES = exports.HR_CHECK_IN_METHOD_ENUM = exports.ALL_HR_ATTENDANCE_STATUS_NAMES = exports.HR_ATTENDANCE_STATUS_ENUM = exports.ALL_HR_EMPLOYMENT_STATUS_NAMES = exports.HR_EMPLOYMENT_STATUS_ENUM = exports.ALL_INTERNAL_CUSTOMER_PAYMENT_METHOD_NAMES = exports.INTERNAL_CUSTOMER_PAYMENT_METHOD_ENUM = exports.ALL_INTERNAL_CUSTOMER_SUBSCRIPTION_SERVICE_NAMES = exports.INTERNAL_CUSTOMER_SUBSCRIPTION_SERVICE_ENUM = exports.ALL_INTERNAL_CUSTOMER_SUBSCRIPTION_PLAN_NAMES = exports.INTERNAL_CUSTOMER_SUBSCRIPTION_PLAN_ENUM = exports.ALL_INTERNAL_CUSTOMER_BILLING_CYCLE_NAMES = exports.INTERNAL_CUSTOMER_BILLING_CYCLE_ENUM = exports.ALL_INTERNAL_CUSTOMER_TYPE_NAMES = exports.INTERNAL_CUSTOMER_TYPE_ENUM = exports.ALL_INTERNAL_INVOICE_TYPE_NAMES = exports.INTERNAL_INVOICE_TYPE_ENUM = exports.ALL_INTERNAL_INVOICE_STATUS_NAMES = exports.INTERNAL_INVOICE_STATUS_ENUM = exports.ALL_SUBSCRIPTION_HARDWARE_NAMES = exports.SUBSCRIPTION_HARDWARE_ENUM = exports.ALL_CUSTOMER_TARGET_MODES = exports.CUSTOMER_TARGET_MODE_ENUM = exports.ALL_WALLET_ASSIGNMENT_BEHAVIORS = exports.WALLET_ASSIGNMENT_BEHAVIOR_ENUM = exports.ALL_WALLET_ASSET_TYPES = exports.WALLET_ASSET_TYPE_ENUM = exports.ALL_RECEIPT_QR_CODE_TYPES = exports.RECEIPT_QR_CODE_TYPE_ENUM = exports.ALL_INTERNAL_LEAD_STATUS = exports.INTERNAL_LEAD_STATUS_ENUM = exports.ALL_INTERNAL_LEAD_SOURCES = exports.INTERNAL_LEAD_SOURCE_ENUM = exports.ALL_CASH_DRAWER_STATUS = exports.CASH_DRAWER_STATUS_ENUM = exports.ALL_CASH_IN_HAND_TRANSACTION_CATEGORIES = exports.CASH_IN_HAND_TRANSACTION_CATEGORY_ENUM = exports.ALL_CASH_IN_HAND_TRANSACTION_TYPES = exports.CASH_IN_HAND_TRANSACTION_TYPE_ENUM = exports.ALL_CASH_IN_OUT_REFS = exports.CASH_IN_OUT_REF_ENUM = exports.ALL_CASH_IN_OUT_TYPES = exports.CASH_IN_OUT_TYPE_ENUM = exports.ALL_POS_SHIFT_STATUS = exports.POS_SHIFT_STATUS_ENUM = exports.ALL_POS_DAY_STATUS = exports.POS_DAY_STATUS_ENUM = exports.ALL_MODIFIER_OPTION_REF_TYPES = exports.MODIFIER_OPTION_REF_TYPE_ENUM = void 0;
|
|
8
|
-
exports.ALL_HR_PAYMENT_METHOD_NAMES = exports.HR_PAYMENT_METHOD_ENUM = exports.ALL_HR_PAYROLL_STATUS_NAMES = exports.HR_PAYROLL_STATUS_ENUM = exports.ALL_HR_PAY_TYPE_NAMES = exports.HR_PAY_TYPE_ENUM = exports.ALL_HR_EMPLOYEE_DOCUMENT_TYPES = exports.HR_EMPLOYEE_DOCUMENT_TYPE_ENUM = exports.ALL_HR_SHIFT_STATUS_NAMES = exports.HR_SHIFT_STATUS_ENUM = exports.ALL_HR_SHIFT_TYPE_NAMES = exports.HR_SHIFT_TYPE_ENUM = exports.ALL_HR_BIOMETRIC_ENROLLMENT_TYPE_NAMES = exports.HR_BIOMETRIC_ENROLLMENT_TYPE_ENUM = void 0;
|
|
8
|
+
exports.ALL_HR_DOCUMENT_STATUS_NAMES = exports.HR_DOCUMENT_STATUS_ENUM = exports.ALL_HR_DOCUMENT_TYPE_NAMES = exports.HR_DOCUMENT_TYPE_ENUM = exports.ALL_HR_PAYMENT_METHOD_NAMES = exports.HR_PAYMENT_METHOD_ENUM = exports.ALL_HR_PAYROLL_STATUS_NAMES = exports.HR_PAYROLL_STATUS_ENUM = exports.ALL_HR_PAY_TYPE_NAMES = exports.HR_PAY_TYPE_ENUM = exports.ALL_HR_EMPLOYEE_DOCUMENT_TYPES = exports.HR_EMPLOYEE_DOCUMENT_TYPE_ENUM = exports.ALL_HR_SHIFT_STATUS_NAMES = exports.HR_SHIFT_STATUS_ENUM = exports.ALL_HR_SHIFT_TYPE_NAMES = exports.HR_SHIFT_TYPE_ENUM = exports.ALL_HR_BIOMETRIC_ENROLLMENT_TYPE_NAMES = exports.HR_BIOMETRIC_ENROLLMENT_TYPE_ENUM = void 0;
|
|
9
9
|
var ORDER_FROM_ENUM;
|
|
10
10
|
(function (ORDER_FROM_ENUM) {
|
|
11
11
|
ORDER_FROM_ENUM["WEB"] = "WEB";
|
|
@@ -1918,3 +1918,17 @@ var HR_PAYMENT_METHOD_ENUM;
|
|
|
1918
1918
|
HR_PAYMENT_METHOD_ENUM["CHEQUE"] = "CHEQUE";
|
|
1919
1919
|
})(HR_PAYMENT_METHOD_ENUM || (exports.HR_PAYMENT_METHOD_ENUM = HR_PAYMENT_METHOD_ENUM = {}));
|
|
1920
1920
|
exports.ALL_HR_PAYMENT_METHOD_NAMES = Object.values(HR_PAYMENT_METHOD_ENUM);
|
|
1921
|
+
var HR_DOCUMENT_TYPE_ENUM;
|
|
1922
|
+
(function (HR_DOCUMENT_TYPE_ENUM) {
|
|
1923
|
+
HR_DOCUMENT_TYPE_ENUM["CONTRACT"] = "CONTRACT";
|
|
1924
|
+
HR_DOCUMENT_TYPE_ENUM["ID_COPY"] = "ID_COPY";
|
|
1925
|
+
HR_DOCUMENT_TYPE_ENUM["CERTIFICATE"] = "CERTIFICATE";
|
|
1926
|
+
HR_DOCUMENT_TYPE_ENUM["OTHER"] = "OTHER";
|
|
1927
|
+
})(HR_DOCUMENT_TYPE_ENUM || (exports.HR_DOCUMENT_TYPE_ENUM = HR_DOCUMENT_TYPE_ENUM = {}));
|
|
1928
|
+
exports.ALL_HR_DOCUMENT_TYPE_NAMES = Object.values(HR_DOCUMENT_TYPE_ENUM);
|
|
1929
|
+
var HR_DOCUMENT_STATUS_ENUM;
|
|
1930
|
+
(function (HR_DOCUMENT_STATUS_ENUM) {
|
|
1931
|
+
HR_DOCUMENT_STATUS_ENUM["ACTIVE"] = "ACTIVE";
|
|
1932
|
+
HR_DOCUMENT_STATUS_ENUM["ARCHIVED"] = "ARCHIVED";
|
|
1933
|
+
})(HR_DOCUMENT_STATUS_ENUM || (exports.HR_DOCUMENT_STATUS_ENUM = HR_DOCUMENT_STATUS_ENUM = {}));
|
|
1934
|
+
exports.ALL_HR_DOCUMENT_STATUS_NAMES = Object.values(HR_DOCUMENT_STATUS_ENUM);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ITenantHrEmployee, ITenantHrPayroll } from '../../schemas';
|
|
2
|
+
export interface IHrPayrollPriceFields {
|
|
3
|
+
salary_per_hour?: number | null;
|
|
4
|
+
monthly_salary?: number | null;
|
|
5
|
+
working_days_per_month?: number | null;
|
|
6
|
+
hours_per_working_day?: number | null;
|
|
7
|
+
overtime_multiplier?: number | null;
|
|
8
|
+
regular_hours?: number | null;
|
|
9
|
+
overtime_hours?: number | null;
|
|
10
|
+
unpaid_leave_days?: number | null;
|
|
11
|
+
regular_pay?: number | null;
|
|
12
|
+
overtime_pay?: number | null;
|
|
13
|
+
gross_salary?: number | null;
|
|
14
|
+
unpaid_leave_deduction?: number | null;
|
|
15
|
+
other_deductions?: number | null;
|
|
16
|
+
total_deductions?: number | null;
|
|
17
|
+
net_salary?: number | null;
|
|
18
|
+
}
|
|
19
|
+
export declare function getHrPayrollWithPrice<T extends IHrPayrollPriceFields>(payroll: T, writeable?: boolean): T;
|
|
20
|
+
export declare function getHrPayrollsFetchedData(data: ITenantHrPayroll[]): ITenantHrPayroll[];
|
|
21
|
+
export interface IHrEmployeePriceFields {
|
|
22
|
+
salary_per_hour?: number | null;
|
|
23
|
+
monthly_salary?: number | null;
|
|
24
|
+
hr_working_days_per_month?: number | null;
|
|
25
|
+
hr_hours_per_working_day?: number | null;
|
|
26
|
+
hr_overtime_multiplier?: number | null;
|
|
27
|
+
}
|
|
28
|
+
export declare function getHrEmployeeWithPrice<T extends IHrEmployeePriceFields>(employee: T, writeable?: boolean): T;
|
|
29
|
+
export declare function getHrEmployeesFetchedData(data: ITenantHrEmployee[]): ITenantHrEmployee[];
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getHrPayrollWithPrice = getHrPayrollWithPrice;
|
|
4
|
+
exports.getHrPayrollsFetchedData = getHrPayrollsFetchedData;
|
|
5
|
+
exports.getHrEmployeeWithPrice = getHrEmployeeWithPrice;
|
|
6
|
+
exports.getHrEmployeesFetchedData = getHrEmployeesFetchedData;
|
|
7
|
+
const price_conversion_1 = require("./price-conversion");
|
|
8
|
+
function getHrPayrollWithPrice(payroll, writeable) {
|
|
9
|
+
const convert = writeable ? price_conversion_1.convertDecimalToInt : price_conversion_1.convertIntToDecimal;
|
|
10
|
+
return {
|
|
11
|
+
...payroll,
|
|
12
|
+
...(payroll.salary_per_hour != null ? { salary_per_hour: convert(payroll.salary_per_hour) } : {}),
|
|
13
|
+
...(payroll.monthly_salary != null ? { monthly_salary: convert(payroll.monthly_salary) } : {}),
|
|
14
|
+
...(payroll.working_days_per_month != null
|
|
15
|
+
? { working_days_per_month: convert(payroll.working_days_per_month) }
|
|
16
|
+
: {}),
|
|
17
|
+
...(payroll.hours_per_working_day != null ? { hours_per_working_day: convert(payroll.hours_per_working_day) } : {}),
|
|
18
|
+
...(payroll.overtime_multiplier != null ? { overtime_multiplier: convert(payroll.overtime_multiplier) } : {}),
|
|
19
|
+
...(payroll.regular_hours != null ? { regular_hours: convert(payroll.regular_hours) } : {}),
|
|
20
|
+
...(payroll.overtime_hours != null ? { overtime_hours: convert(payroll.overtime_hours) } : {}),
|
|
21
|
+
...(payroll.unpaid_leave_days != null ? { unpaid_leave_days: convert(payroll.unpaid_leave_days) } : {}),
|
|
22
|
+
...(payroll.regular_pay != null ? { regular_pay: convert(payroll.regular_pay) } : {}),
|
|
23
|
+
...(payroll.overtime_pay != null ? { overtime_pay: convert(payroll.overtime_pay) } : {}),
|
|
24
|
+
...(payroll.gross_salary != null ? { gross_salary: convert(payroll.gross_salary) } : {}),
|
|
25
|
+
...(payroll.unpaid_leave_deduction != null
|
|
26
|
+
? { unpaid_leave_deduction: convert(payroll.unpaid_leave_deduction) }
|
|
27
|
+
: {}),
|
|
28
|
+
...(payroll.other_deductions != null ? { other_deductions: convert(payroll.other_deductions) } : {}),
|
|
29
|
+
...(payroll.total_deductions != null ? { total_deductions: convert(payroll.total_deductions) } : {}),
|
|
30
|
+
...(payroll.net_salary != null ? { net_salary: convert(payroll.net_salary) } : {}),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function getHrPayrollsFetchedData(data) {
|
|
34
|
+
return data.map((payroll) => getHrPayrollWithPrice(payroll, false));
|
|
35
|
+
}
|
|
36
|
+
// Same encoding for the money/policy values on an HR employee record.
|
|
37
|
+
function getHrEmployeeWithPrice(employee, writeable) {
|
|
38
|
+
const convert = writeable ? price_conversion_1.convertDecimalToInt : price_conversion_1.convertIntToDecimal;
|
|
39
|
+
return {
|
|
40
|
+
...employee,
|
|
41
|
+
...(employee.salary_per_hour != null ? { salary_per_hour: convert(employee.salary_per_hour) } : {}),
|
|
42
|
+
...(employee.monthly_salary != null ? { monthly_salary: convert(employee.monthly_salary) } : {}),
|
|
43
|
+
...(employee.hr_working_days_per_month != null
|
|
44
|
+
? {
|
|
45
|
+
hr_working_days_per_month: convert(employee.hr_working_days_per_month),
|
|
46
|
+
}
|
|
47
|
+
: {}),
|
|
48
|
+
...(employee.hr_hours_per_working_day != null
|
|
49
|
+
? {
|
|
50
|
+
hr_hours_per_working_day: convert(employee.hr_hours_per_working_day),
|
|
51
|
+
}
|
|
52
|
+
: {}),
|
|
53
|
+
...(employee.hr_overtime_multiplier != null
|
|
54
|
+
? { hr_overtime_multiplier: convert(employee.hr_overtime_multiplier) }
|
|
55
|
+
: {}),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function getHrEmployeesFetchedData(data) {
|
|
59
|
+
return data.map((employee) => getHrEmployeeWithPrice(employee, false));
|
|
60
|
+
}
|
|
@@ -19,6 +19,7 @@ export * from './getFormFieldsDiff';
|
|
|
19
19
|
export * from './gift-card-helpers';
|
|
20
20
|
export * from './halfhalf-setup-helpers';
|
|
21
21
|
export * from './hourly-comparison-report-helpers';
|
|
22
|
+
export * from './hr-helpers';
|
|
22
23
|
export * from './hubrise-utils';
|
|
23
24
|
export * from './image-helpers';
|
|
24
25
|
export * from './image-url-helpers';
|
|
@@ -35,6 +35,7 @@ __exportStar(require("./getFormFieldsDiff"), exports);
|
|
|
35
35
|
__exportStar(require("./gift-card-helpers"), exports);
|
|
36
36
|
__exportStar(require("./halfhalf-setup-helpers"), exports);
|
|
37
37
|
__exportStar(require("./hourly-comparison-report-helpers"), exports);
|
|
38
|
+
__exportStar(require("./hr-helpers"), exports);
|
|
38
39
|
__exportStar(require("./hubrise-utils"), exports);
|
|
39
40
|
__exportStar(require("./image-helpers"), exports);
|
|
40
41
|
__exportStar(require("./image-url-helpers"), exports);
|
|
@@ -54,6 +54,7 @@ export * from './tenant_day_sessions';
|
|
|
54
54
|
export * from './tenant_hr_attendance_records';
|
|
55
55
|
export * from './tenant_hr_biometric_enrollments';
|
|
56
56
|
export * from './tenant_hr_departments';
|
|
57
|
+
export * from './tenant_hr_documents';
|
|
57
58
|
export * from './tenant_hr_employees';
|
|
58
59
|
export * from './tenant_hr_payrolls';
|
|
59
60
|
export * from './tenant_hr_positions';
|
|
@@ -70,6 +70,7 @@ __exportStar(require("./tenant_day_sessions"), exports);
|
|
|
70
70
|
__exportStar(require("./tenant_hr_attendance_records"), exports);
|
|
71
71
|
__exportStar(require("./tenant_hr_biometric_enrollments"), exports);
|
|
72
72
|
__exportStar(require("./tenant_hr_departments"), exports);
|
|
73
|
+
__exportStar(require("./tenant_hr_documents"), exports);
|
|
73
74
|
__exportStar(require("./tenant_hr_employees"), exports);
|
|
74
75
|
__exportStar(require("./tenant_hr_payrolls"), exports);
|
|
75
76
|
__exportStar(require("./tenant_hr_positions"), exports);
|
|
@@ -14,6 +14,7 @@ export declare const TenantHrAttendanceRecordSchema: Schema<any, import("mongoos
|
|
|
14
14
|
updatedAt: NativeDate;
|
|
15
15
|
status: HR_ATTENDANCE_STATUS_ENUM;
|
|
16
16
|
notes: string;
|
|
17
|
+
employee_id: string;
|
|
17
18
|
break_time: import("mongoose").Types.DocumentArray<{
|
|
18
19
|
start_time: number;
|
|
19
20
|
end_time: number;
|
|
@@ -24,7 +25,6 @@ export declare const TenantHrAttendanceRecordSchema: Schema<any, import("mongoos
|
|
|
24
25
|
start_time: number;
|
|
25
26
|
end_time: number;
|
|
26
27
|
}>;
|
|
27
|
-
employee_id: string;
|
|
28
28
|
clock_in: NativeDate;
|
|
29
29
|
clock_out: NativeDate;
|
|
30
30
|
total_break_minutes: number;
|
|
@@ -41,6 +41,7 @@ export declare const TenantHrAttendanceRecordSchema: Schema<any, import("mongoos
|
|
|
41
41
|
updatedAt: NativeDate;
|
|
42
42
|
status: HR_ATTENDANCE_STATUS_ENUM;
|
|
43
43
|
notes: string;
|
|
44
|
+
employee_id: string;
|
|
44
45
|
break_time: import("mongoose").Types.DocumentArray<{
|
|
45
46
|
start_time: number;
|
|
46
47
|
end_time: number;
|
|
@@ -51,7 +52,6 @@ export declare const TenantHrAttendanceRecordSchema: Schema<any, import("mongoos
|
|
|
51
52
|
start_time: number;
|
|
52
53
|
end_time: number;
|
|
53
54
|
}>;
|
|
54
|
-
employee_id: string;
|
|
55
55
|
clock_in: NativeDate;
|
|
56
56
|
clock_out: NativeDate;
|
|
57
57
|
total_break_minutes: number;
|
|
@@ -68,6 +68,7 @@ export declare const TenantHrAttendanceRecordSchema: Schema<any, import("mongoos
|
|
|
68
68
|
updatedAt: NativeDate;
|
|
69
69
|
status: HR_ATTENDANCE_STATUS_ENUM;
|
|
70
70
|
notes: string;
|
|
71
|
+
employee_id: string;
|
|
71
72
|
break_time: import("mongoose").Types.DocumentArray<{
|
|
72
73
|
start_time: number;
|
|
73
74
|
end_time: number;
|
|
@@ -78,7 +79,6 @@ export declare const TenantHrAttendanceRecordSchema: Schema<any, import("mongoos
|
|
|
78
79
|
start_time: number;
|
|
79
80
|
end_time: number;
|
|
80
81
|
}>;
|
|
81
|
-
employee_id: string;
|
|
82
82
|
clock_in: NativeDate;
|
|
83
83
|
clock_out: NativeDate;
|
|
84
84
|
total_break_minutes: number;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
import { HR_DOCUMENT_TYPE_ENUM } from '../../constants';
|
|
3
|
+
export declare const TenantHrDocumentSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
4
|
+
timestamps: true;
|
|
5
|
+
versionKey: false;
|
|
6
|
+
minimize: false;
|
|
7
|
+
}, {
|
|
8
|
+
createdAt: NativeDate;
|
|
9
|
+
updatedAt: NativeDate;
|
|
10
|
+
} & {
|
|
11
|
+
_id: import("mongoose").Types.ObjectId;
|
|
12
|
+
tenant_id: string;
|
|
13
|
+
createdAt: NativeDate;
|
|
14
|
+
updatedAt: NativeDate;
|
|
15
|
+
description: string;
|
|
16
|
+
employee_id: string;
|
|
17
|
+
document_type: HR_DOCUMENT_TYPE_ENUM;
|
|
18
|
+
document_name: string;
|
|
19
|
+
file_url: string;
|
|
20
|
+
file_size: number;
|
|
21
|
+
file_type: string;
|
|
22
|
+
is_confidential: boolean;
|
|
23
|
+
is_archived: boolean;
|
|
24
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
25
|
+
createdAt: NativeDate;
|
|
26
|
+
updatedAt: NativeDate;
|
|
27
|
+
} & {
|
|
28
|
+
_id: import("mongoose").Types.ObjectId;
|
|
29
|
+
tenant_id: string;
|
|
30
|
+
createdAt: NativeDate;
|
|
31
|
+
updatedAt: NativeDate;
|
|
32
|
+
description: string;
|
|
33
|
+
employee_id: string;
|
|
34
|
+
document_type: HR_DOCUMENT_TYPE_ENUM;
|
|
35
|
+
document_name: string;
|
|
36
|
+
file_url: string;
|
|
37
|
+
file_size: number;
|
|
38
|
+
file_type: string;
|
|
39
|
+
is_confidential: boolean;
|
|
40
|
+
is_archived: boolean;
|
|
41
|
+
}>> & import("mongoose").FlatRecord<{
|
|
42
|
+
createdAt: NativeDate;
|
|
43
|
+
updatedAt: NativeDate;
|
|
44
|
+
} & {
|
|
45
|
+
_id: import("mongoose").Types.ObjectId;
|
|
46
|
+
tenant_id: string;
|
|
47
|
+
createdAt: NativeDate;
|
|
48
|
+
updatedAt: NativeDate;
|
|
49
|
+
description: string;
|
|
50
|
+
employee_id: string;
|
|
51
|
+
document_type: HR_DOCUMENT_TYPE_ENUM;
|
|
52
|
+
document_name: string;
|
|
53
|
+
file_url: string;
|
|
54
|
+
file_size: number;
|
|
55
|
+
file_type: string;
|
|
56
|
+
is_confidential: boolean;
|
|
57
|
+
is_archived: boolean;
|
|
58
|
+
}> & Required<{
|
|
59
|
+
_id: import("mongoose").Types.ObjectId;
|
|
60
|
+
}> & {
|
|
61
|
+
__v: number;
|
|
62
|
+
}>;
|
|
63
|
+
export declare const TENANT_HR_DOCUMENTS_COLLECTION_NAME = "tenant_hr_documents";
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TENANT_HR_DOCUMENTS_COLLECTION_NAME = exports.TenantHrDocumentSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
exports.TenantHrDocumentSchema = new mongoose_1.Schema({
|
|
7
|
+
_id: {
|
|
8
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
9
|
+
required: true,
|
|
10
|
+
immutable: true,
|
|
11
|
+
},
|
|
12
|
+
tenant_id: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true,
|
|
15
|
+
immutable: true,
|
|
16
|
+
ref: 'tenants',
|
|
17
|
+
},
|
|
18
|
+
employee_id: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
immutable: true,
|
|
22
|
+
ref: 'tenant_hr_employees',
|
|
23
|
+
},
|
|
24
|
+
document_type: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: true,
|
|
27
|
+
enum: constants_1.ALL_HR_DOCUMENT_TYPE_NAMES,
|
|
28
|
+
default: constants_1.HR_DOCUMENT_TYPE_ENUM.OTHER,
|
|
29
|
+
},
|
|
30
|
+
document_name: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
description: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: null,
|
|
37
|
+
},
|
|
38
|
+
file_url: {
|
|
39
|
+
type: String,
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
file_size: {
|
|
43
|
+
type: Number,
|
|
44
|
+
default: 0,
|
|
45
|
+
},
|
|
46
|
+
file_type: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: null,
|
|
49
|
+
},
|
|
50
|
+
is_confidential: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false,
|
|
53
|
+
},
|
|
54
|
+
is_archived: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false,
|
|
57
|
+
},
|
|
58
|
+
createdAt: {
|
|
59
|
+
type: mongoose_1.Schema.Types.Date,
|
|
60
|
+
required: true,
|
|
61
|
+
default: () => new Date(),
|
|
62
|
+
immutable: true,
|
|
63
|
+
},
|
|
64
|
+
updatedAt: {
|
|
65
|
+
type: mongoose_1.Schema.Types.Date,
|
|
66
|
+
required: true,
|
|
67
|
+
default: () => new Date(),
|
|
68
|
+
},
|
|
69
|
+
}, {
|
|
70
|
+
timestamps: true,
|
|
71
|
+
versionKey: false,
|
|
72
|
+
minimize: false,
|
|
73
|
+
});
|
|
74
|
+
exports.TENANT_HR_DOCUMENTS_COLLECTION_NAME = 'tenant_hr_documents';
|
|
@@ -21,8 +21,14 @@ export declare const TenantHrEmployeeSchema: Schema<any, import("mongoose").Mode
|
|
|
21
21
|
phone_number_verified: boolean;
|
|
22
22
|
is_disabled: boolean;
|
|
23
23
|
notes: string;
|
|
24
|
-
|
|
24
|
+
salary_per_hour: number;
|
|
25
|
+
monthly_salary: number;
|
|
26
|
+
pay_type: HR_PAY_TYPE_ENUM;
|
|
27
|
+
hr_working_days_per_month: number;
|
|
28
|
+
hr_hours_per_working_day: number;
|
|
29
|
+
hr_overtime_multiplier: number;
|
|
25
30
|
staff_auth_code: string;
|
|
31
|
+
address: string;
|
|
26
32
|
emergency_contact: {
|
|
27
33
|
name: string;
|
|
28
34
|
phone: string;
|
|
@@ -32,9 +38,6 @@ export declare const TenantHrEmployeeSchema: Schema<any, import("mongoose").Mode
|
|
|
32
38
|
position_id: string;
|
|
33
39
|
join_date: NativeDate;
|
|
34
40
|
employment_status: HR_EMPLOYMENT_STATUS_ENUM;
|
|
35
|
-
pay_type: HR_PAY_TYPE_ENUM;
|
|
36
|
-
salary_per_hour: number;
|
|
37
|
-
monthly_salary: number;
|
|
38
41
|
docs: Map<string, {
|
|
39
42
|
doc_url: string;
|
|
40
43
|
doc_name: string;
|
|
@@ -343,8 +346,14 @@ export declare const TenantHrEmployeeSchema: Schema<any, import("mongoose").Mode
|
|
|
343
346
|
phone_number_verified: boolean;
|
|
344
347
|
is_disabled: boolean;
|
|
345
348
|
notes: string;
|
|
346
|
-
|
|
349
|
+
salary_per_hour: number;
|
|
350
|
+
monthly_salary: number;
|
|
351
|
+
pay_type: HR_PAY_TYPE_ENUM;
|
|
352
|
+
hr_working_days_per_month: number;
|
|
353
|
+
hr_hours_per_working_day: number;
|
|
354
|
+
hr_overtime_multiplier: number;
|
|
347
355
|
staff_auth_code: string;
|
|
356
|
+
address: string;
|
|
348
357
|
emergency_contact: {
|
|
349
358
|
name: string;
|
|
350
359
|
phone: string;
|
|
@@ -354,9 +363,6 @@ export declare const TenantHrEmployeeSchema: Schema<any, import("mongoose").Mode
|
|
|
354
363
|
position_id: string;
|
|
355
364
|
join_date: NativeDate;
|
|
356
365
|
employment_status: HR_EMPLOYMENT_STATUS_ENUM;
|
|
357
|
-
pay_type: HR_PAY_TYPE_ENUM;
|
|
358
|
-
salary_per_hour: number;
|
|
359
|
-
monthly_salary: number;
|
|
360
366
|
docs: Map<string, {
|
|
361
367
|
doc_url: string;
|
|
362
368
|
doc_name: string;
|
|
@@ -665,8 +671,14 @@ export declare const TenantHrEmployeeSchema: Schema<any, import("mongoose").Mode
|
|
|
665
671
|
phone_number_verified: boolean;
|
|
666
672
|
is_disabled: boolean;
|
|
667
673
|
notes: string;
|
|
668
|
-
|
|
674
|
+
salary_per_hour: number;
|
|
675
|
+
monthly_salary: number;
|
|
676
|
+
pay_type: HR_PAY_TYPE_ENUM;
|
|
677
|
+
hr_working_days_per_month: number;
|
|
678
|
+
hr_hours_per_working_day: number;
|
|
679
|
+
hr_overtime_multiplier: number;
|
|
669
680
|
staff_auth_code: string;
|
|
681
|
+
address: string;
|
|
670
682
|
emergency_contact: {
|
|
671
683
|
name: string;
|
|
672
684
|
phone: string;
|
|
@@ -676,9 +688,6 @@ export declare const TenantHrEmployeeSchema: Schema<any, import("mongoose").Mode
|
|
|
676
688
|
position_id: string;
|
|
677
689
|
join_date: NativeDate;
|
|
678
690
|
employment_status: HR_EMPLOYMENT_STATUS_ENUM;
|
|
679
|
-
pay_type: HR_PAY_TYPE_ENUM;
|
|
680
|
-
salary_per_hour: number;
|
|
681
|
-
monthly_salary: number;
|
|
682
691
|
docs: Map<string, {
|
|
683
692
|
doc_url: string;
|
|
684
693
|
doc_name: string;
|
|
@@ -127,6 +127,21 @@ exports.TenantHrEmployeeSchema = new mongoose_1.Schema({
|
|
|
127
127
|
type: Number,
|
|
128
128
|
default: null,
|
|
129
129
|
},
|
|
130
|
+
hr_working_days_per_month: {
|
|
131
|
+
type: Number,
|
|
132
|
+
required: true,
|
|
133
|
+
default: 0,
|
|
134
|
+
},
|
|
135
|
+
hr_hours_per_working_day: {
|
|
136
|
+
type: Number,
|
|
137
|
+
required: true,
|
|
138
|
+
default: 0,
|
|
139
|
+
},
|
|
140
|
+
hr_overtime_multiplier: {
|
|
141
|
+
type: Number,
|
|
142
|
+
required: true,
|
|
143
|
+
default: 0,
|
|
144
|
+
},
|
|
130
145
|
docs: {
|
|
131
146
|
type: Map,
|
|
132
147
|
of: hrEmployeeDocumentSchema,
|
|
@@ -15,12 +15,8 @@ export declare const TenantHrPayrollSchema: Schema<any, import("mongoose").Model
|
|
|
15
15
|
status: HR_PAYROLL_STATUS_ENUM;
|
|
16
16
|
payment_method: HR_PAYMENT_METHOD_ENUM;
|
|
17
17
|
notes: string;
|
|
18
|
-
employee_id: string;
|
|
19
|
-
pay_type: HR_PAY_TYPE_ENUM;
|
|
20
18
|
salary_per_hour: number;
|
|
21
19
|
monthly_salary: number;
|
|
22
|
-
pay_period_start: NativeDate;
|
|
23
|
-
pay_period_end: NativeDate;
|
|
24
20
|
working_days_per_month: number;
|
|
25
21
|
hours_per_working_day: number;
|
|
26
22
|
overtime_multiplier: number;
|
|
@@ -34,6 +30,10 @@ export declare const TenantHrPayrollSchema: Schema<any, import("mongoose").Model
|
|
|
34
30
|
other_deductions: number;
|
|
35
31
|
total_deductions: number;
|
|
36
32
|
net_salary: number;
|
|
33
|
+
employee_id: string;
|
|
34
|
+
pay_type: HR_PAY_TYPE_ENUM;
|
|
35
|
+
pay_period_start: NativeDate;
|
|
36
|
+
pay_period_end: NativeDate;
|
|
37
37
|
payment_date: NativeDate;
|
|
38
38
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
39
39
|
createdAt: NativeDate;
|
|
@@ -46,12 +46,8 @@ export declare const TenantHrPayrollSchema: Schema<any, import("mongoose").Model
|
|
|
46
46
|
status: HR_PAYROLL_STATUS_ENUM;
|
|
47
47
|
payment_method: HR_PAYMENT_METHOD_ENUM;
|
|
48
48
|
notes: string;
|
|
49
|
-
employee_id: string;
|
|
50
|
-
pay_type: HR_PAY_TYPE_ENUM;
|
|
51
49
|
salary_per_hour: number;
|
|
52
50
|
monthly_salary: number;
|
|
53
|
-
pay_period_start: NativeDate;
|
|
54
|
-
pay_period_end: NativeDate;
|
|
55
51
|
working_days_per_month: number;
|
|
56
52
|
hours_per_working_day: number;
|
|
57
53
|
overtime_multiplier: number;
|
|
@@ -65,6 +61,10 @@ export declare const TenantHrPayrollSchema: Schema<any, import("mongoose").Model
|
|
|
65
61
|
other_deductions: number;
|
|
66
62
|
total_deductions: number;
|
|
67
63
|
net_salary: number;
|
|
64
|
+
employee_id: string;
|
|
65
|
+
pay_type: HR_PAY_TYPE_ENUM;
|
|
66
|
+
pay_period_start: NativeDate;
|
|
67
|
+
pay_period_end: NativeDate;
|
|
68
68
|
payment_date: NativeDate;
|
|
69
69
|
}>> & import("mongoose").FlatRecord<{
|
|
70
70
|
createdAt: NativeDate;
|
|
@@ -77,12 +77,8 @@ export declare const TenantHrPayrollSchema: Schema<any, import("mongoose").Model
|
|
|
77
77
|
status: HR_PAYROLL_STATUS_ENUM;
|
|
78
78
|
payment_method: HR_PAYMENT_METHOD_ENUM;
|
|
79
79
|
notes: string;
|
|
80
|
-
employee_id: string;
|
|
81
|
-
pay_type: HR_PAY_TYPE_ENUM;
|
|
82
80
|
salary_per_hour: number;
|
|
83
81
|
monthly_salary: number;
|
|
84
|
-
pay_period_start: NativeDate;
|
|
85
|
-
pay_period_end: NativeDate;
|
|
86
82
|
working_days_per_month: number;
|
|
87
83
|
hours_per_working_day: number;
|
|
88
84
|
overtime_multiplier: number;
|
|
@@ -96,6 +92,10 @@ export declare const TenantHrPayrollSchema: Schema<any, import("mongoose").Model
|
|
|
96
92
|
other_deductions: number;
|
|
97
93
|
total_deductions: number;
|
|
98
94
|
net_salary: number;
|
|
95
|
+
employee_id: string;
|
|
96
|
+
pay_type: HR_PAY_TYPE_ENUM;
|
|
97
|
+
pay_period_start: NativeDate;
|
|
98
|
+
pay_period_end: NativeDate;
|
|
99
99
|
payment_date: NativeDate;
|
|
100
100
|
}> & Required<{
|
|
101
101
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -45,15 +45,15 @@ exports.TenantHrPayrollSchema = new mongoose_1.Schema({
|
|
|
45
45
|
},
|
|
46
46
|
working_days_per_month: {
|
|
47
47
|
type: Number,
|
|
48
|
-
default:
|
|
48
|
+
default: 0,
|
|
49
49
|
},
|
|
50
50
|
hours_per_working_day: {
|
|
51
51
|
type: Number,
|
|
52
|
-
default:
|
|
52
|
+
default: 0,
|
|
53
53
|
},
|
|
54
54
|
overtime_multiplier: {
|
|
55
55
|
type: Number,
|
|
56
|
-
default:
|
|
56
|
+
default: 0,
|
|
57
57
|
},
|
|
58
58
|
regular_hours: {
|
|
59
59
|
type: Number,
|
|
@@ -185,9 +185,6 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
|
|
|
185
185
|
menu_source?: string | null | undefined;
|
|
186
186
|
app_version?: string | null | undefined;
|
|
187
187
|
force_isolated_printing?: boolean | null | undefined;
|
|
188
|
-
hr_working_days_per_month?: number | null | undefined;
|
|
189
|
-
hr_hours_per_working_day?: number | null | undefined;
|
|
190
|
-
hr_overtime_multiplier?: number | null | undefined;
|
|
191
188
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
192
189
|
createdAt: NativeDate;
|
|
193
190
|
updatedAt: NativeDate;
|
|
@@ -369,9 +366,6 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
|
|
|
369
366
|
menu_source?: string | null | undefined;
|
|
370
367
|
app_version?: string | null | undefined;
|
|
371
368
|
force_isolated_printing?: boolean | null | undefined;
|
|
372
|
-
hr_working_days_per_month?: number | null | undefined;
|
|
373
|
-
hr_hours_per_working_day?: number | null | undefined;
|
|
374
|
-
hr_overtime_multiplier?: number | null | undefined;
|
|
375
369
|
}>> & import("mongoose").FlatRecord<{
|
|
376
370
|
createdAt: NativeDate;
|
|
377
371
|
updatedAt: NativeDate;
|
|
@@ -553,9 +547,6 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
|
|
|
553
547
|
menu_source?: string | null | undefined;
|
|
554
548
|
app_version?: string | null | undefined;
|
|
555
549
|
force_isolated_printing?: boolean | null | undefined;
|
|
556
|
-
hr_working_days_per_month?: number | null | undefined;
|
|
557
|
-
hr_hours_per_working_day?: number | null | undefined;
|
|
558
|
-
hr_overtime_multiplier?: number | null | undefined;
|
|
559
550
|
}> & Required<{
|
|
560
551
|
_id: string;
|
|
561
552
|
}> & {
|
|
@@ -773,22 +773,6 @@ exports.TenantSchema = new mongoose_1.Schema({
|
|
|
773
773
|
type: Boolean,
|
|
774
774
|
required: false,
|
|
775
775
|
},
|
|
776
|
-
// ==========>>><<<==========
|
|
777
|
-
hr_working_days_per_month: {
|
|
778
|
-
type: Number,
|
|
779
|
-
required: false,
|
|
780
|
-
default: 30,
|
|
781
|
-
},
|
|
782
|
-
hr_hours_per_working_day: {
|
|
783
|
-
type: Number,
|
|
784
|
-
required: false,
|
|
785
|
-
default: 8,
|
|
786
|
-
},
|
|
787
|
-
hr_overtime_multiplier: {
|
|
788
|
-
type: Number,
|
|
789
|
-
required: false,
|
|
790
|
-
default: 1.5,
|
|
791
|
-
},
|
|
792
776
|
// ====><====
|
|
793
777
|
createdAt: {
|
|
794
778
|
type: mongoose_1.Schema.Types.Date,
|
|
@@ -61,6 +61,7 @@ export * from './tenant_day_sessions';
|
|
|
61
61
|
export * from './tenant_hr_attendance_records';
|
|
62
62
|
export * from './tenant_hr_biometric_enrollments';
|
|
63
63
|
export * from './tenant_hr_departments';
|
|
64
|
+
export * from './tenant_hr_documents';
|
|
64
65
|
export * from './tenant_hr_employees';
|
|
65
66
|
export * from './tenant_hr_payrolls';
|
|
66
67
|
export * from './tenant_hr_positions';
|
|
@@ -77,6 +77,7 @@ __exportStar(require("./tenant_day_sessions"), exports);
|
|
|
77
77
|
__exportStar(require("./tenant_hr_attendance_records"), exports);
|
|
78
78
|
__exportStar(require("./tenant_hr_biometric_enrollments"), exports);
|
|
79
79
|
__exportStar(require("./tenant_hr_departments"), exports);
|
|
80
|
+
__exportStar(require("./tenant_hr_documents"), exports);
|
|
80
81
|
__exportStar(require("./tenant_hr_employees"), exports);
|
|
81
82
|
__exportStar(require("./tenant_hr_payrolls"), exports);
|
|
82
83
|
__exportStar(require("./tenant_hr_positions"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HR_DOCUMENT_TYPE_ENUM } from '../../constants';
|
|
2
|
+
export interface ITenantHrDocument {
|
|
3
|
+
_id: string;
|
|
4
|
+
tenant_id: string;
|
|
5
|
+
employee_id: string;
|
|
6
|
+
document_type: HR_DOCUMENT_TYPE_ENUM;
|
|
7
|
+
document_name: string;
|
|
8
|
+
description?: string | null;
|
|
9
|
+
file_url: string;
|
|
10
|
+
file_size: number;
|
|
11
|
+
file_type?: string | null;
|
|
12
|
+
is_confidential: boolean;
|
|
13
|
+
is_archived: boolean;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date | null;
|
|
16
|
+
}
|
|
@@ -32,6 +32,9 @@ export interface ITenantHrEmployee {
|
|
|
32
32
|
pay_type: HR_PAY_TYPE_ENUM;
|
|
33
33
|
salary_per_hour?: number | null;
|
|
34
34
|
monthly_salary?: number | null;
|
|
35
|
+
hr_working_days_per_month: number;
|
|
36
|
+
hr_hours_per_working_day: number;
|
|
37
|
+
hr_overtime_multiplier: number;
|
|
35
38
|
docs: Record<HR_EMPLOYEE_DOCUMENT_TYPE_ENUM, ITenantHrEmployeeDocument>;
|
|
36
39
|
notes?: string | null;
|
|
37
40
|
createdAt: Date;
|
|
@@ -177,9 +177,6 @@ export interface ITenant {
|
|
|
177
177
|
menu_source?: string | null;
|
|
178
178
|
app_version?: string | null;
|
|
179
179
|
force_isolated_printing?: boolean;
|
|
180
|
-
hr_working_days_per_month: number;
|
|
181
|
-
hr_hours_per_working_day: number;
|
|
182
|
-
hr_overtime_multiplier: number;
|
|
183
180
|
createdAt: Date;
|
|
184
181
|
updatedAt: Date;
|
|
185
182
|
}
|