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

@ -213,7 +213,15 @@ const props = defineProps({
const $q = useQuasar();
const mixin = useCounterMixin(); //
const { dateThaiRange, modalDelete, modalConfirm, dateToISO, success } = mixin;
const {
dateThaiRange,
modalDelete,
modalConfirm,
dateToISO,
success,
showLoader,
hideLoader,
} = mixin;
const store = useExamDataStore();
const { examData, changeExamColumns } = store;
const id = ref<string>("");
@ -318,7 +326,7 @@ onMounted(async () => {
});
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.candidateCareer(candidateId.value))
.then((res) => {
@ -336,7 +344,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -415,7 +423,7 @@ const checkDelete = (row: RequestItemsObject) => {
*/
const clickDeleteRow = async () => {
if (rawItem.value != null) {
loaderPage(true);
showLoader();
await http
.delete(config.API.candidateAdminCareer(rawItem.value.id))
.then(() => {
@ -451,7 +459,7 @@ const clickSave = async () => {
* นทกเพมขอม
*/
const saveData = async () => {
loaderPage(true);
showLoader();
await http
.post(config.API.candidateAdminCareer(candidateId.value), {
name: location.value,
@ -476,7 +484,7 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.candidateAdminCareer(id.value), {
name: location.value,