From fa5c1643a4d1716f246f22c7761e42d8c2cdbaa7 Mon Sep 17 00:00:00 2001 From: jtubau Date: Tue, 4 Mar 2025 12:32:21 +0100 Subject: [PATCH 1/9] test: refs #8717 add integration test for agencyModes --- .../integration/route/agency/agencyModes.spec.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/cypress/integration/route/agency/agencyModes.spec.js diff --git a/test/cypress/integration/route/agency/agencyModes.spec.js b/test/cypress/integration/route/agency/agencyModes.spec.js new file mode 100644 index 000000000..3f5784997 --- /dev/null +++ b/test/cypress/integration/route/agency/agencyModes.spec.js @@ -0,0 +1,15 @@ +describe('Agency modes', () => { + const name = 'inhouse pickup'; + + beforeEach(() => { + cy.viewport(1920, 1080); + cy.login('developer'); + cy.visit(`/#/route/agency/1/modes`); + }); + + it('should display the agency modes page', () => { + cy.get('.flex > .title').should('have.text', name); + cy.get('.flex > .q-chip > .q-chip__content').should('have.text', 'ID: 1'); + cy.get('.list-items > :nth-child(1) > .value').should('have.text', name); + }); +}); From 5f48c9b887a799bf0ada9e7cc36ae6c86393ca9b Mon Sep 17 00:00:00 2001 From: jtubau Date: Mon, 24 Mar 2025 08:13:06 +0100 Subject: [PATCH 2/9] refactor: refs #8717 eliminate warnings and add component on children routes --- src/components/VnTable/VnColumn.vue | 14 ++++++++------ src/router/modules/route.js | 6 ++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/components/VnTable/VnColumn.vue b/src/components/VnTable/VnColumn.vue index d0e245388..3ce62c5de 100644 --- a/src/components/VnTable/VnColumn.vue +++ b/src/components/VnTable/VnColumn.vue @@ -55,6 +55,8 @@ const $props = defineProps({ }, }); +const label = $props.showLabel && $props.column.label ? $props.column.label : ''; + const defaultSelect = { attrs: { row: $props.row, @@ -62,7 +64,7 @@ const defaultSelect = { class: 'fit', }, forceAttrs: { - label: $props.showLabel && $props.column.label, + label, }, }; @@ -74,7 +76,7 @@ const defaultComponents = { class: 'fit', }, forceAttrs: { - label: $props.showLabel && $props.column.label, + label, }, }, number: { @@ -84,7 +86,7 @@ const defaultComponents = { class: 'fit', }, forceAttrs: { - label: $props.showLabel && $props.column.label, + label, }, }, date: { @@ -96,7 +98,7 @@ const defaultComponents = { class: 'fit', }, forceAttrs: { - label: $props.showLabel && $props.column.label, + label, }, }, time: { @@ -105,7 +107,7 @@ const defaultComponents = { disable: !$props.isEditable, }, forceAttrs: { - label: $props.showLabel && $props.column.label, + label, }, }, checkbox: { @@ -125,7 +127,7 @@ const defaultComponents = { return defaultAttrs; }, forceAttrs: { - label: $props.showLabel && $props.column.label, + label, autofocus: true, }, events: { diff --git a/src/router/modules/route.js b/src/router/modules/route.js index 62765a49c..0bf3a6eff 100644 --- a/src/router/modules/route.js +++ b/src/router/modules/route.js @@ -229,6 +229,7 @@ export default { title: 'list', icon: 'view_list', }, + component: () => import('src/pages/Route/RouteList.vue'), }, routeCard, ], @@ -277,6 +278,7 @@ export default { title: 'list', icon: 'view_list', }, + component: () => import('src/pages/Route/RouteRoadmap.vue'), }, roadmapCard, ], @@ -307,6 +309,8 @@ export default { title: 'list', icon: 'view_list', }, + component: () => + import('src/pages/Route/Agency/AgencyList.vue'), }, agencyCard, ], @@ -328,6 +332,8 @@ export default { title: 'vehicleList', icon: 'directions_car', }, + component: () => + import('src/pages/Route/Vehicle/VehicleList.vue'), }, vehicleCard, ], From fb00824ee38a257669f297b7a9bafdfe0b628ddd Mon Sep 17 00:00:00 2001 From: jtubau Date: Mon, 24 Mar 2025 09:55:03 +0100 Subject: [PATCH 3/9] refactor: refs #8717 change toModule prop type from String to Object --- src/components/ui/VnDescriptor.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ui/VnDescriptor.vue b/src/components/ui/VnDescriptor.vue index 47da98d74..878adcadc 100644 --- a/src/components/ui/VnDescriptor.vue +++ b/src/components/ui/VnDescriptor.vue @@ -30,7 +30,7 @@ const $props = defineProps({ default: null, }, toModule: { - type: String, + type: Object, default: null, }, }); From feabf9c7be8793f881fd0b7abba8426ce0fe62dd Mon Sep 17 00:00:00 2001 From: jtubau Date: Mon, 24 Mar 2025 11:19:26 +0100 Subject: [PATCH 4/9] refactor: refs #8717 use markRaw for cardDescriptor in VnCard component --- src/components/common/VnCard.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/common/VnCard.vue b/src/components/common/VnCard.vue index 21cdc9df5..50b041060 100644 --- a/src/components/common/VnCard.vue +++ b/src/components/common/VnCard.vue @@ -1,5 +1,5 @@ diff --git a/src/pages/Route/locale/en.yml b/src/pages/Route/locale/en.yml index 283b61855..e7e2d691e 100644 --- a/src/pages/Route/locale/en.yml +++ b/src/pages/Route/locale/en.yml @@ -50,7 +50,7 @@ route: agencyAgreement: Agency agreement agencyModeName: Agency route isOwn: Own - isAnyVolumeallowed: Any volume allowed + isAnyVolumeAllowed: Any volume allowed Worker: Worker Agency: Agency Vehicle: Vehicle