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