mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 20:39:23 +00:00
refactor and corrections for PR
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block additional_js %}
|
||||
<script defer src="{{ static('webpack/graph-index.ts') }}"></script>
|
||||
<script defer src="{{ static('webpack/counter/permanencies/time-grid-index.ts') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{%- block additional_css -%}
|
||||
@ -27,7 +27,7 @@
|
||||
{% endif %}
|
||||
</ul>
|
||||
<h4>{% trans %}Last weeks opening times{% endtrans %}</h4>
|
||||
<div id="activityGraph"></div>
|
||||
<div id="activityTimeGrid"></div>
|
||||
<br/>
|
||||
<br/>
|
||||
{% endif %}
|
||||
@ -49,8 +49,8 @@
|
||||
{{super()}}
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
loadChart({
|
||||
canvas: document.getElementById("activityGraph"),
|
||||
loadActivityTimeGrid({
|
||||
canvas: document.getElementById("activityTimeGrid"),
|
||||
// sets the start day to 7 days ago
|
||||
startDate: new Date(new Date().setDate(new Date().getDate() - 7)),
|
||||
counterId: {{ counter.id }},
|
||||
|
Reference in New Issue
Block a user