[TASK] rm unnecessary personal stat

This commit is contained in:
Marie Birner 2025-01-07 10:54:15 +01:00
parent 022ec6bd5b
commit 5b013fe389

View File

@ -72,42 +72,5 @@
<span class="pl-3 w-20 text-right"><b>{{ guest_km.amount_trips + club_trips }}</b></span>
</div>
</div>
<div id="container" class="w-full"></div>
</div>
<script>
{% if personal %}
const data = [
{%- for p in personal %}{ date: '{{p.date}}', km: {{p.km}} },{%- endfor %}
]
sessionStorage.setItem('userStats', JSON.stringify(data));
{% endif %}
function getYearFromURL() {
var queryParams = new URLSearchParams(window.location.search);
return queryParams.get('year');
}
function populateYears() {
var select = document.getElementById('yearSelect');
var currentYear = new Date().getFullYear();
var selectedYear = getYearFromURL() || currentYear;
for (var year = 1977; year <= currentYear; year++) {
var option = document.createElement('option');
option.value = option.textContent = year;
if (year == selectedYear) {
option.selected = true;
}
select.appendChild(option);
}
}
function changeYear() {
var selectedYear = document.getElementById('yearSelect').value;
window.location.href = '?year=' + selectedYear;
}
// Call this function when the page loads
populateYears();
</script>
<script src="/public/logbook.js"></script>
{% endblock content %}