first draft of single user-edit page
All checks were successful
CI/CD Pipeline / test (push) Successful in 14m43s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped

This commit is contained in:
2025-04-29 22:37:04 +02:00
parent b0168b798c
commit 34850321b7
12 changed files with 414 additions and 166 deletions

View File

@ -82,7 +82,13 @@
<label for="{{ id }}" class="text-sm text-gray-600 dark:text-gray-100">
Ruderer (inkl. Schiffsführer und Steuerperson)
</label>
<select style="width: 100%;" multiple name="rowers[]" id="{{ id }}" class="w-full" data-seats="{{ amount_seats }}" data-init={{ init }}>
<select style="width: 100%"
multiple
name="rowers[]"
id="{{ id }}"
class="w-full"
data-seats="{{ amount_seats }}"
data-init="{{ init }}">
{% for user in users %}
{% set_global sel = false %}
{% for rower in selected %}

View File

@ -203,7 +203,14 @@ function setChoiceByLabel(choicesInstance, label) {
{% if default %}<option selected value>{{ default }}</option>{% endif %}
{% if nonSelectableDefault %}<option disabled selected value>{{ nonSelectableDefault }}</option>{% endif %}
{% for d in data %}
<option value="{{ d.id }}" {% if only_ergo and d.id!=4 %} disabled {% endif %}{% 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 %}>
<option value="{{ d.id }}"
{% if only_ergo and d.id!=4 %}disabled{% endif %}
{% 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] -}}