Fix missing current permanency display, delegate slot label config to locales

This commit is contained in:
NaNoMelo 2024-10-22 15:41:34 +02:00 committed by imperosol
parent 9206fed4ce
commit 203b5d88ac
2 changed files with 2 additions and 2 deletions

View File

@ -27,6 +27,7 @@ class PermanencyFilterSchema(FilterSchema):
start_before: datetime | None = Field(None, q="start__lte")
end_after: datetime | None = Field(None, q="end__gte")
end_before: datetime | None = Field(None, q="end__lte")
took_place_after: datetime | None = Field(None, q=["start__gte", "end__gte"])
counter: set[int] | None = Field(None, q="counter_id__in")

View File

@ -34,7 +34,7 @@ async function loadChart(options: ActivityChartConfig) {
query: {
counter: [options.counterId],
// biome-ignore lint/style/useNamingConvention: backend API uses snake_case
end_after: options.startDate.toISOString(),
took_place_after: options.startDate.toISOString(),
},
} as PermanencyFetchPermananciesData);
@ -44,7 +44,6 @@ async function loadChart(options: ActivityChartConfig) {
plugins: [timeGridPlugin],
initialView: "timeGridWeek",
locale: options.locale,
slotLabelFormat: { hour: "2-digit", minute: "2-digit", hour12: false },
dayHeaderFormat: { weekday: "long" },
firstDay: 1,
views: { timeGrid: { allDaySlot: false } },