fix จำนวนสิทธิ์และวันลาที่ใช้ไป

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-04-29 14:39:18 +07:00
parent 00a68cc9e0
commit 51e50ad321
3 changed files with 20 additions and 13 deletions

View file

@ -10,7 +10,19 @@ export const useLeaveHistoryDataStore = defineStore("leaveHistory", () => {
name: "ทั้งหมด",
},
]);
/**
*
* @param date
* @returns
*/
function findYear(date: Date) {
const month = date.getMonth() + 1;
return month >= 10 ? date.getFullYear() + 1 : date.getFullYear();
}
return {
leaveTypeData,
findYear,
};
});