new loader
This commit is contained in:
parent
fd7aae2f5d
commit
fe6c712a18
95 changed files with 1189 additions and 950 deletions
|
|
@ -247,7 +247,8 @@ const props = defineProps({
|
|||
const store = useDataStore();
|
||||
const { loaderPage } = store;
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { success, dateToISO, date2Thai, messageError } = mixin;
|
||||
const { success, dateToISO, date2Thai, messageError, showLoader, hideLoader } =
|
||||
mixin;
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
const modalAdd = ref<boolean>(false); //modal เพิ่มวันหยุด
|
||||
const modalDelete = ref<boolean>(false); //modal ลบวันหยุด
|
||||
|
|
@ -284,7 +285,7 @@ const dataSixDaysRaw = ref<RequestItemsObject[]>([]);
|
|||
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
||||
*/
|
||||
onMounted(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
const calen = fullCalendar.value.getApi();
|
||||
const date = new Date(props.dateYear, props.dateMonth);
|
||||
calen.gotoDate(date);
|
||||
|
|
@ -424,7 +425,7 @@ const onSubmit = async () => {
|
|||
*/
|
||||
const fetchData = async () => {
|
||||
calendarOptions.value.events = [];
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(
|
||||
config.API.listHolidayHistoryYearMonth(
|
||||
|
|
@ -577,7 +578,7 @@ const editData = async () => {
|
|||
});
|
||||
});
|
||||
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.listHolidayHistoryEdit(type.value), {
|
||||
history: _dataHistory.value,
|
||||
|
|
@ -620,7 +621,7 @@ const addDate = async () => {
|
|||
)
|
||||
);
|
||||
} while (new Date(dateStart.value) <= new Date(dateRange.value[1]));
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.listHolidayHistoryAdd(category.value), dataAdd.value)
|
||||
.then((res) => {
|
||||
|
|
@ -657,7 +658,7 @@ const deleteData = async () => {
|
|||
new Date(dateStart.value).setDate(new Date(dateStart.value).getDate() + 1)
|
||||
);
|
||||
} while (new Date(dateStart.value) <= new Date(dateRange.value[1]));
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.listHolidayHistoryDelete(type.value), dataDelete.value)
|
||||
.then((res) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue