fix(leave):bug watch

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-10-07 10:52:23 +07:00
parent 27280c393f
commit 7175fac96b
17 changed files with 257 additions and 238 deletions

View file

@ -15,6 +15,7 @@ import type {
ListLeaveTable,
} from "@/modules/05_leave/interface/response/leave";
import type { DataOption } from "../14_IDP/interface/Main";
import { calculateFiscalYear } from "@/utils/functions";
const mixin = useCounterMixin();
const { date2Thai, showLoader, hideLoader } = mixin;
@ -25,7 +26,7 @@ export const useLeaveStore = defineStore("Leave", () => {
const typeLeave = ref<string | undefined>("");
const LeaveType = ref<string | null>("0");
const LeaveStatus = ref<string | null>("0");
const fiscalYearyear = ref<Number | null>(new Date().getFullYear());
const fiscalYearyear = ref<number>(calculateFiscalYear(new Date()));
const rows = ref<ListLeaveTable[]>([]);
const leaveTypeData = ref<TypeLeave[]>([]);
const isLoadingProfile = ref<boolean>(false); // สถานะการโหลดข้อมูลโปรไฟล์