diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index 3cecf760a..44ce07248 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -42,6 +42,10 @@ const $props = defineProps({ type: Number, default: null, }, + uppercase: { + type: Boolean, + default: false, + }, }); const vnInputRef = ref(null); @@ -50,6 +54,9 @@ const value = computed({ return $props.modelValue; }, set(value) { + if ($props.uppercase && typeof value === 'string') { + value = value.toUpperCase(); + } if ($props.emptyToNull && value === '') value = null; emit('update:modelValue', value); }, @@ -169,6 +176,7 @@ const handleInsertMode = (e) => { + en: inputMin: Must be more than {value} @@ -179,8 +187,3 @@ const handleInsertMode = (e) => { maxLength: El valor excede los {value} carácteres inputMax: Debe ser menor a {value} - diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue index fdfd7ff9c..037940ffa 100644 --- a/src/pages/Customer/CustomerList.vue +++ b/src/pages/Customer/CustomerList.vue @@ -50,6 +50,9 @@ const columns = computed(() => [ isTitle: true, create: true, columnClass: 'expand', + attrs: { + uppercase: true, + }, }, { align: 'left', diff --git a/src/pages/Supplier/SupplierList.vue b/src/pages/Supplier/SupplierList.vue index c0748af87..f9238e361 100644 --- a/src/pages/Supplier/SupplierList.vue +++ b/src/pages/Supplier/SupplierList.vue @@ -24,8 +24,13 @@ const columns = computed(() => [ label: t('globals.name'), name: 'socialName', create: true, + attrs: { + uppercase: true, + }, columnFilter: { - name: 'search', + name: 'search',attrs: { + uppercase: false, + }, }, isTitle: true, }, diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue index 48393a8c7..0b784b993 100644 --- a/src/pages/Worker/WorkerList.vue +++ b/src/pages/Worker/WorkerList.vue @@ -138,7 +138,11 @@ function uppercaseStreetModel(data) { return { get: () => (data.street ? data.street.toUpperCase() : ''), set: (value) => { - data.street = value.toUpperCase(); + if (value) { + data.street = value.toUpperCase(); + } else { + data.street = null; + } }, }; }