diff --git a/counter/schemas.py b/counter/schemas.py index 0304aadc..bdac0da8 100644 --- a/counter/schemas.py +++ b/counter/schemas.py @@ -21,6 +21,8 @@ class PermanencySchema(ModelSchema): class PermanencyFilterSchema(FilterSchema): - start_date: datetime | None = Field(None, q="start__gte") - end_date: datetime | None = Field(None, q="end__lte") + start_after: datetime | None = Field(None, q="start__gte") + 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") counter: set[int] | None = Field(None, q="counter_id__in") diff --git a/counter/static/counter/css/activity.scss b/counter/static/counter/css/activity.scss index 1ffb1111..c707dda1 100644 --- a/counter/static/counter/css/activity.scss +++ b/counter/static/counter/css/activity.scss @@ -21,4 +21,21 @@ align-items: center; } } +} + +#activityGraph { + th { + border: none; + } + + .fc-col-header-cell-cushion { + color: white; + } + + table table { + // the JS library puts tables inside the table + // Those additional tables must be hidden + border: none; + box-shadow: none; + } } \ No newline at end of file diff --git a/counter/static/webpack/graph-index.ts b/counter/static/webpack/graph-index.ts index f2de17f9..c68969ec 100644 --- a/counter/static/webpack/graph-index.ts +++ b/counter/static/webpack/graph-index.ts @@ -25,8 +25,8 @@ interface EventInput { backgroundColor: string; } -// TODO: Fix du look (bandes blanches dans la table, ...) // TODO: Semaines passées +// TODO: Manage locales exportToHtml("loadChart", loadChart); @@ -35,7 +35,7 @@ async function loadChart(options: ActivityChartConfig) { query: { counter: [options.counterId], // biome-ignore lint/style/useNamingConvention: backend API uses snake_case - start_date: options.startDate.toISOString(), + end_after: options.startDate.toISOString(), }, } as PermanencyFetchPermananciesData); diff --git a/counter/templates/counter/activity.jinja b/counter/templates/counter/activity.jinja index efee5175..8df16b12 100644 --- a/counter/templates/counter/activity.jinja +++ b/counter/templates/counter/activity.jinja @@ -29,6 +29,7 @@

{% trans %}Last Week Activity {% endtrans %}


+
{% endif %}
{% trans %}Legend{% endtrans %}