diff --git a/package.json b/package.json index 742fbf276..fb77b3f0a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "24.24.1", + "version": "24.24.3", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 000de4336..fe15d2db1 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -1,6 +1,7 @@ @@ -411,7 +330,7 @@ async function upsert() { - - @@ -522,7 +441,7 @@ async function upsert() { - @@ -545,7 +464,7 @@ async function upsert() { :options="warehouses" option-value="id" option-label="name" - :rules="[requiredFieldRule]" + :required="true" /> - import { ref, computed } from 'vue'; -import { useRoute, useRouter } from 'vue-router'; +import { useRouter } from 'vue-router'; import { useI18n } from 'vue-i18n'; import { useArrayData } from 'src/composables/useArrayData'; import { useCapitalize } from 'src/composables/useCapitalize'; @@ -8,12 +8,11 @@ import CrudModel from 'src/components/CrudModel.vue'; import FetchData from 'src/components/FetchData.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; -const router = useRouter(); -const route = useRoute(); +const { push, currentRoute } = useRouter(); const { t } = useI18n(); -const invoiceId = route.params.id; -const arrayData = useArrayData('InvoiceIn'); +const invoiceId = +currentRoute.value.params.id; +const arrayData = useArrayData(currentRoute.value.meta.moduleName); const invoiceIn = computed(() => arrayData.store.data); const invoiceInCorrectionRef = ref(); const filter = { @@ -74,7 +73,7 @@ const rowsSelected = ref([]); const requiredFieldRule = (val) => val || t('globals.requiredField'); -const onSave = (data) => data.deletes && router.push(`/invoice-in/${invoiceId}/summary`); +const onSave = (data) => data.deletes && push(`/invoice-in/${invoiceId}/summary`);