From da24b4d836b6b524ba46bbf3b0f94ebed9cc4325 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 5 Apr 2024 13:39:43 +0200 Subject: [PATCH] refs #6111 onMounted --- src/pages/Route/RouteList.vue | 54 +++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index a8a63d86c..9fa6f58d8 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -29,13 +29,6 @@ const { validate } = useValidator(); const quasar = useQuasar(); const session = useSession(); const { viewSummary } = useSummaryDialog(); -const router = useRouter(); -onMounted(async () => { - stateStore.rightDrawer = true; - allColumnNames.value = columns.value.map((col) => col.name); - await arrayData.fetch({ append: false }); -}); -onUnmounted(() => (stateStore.rightDrawer = false)); const selectedRows = ref([]); const columns = computed(() => [ @@ -46,7 +39,7 @@ const columns = computed(() => [ sortable: true, align: 'center', columnFilter: { - component: VnInput, + component: 'VnInput', type: 'text', filterValue: null, event: getInputEvents, @@ -62,7 +55,7 @@ const columns = computed(() => [ sortable: true, align: 'left', columnFilter: { - component: VnSelectFilter, + component: 'VnSelectFilter', type: 'select', filterValue: null, event: getInputEvents, @@ -81,7 +74,7 @@ const columns = computed(() => [ sortable: true, align: 'left', columnFilter: { - component: VnSelectFilter, + component: 'VnSelectFilter', type: 'select', filterValue: null, event: getInputEvents, @@ -100,7 +93,7 @@ const columns = computed(() => [ sortable: true, align: 'left', columnFilter: { - component: VnSelectFilter, + component: 'VnSelectFilter', type: 'select', filterValue: null, event: getInputEvents, @@ -119,7 +112,7 @@ const columns = computed(() => [ sortable: true, align: 'left', columnFilter: { - component: VnInputDate, + component: 'VnInputDate', type: 'select', filterValue: null, event: getInputEvents, @@ -139,7 +132,7 @@ const columns = computed(() => [ sortable: true, align: 'left', columnFilter: { - component: VnInput, + component: 'VnInput', type: 'select', filterValue: null, event: getInputEvents, @@ -152,7 +145,7 @@ const columns = computed(() => [ sortable: true, align: 'left', columnFilter: { - component: VnInputTime, + component: 'VnInputTime', type: 'select', filterValue: null, event: getInputEvents, @@ -165,7 +158,7 @@ const columns = computed(() => [ sortable: true, align: 'left', columnFilter: { - component: VnInputDate, + component: 'VnInputDate', type: 'select', filterValue: null, event: getInputEvents, @@ -197,9 +190,6 @@ const updateRoute = async (route) => { const allColumnNames = ref([]); const confirmationDialog = ref(false); const startingDate = ref(null); -const store = arrayData.store; -const rows = computed(() => store.data); -const rowsSelected = ref([]); const getInputEvents = (col) => { return col.columnFilter.type === 'select' @@ -267,6 +257,14 @@ const openTicketsDialog = (id) => { }) .onOk(() => refreshKey.value++); }; + +onMounted(async () => { + stateStore.rightDrawer = true; + allColumnNames.value = columns.value.map((col) => col.name); + console.log('les columnes', allColumnNames.value); + await arrayData.fetch({ append: false }); +}); +onUnmounted(() => (stateStore.rightDrawer = false)); @@ -386,6 +385,25 @@ const openTicketsDialog = (id) => { hide-pagination :no-data-label="t('globals.noResults')" > +