fix: แก้ ลบข้อไม่หาย

This commit is contained in:
Net 2024-06-28 15:51:13 +07:00
parent 4ab245834d
commit 853219c1a2

View file

@ -547,7 +547,12 @@ async function deleteServiceById(serviceId?: string) {
action: async () => {
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;
@ -571,7 +576,13 @@ async function deleteTypeOfProduct(id?: string) {
message: t('deleteConfirmMessage'),
action: async () => {
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;