diff --git a/frontend/main.ts b/frontend/main.ts index a04b37c..876f650 100644 --- a/frontend/main.ts +++ b/frontend/main.ts @@ -139,9 +139,8 @@ function selectBoatChange() { const event = e as ChoiceBoatEvent; boat_reserved_today = event.detail.customProperties.boat_reserved_today; - console.log(event.detail.customProperties); if (boat_reserved_today){ - alert(event.detail.label+' wurde heute reserviert. Bitte kontrolliere, dass du die Reservierung nicht störst.'); + alert(event.detail.label.trim()+' wurde heute reserviert. Bitte kontrolliere, dass du die Reservierung nicht störst.'); } boat_in_ottensheim = event.detail.customProperties.boat_in_ottensheim; diff --git a/staging-diff.sql b/staging-diff.sql index 6f23c35..e69de29 100644 --- a/staging-diff.sql +++ b/staging-diff.sql @@ -1,11 +0,0 @@ -CREATE TABLE IF NOT EXISTS "boat_reservation" ( - "id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, - "boat_id" INTEGER NOT NULL REFERENCES boat(id), - "start_date" DATE NOT NULL, - "end_date" DATE NOT NULL, - "time_desc" TEXT NOT NULL, - "usage" TEXT NOT NULL, - "user_id_applicant" INTEGER NOT NULL REFERENCES user(id), - "user_id_confirmation" INTEGER REFERENCES user(id), - "created_at" datetime not null default CURRENT_TIMESTAMP -); diff --git a/templates/boatreservations.html.tera b/templates/boatreservations.html.tera index 74436d5..6ddb6cd 100644 --- a/templates/boatreservations.html.tera +++ b/templates/boatreservations.html.tera @@ -42,22 +42,37 @@
{% for reservation in boatreservations %}
- Boot: {{ reservation.boat.name }} + Boot: + {{ reservation.boat.name }}
- Datum: {{ reservation.start_date }} - {% if reservation.end_date != reservation.start_date %}- {{ reservation.end_date }}{% endif %} + Reservierung: + {{ reservation.user_applicant.name }}
- Uhrzeit: {{ reservation.time_desc }} + Datum: + {{ reservation.start_date }} + {% if reservation.end_date != reservation.start_date %} + - + {{ reservation.end_date }} + {% endif %}
- Zweck: {{ reservation.usage }} + Uhrzeit: + {{ reservation.time_desc }}
- Reserviert von {{ reservation.user_applicant.name }} + Zweck: + {{ reservation.usage }} {% if loggedin_user %} {% if loggedin_user.id == reservation.user_applicant.id or "admin" in loggedin_user.roles %} - RESERVIERUNG LÖSCHEN + {% endif %} {% endif %}
diff --git a/templates/includes/forms/log.html.tera b/templates/includes/forms/log.html.tera index 1f29201..8c04c08 100644 --- a/templates/includes/forms/log.html.tera +++ b/templates/includes/forms/log.html.tera @@ -104,6 +104,7 @@ {{ log.departure | date(format="%H:%M") }} Uhr + ({{ log.departure | date(format="%d.%m.%Y") }}) 0 %} - Gäste (ohne Account): + Gäste + (ohne Account): {{ amount_guests }} {% endif %} {% if allowed_to_close and state == "on_water" %} @@ -182,18 +184,23 @@
{% endif %}
- {{ log.boat.name }} ({{ log.shipmaster_user.name -}} + {{ log.boat.name }} + ({{ log.shipmaster_user.name -}} {% if log.shipmaster_only_steering %} - handgesteuert {% endif -%} ) {% if state == "completed" and log.departure | date(format='%d.%m.%Y') == log.arrival | date(format='%d.%m.%Y') %} - {{ log.departure | date(format='%d.%m.%Y') }} ({{ log.departure | date(format='%H:%M') }} - {{ log.arrival | date(format='%H:%M') }}) + {{ log.departure | date(format='%d.%m.%Y') }} + ({{ log.departure | date(format='%H:%M') }} + - + {{ log.arrival | date(format='%H:%M') }}) {% else %} {{ log.departure | date(format='%d.%m.%Y (%H:%M)') }} {% if state == "completed" %} - - {{ log.arrival | date(format='%d.%m.%Y (%H:%M)') }} + - + {{ log.arrival | date(format='%d.%m.%Y (%H:%M)') }} {% endif %} {% endif %} @@ -205,7 +212,8 @@
{{ log.destination }} {% if state == "completed" %} - ({{ log.distance_in_km }} km) + ({{ log.distance_in_km }} + km) {% endif %} {% if log.comments %}- "{{ log.comments }}"{% endif %}
@@ -217,7 +225,9 @@ {% if not loop.last or amount_guests > 0 and log.boat.name != 'Externes Boot' %},{% endif %} {% endfor %} {% if amount_guests > 0 and log.boat.name != 'Externes Boot' %} - Gäste (ohne Account): {{ amount_guests }} + Gäste + (ohne Account): + {{ amount_guests }} {% endif %}
{% endif %} diff --git a/templates/includes/macros.html.tera b/templates/includes/macros.html.tera index db89100..ab69fdc 100644 --- a/templates/includes/macros.html.tera +++ b/templates/includes/macros.html.tera @@ -1,18 +1,25 @@ {% macro boatreservation() %} {% if reservations %} -
-

Bootsreservierungen

-
{% endif %} @@ -146,7 +155,7 @@ {% if required %}required="required"{% endif %}> {% if default %}{% endif %} {% for d in data %} -