แก้ 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

@ -576,7 +576,7 @@ const clearPublishedData = async () => {
})
.finally(async () => {
await fetchHistory();
await fetchData();
await fetchData(true);
});
};
@ -595,7 +595,7 @@ const publishedData = async () => {
messageError($q, e);
})
.finally(async () => {
await fetchData();
await fetchData(true);
});
};
@ -668,8 +668,9 @@ const save = async (publish: boolean) => {
.catch((e) => {
messageError($q, e);
})
.finally(() => {
.finally(async () => {
hideLoader();
await fetchData(true);
});
};
@ -713,6 +714,7 @@ const clickEdit = async () => {
*/
const clickSave = async () => {
await save(false);
await fetchData(true);
};
/**
@ -720,6 +722,7 @@ const clickSave = async () => {
*/
const clickDelete = async () => {
await clearPublishedData();
await fetchData(true);
};
/**
@ -727,7 +730,7 @@ const clickDelete = async () => {
*/
const clickCancel = async () => {
edit.value = false;
await fetchData();
await fetchData(true);
};
/**