From e499fd151173e7d026b862bfb8d36e8173fa4678 Mon Sep 17 00:00:00 2001 From: alexandre Date: Wed, 30 Nov 2022 15:00:02 +0100 Subject: [PATCH 1/5] working on create deliveryMan --- src/i18n/en/index.js | 41 ++++++ src/i18n/es/index.js | 41 ++++++ src/pages/Route/Card/DeliveryManBasicData.vue | 115 ++++++++++++++++ src/pages/Route/Card/DeliveryManCard.vue | 58 ++++++++ .../Route/Card/DeliveryManDescriptor.vue | 82 ++++++++++++ src/pages/Route/Card/DeliveryManSummary.vue | 124 ++++++++++++++++++ src/pages/Route/DeliveryManCreate.vue | 44 +++++++ src/pages/Route/DeliveryManList.vue | 78 +++++++++++ src/pages/Route/RouteMain.vue | 17 +++ src/router/modules/route.js | 65 +++++++++ src/router/routes.js | 6 +- 11 files changed, 669 insertions(+), 2 deletions(-) create mode 100644 src/pages/Route/Card/DeliveryManBasicData.vue create mode 100644 src/pages/Route/Card/DeliveryManCard.vue create mode 100644 src/pages/Route/Card/DeliveryManDescriptor.vue create mode 100644 src/pages/Route/Card/DeliveryManSummary.vue create mode 100644 src/pages/Route/DeliveryManCreate.vue create mode 100644 src/pages/Route/DeliveryManList.vue create mode 100644 src/pages/Route/RouteMain.vue create mode 100644 src/router/modules/route.js diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 88fae5bb7..f567edcab 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -251,6 +251,47 @@ export default { returnOfMaterial: 'Return of material authorization (RMA)', }, }, + route: { + pageTitles: { + routes: 'Routes', + deliveryManList: 'Delivery Men', + basicData: 'Basic Data', + deliveryManCreate: 'Create Delivery Man', + }, + deliveryMan: { + list: { + deliveryMan: 'Delivery man', + supplier: 'Supplier', + id: 'ID', + minCost: 'Minimum cost', + minM3: 'M3', + agency: 'Agency', + }, + basicData: { + supplier: 'Supplier', + id: 'ID', + minCost: 'Minimum cost', + minM3: 'M3', + agency: 'Agency', + }, + card: { + supplier: 'Supplier', + id: 'ID', + minCost: 'Minimum cost', + minM3: 'M3', + agency: 'Agency', + }, + summary: { + deliveryMan: 'Delivery man', + supplier: 'Supplier', + id: 'ID', + minCost: 'Minimum cost', + minM3: 'M3', + agency: 'Agency', + }, + } + + }, components: { topbar: {}, userPanel: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 0103b1a92..567fe71e4 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -250,6 +250,47 @@ export default { returnOfMaterial: 'Autorización de retorno de materiales (RMA)', }, }, + route: { + pageTitles: { + routes: 'Rutas', + deliveryManList: 'Repartidores', + basicData: 'Datos básicos', + deliveryManCreate: 'Crear Repartidor', + }, + deliveryMan: { + list: { + deliveryMan: 'Repartidor', + supplier: 'Proveedor', + id: 'ID', + minCost: 'Coste mínimo', + minM3: 'Número de M3', + agency: 'Agencia', + }, + basicData: { + supplier: 'Proveedor', + id: 'ID', + minCost: 'Coste mínimo', + minM3: 'Número de M3', + agency: 'Agencia', + }, + card: { + supplier: 'Proveedor', + id: 'ID', + minCost: 'Coste mínimo', + minM3: 'Número de M3', + agency: 'Agencia', + }, + summary: { + deliveryMan: 'Repartidor', + supplier: 'Proveedor', + id: 'ID', + minCost: 'Coste mínimo', + minM3: 'Número de M3', + agency: 'Agencia', + } + } + + }, components: { topbar: {}, userPanel: { diff --git a/src/pages/Route/Card/DeliveryManBasicData.vue b/src/pages/Route/Card/DeliveryManBasicData.vue new file mode 100644 index 000000000..1aad8d8cc --- /dev/null +++ b/src/pages/Route/Card/DeliveryManBasicData.vue @@ -0,0 +1,115 @@ + + + + diff --git a/src/pages/Route/Card/DeliveryManCard.vue b/src/pages/Route/Card/DeliveryManCard.vue new file mode 100644 index 000000000..cabf0266c --- /dev/null +++ b/src/pages/Route/Card/DeliveryManCard.vue @@ -0,0 +1,58 @@ + + + + + + diff --git a/src/pages/Route/Card/DeliveryManDescriptor.vue b/src/pages/Route/Card/DeliveryManDescriptor.vue new file mode 100644 index 000000000..6d9e64c32 --- /dev/null +++ b/src/pages/Route/Card/DeliveryManDescriptor.vue @@ -0,0 +1,82 @@ + + + diff --git a/src/pages/Route/Card/DeliveryManSummary.vue b/src/pages/Route/Card/DeliveryManSummary.vue new file mode 100644 index 000000000..b76ca8a05 --- /dev/null +++ b/src/pages/Route/Card/DeliveryManSummary.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/src/pages/Route/DeliveryManCreate.vue b/src/pages/Route/DeliveryManCreate.vue new file mode 100644 index 000000000..8cb66d510 --- /dev/null +++ b/src/pages/Route/DeliveryManCreate.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/src/pages/Route/DeliveryManList.vue b/src/pages/Route/DeliveryManList.vue new file mode 100644 index 000000000..2103e6129 --- /dev/null +++ b/src/pages/Route/DeliveryManList.vue @@ -0,0 +1,78 @@ + + + diff --git a/src/pages/Route/RouteMain.vue b/src/pages/Route/RouteMain.vue new file mode 100644 index 000000000..fd50f1521 --- /dev/null +++ b/src/pages/Route/RouteMain.vue @@ -0,0 +1,17 @@ + + + diff --git a/src/router/modules/route.js b/src/router/modules/route.js new file mode 100644 index 000000000..a5e86a446 --- /dev/null +++ b/src/router/modules/route.js @@ -0,0 +1,65 @@ +import { RouterView } from 'vue-router'; + +export default { + name: 'Route', + path: '/route', + meta: { + title: 'routes', + icon: 'vn:delivery' + }, + component: RouterView, + redirect: { name: 'RouteMain' }, + children: [ + { + path: '', + name: 'RouteMain', + component: () => import('src/pages/Route/RouteMain.vue'), + redirect: { name: 'DeliveryManList' }, + children: [ + { + name: 'DeliveryManList', + path: 'deliveryMan/list', + meta: { + title: 'deliveryManList', + icon: 'person', + }, + component: () => import('src/pages/Route/DeliveryManList.vue'), + }, + { + name: 'DeliveryManCreate', + path: 'deliveryMan/create', + meta: { + title: 'deliveryManCreate', + icon: 'vn:addperson', + }, + component: () => import('src/pages/Route/DeliveryManCreate.vue'), + }, + + ] + }, + { + name: 'DeliveryManCard', + path: ':id', + component: () => import('src/pages/Route/Card/DeliveryManCard.vue'), + redirect: { name: 'DeliveryManSummary' }, + children: [ + { + name: 'DeliveryManSummary', + path: 'deliveryMan/summary', + meta: { + title: 'summary', + }, + component: () => import('src/pages/Route/Card/DeliveryManSummary.vue'), + }, + { + name: 'DeliveryManBasicData', + path: 'deliveryMan/basic-data', + meta: { + title: 'basicData', + }, + component: () => import('src/pages/Route/Card/DeliveryManBasicData.vue'), + }, + ] + }, + ] +}; diff --git a/src/router/routes.js b/src/router/routes.js index a7261379f..f0090d380 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -1,6 +1,7 @@ import customer from './modules/customer'; import ticket from './modules/ticket'; import claim from './modules/claim'; +import route from './modules/route'; const routes = [ { @@ -25,13 +26,14 @@ const routes = [ customer, ticket, claim, + route, { path: '/:pathMatch(.*)*', name: 'NotFound', component: () => import('../pages/NotFound.vue'), - } + }, ], } ]; -export default routes; \ No newline at end of file +export default routes; From 20e284fe594507ecc15542ce98bba359921ce5b5 Mon Sep 17 00:00:00 2001 From: alexandre Date: Thu, 1 Dec 2022 15:16:41 +0100 Subject: [PATCH 2/5] wornking on invoiceAllocation --- src/i18n/en/index.js | 1 + src/i18n/es/index.js | 1 + src/pages/Route/DeliveryManCreate.vue | 114 +++++++++++++++++++---- src/pages/Route/DeliveryManList.vue | 13 ++- src/pages/Route/InvoiceAllocation.vue | 126 ++++++++++++++++++++++++++ src/router/modules/route.js | 9 ++ 6 files changed, 244 insertions(+), 20 deletions(-) create mode 100644 src/pages/Route/InvoiceAllocation.vue diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index f567edcab..66c8b5ca5 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -257,6 +257,7 @@ export default { deliveryManList: 'Delivery Men', basicData: 'Basic Data', deliveryManCreate: 'Create Delivery Man', + invoiceAllocation: 'Invoice Allocation', }, deliveryMan: { list: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 567fe71e4..bbc335a6e 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -256,6 +256,7 @@ export default { deliveryManList: 'Repartidores', basicData: 'Datos básicos', deliveryManCreate: 'Crear Repartidor', + invoiceAllocation: 'Imputación Facturas', }, deliveryMan: { list: { diff --git a/src/pages/Route/DeliveryManCreate.vue b/src/pages/Route/DeliveryManCreate.vue index 8cb66d510..fbe0be4d0 100644 --- a/src/pages/Route/DeliveryManCreate.vue +++ b/src/pages/Route/DeliveryManCreate.vue @@ -1,44 +1,126 @@ diff --git a/src/pages/Route/DeliveryManList.vue b/src/pages/Route/DeliveryManList.vue index 2103e6129..058be1e80 100644 --- a/src/pages/Route/DeliveryManList.vue +++ b/src/pages/Route/DeliveryManList.vue @@ -22,9 +22,13 @@ const filter = { ], }; -function navigate(id) { +function navigateCard(id) { router.push({ path: `/route/${id}` }); } + +function navigateCreate() { + router.push({ path: `/route/deliveryMan/create` }); +} es: - Warehouse: Almacén + Address: Consignatario ETA date: Fecha ETA ETA hour: Hora ETA Description: Descripción diff --git a/src/pages/Route/Roadmap/RoadmapSummary.vue b/src/pages/Route/Roadmap/RoadmapSummary.vue index 1fed6aa78..01246b647 100644 --- a/src/pages/Route/Roadmap/RoadmapSummary.vue +++ b/src/pages/Route/Roadmap/RoadmapSummary.vue @@ -35,9 +35,9 @@ onUnmounted(hideRightDrawer); const columns = ref([ { - name: 'warehouse', - label: t('Warehouse'), - field: (row) => dashIfEmpty(row?.warehouse?.name), + name: 'address', + label: t('Address'), + field: (row) => dashIfEmpty(row?.address?.nickname), sortable: true, align: 'left', }, @@ -54,8 +54,8 @@ const filter = { { relation: 'supplier' }, { relation: 'worker' }, { - relation: 'expeditionTruck', - scope: { include: [{ relation: 'warehouse' }] }, + relation: 'roadmapStop', + scope: { include: [{ relation: 'address' }] }, }, ], }; @@ -146,7 +146,7 @@ const openAddStopDialog = () => { Date: Tue, 4 Jun 2024 10:52:00 +0200 Subject: [PATCH 4/5] feat: refs #560 refactor descriptor --- .../Route/Roadmap/RoadmapAddStopForm.vue | 37 ++++++++++++++----- src/pages/Route/Roadmap/RoadmapCard.vue | 30 +++++++-------- src/pages/Route/Roadmap/RoadmapSummary.vue | 15 ++++++-- src/pages/Route/RouteRoadmap.vue | 4 +- 4 files changed, 53 insertions(+), 33 deletions(-) diff --git a/src/pages/Route/Roadmap/RoadmapAddStopForm.vue b/src/pages/Route/Roadmap/RoadmapAddStopForm.vue index 736280e99..6cc21fd4d 100644 --- a/src/pages/Route/Roadmap/RoadmapAddStopForm.vue +++ b/src/pages/Route/Roadmap/RoadmapAddStopForm.vue @@ -23,28 +23,43 @@ const props = defineProps({ }); const { t } = useI18n(); -const warehouseList = ref([]); +const addressList = ref([]); const form = computed(() => props.formData); const isDialog = computed(() => props.layout === 'dialog'); +const onFetch = (data) => { + addressList.value = data.map((roadmap) => ({ + id: roadmap.addressFk, + nickname: roadmap.address ? roadmap.address.nickname : '', + })); +}; + + + es: - Warehouse: Almacén + Address: Dirección ETA date: Fecha ETA ETA hour: Hora ETA Description: Descripción diff --git a/src/pages/Route/Roadmap/RoadmapCard.vue b/src/pages/Route/Roadmap/RoadmapCard.vue index d6b02824b..4e8f8dd50 100644 --- a/src/pages/Route/Roadmap/RoadmapCard.vue +++ b/src/pages/Route/Roadmap/RoadmapCard.vue @@ -1,21 +1,17 @@ diff --git a/src/pages/Route/Roadmap/RoadmapSummary.vue b/src/pages/Route/Roadmap/RoadmapSummary.vue index 8604cc30a..e9969c2f7 100644 --- a/src/pages/Route/Roadmap/RoadmapSummary.vue +++ b/src/pages/Route/Roadmap/RoadmapSummary.vue @@ -55,7 +55,16 @@ const filter = { { relation: 'worker' }, { relation: 'roadmapStop', - scope: { include: [{ relation: 'address' }] }, + scope: { + include: [ + { + relation: 'address', + scope: { + fields: ['nickname'], + }, + }, + ], + }, }, ], }; @@ -154,8 +163,6 @@ const openAddStopDialog = () => { :rows="entity?.roadmapStop" :rows-per-page-options="[0]" row-key="id" - flat - hide-pagination /> @@ -171,7 +178,7 @@ es: Worker: Trabajador Observations: Observaciones Stops: Paradas - Warehouse: Almacén + Address: Dirección Go to stops: Ir a paradas Add stop: Añadir parada diff --git a/src/pages/Route/RouteRoadmap.vue b/src/pages/Route/RouteRoadmap.vue index 2ed8b6a9a..06c632ad4 100644 --- a/src/pages/Route/RouteRoadmap.vue +++ b/src/pages/Route/RouteRoadmap.vue @@ -284,9 +284,9 @@ function navigateToRoadmapSummary(event, row) { es: Search roadmaps: Buscar troncales - You can search by roadmap reference: Puedes buscar por referencia de la troncal + You can search by roadmap reference: Puedes buscar por referencia del troncal Delete roadmap(s): Eliminar troncal(es) - Selected roadmaps will be removed: Las troncales seleccionadas serán eliminadas + Selected roadmaps will be removed: Los troncales seleccionadas serán eliminados Are you sure you want to continue?: ¿Seguro que quieres continuar? The date can't be empty: La fecha no puede estar vacía Clone Selected Routes: Clonar rutas seleccionadas From 857aca49dd5b0bcad405aa0bb434c07356629685 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 4 Jun 2024 14:06:04 +0200 Subject: [PATCH 5/5] feat: refs #4560 sin DeliveryMan --- src/pages/Route/Card/DeliveryManBasicData.vue | 115 ---------------- src/pages/Route/Card/DeliveryManCard.vue | 58 -------- .../Route/Card/DeliveryManDescriptor.vue | 82 ------------ src/pages/Route/Card/DeliveryManSummary.vue | 124 ----------------- src/pages/Route/DeliveryManCreate.vue | 126 ------------------ src/pages/Route/DeliveryManList.vue | 83 ------------ src/pages/Route/InvoiceAllocation.vue | 126 ------------------ src/pages/Route/Roadmap/RoadmapBasicData.vue | 2 - src/pages/Route/Roadmap/RoadmapStops.vue | 2 - 9 files changed, 718 deletions(-) delete mode 100644 src/pages/Route/Card/DeliveryManBasicData.vue delete mode 100644 src/pages/Route/Card/DeliveryManCard.vue delete mode 100644 src/pages/Route/Card/DeliveryManDescriptor.vue delete mode 100644 src/pages/Route/Card/DeliveryManSummary.vue delete mode 100644 src/pages/Route/DeliveryManCreate.vue delete mode 100644 src/pages/Route/DeliveryManList.vue delete mode 100644 src/pages/Route/InvoiceAllocation.vue diff --git a/src/pages/Route/Card/DeliveryManBasicData.vue b/src/pages/Route/Card/DeliveryManBasicData.vue deleted file mode 100644 index 1aad8d8cc..000000000 --- a/src/pages/Route/Card/DeliveryManBasicData.vue +++ /dev/null @@ -1,115 +0,0 @@ - - - - diff --git a/src/pages/Route/Card/DeliveryManCard.vue b/src/pages/Route/Card/DeliveryManCard.vue deleted file mode 100644 index cabf0266c..000000000 --- a/src/pages/Route/Card/DeliveryManCard.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - diff --git a/src/pages/Route/Card/DeliveryManDescriptor.vue b/src/pages/Route/Card/DeliveryManDescriptor.vue deleted file mode 100644 index 6d9e64c32..000000000 --- a/src/pages/Route/Card/DeliveryManDescriptor.vue +++ /dev/null @@ -1,82 +0,0 @@ - - - diff --git a/src/pages/Route/Card/DeliveryManSummary.vue b/src/pages/Route/Card/DeliveryManSummary.vue deleted file mode 100644 index b76ca8a05..000000000 --- a/src/pages/Route/Card/DeliveryManSummary.vue +++ /dev/null @@ -1,124 +0,0 @@ - - - - - diff --git a/src/pages/Route/DeliveryManCreate.vue b/src/pages/Route/DeliveryManCreate.vue deleted file mode 100644 index fbe0be4d0..000000000 --- a/src/pages/Route/DeliveryManCreate.vue +++ /dev/null @@ -1,126 +0,0 @@ - - - - - diff --git a/src/pages/Route/DeliveryManList.vue b/src/pages/Route/DeliveryManList.vue deleted file mode 100644 index 058be1e80..000000000 --- a/src/pages/Route/DeliveryManList.vue +++ /dev/null @@ -1,83 +0,0 @@ - - - diff --git a/src/pages/Route/InvoiceAllocation.vue b/src/pages/Route/InvoiceAllocation.vue deleted file mode 100644 index fbe0be4d0..000000000 --- a/src/pages/Route/InvoiceAllocation.vue +++ /dev/null @@ -1,126 +0,0 @@ - - - - - diff --git a/src/pages/Route/Roadmap/RoadmapBasicData.vue b/src/pages/Route/Roadmap/RoadmapBasicData.vue index a6c2f7d4d..19b6a1b3d 100644 --- a/src/pages/Route/Roadmap/RoadmapBasicData.vue +++ b/src/pages/Route/Roadmap/RoadmapBasicData.vue @@ -3,7 +3,6 @@ import { useI18n } from 'vue-i18n'; import { useRoute, useRouter } from 'vue-router'; import VnRow from 'components/ui/VnRow.vue'; import FormModel from 'components/FormModel.vue'; -import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import VnInputDate from 'components/common/VnInputDate.vue'; import VnInput from 'components/common/VnInput.vue'; import VnInputTime from 'components/common/VnInputTime.vue'; @@ -22,7 +21,6 @@ const onSave = (data, response) => { };