Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
felixcicatt committed Dec 16, 2024
1 parent 9d8f46e commit f21a03c
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions odpc.client/src/features/publicatie/PublicatiesOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand All @@ -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,
Expand Down

0 comments on commit f21a03c

Please sign in to comment.