new loader
This commit is contained in:
parent
fd7aae2f5d
commit
fe6c712a18
95 changed files with 1189 additions and 950 deletions
|
|
@ -407,7 +407,7 @@ import { useQuasar } from "quasar";
|
|||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { genColor15, messageError } = mixin;
|
||||
const { genColor15, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore; //ขึ้นหน้า load ขณะเรียก api
|
||||
|
|
@ -598,7 +598,7 @@ const changeList = async (val: number) => {
|
|||
*/
|
||||
const fetchDataSummary = async () => {
|
||||
lists.value = [];
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.countDashbordHistory)
|
||||
.then((res) => {
|
||||
|
|
@ -615,7 +615,7 @@ const fetchDataSummary = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -630,7 +630,7 @@ const fetchDataSummarySubComponent = async () => {
|
|||
*/
|
||||
const fetchDataSummarySub = async (val: number) => {
|
||||
dataNum.value = [];
|
||||
// loaderPage(true);
|
||||
// showLoader();
|
||||
await http
|
||||
.get(config.API.countDashbordSubHistory(val))
|
||||
.then((res) => {
|
||||
|
|
@ -648,7 +648,7 @@ const fetchDataSummarySub = async (val: number) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -656,7 +656,7 @@ const fetchDataSummarySub = async (val: number) => {
|
|||
* สรุปวันหยุด
|
||||
*/
|
||||
const fetchDataSummaryCalendar = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.summaryHolidayHistoryYear(yearSum.value))
|
||||
.then((res) => {
|
||||
|
|
@ -676,7 +676,7 @@ const fetchDataSummaryCalendar = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -365,6 +365,8 @@ const {
|
|||
date2Thai,
|
||||
messageError,
|
||||
dialogMessage,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
const { loaderPage } = dataStore; //รอโหลด
|
||||
const store = useManageDataStore();
|
||||
|
|
@ -491,7 +493,7 @@ const onSubmit = async () => {
|
|||
)
|
||||
);
|
||||
} while (new Date(dateStart.value) <= new Date(dateAdd.value[1]));
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.listHolidayHistoryAdd(category.value), dataAdd.value)
|
||||
.then((res) => {
|
||||
|
|
@ -503,7 +505,7 @@ const onSubmit = async () => {
|
|||
})
|
||||
.finally(() => {
|
||||
refreshData.value = !refreshData.value;
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -528,7 +530,7 @@ const onSubmitCopy = async () => {
|
|||
);
|
||||
return;
|
||||
}
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.listHolidayCopy, {
|
||||
fromYear: dateYearStart.value,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue