oswilno/crates/oswilno-parking-space/templates/parking-spaces/all-partial.html
2023-09-05 16:09:26 +02:00

63 lines
2.1 KiB
HTML

<section class="container mx-auto px-4">
<section class="flex space-x-4">
<h1 class="text-white font-semibold text-5xl">
{{"Parking spaces"}}
</h1>
<div class="">
&nbsp;
</div>
<div>
</div>
{% if let Some(session) = session %}
<div>
<a
href="/parking-spaces/form"
x-get="/parking-spaces/form"
x-target="main"
class="text-emerald-500 background-transparent font-bold uppercase px-6 py-2 text-sm outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150 border-2 rounded-full"
>
<i class="fas fa-plus"></i>
</a>
</div>
{% endif %}
</section>
<section id="own-parking-spaces">
{% for parking_space in parking_spaces -%}
<oswilno-parking-space id="parking-space-{{ parking_space.id }}">
{% if let Some(location_id) = parking_space.location_id -%}
{% if let Some(location) = location_by_id.get(location_id) -%}
{% if let Some(spot) = parking_space.spot -%}
{% if let Some(account) = account_by_id.get(parking_space.account_id) -%}
<span>{{spot}}</span>
<span>{{location.name}}</span>
<span>{{location.number}}</span>
<span>{{location.stage}}</span>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
</oswilno-parking-space>
{% endfor %}
</section>
<oswilno-parking-space-rents>
{% for parking_space_rent in parking_space_rents -%}
{% if let Some(parking_space) = parking_space_by_id.get(parking_space_rent.parking_space_id) %}
{% if let Some(account) = account_by_id.get(parking_space.account_id) %}
<oswilno-parking-space-rent id="parking-space-rent-{{ parking_space_rent.id }}">
<oswilno-parking-space id="parking-space-{{ parking_space.id }}">
<oswilno-account id="account-{{ account.id }}">
<div>{{ account.login }}</div>
</oswilno-account>
</oswilno-parking-space>
<oswilno-price id="parking-space-rent-{{ parking_space_rent.id }}-price" multiplier="100" currency="PLN" price="{{ parking_space_rent.price }}">
{{ parking_space_rent.price }}
</oswilno-price>
</oswilno-parking-space-rent>
{% endif %}
{% endif %}
{% endfor -%}
</oswilno-parking-space-rents>
</section>