2023-07-23 12:17:57 +02:00
|
|
|
{% import "includes/macros" as macros %}
|
2023-07-26 12:56:19 +02:00
|
|
|
{% import "includes/forms/log" as log %}
|
2023-07-23 12:17:57 +02:00
|
|
|
{% extends "base" %}
|
|
|
|
{% block content %}
|
2024-03-04 13:28:42 +01:00
|
|
|
<div class="w-full">
|
|
|
|
<h1 class="h1">Logbuch</h1>
|
2024-04-02 20:59:09 +02:00
|
|
|
<div class="w-full grid lg:grid-cols-5 gap-3 mt-5">
|
|
|
|
<div>
|
2024-04-23 22:39:59 +02:00
|
|
|
<div class="bg-white dark:bg-primary-900 rounded-md hidden lg:block shadow">
|
2024-04-02 20:59:09 +02:00
|
|
|
<h2 class="h2">Boote</h2>
|
|
|
|
<div>{{ log::show_boats(only_ones=false) }}</div>
|
|
|
|
</div>
|
2024-03-04 13:28:42 +01:00
|
|
|
</div>
|
2024-04-23 22:39:59 +02:00
|
|
|
<div class="lg:col-span-3">
|
2024-04-24 08:57:41 +02:00
|
|
|
<div class="bg-white dark:bg-primary-900 rounded-md shadow">
|
|
|
|
<h2 class="h2">Neue Ausfahrt</h2>
|
|
|
|
<div class="p-3">{{ log::new(shipmaster=loggedin_user.id) }}</div>
|
|
|
|
</div>
|
2024-03-04 13:28:42 +01:00
|
|
|
</div>
|
2024-04-02 20:59:09 +02:00
|
|
|
<div>
|
|
|
|
<div class="bg-white dark:bg-primary-900 rounded-md shadow pb-2">
|
|
|
|
<h2 class="h2">Am Wasser</h2>
|
|
|
|
{% if on_water | length > 0 %}
|
|
|
|
{% for log in on_water %}
|
|
|
|
{% if log.shipmaster == loggedin_user.id %}
|
2024-10-25 18:29:50 +02:00
|
|
|
{{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=not loggedin_user.allowed_to_steer) }}
|
2024-04-02 20:59:09 +02:00
|
|
|
{% elif "Vorstand" in loggedin_user.roles %}
|
2024-10-25 18:29:50 +02:00
|
|
|
{{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=not loggedin_user.allowed_to_steer) }}
|
2024-04-02 20:59:09 +02:00
|
|
|
{% else %}
|
|
|
|
{{ log::show(log=log, state="on_water", only_ones=true) }}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% else %}
|
|
|
|
<p class="p-3 text-center text-black dark:text-white">Kein Boot am Wasser</p>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{{ macros::boatreservation() }}
|
2024-08-13 23:02:34 +02:00
|
|
|
{{ macros::plannedtrips() }}
|
2024-03-04 13:28:42 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-04-26 09:50:01 +02:00
|
|
|
{% if loggedin_user %}<script>var loggedin_user_id = "{{ loggedin_user.id }}";</script>{% endif %}
|
2024-03-04 13:28:42 +01:00
|
|
|
<script src="/public/logbook.js"></script>
|
|
|
|
{% endblock content %}
|