From ce02d21b3b963abbbde309ec8efbd1a3923403cf Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 5 Apr 2024 08:50:33 +0200 Subject: [PATCH] refs #6111 fix routeList --- src/components/common/TableVisibleColumns.vue | 4 ++++ src/pages/Route/RouteList.vue | 18 +++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/components/common/TableVisibleColumns.vue b/src/components/common/TableVisibleColumns.vue index 7aa696a07..56d0b08df 100644 --- a/src/components/common/TableVisibleColumns.vue +++ b/src/components/common/TableVisibleColumns.vue @@ -43,6 +43,7 @@ const setUserConfigViewData = (data) => { name: col, active: data[col] == undefined ? true : data[col], })); + console.log('formattedCols: ', formattedCols.value); emitSavedConfig(); }; @@ -63,6 +64,7 @@ const fetchViewConfigData = async () => { where: { tableCode: $props.tableCode, userFk: user.id }, }; const userConfig = await getConfig('UserConfigViews', userConfigFilter); + console.log('userConfig: ', userConfig); if (userConfig) { initialUserConfigViewData.value = userConfig; @@ -72,6 +74,7 @@ const fetchViewConfigData = async () => { const defaultConfigFilter = { where: { tableCode: $props.tableCode } }; const defaultConfig = await getConfig('DefaultViewConfigs', defaultConfigFilter); + console.log('defaultConfig: ', defaultConfig); if (defaultConfig) { setUserConfigViewData(defaultConfig.columns); @@ -131,6 +134,7 @@ const emitSavedConfig = () => { const activeColumns = formattedCols.value .filter((col) => col.active) .map((col) => col.name); + console.log('activeColumns: ', activeColumns); emit('onConfigSaved', activeColumns); }; diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index 4494c67ea..a8a63d86c 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -32,9 +32,7 @@ const { viewSummary } = useSummaryDialog(); const router = useRouter(); onMounted(async () => { stateStore.rightDrawer = true; - const filteredColumns = columns.value.filter((col) => col.name !== 'picture'); - allColumnNames.value = filteredColumns.map((col) => col.name); - allColumnNames.value = columns.value; + allColumnNames.value = columns.value.map((col) => col.name); await arrayData.fetch({ append: false }); }); onUnmounted(() => (stateStore.rightDrawer = false)); @@ -327,6 +325,14 @@ const openTicketsDialog = (id) => { +