แก้ Fetchdata ข้อมูลหลัก
This commit is contained in:
parent
11e41bc974
commit
5276ba4db3
25 changed files with 178 additions and 108 deletions
|
|
@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue