From a9a09ad0a3aa9f81639a98c88680308fc1ec542c Mon Sep 17 00:00:00 2001 From: jtubau Date: Fri, 27 Dec 2024 13:58:35 +0100 Subject: [PATCH 01/18] refactor: refs #8316 used VnSection and VnCardBeta --- src/pages/Entry/Card/EntryCard.vue | 14 +- src/pages/Entry/EntryList.vue | 122 ++++++++--------- src/pages/Entry/locale/en.yml | 3 + src/pages/Entry/locale/es.yml | 6 +- src/router/modules/entry.js | 201 ++++++++++++++++------------- 5 files changed, 179 insertions(+), 167 deletions(-) diff --git a/src/pages/Entry/Card/EntryCard.vue b/src/pages/Entry/Card/EntryCard.vue index 3f2596338..6d743926e 100644 --- a/src/pages/Entry/Card/EntryCard.vue +++ b/src/pages/Entry/Card/EntryCard.vue @@ -1,21 +1,11 @@ diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue index 84ead85ad..6e7e9fc82 100644 --- a/src/pages/Entry/EntryList.vue +++ b/src/pages/Entry/EntryList.vue @@ -2,19 +2,19 @@ import { onMounted, ref, computed } from 'vue'; import { useI18n } from 'vue-i18n'; import EntryFilter from './EntryFilter.vue'; -import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; import { useStateStore } from 'stores/useStateStore'; import VnTable from 'components/VnTable/VnTable.vue'; -import RightMenu from 'src/components/common/RightMenu.vue'; import { toDate } from 'src/filters'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import EntrySummary from './Card/EntrySummary.vue'; import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue'; import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue'; +import VnSection from 'src/components/common/VnSection.vue'; const stateStore = useStateStore(); const { t } = useI18n(); const tableRef = ref(); +const dataKey = 'EntryList'; const { viewSummary } = useSummaryDialog(); const entryFilter = { @@ -180,67 +180,71 @@ const columns = computed(() => [ }, ]); + + 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; + } }, }; } From f834f3b7549e9c3ea726fa78a72b897d9b7aa50d Mon Sep 17 00:00:00 2001 From: provira Date: Fri, 10 Jan 2025 07:52:22 +0100 Subject: [PATCH 05/18] feat: refs #8258 added button to pass to uppercase --- src/components/common/VnInput.vue | 28 ++++++++++++++++--- .../Customer/Card/CustomerFiscalData.vue | 1 + src/pages/Customer/CustomerList.vue | 5 ++++ .../Supplier/Card/SupplierFiscalData.vue | 1 + src/pages/Supplier/SupplierList.vue | 7 +++-- 5 files changed, 35 insertions(+), 7 deletions(-) diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index c45f7d073..e921d8e1f 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -49,15 +49,11 @@ const $props = defineProps({ }); const vnInputRef = ref(null); -const showPassword = ref(false); const value = computed({ get() { return $props.modelValue; }, set(value) { - if ($props.uppercase && typeof value === 'string') { - value = value.toUpperCase(); - } if ($props.emptyToNull && value === '') value = null; emit('update:modelValue', value); }, @@ -124,6 +120,10 @@ const handleInsertMode = (e) => { input.setSelectionRange(cursorPos + 1, cursorPos + 1); }); }; + +const handleUppercase = () => { + value.value = value.value?.toUpperCase() || ''; +}; + + + en: + inputMin: Must be more than {value} + maxLength: The value exceeds {value} characters + inputMax: Must be less than {value} + es: + inputMin: Debe ser mayor a {value} + maxLength: El valor excede los {value} carácteres + inputMax: Debe ser menor a {value} + \ No newline at end of file diff --git a/src/pages/Customer/Card/CustomerFiscalData.vue b/src/pages/Customer/Card/CustomerFiscalData.vue index aff7deda4..8f2c4efb0 100644 --- a/src/pages/Customer/Card/CustomerFiscalData.vue +++ b/src/pages/Customer/Card/CustomerFiscalData.vue @@ -44,6 +44,7 @@ function handleLocation(data, location) { :required="true" :rules="validate('client.socialName')" clearable + uppercase="true" v-model="data.socialName" > diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue index 572a5908b..edd3ae942 100644 --- a/src/pages/Entry/EntryList.vue +++ b/src/pages/Entry/EntryList.vue @@ -188,7 +188,6 @@ const columns = computed(() => [ :array-data-props="{ url: 'Entries/filter', order: 'id DESC', - exprBuilder, }" >