From d82372c0a98dc3571529263a3ad9e9293a551ca7 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 2 May 2024 17:13:53 +0200 Subject: [PATCH 01/15] feat: refs #6449 show summaryId --- src/components/common/VnLog.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 340a9e550c1..c8d69307e5c 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -49,6 +49,7 @@ const filter = { 'changedModelId', 'changedModelValue', 'description', + 'summaryId', ], include: [ { @@ -455,12 +456,12 @@ setLogTree(); :style="{ backgroundColor: useColor(modelLog.model), }" - :title="modelLog.model" + :title="`${modelLog.model} #${modelLog.id}`" > {{ t(modelLog.modelI18n) }} - #{{ modelLog.id }}#{{ modelLog.summaryId }} {{ modelLog.showValue }} From aaee96d6bb4ddcb693d9801b50b1af9fcc42e712 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 26 Jun 2024 15:09:26 +0200 Subject: [PATCH 02/15] refs #7366 VnTable --- src/i18n/locale/en.yml | 10 ++ src/i18n/locale/es.yml | 10 ++ src/pages/Travel/TravelList.vue | 245 +++++++++++++++++--------------- 3 files changed, 147 insertions(+), 118 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index fbab0696634..5ebd50649e7 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -1144,6 +1144,16 @@ travel: basicData: Basic data history: Log thermographs: Thermograph + travelList: + tableVisibleColumns: + id: Id + ref: Reference + agency: Agency + shipped: Shipped + landed: Landed + warehouseIn: Warehouse in + warehouseOut: Warehouse out + totalEntries: Total entries summary: confirmed: Confirmed entryId: Entry Id diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index fec78d5e653..cecca86da51 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -1132,6 +1132,16 @@ travel: basicData: Datos básicos history: Historial thermographs: Termógrafos + travelList: + tableVisibleColumns: + id: Id + ref: Referencia + agency: Agencia + shipped: Enviado + landed: Llegada + warehouseIn: Almacén de salida + warehouseOut: Almacén de entrada + totalEntries: Total de entradas summary: confirmed: Confirmado entryId: Id entrada diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index e6696b26f97..eca79d69075 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -2,19 +2,12 @@ import { onMounted, ref } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; -import VnPaginate from 'src/components/ui/VnPaginate.vue'; -import CardList from 'src/components/ui/CardList.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; -import TravelSummary from './Card/TravelSummary.vue'; -import TravelFilter from './TravelFilter.vue'; -import FetchData from 'components/FetchData.vue'; -import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; - import { useStateStore } from 'stores/useStateStore'; -import { toDate } from 'src/filters/index'; +import VnTable from 'components/VnTable/VnTable.vue'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; -import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js'; -import RightMenu from 'src/components/common/RightMenu.vue'; + +import { computed } from 'vue'; +import TravelSummary from './Card/TravelSummary.vue'; const router = useRouter(); const { t } = useI18n(); @@ -47,118 +40,134 @@ const getWarehouseName = (id) => { onMounted(async () => { stateStore.rightDrawer = true; }); + +const columns = computed(() => [ + { + align: 'left', + name: 'id', + label: t('travel.travelList.tableVisibleColumns.id'), + isId: true, + field: 'id', + cardVisible: true, + }, + { + align: 'left', + name: 'ref', + label: t('travel.travelList.tableVisibleColumns.ref'), + field: 'ref', + component: 'input', + cardVisible: true, + create: true, + }, + { + align: 'left', + name: 'agencyModeFk', + label: t('travel.travelList.tableVisibleColumns.agency'), + field: 'agencyModeFk', + component: 'select', + attrs: { + url: 'agencyModes', + fields: ['id', 'name'], + }, + cardVisible: true, + create: true, + }, + { + align: 'left', + name: 'shipped', + label: t('travel.travelList.tableVisibleColumns.shipped'), + field: 'shipped', + component: 'date', + cardVisible: true, + create: true, + }, + { + align: 'left', + name: 'landed', + label: t('travel.travelList.tableVisibleColumns.landed'), + field: 'landed', + component: 'date', + cardVisible: true, + create: true, + }, + { + align: 'left', + name: 'warehouseInFk', + label: t('travel.travelList.tableVisibleColumns.warehouseIn'), + field: 'warehouseInFk', + component: 'select', + attrs: { + url: 'warehouses', + fields: ['id', 'name'], + }, + cardVisible: true, + create: true, + }, + { + align: 'left', + name: 'warehouseOutFk', + label: t('travel.travelList.tableVisibleColumns.warehouseOut'), + field: 'warehouseOutFk', + component: 'select', + attrs: { + url: 'warehouses', + fields: ['id', 'name'], + }, + cardVisible: true, + create: true, + }, + { + align: 'left', + name: 'totalEntries', + label: t('travel.travelList.tableVisibleColumns.totalEntries'), + field: 'totalEntries', + component: 'input', + cardVisible: true, + create: true, + }, + { + align: 'right', + label: '', + name: 'tableActions', + actions: [ + { + title: t('Clone'), + icon: 'vn:ticket', + action: cloneTravel, + isPrimary: true, + }, + { + title: t('Add entry'), + icon: 'preview', + action: (row) => viewSummary(row.id, TravelSummary), + }, + ], + }, +]); From 95a9805a842cc802059c33f65534cf32b3d60878 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 27 Jun 2024 09:53:42 +0200 Subject: [PATCH 03/15] refs #7366 fix icons actions --- src/pages/Travel/TravelList.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index eca79d69075..1e616a937f0 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -132,14 +132,14 @@ const columns = computed(() => [ actions: [ { title: t('Clone'), - icon: 'vn:ticket', + icon: 'vn:clone', action: cloneTravel, isPrimary: true, }, { title: t('Add entry'), - icon: 'preview', - action: (row) => viewSummary(row.id, TravelSummary), + icon: 'contact_support', + action: redirectCreateEntryView, }, ], }, From 99628d2cf83a7869a41387f556888ecf37a9766a Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 27 Jun 2024 10:08:17 +0200 Subject: [PATCH 04/15] refs #7366 remove code --- src/pages/Travel/TravelList.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index 1e616a937f0..e77c95ac29a 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -7,19 +7,13 @@ import VnTable from 'components/VnTable/VnTable.vue'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { computed } from 'vue'; -import TravelSummary from './Card/TravelSummary.vue'; const router = useRouter(); const { t } = useI18n(); const stateStore = useStateStore(); -const { viewSummary } = useSummaryDialog(); const warehouses = ref([]); -const navigateToTravelId = (id) => { - router.push({ path: `/travel/${id}` }); -}; - const cloneTravel = (travelData) => { const stringifiedTravelData = JSON.stringify(travelData); redirectToCreateView(stringifiedTravelData); From 4dd1ed3a3dba69f8f06034b160055feadae79ed4 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 27 Jun 2024 10:12:04 +0200 Subject: [PATCH 05/15] refs #7366 remove summary --- src/pages/Travel/TravelList.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index e77c95ac29a..2b2af9dbff4 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; import { useStateStore } from 'stores/useStateStore'; import VnTable from 'components/VnTable/VnTable.vue'; -import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { computed } from 'vue'; From a69235e4d4ca5297f43c0752dc3ebd4b34e15bd4 Mon Sep 17 00:00:00 2001 From: pablone Date: Mon, 1 Jul 2024 07:39:35 +0200 Subject: [PATCH 06/15] fix: refs #7404 add e2e and fix route --- src/components/LeftMenuItem.vue | 2 +- src/css/app.scss | 9 +- src/i18n/locale/en.yml | 1 + src/pages/{ => Route}/Agency/AgencyList.vue | 1 + .../Agency/Card/AgencyBasicData.vue | 0 .../{ => Route}/Agency/Card/AgencyCard.vue | 2 +- .../Agency/Card/AgencyDescriptor.vue | 0 .../{ => Route}/Agency/Card/AgencyLog.vue | 0 .../{ => Route}/Agency/Card/AgencyModes.vue | 0 .../{ => Route}/Agency/Card/AgencySummary.vue | 0 .../Agency/Card/AgencyWorkcenter.vue | 0 src/pages/{ => Route}/Agency/locale/en.yml | 0 src/pages/{ => Route}/Agency/locale/es.yml | 0 src/router/modules/agency.js | 87 +------------- src/router/modules/route.js | 107 ++++++++++++++++-- src/router/routes.js | 2 - .../agency/agencyWorkCenter.spec.js | 2 - 17 files changed, 108 insertions(+), 105 deletions(-) rename src/pages/{ => Route}/Agency/AgencyList.vue (98%) rename src/pages/{ => Route}/Agency/Card/AgencyBasicData.vue (100%) rename src/pages/{ => Route}/Agency/Card/AgencyCard.vue (82%) rename src/pages/{ => Route}/Agency/Card/AgencyDescriptor.vue (100%) rename src/pages/{ => Route}/Agency/Card/AgencyLog.vue (100%) rename src/pages/{ => Route}/Agency/Card/AgencyModes.vue (100%) rename src/pages/{ => Route}/Agency/Card/AgencySummary.vue (100%) rename src/pages/{ => Route}/Agency/Card/AgencyWorkcenter.vue (100%) rename src/pages/{ => Route}/Agency/locale/en.yml (100%) rename src/pages/{ => Route}/Agency/locale/es.yml (100%) rename test/cypress/integration/{ => route}/agency/agencyWorkCenter.spec.js (97%) diff --git a/src/components/LeftMenuItem.vue b/src/components/LeftMenuItem.vue index d12fb8428a8..f3f2315a334 100644 --- a/src/components/LeftMenuItem.vue +++ b/src/components/LeftMenuItem.vue @@ -21,7 +21,7 @@ const itemComputed = computed(() => {