fix: แก้ ลบข้อไม่หาย
This commit is contained in:
parent
4ab245834d
commit
853219c1a2
1 changed files with 13 additions and 2 deletions
|
|
@ -547,7 +547,12 @@ async function deleteServiceById(serviceId?: string) {
|
||||||
action: async () => {
|
action: async () => {
|
||||||
const res = await deleteService(serviceId ?? currentIdService.value);
|
const res = await deleteService(serviceId ?? currentIdService.value);
|
||||||
|
|
||||||
await fetchListOfService();
|
if (productAndServiceTab.value === 'service') {
|
||||||
|
await await fetchListOfService();
|
||||||
|
}
|
||||||
|
if (productAndServiceTab.value === 'all') {
|
||||||
|
await fetchListOfProductAndService();
|
||||||
|
}
|
||||||
|
|
||||||
dialogServiceEdit.value = false;
|
dialogServiceEdit.value = false;
|
||||||
|
|
||||||
|
|
@ -571,7 +576,13 @@ async function deleteTypeOfProduct(id?: string) {
|
||||||
message: t('deleteConfirmMessage'),
|
message: t('deleteConfirmMessage'),
|
||||||
action: async () => {
|
action: async () => {
|
||||||
const res = await deleteProduct(id ?? currentIdProduct.value);
|
const res = await deleteProduct(id ?? currentIdProduct.value);
|
||||||
await fetchListOfProduct(currentIdType.value);
|
|
||||||
|
if (productAndServiceTab.value === 'product') {
|
||||||
|
await fetchListOfProduct(currentIdType.value);
|
||||||
|
}
|
||||||
|
if (productAndServiceTab.value === 'all') {
|
||||||
|
await fetchListOfProductAndService();
|
||||||
|
}
|
||||||
|
|
||||||
dialogProductEdit.value = false;
|
dialogProductEdit.value = false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue