2023-08-02 14:29:19 +02:00
|
|
|
{% import "includes/macros" as macros %}
|
|
|
|
{% import "includes/forms/log" as log %}
|
|
|
|
|
|
|
|
{% extends "base" %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
<div class="w-full">
|
|
|
|
<h1 class="h1">Bootschäden</h1>
|
|
|
|
|
|
|
|
{% if flash %}
|
|
|
|
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
|
|
|
{% endif %}
|
|
|
|
<h1>Neuen Schaden eintragen</h1>
|
|
|
|
<form action="/boatdamage" method="post">
|
|
|
|
{{ log::boat_select(only_ones=false) }}
|
|
|
|
{{ macros::input(label='Beschreibung des Schadens', name='desc', type='text', required=true) }}
|
2023-08-05 12:05:54 +02:00
|
|
|
{{ macros::checkbox(label='Boot sperren', name='lock_boat', type='text', required=true) }}
|
2023-08-02 14:29:19 +02:00
|
|
|
<input type="submit" value="Schaden eintragen" />
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
|
|
|
|
{% for boatdamage in boatdamages %}
|
|
|
|
Boat: {{ boatdamage.boat.name }}
|
|
|
|
Desc: {{ boatdamage.desc }}
|
|
|
|
Schaden eingetragen von {{ boatdamage.user_created.name }} am/um {{ boatdamage.created_at | date(format='%d. %m. %Y %H:%M') }}
|
|
|
|
{% if boatdamage.is_lock %}
|
|
|
|
Boot gesperrt
|
|
|
|
{% endif %}
|
|
|
|
{% if boatdamage.fixed_at %}
|
|
|
|
Repariert von {{ boatdamage.user_fixed.name }} am/um {{ boatdamage.fixed_at | date(format='%d. %m. %Y %H:%M') }}
|
|
|
|
{% elif loggedin_user.is_cox %}
|
|
|
|
<form action="/boatdamage/{{ boatdamage.id }}/fixed" method="post">
|
|
|
|
<input type="text" name="desc" value="{{ boatdamage.desc }}" />
|
|
|
|
{% if loggedin_user.is_tech %}
|
|
|
|
<input type="submit" value="Ich hab's repariert + verifiziert" />
|
|
|
|
{% else %}
|
|
|
|
<input type="submit" value="Ich hab's repariert" />
|
|
|
|
{% endif %}
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
{% if boatdamage.verified_at %}
|
|
|
|
Verifziert von {{ boatdamage.user_verified.name }} am/um {{ boatdamage.verified_at | date(format='%d. %m. %Y %H:%M') }}
|
|
|
|
{% elif loggedin_user.is_tech and boatdamage.fixed_at %}
|
|
|
|
<form action="/boatdamage/{{ boatdamage.id }}/verified" method="post">
|
|
|
|
<input type="text" name="desc" value="{{ boatdamage.desc }}" />
|
|
|
|
<input type="submit" value="Ich hab's verifiziert" />
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
<hr />
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% include "dynamics/sidebar" %}
|
|
|
|
{% endblock content%}
|