From dc5142c20a381aa8445783c5c8c0ec7dbbf4f039 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 8 Aug 2024 10:12:54 +0200 Subject: [PATCH 01/11] feat: refs #6900 use VnTable & sort filter fields --- src/components/VnTable/VnColumn.vue | 2 +- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 2 + src/pages/InvoiceIn/InvoiceInCreate.vue | 17 +- src/pages/InvoiceIn/InvoiceInFilter.vue | 108 ++++---- src/pages/InvoiceIn/InvoiceInList.vue | 236 +++++++++++------- src/pages/Route/RouteAutonomous.vue | 3 +- .../Supplier/Card/SupplierDescriptor.vue | 3 +- 8 files changed, 205 insertions(+), 167 deletions(-) diff --git a/src/components/VnTable/VnColumn.vue b/src/components/VnTable/VnColumn.vue index 55b2f5fee..ed34e9eee 100644 --- a/src/components/VnTable/VnColumn.vue +++ b/src/components/VnTable/VnColumn.vue @@ -151,7 +151,7 @@ const col = computed(() => { }; } if ( - (newColumn.name.startsWith('is') || newColumn.name.startsWith('has')) && + (/^is[A-Z]/.test(newColumn.name) || /^has[A-Z]/.test(newColumn.name)) && newColumn.component == null ) newColumn.component = 'checkbox'; diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index d2cd83560..12680d0cb 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -262,6 +262,7 @@ globals: unsavedPopup: title: Unsaved changes will be lost subtitle: Are you sure exit without saving? + createInvoiceIn: Create invoice in errors: statusUnauthorized: Access denied statusInternalServerError: An internal server error has ocurred diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index b926bd50b..747a10d51 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -264,6 +264,8 @@ globals: unsavedPopup: title: Los cambios que no haya guardado se perderán subtitle: ¿Seguro que quiere salir sin guardar? + createInvoiceIn: Crear factura recibida + errors: statusUnauthorized: Acceso denegado statusInternalServerError: Ha ocurrido un error interno del servidor diff --git a/src/pages/InvoiceIn/InvoiceInCreate.vue b/src/pages/InvoiceIn/InvoiceInCreate.vue index 4dec9ac7d..e6863beb1 100644 --- a/src/pages/InvoiceIn/InvoiceInCreate.vue +++ b/src/pages/InvoiceIn/InvoiceInCreate.vue @@ -26,8 +26,7 @@ const newInvoiceIn = reactive({ companyFk: user.value.companyFk || null, issued: Date.vnNew(), }); -const suppliersOptions = ref([]); -const companiesOptions = ref([]); +const companies = ref([]); const redirectToInvoiceInBasicData = (__, { id }) => { router.push({ name: 'InvoiceInBasicData', params: { id } }); @@ -35,19 +34,12 @@ const redirectToInvoiceInBasicData = (__, { id }) => {