From b2078a506b4b271e6656f8a39a7e009f87f160f6 Mon Sep 17 00:00:00 2001 From: Dominik Pschenitschni Date: Tue, 11 Oct 2022 13:22:57 +0200 Subject: [PATCH] feat: working route sync --- src/components/misc/flatpickr/Flatpickr.vue | 13 -- src/components/tasks/gantt-chart.vue | 5 +- src/router/index.ts | 1 + src/views/list/ListGantt.vue | 236 +++++++++----------- 4 files changed, 114 insertions(+), 141 deletions(-) diff --git a/src/components/misc/flatpickr/Flatpickr.vue b/src/components/misc/flatpickr/Flatpickr.vue index 48d3097a0..af6c7707f 100644 --- a/src/components/misc/flatpickr/Flatpickr.vue +++ b/src/components/misc/flatpickr/Flatpickr.vue @@ -186,19 +186,6 @@ watch(config, () => { }); }, {deep:true}) - - -// watch(root, () => { -// if ( -// fp.value || // Return early if flatpickr is already loaded -// !root.value // our input needs to be mounted -// ) { -// return -// } - - -// }) - const fpInput = computed(() => { if (!fp.value) return return fp.value.altInput || fp.value.input; diff --git a/src/components/tasks/gantt-chart.vue b/src/components/tasks/gantt-chart.vue index 5c5bbb418..72dd5e6fd 100644 --- a/src/components/tasks/gantt-chart.vue +++ b/src/components/tasks/gantt-chart.vue @@ -71,13 +71,12 @@ export type DateRange = { dateTo: string, } -export interface GanttChartProps { +export interface GanttChartProps extends DateRange { listId: IList['id'] - dateRange: DateRange showTasksWithoutDates: boolean } -export const DATE_FORMAT = 'yyyy-LL-dd HH:mm' +// export const DATE_FORMAT = 'yyyy-LL-dd HH:mm' const props = withDefaults(defineProps(), { showTasksWithoutDates: false, diff --git a/src/router/index.ts b/src/router/index.ts index ce9ff8166..faf4823d7 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -383,6 +383,7 @@ const router = createRouter({ dateFrom: route.query.dateFrom as string, dateTo: route.query.dateTo as string, showTasksWithoutDates: Boolean(route.query.showTasksWithoutDates), + route, }), }, { diff --git a/src/views/list/ListGantt.vue b/src/views/list/ListGantt.vue index 20f8c89be..6be61d1d1 100644 --- a/src/views/list/ListGantt.vue +++ b/src/views/list/ListGantt.vue @@ -1,5 +1,5 @@