From c621ccb5a6e35552a25bc203575554c852d9f8d2 Mon Sep 17 00:00:00 2001 From: jcasado Date: Tue, 23 Apr 2024 13:19:21 +0200 Subject: [PATCH 01/38] refs #7113 fix test --- test/cypress/support/commands.js | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index f075d500f..13103950c 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -38,6 +38,15 @@ Cypress.Commands.add('login', (user) => { }, }).then((response) => { window.localStorage.setItem('token', response.body.token); + cy.request({ + method: 'GET', + url: '/api/VnUsers/ShareToken', + headers: { + Authorization: window.localStorage.getItem('token'), + }, + }).then(({ body }) => { + window.localStorage.setItem('tokenMultimedia', body.multimediaToken.id); + }); }); }); @@ -52,16 +61,18 @@ Cypress.Commands.add('getValue', (selector) => { } // Si es un QSelect if ($el.find('.q-select__dropdown-icon').length) { - return cy.get( - selector + - '> .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > input' - ).invoke('val') + return cy + .get( + selector + + '> .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > input' + ) + .invoke('val'); } // Si es un QSelect if ($el.find('span').length) { - return cy.get( - selector + ' span' - ).then(($span) => { return $span[0].innerText }) + return cy.get(selector + ' span').then(($span) => { + return $span[0].innerText; + }); } // Puedes añadir un log o lanzar un error si el elemento no es reconocido cy.log('Elemento no soportado'); @@ -132,13 +143,13 @@ Cypress.Commands.add('validateRow', (rowSelector, expectedValues) => { cy.get(rowSelector).within(() => { for (const [index, value] of expectedValues.entries()) { cy.log('CHECKING ', index, value); - if(value === undefined) continue + if (value === undefined) continue; if (typeof value == 'boolean') { const prefix = value ? '' : 'not.'; cy.getValue(`:nth-child(${index + 1})`).should(`${prefix}be.checked`); continue; } - cy.getValue(`:nth-child(${index + 1})`).should('equal', value) + cy.getValue(`:nth-child(${index + 1})`).should('equal', value); } }); }); From 934db329733c81741074a22cdb39ea37446350d6 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 24 Apr 2024 10:31:33 -0300 Subject: [PATCH 02/38] WIP --- src/components/CrudModel.vue | 1 + src/css/app.scss | 5 + src/pages/Item/Card/ItemTags.vue | 176 ++++++++++++++++++++++++++++++- src/router/modules/item.js | 4 +- 4 files changed, 183 insertions(+), 3 deletions(-) diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index fb3ac10c3..deec0e4fe 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -81,6 +81,7 @@ defineExpose({ hasChanges, saveChanges, getChanges, + formData, }); async function fetch(data) { diff --git a/src/css/app.scss b/src/css/app.scss index 25b484649..9037802ad 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -119,6 +119,11 @@ select:-webkit-autofill { font-variation-settings: 'FILL' 1; } +.fill-icon-on-hover:hover { + font-variation-settings: 'FILL' 1; + cursor: pointer; +} + .vn-table-separation-row { height: 16px !important; background-color: var(--vn-section-color) !important; diff --git a/src/pages/Item/Card/ItemTags.vue b/src/pages/Item/Card/ItemTags.vue index 95f4380e4..bf18c682c 100644 --- a/src/pages/Item/Card/ItemTags.vue +++ b/src/pages/Item/Card/ItemTags.vue @@ -1 +1,175 @@ - + + + + + +es: + Remove tag: Quitar etiqueta + Add tag: Añadir etiqueta + Tag: Etiqueta + Value: Valor + Relevancy: Relevancia + diff --git a/src/router/modules/item.js b/src/router/modules/item.js index 70d49c56c..1b582d8e4 100644 --- a/src/router/modules/item.js +++ b/src/router/modules/item.js @@ -12,7 +12,7 @@ export default { redirect: { name: 'ItemMain' }, menus: { main: ['ItemList', 'WasteBreakdown', 'ItemTypeList'], - card: ['ItemBasicData'], + card: ['ItemBasicData', 'ItemTags'], }, children: [ { @@ -98,7 +98,7 @@ export default { path: 'tags', name: 'ItemTags', meta: { - title: 'Tags', + title: 'tags', icon: 'vn:tags', }, component: () => import('src/pages/Item/Card/ItemTags.vue'), From 42591d078119e6a1051669a104c977f7c6b4abc2 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 25 Apr 2024 14:27:56 +0200 Subject: [PATCH 03/38] feat #7271 router --- src/router/modules/index.js | 2 + src/router/modules/zone.js | 139 +++++++++++++++++++++++++++++++ src/router/routes.js | 2 + src/stores/useNavigationStore.js | 1 + 4 files changed, 144 insertions(+) create mode 100644 src/router/modules/zone.js diff --git a/src/router/modules/index.js b/src/router/modules/index.js index 302ba7fe0..2fe40038f 100644 --- a/src/router/modules/index.js +++ b/src/router/modules/index.js @@ -15,6 +15,7 @@ import Department from './department'; import Entry from './entry'; import roadmap from './roadmap'; import Parking from './parking'; +import Zone from './zone'; export default [ Item, @@ -34,4 +35,5 @@ export default [ Entry, roadmap, Parking, + Zone, ]; diff --git a/src/router/modules/zone.js b/src/router/modules/zone.js new file mode 100644 index 000000000..be11ced11 --- /dev/null +++ b/src/router/modules/zone.js @@ -0,0 +1,139 @@ +import { RouterView } from 'vue-router'; + +export default { + path: '/zone', + name: 'Zone', + meta: { + title: 'zones', + icon: 'vn:zone', + moduleName: 'Zone', + }, + component: RouterView, + redirect: { name: 'ZoneMain' }, + menus: { + main: ['ZoneList', 'ZoneDeliveryList', 'ZoneUpcomingList'], + card: [], + }, + children: [ + { + path: '/zone', + name: 'ZoneMain', + component: () => import('src/pages/Zone/ZoneMain.vue'), + redirect: { name: 'ZoneList' }, + children: [ + { + path: 'list', + name: 'ZoneList', + meta: { + title: 'zonesList', + icon: 'vn:zone', + }, + component: () => import('src/pages/Zone/ZoneList.vue'), + }, + { + path: 'create', + name: 'ZoneCreate', + meta: { + title: 'zoneCreate', + icon: 'create', + }, + component: () => import('src/pages/Zone/ZoneCreate.vue'), + }, + { + path: ':id/edit', + name: 'ZoneEdit', + meta: { + title: 'zoneEdit', + icon: 'edit', + }, + component: () => import('src/pages/Zone/ZoneCreate.vue'), + }, + { + path: 'counter', + name: 'ZoneCounter', + meta: { + title: 'zoneCounter', + icon: 'add_circle', + }, + component: () => import('src/pages/Zone/ZoneCounter.vue'), + }, + ], + }, + { + path: '/zone/delivery', + name: 'ZoneDeliveryMain', + component: () => import('src/pages/Zone/ZoneMain.vue'), + redirect: { name: 'ZoneDeliveryList' }, + children: [ + { + path: 'list', + name: 'ZoneDeliveryList', + meta: { + title: 'deliveryList', + icon: 'today', + }, + component: () => + import('src/pages/Zone/Delivery/ZoneDeliveryList.vue'), + }, + { + path: 'create', + name: 'ZoneDeliveryCreate', + meta: { + title: 'deliveryCreate', + icon: 'create', + }, + component: () => + import('src/pages/Zone/Delivery/ZoneDeliveryCreate.vue'), + }, + { + path: ':id/edit', + name: 'ZoneDeliveryEdit', + meta: { + title: 'deliveryEdit', + icon: 'edit', + }, + component: () => + import('src/pages/Zone/Delivery/ZoneDeliveryCreate.vue'), + }, + ], + }, + { + path: '/zone/upcoming', + name: 'ZoneUpcomingMain', + component: () => import('src/pages/Zone/ZoneMain.vue'), + redirect: { name: 'ZoneUpcomingList' }, + children: [ + { + path: 'list', + name: 'ZoneUpcomingList', + meta: { + title: 'upcomingList', + icon: 'today', + }, + component: () => + import('src/pages/Zone/Upcoming/ZoneUpcomingList.vue'), + }, + { + path: 'create', + name: 'ZoneUpcomingCreate', + meta: { + title: 'upcomingCreate', + icon: 'create', + }, + component: () => + import('src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue'), + }, + { + path: ':id/edit', + name: 'ZoneUpcomingEdit', + meta: { + title: 'upcomingEdit', + icon: 'edit', + }, + component: () => + import('src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue'), + }, + ], + }, + ], +}; diff --git a/src/router/routes.js b/src/router/routes.js index 51e726a62..14bf6665f 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -15,6 +15,7 @@ import order from 'src/router/modules/order'; import entry from 'src/router/modules/entry'; import roadmap from 'src/router/modules/roadmap'; import parking from 'src/router/modules/parking'; +import zone from 'src/router/modules/zone'; const routes = [ { @@ -71,6 +72,7 @@ const routes = [ roadmap, entry, parking, + zone, { path: '/:catchAll(.*)*', name: 'NotFound', diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js index f075301f6..ee1e04e9b 100644 --- a/src/stores/useNavigationStore.js +++ b/src/stores/useNavigationStore.js @@ -21,6 +21,7 @@ export const useNavigationStore = defineStore('navigationStore', () => { 'ticket', 'worker', 'wagon', + 'zone', ]; const pinnedModules = ref([]); const role = useRole(); From b4e3157887e6ace9072ba5f686b9d26046bf2360 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 25 Apr 2024 14:28:06 +0200 Subject: [PATCH 04/38] feat #7271 i18n --- src/i18n/locale/en.yml | 6 ++++++ src/i18n/locale/es.yml | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index ff57bf968..aa65ce08c 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -1165,6 +1165,12 @@ item: type: Type intrastat: Intrastat origin: Origin +zone: + pageTitles: + zones: Zone + zonesList: Zones + deliveryList: Delivery days + upcomingList: Upcoming deliveries components: topbar: {} itemsFilterPanel: diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index f9278a9b0..da421432d 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -287,7 +287,7 @@ customer: hasSepaVnl: Recibido B2B VNL entry: pageTitles: - entries: Entradas + entries: Entrasdadas list: Listado summary: Resumen basicData: Datos básicos @@ -1164,6 +1164,12 @@ item: type: Tipo intrastat: Intrastat origin: Origen +zone: + pageTitles: + zones: Zona + zonesList: Zonas + deliveryList: Días de entrega + upcomingList: Próximos repartos components: topbar: {} itemsFilterPanel: From b1871c33fd0ad1eb86f7ca6985af6ec41a770709 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 25 Apr 2024 14:30:16 +0200 Subject: [PATCH 05/38] feat #7271 Zone Components boilerplate --- src/pages/Zone/Card/ZoneCard.vue | 6 + .../Zone/Delivery/ZoneDeliveryCreate.vue | 432 ++++++++++++++++++ src/pages/Zone/Delivery/ZoneDeliveryList.vue | 81 ++++ .../Zone/Upcoming/ZoneUpcomingCreate.vue | 432 ++++++++++++++++++ src/pages/Zone/Upcoming/ZoneUpcomingList.vue | 81 ++++ src/pages/Zone/ZoneCreate.vue | 184 ++++++++ src/pages/Zone/ZoneList.vue | 97 ++++ src/pages/Zone/ZoneMain.vue | 17 + 8 files changed, 1330 insertions(+) create mode 100644 src/pages/Zone/Card/ZoneCard.vue create mode 100644 src/pages/Zone/Delivery/ZoneDeliveryCreate.vue create mode 100644 src/pages/Zone/Delivery/ZoneDeliveryList.vue create mode 100644 src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue create mode 100644 src/pages/Zone/Upcoming/ZoneUpcomingList.vue create mode 100644 src/pages/Zone/ZoneCreate.vue create mode 100644 src/pages/Zone/ZoneList.vue create mode 100644 src/pages/Zone/ZoneMain.vue diff --git a/src/pages/Zone/Card/ZoneCard.vue b/src/pages/Zone/Card/ZoneCard.vue new file mode 100644 index 000000000..948636c55 --- /dev/null +++ b/src/pages/Zone/Card/ZoneCard.vue @@ -0,0 +1,6 @@ + + diff --git a/src/pages/Zone/Delivery/ZoneDeliveryCreate.vue b/src/pages/Zone/Delivery/ZoneDeliveryCreate.vue new file mode 100644 index 000000000..a48eaf278 --- /dev/null +++ b/src/pages/Zone/Delivery/ZoneDeliveryCreate.vue @@ -0,0 +1,432 @@ + + + + + diff --git a/src/pages/Zone/Delivery/ZoneDeliveryList.vue b/src/pages/Zone/Delivery/ZoneDeliveryList.vue new file mode 100644 index 000000000..c7a3cbcdb --- /dev/null +++ b/src/pages/Zone/Delivery/ZoneDeliveryList.vue @@ -0,0 +1,81 @@ + + + diff --git a/src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue b/src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue new file mode 100644 index 000000000..6bc04c428 --- /dev/null +++ b/src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue @@ -0,0 +1,432 @@ + + + + + diff --git a/src/pages/Zone/Upcoming/ZoneUpcomingList.vue b/src/pages/Zone/Upcoming/ZoneUpcomingList.vue new file mode 100644 index 000000000..5c417df8f --- /dev/null +++ b/src/pages/Zone/Upcoming/ZoneUpcomingList.vue @@ -0,0 +1,81 @@ + + + diff --git a/src/pages/Zone/ZoneCreate.vue b/src/pages/Zone/ZoneCreate.vue new file mode 100644 index 000000000..8c0ba8c17 --- /dev/null +++ b/src/pages/Zone/ZoneCreate.vue @@ -0,0 +1,184 @@ + + + + + diff --git a/src/pages/Zone/ZoneList.vue b/src/pages/Zone/ZoneList.vue new file mode 100644 index 000000000..00502e1f7 --- /dev/null +++ b/src/pages/Zone/ZoneList.vue @@ -0,0 +1,97 @@ + + + diff --git a/src/pages/Zone/ZoneMain.vue b/src/pages/Zone/ZoneMain.vue new file mode 100644 index 000000000..66ce78f23 --- /dev/null +++ b/src/pages/Zone/ZoneMain.vue @@ -0,0 +1,17 @@ + + + From f14d6310514c949c81de6ac07083dd686e37e87b Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 25 Apr 2024 14:32:42 +0200 Subject: [PATCH 06/38] feat #7271 ZoneDescriptor --- src/pages/Zone/Card/ZoneDescriptor.vue | 127 ++++++++++++++++++ .../Zone/Card/ZoneDescriptorMenuItems.vue | 108 +++++++++++++++ src/pages/Zone/Card/ZoneDescriptorProxy.vue | 16 +++ 3 files changed, 251 insertions(+) create mode 100644 src/pages/Zone/Card/ZoneDescriptor.vue create mode 100644 src/pages/Zone/Card/ZoneDescriptorMenuItems.vue create mode 100644 src/pages/Zone/Card/ZoneDescriptorProxy.vue diff --git a/src/pages/Zone/Card/ZoneDescriptor.vue b/src/pages/Zone/Card/ZoneDescriptor.vue new file mode 100644 index 000000000..665cb6f0e --- /dev/null +++ b/src/pages/Zone/Card/ZoneDescriptor.vue @@ -0,0 +1,127 @@ + + + + + +es: + Go to module index: Ir al índice del módulo + The travel will be deleted: El envío será eliminado + Do you want to delete this travel?: ¿Quieres eliminar este envío? + All travels with current agency: Todos los envíos con la agencia actual + diff --git a/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue b/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue new file mode 100644 index 000000000..920d83dfe --- /dev/null +++ b/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue @@ -0,0 +1,108 @@ + + + + + +es: + The travel will be deleted: El envío será eliminado + Do you want to delete this travel?: ¿Quieres eliminar este envío? + diff --git a/src/pages/Zone/Card/ZoneDescriptorProxy.vue b/src/pages/Zone/Card/ZoneDescriptorProxy.vue new file mode 100644 index 000000000..15c5fb0e5 --- /dev/null +++ b/src/pages/Zone/Card/ZoneDescriptorProxy.vue @@ -0,0 +1,16 @@ + + + From 6ae38d26119baf867d039ee29682ed26f360072f Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 29 Apr 2024 09:49:06 +0200 Subject: [PATCH 07/38] refactor: refs #6887 pending claim changes --- src/i18n/locale/en.yml | 3 +- src/i18n/locale/es.yml | 3 +- src/pages/Claim/Card/ClaimDescriptor.vue | 14 +- src/pages/Claim/Card/ClaimSummary.vue | 45 ++++++- src/pages/Zone/Card/ZoneDescriptor.vue | 127 ++++++++++++++++++ .../Zone/Card/ZoneDescriptorMenuItems.vue | 108 +++++++++++++++ src/pages/Zone/Card/ZoneDescriptorProxy.vue | 16 +++ 7 files changed, 309 insertions(+), 7 deletions(-) create mode 100644 src/pages/Zone/Card/ZoneDescriptor.vue create mode 100644 src/pages/Zone/Card/ZoneDescriptorMenuItems.vue create mode 100644 src/pages/Zone/Card/ZoneDescriptorProxy.vue diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index ff57bf968..942018b84 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -513,7 +513,7 @@ claim: records: records card: claimId: Claim ID - assignedTo: Assigned + attendedBy: Attended by created: Created state: State ticketId: Ticket ID @@ -551,6 +551,7 @@ claim: responsible: Responsible worker: Worker redelivery: Redelivery + changeState: Change state basicData: customer: Customer assignedTo: Assigned diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index f9278a9b0..3de5af50c 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -511,7 +511,7 @@ claim: records: registros card: claimId: ID reclamación - assignedTo: Asignada a + attendedBy: Atendida por created: Creada state: Estado ticketId: ID ticket @@ -549,6 +549,7 @@ claim: responsible: Responsable worker: Trabajador redelivery: Devolución + changeState: Cambiar estado basicData: customer: Cliente assignedTo: Asignada a diff --git a/src/pages/Claim/Card/ClaimDescriptor.vue b/src/pages/Claim/Card/ClaimDescriptor.vue index 968f1e294..3b5dd82b8 100644 --- a/src/pages/Claim/Card/ClaimDescriptor.vue +++ b/src/pages/Claim/Card/ClaimDescriptor.vue @@ -11,6 +11,7 @@ import VnLv from 'src/components/ui/VnLv.vue'; import useCardDescription from 'src/composables/useCardDescription'; import VnUserLink from 'src/components/ui/VnUserLink.vue'; import { getUrl } from 'src/composables/getUrl'; +import ZoneDescriptorProxy from 'src/pages/Zone/Card/ZoneDescriptorProxy.vue'; const $props = defineProps({ id: { @@ -127,17 +128,24 @@ onMounted(async () => { - + + + import { onMounted, ref, computed } from 'vue'; -import { useRoute } from 'vue-router'; +import { useRoute, useRouter } from 'vue-router'; import { useI18n } from 'vue-i18n'; import { toDate, toCurrency } from 'src/filters'; import CardSummary from 'components/ui/CardSummary.vue'; @@ -13,8 +13,10 @@ import VnUserLink from 'src/components/ui/VnUserLink.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import VnTitle from 'src/components/common/VnTitle.vue'; import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue'; +import axios from 'axios'; const route = useRoute(); +const router = useRouter(); const { t } = useI18n(); const { getTokenMultimedia } = useSession(); const token = getTokenMultimedia(); @@ -27,7 +29,7 @@ const $props = defineProps({ }); const entityId = computed(() => $props.id || route.params.id); - +const ClaimStates = ref([]); const claimUrl = ref(); const salixUrl = ref(); const claimDmsRef = ref(); @@ -162,6 +164,10 @@ function openDialog(dmsId) { multimediaSlide.value = dmsId; multimediaDialog.value = true; } +async function changeState(value) { + await axios.patch(`Claims/updateClaim/${entityId.value}`, { claimStateFk: value }); + router.go(route.fullPath); +} + diff --git a/src/pages/Item/locale/en.yml b/src/pages/Item/locale/en.yml index 410ed5edc..35d65b2da 100644 --- a/src/pages/Item/locale/en.yml +++ b/src/pages/Item/locale/en.yml @@ -24,6 +24,13 @@ basicData: boxUnits: Units/Box recycledPlastic: Recycled plastic nonRecycledPlastic: Non recycled plastic + description: Description + isActive: Active + hasKgPrice: Price in kg + isFragile: Fragile + isFragileTooltip: Is shown at website, app that this item cannot travel (wreath, palms, ...) + isPhotoRequested: Do photo + isPhotoRequestedTooltip: This item does need a photo createIntrastatForm: title: New intrastat identifier: Identifier diff --git a/src/pages/Item/locale/es.yml b/src/pages/Item/locale/es.yml index 6540c36c8..498520c26 100644 --- a/src/pages/Item/locale/es.yml +++ b/src/pages/Item/locale/es.yml @@ -24,6 +24,13 @@ basicData: boxUnits: Unidades/caja recycledPlastic: Plástico reciclado nonRecycledPlastic: Plástico no reciclado + description: Descripción + isActive: Activo + hasKgPrice: Precio en kg + isFragile: Frágil + isFragileTooltip: Se muestra en la web app, que este artículo no puede viajar (coronas, palmas, ...) + isPhotoRequested: Hacer foto + isPhotoRequestedTooltip: Este artículo necesita una foto createIntrastatForm: title: Nuevo intrastat identifier: Identificador From 1a5f2fbea2a7c821ca7d9e70fa5224f6a82dc22f Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 3 May 2024 12:30:53 +0200 Subject: [PATCH 25/38] feat: refs #7271 advanced structure --- src/i18n/locale/en.yml | 4 + src/i18n/locale/es.yml | 6 +- src/pages/Zone/Card/ZoneBasicData.vue | 103 +++++++++++++++++++ src/pages/Zone/Card/ZoneCalendar.vue | 0 src/pages/Zone/Card/ZoneLocations.vue | 0 src/pages/Zone/Card/ZoneLog.vue | 6 ++ src/pages/Zone/Card/ZoneSummary.vue | 3 + src/pages/Zone/Card/ZoneWarehouses.vue | 59 +++++++++++ src/pages/Zone/Delivery/ZoneDeliveryList.vue | 3 +- src/pages/Zone/Upcoming/ZoneUpcomingList.vue | 3 +- src/pages/Zone/ZoneCreate.vue | 8 +- src/pages/Zone/ZoneDeliveryDays.vue | 0 src/pages/Zone/ZoneFilterPanel.vue | 55 ++++++++++ src/pages/Zone/ZoneList.vue | 67 +++++++----- src/pages/Zone/ZoneUpcoming.vue | 53 ++++++++++ src/pages/Zone/locale/en.yml | 19 ++++ src/pages/Zone/locale/es.yml | 19 ++++ 17 files changed, 376 insertions(+), 32 deletions(-) create mode 100644 src/pages/Zone/Card/ZoneBasicData.vue create mode 100644 src/pages/Zone/Card/ZoneCalendar.vue create mode 100644 src/pages/Zone/Card/ZoneLocations.vue create mode 100644 src/pages/Zone/Card/ZoneLog.vue create mode 100644 src/pages/Zone/Card/ZoneSummary.vue create mode 100644 src/pages/Zone/Card/ZoneWarehouses.vue create mode 100644 src/pages/Zone/ZoneDeliveryDays.vue create mode 100644 src/pages/Zone/ZoneFilterPanel.vue create mode 100644 src/pages/Zone/ZoneUpcoming.vue create mode 100644 src/pages/Zone/locale/en.yml create mode 100644 src/pages/Zone/locale/es.yml diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index aa65ce08c..a580f2553 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -90,6 +90,10 @@ globals: basicData: Basic data log: Logs parkingList: Parkings list + zones: Zones + zonesList: Zones + deliveryList: Delivery days + upcomingList: Upcoming deliveries created: Created worker: Worker now: Now diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index da421432d..ef7ebf22b 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -90,6 +90,10 @@ globals: basicData: Datos básicos log: Historial parkingList: Listado de parkings + zones: Zonas + zonesList: Zonas + deliveryList: Días de entrega + upcomingList: Próximos repartos created: Fecha creación worker: Trabajador now: Ahora @@ -287,7 +291,7 @@ customer: hasSepaVnl: Recibido B2B VNL entry: pageTitles: - entries: Entrasdadas + entries: Entradas list: Listado summary: Resumen basicData: Datos básicos diff --git a/src/pages/Zone/Card/ZoneBasicData.vue b/src/pages/Zone/Card/ZoneBasicData.vue new file mode 100644 index 000000000..5d57b920e --- /dev/null +++ b/src/pages/Zone/Card/ZoneBasicData.vue @@ -0,0 +1,103 @@ + + + + + +es: + Name: Nombre + Agency: Agencia + Max m³: Medida máxima + Maximum m³: M³ maximo + Traveling days: Dias de viaje + Closing: Cierre + Price: Precio + Bonus: Bonificación + Inflation: Inflación + Volumetric: Volumétrico + diff --git a/src/pages/Zone/Card/ZoneCalendar.vue b/src/pages/Zone/Card/ZoneCalendar.vue new file mode 100644 index 000000000..e69de29bb diff --git a/src/pages/Zone/Card/ZoneLocations.vue b/src/pages/Zone/Card/ZoneLocations.vue new file mode 100644 index 000000000..e69de29bb diff --git a/src/pages/Zone/Card/ZoneLog.vue b/src/pages/Zone/Card/ZoneLog.vue new file mode 100644 index 000000000..373d210b5 --- /dev/null +++ b/src/pages/Zone/Card/ZoneLog.vue @@ -0,0 +1,6 @@ + + diff --git a/src/pages/Zone/Card/ZoneSummary.vue b/src/pages/Zone/Card/ZoneSummary.vue new file mode 100644 index 000000000..63090b5d4 --- /dev/null +++ b/src/pages/Zone/Card/ZoneSummary.vue @@ -0,0 +1,3 @@ + diff --git a/src/pages/Zone/Card/ZoneWarehouses.vue b/src/pages/Zone/Card/ZoneWarehouses.vue new file mode 100644 index 000000000..67a81ba4d --- /dev/null +++ b/src/pages/Zone/Card/ZoneWarehouses.vue @@ -0,0 +1,59 @@ + + + + + + es: + Remove row: Eliminar fila + diff --git a/src/pages/Zone/Delivery/ZoneDeliveryList.vue b/src/pages/Zone/Delivery/ZoneDeliveryList.vue index c7a3cbcdb..695388a9b 100644 --- a/src/pages/Zone/Delivery/ZoneDeliveryList.vue +++ b/src/pages/Zone/Delivery/ZoneDeliveryList.vue @@ -6,7 +6,6 @@ import { useArrayData } from 'src/composables/useArrayData'; import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; import CardList from 'components/ui/CardList.vue'; -import VnLv from 'components/ui/VnLv.vue'; const quasar = useQuasar(); const arrayData = useArrayData('ZoneDeliveryList'); @@ -45,7 +44,7 @@ async function remove(row) {
diff --git a/src/pages/Zone/Upcoming/ZoneUpcomingList.vue b/src/pages/Zone/Upcoming/ZoneUpcomingList.vue index 5c417df8f..2d3016f25 100644 --- a/src/pages/Zone/Upcoming/ZoneUpcomingList.vue +++ b/src/pages/Zone/Upcoming/ZoneUpcomingList.vue @@ -6,7 +6,6 @@ import { useArrayData } from 'src/composables/useArrayData'; import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; import CardList from 'components/ui/CardList.vue'; -import VnLv from 'components/ui/VnLv.vue'; const quasar = useQuasar(); const arrayData = useArrayData('ZoneUpcomingList'); @@ -45,7 +44,7 @@ async function remove(row) {
diff --git a/src/pages/Zone/ZoneCreate.vue b/src/pages/Zone/ZoneCreate.vue index 8c0ba8c17..93ea9589b 100644 --- a/src/pages/Zone/ZoneCreate.vue +++ b/src/pages/Zone/ZoneCreate.vue @@ -96,7 +96,7 @@ function filterType(val, update) {
@@ -116,7 +116,7 @@ function filterType(val, update) { +import { ref } from 'vue'; +import { useI18n } from 'vue-i18n'; +import VnInput from 'components/common/VnInput.vue'; +import FetchData from 'components/FetchData.vue'; +import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue'; +import VnSelectFilter from 'components/common/VnSelectFilter.vue'; + +const { t } = useI18n(); +const props = defineProps({ + dataKey: { + type: String, + required: true, + }, + exprBuilder: { + type: Function, + default: null, + }, +}); +const agencies = ref([]); + + + diff --git a/src/pages/Zone/ZoneList.vue b/src/pages/Zone/ZoneList.vue index 00502e1f7..2140c5e14 100644 --- a/src/pages/Zone/ZoneList.vue +++ b/src/pages/Zone/ZoneList.vue @@ -7,21 +7,15 @@ import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; import CardList from 'components/ui/CardList.vue'; import VnLv from 'components/ui/VnLv.vue'; +import FetchData from 'src/components/FetchData.vue'; +import { useSummaryDialog } from 'src/composables/useSummaryDialog'; const quasar = useQuasar(); const arrayData = useArrayData('ZoneList'); const store = arrayData.store; const router = useRouter(); const { t } = useI18n(); - -const filter = { - include: { - relation: 'type', - scope: { - fields: 'name', - }, - }, -}; +const { viewSummary } = useSummaryDialog(); function navigate(id) { router.push({ path: `/zone/${id}/edit` }); @@ -44,18 +38,25 @@ async function remove(row) { // } } + +function extractHour(dateTime) { + const date = new Date(dateTime); + const hours = date.getHours().toString().padStart(2, '0'); + const minutes = date.getMinutes().toString().padStart(2, '0'); + return `${hours}:${minutes}`; +}