From 5833b4d856db5b44dfe81775d48a4ad85efb9db4 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 18 Jul 2024 13:53:57 +0200 Subject: [PATCH 1/2] fix(VnTable): autoload when has url parameters --- src/components/VnTable/VnTable.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 97053184a..22fd3acaf 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -1,5 +1,5 @@ - diff --git a/src/pages/Route/Cmr/CmrList.vue b/src/pages/Route/Cmr/CmrList.vue index 6dfd3a1e5..0cc0adcf3 100644 --- a/src/pages/Route/Cmr/CmrList.vue +++ b/src/pages/Route/Cmr/CmrList.vue @@ -72,10 +72,7 @@ const columns = computed(() => [ label: t('globals.warehouse'), component: 'select', attrs: { - url: 'warehouses', - fields: ['id', 'name'], - optionLabel: 'name', - optionValue: 'id', + options: warehouses.value, }, }, { diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index 55bcdabb0..0f7c06de9 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -57,9 +57,13 @@ const columns = computed(() => [ component: 'select', attrs: { url: 'Workers/activeWithInheritedRole', - fields: ['id', 'nickname'], - optionValue: 'id', - optionLabel: 'nickname', + fields: ['id', 'name'], + useLike: false, + optionFilter: 'firstName', + find: { + value: 'workerFk', + label: 'workerUserName', + }, }, useLike: false, cardVisible: true, @@ -76,8 +80,10 @@ const columns = computed(() => [ attrs: { url: 'agencyModes', fields: ['id', 'name'], - optionLabel: 'name', - optionValue: 'id', + find: { + value: 'agencyModeFk', + label: 'agencyName', + }, }, }, { @@ -91,7 +97,10 @@ const columns = computed(() => [ url: 'vehicles', fields: ['id', 'numberPlate'], optionLabel: 'numberPlate', - optionValue: 'id', + find: { + value: 'vehicleFk', + label: 'vehiclePlateNumber', + }, }, }, { @@ -248,6 +257,7 @@ const openTicketsDialog = (id) => { :is-editable="true" :filter="routeFilter" redirect="route" + :row-click="false" :create="{ urlCreate: 'Routes', title: t('Create route'), -- 2.40.1