fix leave Skeleton Load
This commit is contained in:
parent
7cdff8d853
commit
474828c5ee
15 changed files with 282 additions and 260 deletions
|
|
@ -28,6 +28,7 @@ export const useLeaveStore = defineStore("Leave", () => {
|
|||
const fiscalYearyear = ref<Number | null>(new Date().getFullYear());
|
||||
const rows = ref<ListLeaveTable[]>([]);
|
||||
const leaveTypeData = ref<TypeLeave[]>([]);
|
||||
const isLoadingProfile = ref<boolean>(false); // สถานะการโหลดข้อมูลโปรไฟล์
|
||||
|
||||
/**
|
||||
* function เรียกข้อมูลรายการลา Table
|
||||
|
|
@ -307,7 +308,8 @@ export const useLeaveStore = defineStore("Leave", () => {
|
|||
|
||||
//ดึงข้อมูล profile จาก API
|
||||
async function fetchProfile() {
|
||||
showLoader();
|
||||
// showLoader();
|
||||
isLoadingProfile.value = true;
|
||||
await http
|
||||
.post(config.API.leaveProfile(), { type: typeId.value })
|
||||
.then((res: any) => {
|
||||
|
|
@ -345,7 +347,8 @@ export const useLeaveStore = defineStore("Leave", () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
// hideLoader();
|
||||
isLoadingProfile.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -474,5 +477,6 @@ export const useLeaveStore = defineStore("Leave", () => {
|
|||
converstType,
|
||||
|
||||
fetchLeaveTypeData,
|
||||
isLoadingProfile,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue