From f21a03c53649006168da3ed4d0dc8825bf1b1c91 Mon Sep 17 00:00:00 2001 From: Felix Cornelissen Date: Mon, 16 Dec 2024 12:34:03 +0100 Subject: [PATCH] cleanup --- .../publicatie/PublicatiesOverview.vue | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/odpc.client/src/features/publicatie/PublicatiesOverview.vue b/odpc.client/src/features/publicatie/PublicatiesOverview.vue index 55d48ad..30f035d 100644 --- a/odpc.client/src/features/publicatie/PublicatiesOverview.vue +++ b/odpc.client/src/features/publicatie/PublicatiesOverview.vue @@ -141,8 +141,8 @@ const untilDateInclusive = ref(""); // we zoeken met een datum in een datum-tijd veld, daarom corrigeren we de datum hier const untilDateExclusive = computed({ get: () => addDay(untilDateInclusive.value), - set: (v) => untilDateInclusive.value = subtractDay(v) -}) + set: (v) => (untilDateInclusive.value = subtractDay(v)) +}); const sortingOptions = { officiele_titel: "Title (a-z)", @@ -162,16 +162,20 @@ const searchParamsConfig = { }; const addDay = (v: string) => { - if(!v) return v - const date = new Date(v) - return new Date(date.getFullYear(), date.getMonth(), date.getDate() + 2).toISOString().substring(0, 10) -} + if (!v) return v; + const date = new Date(v); + return new Date(date.getFullYear(), date.getMonth(), date.getDate() + 2) + .toISOString() + .substring(0, 10); +}; const subtractDay = (v: string) => { - if(!v) return v - const date = new Date(v) - return new Date(date.getFullYear(), date.getMonth(), date.getDate()).toISOString().substring(0, 10) -} + if (!v) return v; + const date = new Date(v); + return new Date(date.getFullYear(), date.getMonth(), date.getDate()) + .toISOString() + .substring(0, 10); +}; const { pagedResult, queryParams, pageCount, onNext, onPrev, isFetching, error } = usePagedSearch< Publicatie,