This commit is contained in:
NaNoMelo 2024-10-20 15:53:02 +02:00 committed by imperosol
parent 1bce7e055f
commit f133bac921
4 changed files with 24 additions and 4 deletions

View File

@ -23,8 +23,10 @@ class PermanencySchema(ModelSchema):
class PermanencyFilterSchema(FilterSchema): class PermanencyFilterSchema(FilterSchema):
start_date: datetime | None = Field(None, q="start__gte") start_after: datetime | None = Field(None, q="start__gte")
end_date: datetime | None = Field(None, q="end__lte") 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") counter: set[int] | None = Field(None, q="counter_id__in")

View File

@ -21,4 +21,21 @@
align-items: center; 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;
}
} }

View File

@ -25,8 +25,8 @@ interface EventInput {
backgroundColor: string; backgroundColor: string;
} }
// TODO: Fix du look (bandes blanches dans la table, ...)
// TODO: Semaines passées // TODO: Semaines passées
// TODO: Manage locales
exportToHtml("loadChart", loadChart); exportToHtml("loadChart", loadChart);
@ -35,7 +35,7 @@ async function loadChart(options: ActivityChartConfig) {
query: { query: {
counter: [options.counterId], counter: [options.counterId],
// biome-ignore lint/style/useNamingConvention: backend API uses snake_case // biome-ignore lint/style/useNamingConvention: backend API uses snake_case
start_date: options.startDate.toISOString(), end_after: options.startDate.toISOString(),
}, },
} as PermanencyFetchPermananciesData); } as PermanencyFetchPermananciesData);

View File

@ -29,6 +29,7 @@
<h4>{% trans %}Last Week Activity {% endtrans %}</h4> <h4>{% trans %}Last Week Activity {% endtrans %}</h4>
<div id="activityGraph" width="400" height="200"></div> <div id="activityGraph" width="400" height="200"></div>
<br/> <br/>
<br/>
{% endif %} {% endif %}
<h5>{% trans %}Legend{% endtrans %}</h5> <h5>{% trans %}Legend{% endtrans %}</h5>