WIP Impelement more stuff

This commit is contained in:
Björn Fromme
2023-10-04 15:10:16 +02:00
parent dec8feedf2
commit cc1ab396af
35 changed files with 928 additions and 177 deletions
+20 -21
View File
@@ -20,9 +20,6 @@
<div {{ stimulus_controller('tabs', {}, { 'buttonActive': 'bg-gray-50' }) }}>
<div class="grid lg:grid-cols-3 gap-y-8 lg:gap-y-0 lg:gap-x-16">
<div>
<h1 class="text-2xl font-bold pb-8">
Mein Profil
</h1>
<ul role="list" class="space-y-1">
<li>
<button type="button" class="hover:bg-gray-50 block rounded-md py-2 pr-2 pl-10 w-full text-left text-sm leading-6 font-semibold text-gray-700" {{ stimulus_target('tabs', 'button') }} {{ stimulus_action('tabs', 'select', null, { 'tab': 0 }) }}>
@@ -52,6 +49,9 @@
</ul>
</div>
<div class="lg:col-span-2">
<h1 class="text-2xl font-bold pb-8">
Mein Profil
</h1>
{% if not form.vars.valid %}
<div class="border border-red-500 rounded-md p-4 text-red-500 mb-8">
{% include '_partials/_form_errors.html.twig' with { 'form': form } %}
@@ -59,7 +59,7 @@
{% include '_partials/_form_errors.html.twig' with { 'form': form.communication } %}
{% include '_partials/_form_errors.html.twig' with { 'form': form.bankAccount } %}
</div>
{% elseif errors|length > 0 %}
{% elseif errors|length %}
<div class="border border-red-500 rounded-md p-4 text-red-500 mb-8">
<ul>
{% for error in errors %}
@@ -121,27 +121,26 @@
<h2 class="text-xl font-bold pb-2">
Sonstiges
</h2>
<div class="flex flex-col space-y-4 pb-8">
<div class="flex flex-col space-y-4">
{{ form_row(form.taxId) }}
{{ form_row(form.healthInsuranceCompany) }}
{{ form_row(form.language) }}
{{ form_row(form.size) }}
</div>
<div {{ stimulus_controller('form-collection', { 'prototype': _self.collectionRow(form.pickups.vars.prototype)|json_encode }) }}>
<h4 class="font-bold">
Buszustiege
</h4>
<div {{ stimulus_target('form-collection', 'fields')}} class="flex flex-col space-y-4 mb-4">
{% do form.pickups.setRendered %}
{%- for pickup in form.pickups -%}{{- _self.collectionRow(pickup) -}}{%- endfor -%}
</div>
<div class="flex justify-end">
<button type="button"
{{ stimulus_action('form-collection', 'addItem') }}
title="Zustieg hinzufügen">
{{ icon('plus', 'w-4 h-4 pointer-events-none') }}
</button>
<div {{ stimulus_controller('form-collection', { 'prototype': _self.collectionRow(form.pickups.vars.prototype)|json_encode }) }}>
<h4 class="font-bold pb-2">
Buszustiege
</h4>
<div {{ stimulus_target('form-collection', 'fields')}} class="flex flex-col space-y-4 mb-4">
{% do form.pickups.setRendered %}
{%- for pickup in form.pickups -%}{{- _self.collectionRow(pickup) -}}{%- endfor -%}
</div>
<div class="flex justify-end">
<button type="button"
{{ stimulus_action('form-collection', 'addItem') }}
title="Zustieg hinzufügen">
{{ icon('plus', 'w-4 h-4 pointer-events-none') }}
</button>
</div>
</div>
</div>
</div>