From a5a64b30dcbabdd96a4ce1bdc75ad5b92b798adf Mon Sep 17 00:00:00 2001 From: puriphatt Date: Tue, 14 Jan 2025 09:38:49 +0700 Subject: [PATCH] feat: creditNote => add validation rules --- src/pages/11_credit-note/FormPage.vue | 28 +++++++++++++------ .../expansion/CreditNoteExpansion.vue | 2 ++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/pages/11_credit-note/FormPage.vue b/src/pages/11_credit-note/FormPage.vue index c69400f8..a66e6f3d 100644 --- a/src/pages/11_credit-note/FormPage.vue +++ b/src/pages/11_credit-note/FormPage.vue @@ -30,6 +30,7 @@ import { storeToRefs } from 'pinia'; import useOptionStore from 'src/stores/options'; import { dialogWarningClose } from 'src/stores/utils'; import { useI18n } from 'vue-i18n'; +import { QForm } from 'quasar'; const route = useRoute(); const router = useRouter(); @@ -39,6 +40,7 @@ const configStore = useConfigStore(); const { data: config } = storeToRefs(configStore); const { t } = useI18n(); +const refForm = ref>(); const creditNoteData = ref(); const quotationData = ref(); const view = ref(null); @@ -556,6 +558,7 @@ onMounted(async () => { @click="i.handler()" /> + { @goto-quotation="goToQuotation" /> - + + + + { " /> - { > {{ $t('general.view', { msg: $t('general.example') }) }} + ('detail'); { label: $t('creditNote.label.reasonReturn'), value: 'Return' }, { label: $t('creditNote.label.reasonCanceled'), value: 'Canceled' }, ]" + :rules="[(val: string) => !!val || $t('form.error.required')]" > ('detail'); dense class="col" v-model="detail" + :rules="[(val: string) => !!val || $t('form.error.required')]" >