แก้ 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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -477,7 +477,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -546,8 +546,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -569,7 +570,7 @@ const checkDupDataName = (val: string) => {
|
|||
* ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่
|
||||
*/
|
||||
const clickEdit = async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -577,6 +578,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -584,6 +586,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -591,7 +594,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -546,8 +546,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -569,7 +570,7 @@ const checkDupDataName = (val: string) => {
|
|||
* ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่
|
||||
*/
|
||||
const clickEdit = async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -591,7 +592,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -492,7 +492,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -511,7 +511,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -581,8 +581,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -604,7 +605,7 @@ const checkDupDataName = (val: string) => {
|
|||
* ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่
|
||||
*/
|
||||
const clickEdit = async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -612,6 +613,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -626,7 +628,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -589,7 +589,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -608,7 +608,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -683,8 +683,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -725,7 +726,7 @@ const checkDupDataName = (row: any) => {
|
|||
* ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่
|
||||
*/
|
||||
const clickEdit = async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -733,6 +734,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -740,6 +742,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -747,7 +750,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -477,7 +477,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -548,6 +548,7 @@ const save = async (publish: boolean) => {
|
|||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -569,7 +570,7 @@ const checkDupDataName = (val: string) => {
|
|||
* ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่
|
||||
*/
|
||||
const clickEdit = async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -577,6 +578,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -584,6 +586,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -591,7 +594,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -477,7 +477,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -546,8 +546,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -569,7 +570,7 @@ const checkDupDataName = (val: string) => {
|
|||
* ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่
|
||||
*/
|
||||
const clickEdit = async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -577,6 +578,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -584,6 +586,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -591,7 +594,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -477,7 +477,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -546,8 +546,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -569,7 +570,7 @@ const checkDupDataName = (val: string) => {
|
|||
* ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่
|
||||
*/
|
||||
const clickEdit = async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -577,6 +578,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -584,6 +586,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -591,7 +594,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -477,7 +477,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -546,8 +546,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -569,7 +570,7 @@ const checkDupDataName = (val: string) => {
|
|||
* ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่
|
||||
*/
|
||||
const clickEdit = async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -577,6 +578,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -584,6 +586,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -591,7 +594,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -457,7 +457,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -476,7 +476,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -545,8 +545,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -568,7 +569,7 @@ const checkDupDataName = (val: string) => {
|
|||
* ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่
|
||||
*/
|
||||
const clickEdit = async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -576,6 +577,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -583,6 +585,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -590,7 +593,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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -565,7 +565,7 @@ const checkDupDataName = (val: string) => {
|
|||
* ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่
|
||||
*/
|
||||
const clickEdit = async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -573,6 +573,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -580,6 +581,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -587,7 +589,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -436,6 +436,7 @@ const fetchHistory = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -455,7 +456,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -474,7 +475,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -543,8 +544,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -574,6 +576,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -581,6 +584,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -588,7 +592,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -474,6 +474,7 @@ const fetchHistory = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -512,7 +513,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -582,8 +583,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -605,7 +607,7 @@ const checkDupDataName = (val: string) => {
|
|||
* ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่
|
||||
*/
|
||||
const clickEdit = async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -620,6 +622,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -627,7 +630,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -497,7 +497,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -516,7 +516,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -586,8 +586,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -609,7 +610,7 @@ const checkDupDataName = (val: string) => {
|
|||
* ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่
|
||||
*/
|
||||
const clickEdit = async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -624,6 +625,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -631,7 +633,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -459,7 +459,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -547,8 +547,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -578,6 +579,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -585,6 +587,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -592,7 +595,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -455,7 +455,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -474,7 +474,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -545,6 +545,7 @@ const save = async (publish: boolean) => {
|
|||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -574,6 +575,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -581,6 +583,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -588,7 +591,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -477,7 +477,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -546,8 +546,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -577,6 +578,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -584,6 +586,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -591,7 +594,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -477,7 +477,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -546,8 +546,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -577,6 +578,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -584,6 +586,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -591,7 +594,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -477,7 +477,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -546,8 +546,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -577,6 +578,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -584,6 +586,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -591,7 +594,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -515,7 +515,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -587,6 +587,7 @@ const save = async (publish: boolean) => {
|
|||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -608,7 +609,7 @@ const checkDupDataName = (val: string) => {
|
|||
* ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่
|
||||
*/
|
||||
const clickEdit = async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -623,6 +624,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -630,7 +632,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -515,7 +515,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -588,8 +588,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -619,6 +620,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -626,6 +628,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -633,7 +636,7 @@ const clickDelete = async () => {
|
|||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false;
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchHistory();
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -477,7 +477,7 @@ const publishedData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -546,8 +546,9 @@ const save = async (publish: boolean) => {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await fetchData(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -569,7 +570,7 @@ const checkDupDataName = (val: string) => {
|
|||
* ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่
|
||||
*/
|
||||
const clickEdit = async () => {
|
||||
await fetchData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -577,6 +578,7 @@ const clickEdit = async () => {
|
|||
*/
|
||||
const clickSave = async () => {
|
||||
await save(false);
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -584,6 +586,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const clickDelete = async () => {
|
||||
await clearPublishedData();
|
||||
await fetchData(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -591,7 +594,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