diff --git a/package.json b/package.json index 0a66ddb4f..0590a1526 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "24.32.0", + "version": "24.34.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", diff --git a/src/boot/axios.js b/src/boot/axios.js index fa8a08003..9b32275bd 100644 --- a/src/boot/axios.js +++ b/src/boot/axios.js @@ -43,6 +43,15 @@ const onResponseError = (error) => { } switch (response?.status) { + case 422: + if (error.name == 'ValidationError') + message += + ' "' + + responseError.details.context + + '.' + + Object.keys(responseError.details.codes).join(',') + + '"'; + break; case 500: message = 'errors.statusInternalServerError'; break; diff --git a/src/boot/qformMixin.js b/src/boot/qformMixin.js index 0bf1f9795..fc7852369 100644 --- a/src/boot/qformMixin.js +++ b/src/boot/qformMixin.js @@ -1,28 +1,11 @@ import { getCurrentInstance } from 'vue'; -const filterAvailableInput = (element) => { - return element.classList.contains('q-field__native') && !element.disabled; -}; -const filterAvailableText = (element) => { - return ( - element.__vueParentComponent.type.name === 'QInput' && - element.__vueParentComponent?.attrs?.class !== 'vn-input-date' - ); -}; - export default { mounted: function () { const vm = getCurrentInstance(); if (vm.type.name === 'QForm') { if (!['searchbarForm', 'filterPanelForm'].includes(this.$el?.id)) { - // AUTOFOCUS - const elementsArray = Array.from(this.$el.elements); - const availableInputs = elementsArray.filter(filterAvailableInput); - const firstInputElement = availableInputs.find(filterAvailableText); - - if (firstInputElement) { - firstInputElement.focus(); - } + // TODO: AUTOFOCUS IS NOT FOCUSING const that = this; this.$el.addEventListener('keyup', function (evt) { if (evt.key === 'Enter') { diff --git a/src/components/CreateBankEntityForm.vue b/src/components/CreateBankEntityForm.vue index b2c5226e6..c46ac7752 100644 --- a/src/components/CreateBankEntityForm.vue +++ b/src/components/CreateBankEntityForm.vue @@ -52,7 +52,7 @@ onMounted(async () => { @on-data-saved="onDataSaved" >