implement first draft of switching handoperatable boats
Some checks failed
CI/CD Pipeline / deploy-staging (push) Blocked by required conditions
CI/CD Pipeline / deploy-main (push) Blocked by required conditions
CI/CD Pipeline / test (push) Has been cancelled

This commit is contained in:
2024-04-24 09:37:45 +02:00
parent 3f80cb498c
commit a0dbd0f490
8 changed files with 44 additions and 34 deletions

View File

@ -24,6 +24,7 @@
{{ macros::input(label='Default destination', name='default_destination', type='text') }}
<div>
{{ macros::checkbox(label="handgesteuert", name="default_shipmaster_only_steering") }}
{{ macros::checkbox(label="Umbau Hand-/Fußsteuerung möglich", name="convert_handoperated_possible") }}
{{ macros::checkbox(label="Skull", name="skull", checked=true) }}
{{ macros::checkbox(label="Externes Boot (anderer Verein)", name="external") }}
</div>
@ -66,6 +67,7 @@
{{ macros::input(label='Baujahr', name='year_built', type='number', min=1950, value=boat.year_built) }}
{{ macros::input(label='Bootsbauer', name='boatbuilder', type='text', value=boat.boatbuilder) }}
{{ macros::checkbox(label='handgesteuert', name='default_shipmaster_only_steering', id=uuid , checked=boat.default_shipmaster_only_steering) }}
{{ macros::checkbox(label='Umbau Hand-/Fußsteuerung möglich', name='convert_handoperated_possible', id=uuid , checked=boat.convert_handoperated_possible) }}
{{ macros::input(label='Default destination', name='default_destination', type='text', value=boat.default_destination) }}
{{ macros::checkbox(label='Skull', name='skull', id=uuid , checked=boat.skull) }}
{{ macros::checkbox(label='Externes Boot', name='external', id=uuid , checked=boat.external) }}

View File

@ -7,12 +7,12 @@
<details>
<summary class="font-bold cursor-pointer text-primary-900 dark:text-white border-t p-3 hover:bg-gray-100 dark:hover:bg-primary-950">
<span>
{% if grouped_boats[0].amount_seats < 9 or grouped_boats[0].amount_seats == 24 %}
{{ amount_seats }}x
{% elif grouped_boats[0].amount_seats == 9 %}
{% if grouped_boats[0].external %}
Vereinsfremde Boote
{% elif grouped_boats[0].default_shipmaster_only_steering %}
{{ grouped_boats[0].amount_seats - 1 }}+
{% else %}
Vereinsfremde Boote
{{ amount_seats }}x
{% endif %}
</span>
<small class="text-gray-500 dark:text-gray-100">({{ grouped_boats | length }})</small>

View File

@ -159,7 +159,7 @@
{% if required %}required="required"{% endif %}>
{% if default %}<option selected value>{{ default }}</option>{% endif %}
{% for d in data %}
<option value="{{ d.id }}" {% if d.id == selected_id %}selected{% endif %} {% if extras != '' %} {% for extra in extras %} {% if extra != 'on_water' and d[extra] %} data- {{ extra }}={{ d[extra] }} {% else %} {% if d[extra] %}disabled{% endif %} {% endif %} {% endfor %} {% endif %} {% if show_seats %} data-custom-properties='{"amount_seats": {{ d["amount_seats"] }}, "owner": "{{ d["owner"] }}", "default_destination": "{{ d["default_destination"] }}", "boat_in_ottensheim": {{ d["location_id"] == 2 }}, "boat_reserved_today": {{ d["reserved_today"] }}}' {% endif %}>
<option value="{{ d.id }}" {% if d.id == selected_id %}selected{% endif %} {% if extras != '' %} {% for extra in extras %} {% if extra != 'on_water' and d[extra] %} data- {{ extra }}={{ d[extra] }} {% else %} {% if d[extra] %}disabled{% endif %} {% endif %} {% endfor %} {% endif %} {% if show_seats %} data-custom-properties='{"amount_seats": {{ d["amount_seats"] }}, "owner": "{{ d["owner"] }}", "default_destination": "{{ d["default_destination"] }}", "boat_in_ottensheim": {{ d["location_id"] == 2 }}, "boat_reserved_today": {{ d["reserved_today"] }}, "convert_handoperated_possible": {{ d["convert_handoperated_possible"] }}, "default_handoperated": {{ d["default_shipmaster_only_steering"] }}}' {% endif %}>
{% for displa in display -%}
{%- if d[displa] -%}
{{- d[displa] -}}