diff --git a/package.json b/package.json index 39d49519b..b5e62af11 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "24.52.0", + "version": "25.02.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", diff --git a/src/components/common/VnInputNumber.vue b/src/components/common/VnInputNumber.vue index 1cad6c245..165cfae3d 100644 --- a/src/components/common/VnInputNumber.vue +++ b/src/components/common/VnInputNumber.vue @@ -1,13 +1,28 @@ - diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index e5ac05231..758fb9228 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n'; import { useArrayData } from 'src/composables/useArrayData'; import { useRequired } from 'src/composables/useRequired'; import dataByOrder from 'src/utils/dataByOrder'; +import { QItemLabel } from 'quasar'; const emit = defineEmits(['update:modelValue', 'update:options', 'remove']); const $attrs = useAttrs(); @@ -33,6 +34,10 @@ const $props = defineProps({ type: String, default: 'id', }, + optionCaption: { + type: String, + default: null, + }, optionFilter: { type: String, default: null, @@ -101,6 +106,10 @@ const $props = defineProps({ type: String, default: null, }, + isOutlined: { + type: Boolean, + default: false, + }, }); const mixinRules = [requiredFieldRule, ...($attrs.rules ?? [])]; @@ -115,6 +124,15 @@ const noOneOpt = ref({ [optionValue.value]: false, [optionLabel.value]: noOneText, }); +const styleAttrs = computed(() => { + return $props.isOutlined + ? { + dense: true, + outlined: true, + rounded: true, + } + : {}; +}); const isLoading = ref(false); const useURL = computed(() => $props.url); const value = computed({ @@ -288,7 +306,7 @@ function handleKeyDown(event) { } const focusableElements = document.querySelectorAll( - 'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])' + 'a:not([disabled]), button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), details:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled])' ); const currentIndex = Array.prototype.indexOf.call( focusableElements, @@ -307,9 +325,8 @@ function handleKeyDown(event) { :options="myOptions" :option-label="optionLabel" :option-value="optionValue" - v-bind="$attrs" + v-bind="{ ...$attrs, ...styleAttrs }" @filter="filterHandler" - @keydown="handleKeyDown" :emit-value="nullishToTrue($attrs['emit-value'])" :map-options="nullishToTrue($attrs['map-options'])" :use-input="nullishToTrue($attrs['use-input'])" @@ -324,13 +341,15 @@ function handleKeyDown(event) { :input-debounce="useURL ? '300' : '0'" :loading="isLoading" @virtual-scroll="onScroll" + @keydown="handleKeyDown" :data-cy="$attrs.dataCy ?? $attrs.label + '_select'" + :data-url="url" > + diff --git a/src/components/ui/VnConfirm.vue b/src/components/ui/VnConfirm.vue index 0b1913383..a02b56bdb 100644 --- a/src/components/ui/VnConfirm.vue +++ b/src/components/ui/VnConfirm.vue @@ -98,6 +98,7 @@ function cancel() { /> { + const param = label.split('.').at(-1); + const globalLocale = `globals.params.${param}`; + if (te(globalLocale)) return t(globalLocale); + else if (te(t(`params.${param}`))); + else return t(`${route.meta.moduleName}.params.${param}`); +}; - es: Original invoice: Factura origen diff --git a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue index 92f3fffca..cb8a45833 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue @@ -1,5 +1,5 @@