add presets for date rage picker in reporting

This commit is contained in:
Gregor Vostrak
2024-09-17 19:16:01 +02:00
committed by Constantin Graf
parent 36cdae523f
commit 7e5374d5b1
2 changed files with 114 additions and 12 deletions

View File

@@ -37,10 +37,12 @@ import { useTagsStore } from '@/utils/useTags';
import { formatCents } from '@/packages/ui/src/utils/money';
import { useStorage } from '@vueuse/core';
const startDate = ref<string>(
const startDate = useStorage<string>(
'reporting-start-date',
getLocalizedDayJs(getDayJsInstance()().format()).subtract(14, 'd').format()
);
const endDate = ref<string>(
const endDate = useStorage<string>(
'reporting-end-date',
getLocalizedDayJs(getDayJsInstance()().format()).format()
);
const selectedTags = ref<string[]>([]);