hrms-user/src/utils/functions.ts

24 lines
746 B
TypeScript
Raw Normal View History

2025-10-02 13:21:41 +07:00
/**
*
*
* @param date
* @returns
*/
export function calculateFiscalYear(date: Date) {
const month = date.getMonth() + 1;
return month >= 10 ? date.getFullYear() + 1 : date.getFullYear();
}
2026-02-25 10:42:46 +07:00
/**
*
* @param col
* @param isAct
* @returns
*/
export function getColumnLabel(col: any, isAct: boolean) {
if (col.name === "posNo" && isAct) {
2026-02-25 15:13:12 +07:00
return `${col.label}รักษาการแทน`;
2026-02-25 10:42:46 +07:00
}
return col.label;
}