ปรับ fe sprint2
This commit is contained in:
parent
8576f3c387
commit
0d6ff7be0a
83 changed files with 6932 additions and 2571 deletions
|
|
@ -578,7 +578,7 @@ const $q = useQuasar();
|
|||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const store = useDataStore();
|
||||
const { loaderPage } = store;
|
||||
const { date2Thai, messageError, showLoader, hideLoader } = mixin;
|
||||
const { date2Thai, messageError } = mixin;
|
||||
const previous = ref<boolean>(false);
|
||||
const next = ref<boolean>(false);
|
||||
const addDialog = ref<boolean>(false);
|
||||
|
|
@ -870,7 +870,7 @@ const saveEdit = async () => {
|
|||
};
|
||||
|
||||
const saveDataAgency = async (data: DataLink[]) => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.post(config.API.cmsAgency, data)
|
||||
.then((res) => {})
|
||||
|
|
@ -883,7 +883,7 @@ const saveDataAgency = async (data: DataLink[]) => {
|
|||
};
|
||||
|
||||
const saveDataGoverment = async (data: DataLink[]) => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
|
||||
await http
|
||||
.post(config.API.cmsGoverment, data)
|
||||
|
|
@ -897,7 +897,7 @@ const saveDataGoverment = async (data: DataLink[]) => {
|
|||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.cms)
|
||||
.then((res) => {
|
||||
|
|
@ -952,12 +952,12 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
const takeLogo = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
const formData = new FormData();
|
||||
formData.append("FileData", imageFileLogo.value);
|
||||
await http
|
||||
|
|
@ -974,7 +974,7 @@ const takeLogo = async () => {
|
|||
};
|
||||
|
||||
const takeBanner = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
const formData = new FormData();
|
||||
formData.append("FileData", imageFile.value);
|
||||
await http
|
||||
|
|
@ -999,7 +999,7 @@ const sendDataDetail = async () => {
|
|||
description: web.value.descripstion,
|
||||
shortName: web.value.by,
|
||||
};
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.post(config.API.cmsDeatail, data)
|
||||
.then((res) => {})
|
||||
|
|
@ -1026,7 +1026,7 @@ const sendDataAbout = async () => {
|
|||
zipCode: address.value.code,
|
||||
telephone: address.value.tel,
|
||||
};
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.post(config.API.cmsAbout, data)
|
||||
.then((res) => {})
|
||||
|
|
@ -1042,7 +1042,7 @@ const sendDataAbout = async () => {
|
|||
};
|
||||
|
||||
const fetchProvince = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.province)
|
||||
.then((res) => {
|
||||
|
|
@ -1057,13 +1057,13 @@ const fetchProvince = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
const fetchDistrict = async (id: string | null) => {
|
||||
if (id !== null) {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.listDistrict(id))
|
||||
.then((res) => {
|
||||
|
|
@ -1078,14 +1078,14 @@ const fetchDistrict = async (id: string | null) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const fetchSubDistrict = async (id: string | null) => {
|
||||
if (id !== null) {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.listSubDistrict(id))
|
||||
.then((res) => {
|
||||
|
|
@ -1104,7 +1104,7 @@ const fetchSubDistrict = async (id: string | null) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue