refactor: image upload and bind button

This commit is contained in:
Methapon2001 2024-08-08 17:10:02 +07:00
parent e0d18401fb
commit 155523d354

View file

@ -1059,8 +1059,7 @@ watch(
() => {
const { branch, ...payload } = props.row;
currentCustomer = payload;
// assignFormData(props.row.id);
// openDialogInputForm('INFO', props.row.id);
editCustomerForm(props.row.id);
}
"
v-close-popup
@ -1087,7 +1086,13 @@ watch(
dense
class="row q-py-sm"
style="white-space: nowrap"
@click="() => {}"
@click="
async () => {
await editCustomerForm(props.row.id);
customerFormState.dialogType = 'edit';
customerFormState.readonly = false;
}
"
>
<q-icon
name="mdi-pencil-outline"
@ -2328,11 +2333,6 @@ watch(
v-model:dialog-state="customerFormState.imageDialog"
v-model:file="customerFormData.image"
v-model:image-url="customerFormState.customerImageUrl"
:hidden-footer="
!customerFormData.image ||
!customerFormState.customerImageUrl ||
customerFormState.dialogType === 'edit'
"
clear-button
@save="
async (v) => {