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

@ -244,7 +244,15 @@ const props = defineProps({
const store = useDataStore();
const { loaderPage } = store;
const mixin = useCounterMixin(); //
const { success, dateToISO, dateMonth2Thai, weekThai, messageError } = mixin;
const {
success,
dateToISO,
dateMonth2Thai,
weekThai,
messageError,
showLoader,
hideLoader,
} = mixin;
const $q = useQuasar(); // noti quasar
const calendarData = ref<DataDateListsObject[]>([]); //data
const modalAdd = ref<boolean>(false); //modal
@ -329,7 +337,7 @@ const deleteClick = async (val: DataDateListsObject) => {
*/
const fetchData = async () => {
calendarData.value = [];
loaderPage(true);
showLoader();
await http
.get(config.API.listHolidayHistoryYear(props.dateYear))
.then((res) => {
@ -409,7 +417,7 @@ const deleteConfirm = async () => {
} else {
return;
}
loaderPage(true);
showLoader();
await http
.post(
config.API.listHolidayHistoryDelete(currentTab.value),
@ -462,7 +470,7 @@ const editData = async () => {
}
);
}
loaderPage(true);
showLoader();
await http
.post(config.API.listHolidayHistoryEdit(currentTab.value), {
history: _dataHistory.value,