refactor: add q-form submit

This commit is contained in:
Thanaphon Frappet 2024-12-20 17:42:50 +07:00
parent 4cdc462ded
commit ba6950769a

View file

@ -122,6 +122,7 @@ const { t, locale } = useI18n();
const ocrStore = useOcrStore();
const $q = useQuasar();
const openQuotation = ref<boolean>(false);
const formMetadata = ref();
const rowsRequestList = ref<RequestData[]>([]);
@ -1433,6 +1434,14 @@ watch(
</template>
<div class="surface-1 q-pa-md full-width">
<q-form
ref="formMetadata"
@submit="
() => {
convertDataToFormSubmit();
}
"
>
<QuotationFormMetadata
class="q-mb-md"
:readonly
@ -1460,6 +1469,7 @@ watch(
/>
</template>
</QuotationFormMetadata>
</q-form>
</div>
</q-expansion-item>
@ -2240,16 +2250,13 @@ watch(
v-if="quotationFormState.mode === 'info' && closeAble()"
/>
<SaveButton
type="submit"
v-if="
quotationFormState.mode === 'create' ||
quotationFormState.mode === 'edit'
"
@click="
() => {
convertDataToFormSubmit();
}
"
solid
@click="() => formMetadata.submit()"
/>
<EditButton
v-else