ui-improvements #749

Merged
philipp merged 17 commits from ui-improvements into main 2024-09-24 19:43:47 +02:00
Showing only changes of commit 2663772651 - Show all commits

View File

@ -1,43 +1,44 @@
{% import "includes/macros" as macros %}
{% extends "base" %}
{% block content %}
<div class="max-w-screen-lg w-full bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5">
<h1 class="h1">Gebühren</h1>
<!-- START filterBar -->
<div class="max-w-screen-lg w-full">
<h1 class="h1">
Gebühren
</h1>
<div class="search-wrapper">
<label for="name" class="sr-only">Suche</label>
<input type="search"
name="name"
id="filter-js"
class="search-bar"
placeholder="Suchen nach Name" />
placeholder="Suchen nach Namen..." />
</div>
<!-- END filterBar -->
<div class="bg-primary-100 dark:bg-primary-950 p-3 rounded-b-md grid gap-4">
<div id="filter-result-js"
class="text-primary-950 dark:text-white text-right"></div>
<div id="filter-result-js" class="search-result"></div>
<div class="border-r border-l border-gray-200 dark:border-primary-600">
{% for fee in fees | sort(attribute="name") %}
<div {% if fee.paid %}style="background-color: green;"{% endif %}
<div class="border-t border-gray-200 dark:border-primary-600 {% if fee.paid %}bg-[#15803d] text-white {% else %} bg-white {% endif %} dark:bg-primary-900 text-black dark:text-white flex justify-between items-center px-3 py-1 "
data-filterable="true"
data-filter="{{ fee.name }} {% if fee.paid %} has-already-paid {% else %} has-not-paid {% endif %}"
class="bg-white dark:bg-primary-900 p-3 rounded-md w-full">
<div class="grid sm:grid-cols-1 gap-3">
<div style="width: 100%" class="col-span-2">
<b>{{ fee.name }}</b>
<div class="grid md:grid-cols-3 gap-3 w-full py-3">
<div>
<strong>{{ fee.name }}</strong>
<span class="block">{{ fee.sum_in_cents / 100 }}€</span>
</div>
<div style="width: 100%">{{ fee.sum_in_cents / 100 }}€:</div>
<div style="width: 100%">
<div>
{% for p in fee.parts %}
{{ p.0 }} ({{ p.1 / 100 }}€)
{% if not loop.last %}+{% endif %}
{% endfor %}
</div>
{% if "admin" in loggedin_user.roles or "kassier" in loggedin_user.roles %}
<a href="/admin/user/fees/paid?{{ fee.user_ids }}">Zahlungsstatus ändern</a>
<div class="text-end"><a href="/admin/user/fees/paid?{{ fee.user_ids }}" class="btn btn-primary">Zahlungsstatus ändern</a></div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% endblock content %}