new loader

This commit is contained in:
Thanit Konmek 2023-06-09 14:25:41 +07:00
parent fd7aae2f5d
commit fe6c712a18
95 changed files with 1189 additions and 950 deletions

View file

@ -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,