add stats

This commit is contained in:
2023-07-24 20:56:46 +02:00
parent e90e27fc3d
commit 082fac9789
11 changed files with 142 additions and 9 deletions

View File

@ -43,16 +43,12 @@
<input type="submit" />
<script>
// Get the current date and time
const currentDate = new Date();
// Format the date and time as a string in the format "YYYY-MM-DDTHH:mm"
const formattedDate = currentDate.toISOString().slice(0, 16);
const localTime = new Date(currentDate.getTime() - (currentDate.getTimezoneOffset() * 60000));
const formattedDate = localTime.toISOString().slice(0, 16);
// Set the formatted string as the value of the input field
document.getElementById("datetime-dep").value = formattedDate;
</script>
</form>
@ -89,6 +85,17 @@
{{ macros::input(label="Distanz", name="distance_in_km", id="distance_in_km_home", type="number", min=0, value=log.distance_in_km) }}
{{ macros::input(label="Kommentar", name="comments", type="text", value=log.comments) }}
{{ macros::select(data=logtypes, select_name='logtype', default="Normal", selected_id=log.logtype) }}
<select multiple="multiple" name="rower[]">
{% for user in users %}
{% set_global selected = false %}
{% for rower in log.rowers %}
{% if rower.id == user.id %}
{% set_global selected = true %}
{% endif %}
{% endfor %}
<option value="{{ user.id }}" {% if selected %}selected{% endif %} onmousedown="event.preventDefault(); this.selected = !this.selected; return false;">{{user.name}}</option>
{% endfor %}
</select>
<input type="submit" value="AUSFAHRT BEENDEN"/>
</form>
{% endif %}