0
0
Fork 0

fix: src/pages/InvoiceIn/Card/InvoiceInBasicData.vue

This commit is contained in:
Javier Segarra 2024-05-31 13:56:46 +02:00
parent 25d5887a57
commit 59f9cf4111
1 changed files with 221 additions and 209 deletions

View File

@ -81,7 +81,7 @@ async function setCreateDms() {
createDmsRef.value.show();
}
async function upsert() {
async function onSubmit() {
try {
const isEdit = !!dms.value.id;
const errors = {
@ -317,16 +317,16 @@ async function upsert() {
</VnRow>
</template>
</FormModel>
<QDialog ref="editDmsRef" @keyup.enter="upsert">
<QCard>
<QCardSection class="q-pb-none">
<QItem class="q-px-none">
<span class="text-primary text-h6 full-width">
<QDialog ref="editDmsRef">
<QForm @submit="onSubmit()" class="all-pointer-events">
<QCard class="q-pa-sm">
<QCardSection class="row items-center q-pb-none">
<span class="text-primary text-h6">
<QIcon name="edit" class="q-mr-xs" />
{{ t('Edit document') }}
</span>
<QSpace />
<QBtn icon="close" flat round dense v-close-popup />
</QItem>
</QCardSection>
<QCardSection class="q-py-none">
<QItem>
@ -423,21 +423,27 @@ async function upsert() {
</QItem>
</QCardSection>
<QCardActions class="justify-end">
<QBtn flat :label="t('globals.close')" color="primary" v-close-popup />
<QBtn :label="t('globals.save')" color="primary" @click="upsert" />
<QBtn
flat
:label="t('globals.close')"
color="primary"
v-close-popup
/>
<QBtn :label="t('globals.save')" color="primary" @click="onSubmit" />
</QCardActions>
</QCard>
</QForm>
</QDialog>
<QDialog ref="createDmsRef">
<QCard>
<QCardSection class="q-pb-none">
<QItem>
<span class="text-primary text-h6 full-width">
<QForm @submit="onSubmit()" class="all-pointer-events">
<QCard class="q-pa-sm">
<QCardSection class="row items-center q-pb-none">
<span class="text-primary text-h6">
<QIcon name="edit" class="q-mr-xs" />
{{ t('Create document') }}
</span>
<QBtn icon="close" flat round dense v-close-popup align="right" />
</QItem>
<QSpace />
<QBtn icon="close" flat round dense v-close-popup />
</QCardSection>
<QCardSection class="q-pb-none">
<QItem>
@ -532,10 +538,16 @@ async function upsert() {
</QItem>
</QCardSection>
<QCardActions align="right">
<QBtn flat :label="t('globals.close')" color="primary" v-close-popup />
<QBtn :label="t('globals.save')" color="primary" @click="upsert" />
<QBtn
flat
:label="t('globals.close')"
color="primary"
v-close-popup
/>
<QBtn :label="t('globals.save')" color="primary" @click="onSubmit" />
</QCardActions>
</QCard>
</QForm>
</QDialog>
</template>
<style lang="scss" scoped>