แก้ Fetchdata ข้อมูลหลัก

This commit is contained in:
AnandaTon 2023-06-19 17:52:16 +07:00
parent 11e41bc974
commit 5276ba4db3
25 changed files with 178 additions and 108 deletions

View file

@ -809,8 +809,9 @@ const save = async (publish: boolean) => {
.catch((e) => {
messageError($q, e);
})
.finally(() => {
.finally(async () => {
hideLoader();
await fetchData(true);
});
};
@ -846,7 +847,7 @@ const checkDupDataShortName = (val: string) => {
* งกนปมแกไข ให get data มาใหม
*/
const clickEdit = async () => {
await fetchData();
await fetchData(true);
};
/**
@ -854,6 +855,7 @@ const clickEdit = async () => {
*/
const clickSave = async () => {
await save(false);
await fetchData(true);
};
/**
@ -861,6 +863,7 @@ const clickSave = async () => {
*/
const clickDelete = async () => {
await clearPublishedData();
await fetchData(true);
};
/**
@ -868,7 +871,7 @@ const clickDelete = async () => {
*/
const clickCancel = async () => {
edit.value = false;
await fetchData();
await fetchData(true);
};
/**

View file

@ -454,7 +454,7 @@ const clearPublishedData = async () => {
})
.finally(async () => {
await fetchHistory();
await fetchData();
await fetchData(true);
});
};
@ -473,7 +473,7 @@ const publishedData = async () => {
messageError($q, e);
})
.finally(async () => {
await fetchData();
await fetchData(true);
});
};
@ -542,8 +542,9 @@ const save = async (publish: boolean) => {
.catch((e) => {
messageError($q, e);
})
.finally(() => {
.finally(async () => {
hideLoader();
await fetchData(true);
});
};
@ -565,7 +566,7 @@ const checkDupDataName = (val: string) => {
* งกนปมแกไข ให get data มาใหม
*/
const clickEdit = async () => {
await fetchData();
await fetchData(true);
};
/**
@ -573,6 +574,7 @@ const clickEdit = async () => {
*/
const clickSave = async () => {
await save(false);
await fetchData(true);
};
/**
@ -580,6 +582,7 @@ const clickSave = async () => {
*/
const clickDelete = async () => {
await clearPublishedData();
await fetchData(true);
};
/**
@ -587,7 +590,7 @@ const clickDelete = async () => {
*/
const clickCancel = async () => {
edit.value = false;
await fetchData();
await fetchData(true);
};
/**