fix bug ลา

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-01 11:26:35 +07:00
parent cf36f1c150
commit e726510691
3 changed files with 42 additions and 48 deletions

View file

@ -17,7 +17,7 @@ import type {
} from "@/modules/05_leave/interface/response/leave";
const mixin = useCounterMixin();
const { date2Thai, messageError } = mixin;
const { date2Thai, messageError, showLoader, hideLoader } = mixin;
const $q = useQuasar();
const type = ref<string>("00000000-0000-0000-0000-000000000000");
const status = ref<string>("ALL");
@ -283,6 +283,7 @@ export const useLeaveStore = defineStore("Leave", () => {
//ดึงข้อมูล profile จาก API
async function fetchProfile() {
showLoader();
await http
.post(config.API.leaveProfile(), { type: typeId.value })
.then((res: any) => {
@ -311,6 +312,9 @@ export const useLeaveStore = defineStore("Leave", () => {
})
.catch((e: any) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}