refactor: img dialog => remove img function

This commit is contained in:
puriphatt 2024-09-12 16:41:09 +07:00
parent 42bb43f618
commit 7ab9f69ef8
6 changed files with 82 additions and 78 deletions

View file

@ -2739,7 +2739,7 @@ const emptyCreateDialog = ref(false);
);
await fetchImageList(
customerFormState.editCustomerId,
name,
customerFormData.selectedImage || '',
'customer',
);
}
@ -2844,7 +2844,11 @@ const emptyCreateDialog = ref(false);
if (!currentFromDataEmployee.id) return;
const name = v.split('/').pop() || '';
await employeeStore.deleteImageByName(currentFromDataEmployee.id, name);
await fetchImageList(currentFromDataEmployee.id, name, 'employee');
await fetchImageList(
currentFromDataEmployee.id,
currentFromDataEmployee.selectedImage || '',
'employee',
);
}
"
@submit="