71 lines
4.1 KiB
Plaintext
71 lines
4.1 KiB
Plaintext
{% import "includes/macros" as macros %}
|
|
{% import "includes/forms/log" as log %}
|
|
{% 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">Scheckbücher</h1>
|
|
<form action="/admin/user/new/scheckbuch"
|
|
method="post"
|
|
class="mt-4 bg-primary-900 rounded-md text-white px-3 pb-3 pt-2 sm:flex items-end justify-between">
|
|
<div class="w-full">
|
|
<h2 class="text-md font-bold mb-2 uppercase tracking-wide">Neues Scheckbuch hinzufügen</h2>
|
|
<div class="grid md:grid-cols-3">
|
|
<div>
|
|
<label for="name" class="sr-only">Name</label>
|
|
<input type="text"
|
|
name="name"
|
|
class="relative block rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6 mb-2 md:mb-0"
|
|
placeholder="Name" />
|
|
</div>
|
|
<div>
|
|
<label for="name" class="sr-only">Mail</label>
|
|
<input type="mail"
|
|
name="mail"
|
|
class="relative block rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6 mb-2 md:mb-0"
|
|
placeholder="Mail" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="text-right">
|
|
<input value="Hinzufügen"
|
|
type="submit"
|
|
class="w-28 mt-2 sm:mt-0 rounded-md bg-primary-500 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer" />
|
|
</div>
|
|
</form>
|
|
<!-- START filterBar -->
|
|
<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" />
|
|
</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>
|
|
{% for scheckbook in scheckbooks %}
|
|
{% set user = scheckbook.1 %}
|
|
{% set trips = scheckbook.0 %}
|
|
<div {% if "paid" in user.roles %}style="background-color: green;"{% endif %}
|
|
data-filterable="true"
|
|
data-filter="{{ user.name }} {% if "paid" in user.roles %} 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>{{ user.name }} - Ausfahrten: {{ trips | length }}</b>
|
|
{% for trip in trips %}
|
|
<li>{{ log::show_old(log=trip, state="completed", only_ones=false, index=loop.index) }}</li>
|
|
{% endfor %}
|
|
</div>
|
|
{% if "admin" in loggedin_user.roles or "kassier" in loggedin_user.roles %}
|
|
<a href="/admin/user/fees/paid?user_ids[]={{ user.id }}">Zahlungsstatus ändern</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endblock content %}
|