work+roles

This commit is contained in:
JMARyA 2024-12-06 14:04:17 +01:00
parent d64efb663a
commit 3caecf63f6
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
8 changed files with 49 additions and 10 deletions

View file

@ -1,5 +1,5 @@
<button class="{{ style.card }}"
<a class="{{ style.card }}"
href="/report/{{ report.id }}"
hx-get="/report/{{ report.id }}" hx-target="#main_content" hx-push-url="true" hx-swap="innerHTML"
>
{% if report.is_approved %}
@ -9,4 +9,4 @@ hx-get="/report/{{ report.id }}" hx-target="#main_content" hx-push-url="true" hx
</div>
{% endif %} {{ report }}
</button>
</a>

View file

@ -24,11 +24,11 @@
{% for report in reports %}
{% if forloop.first %} {% if report.week != week_now %}
<button class="{{ style.card }} flex items-center justify-center" title="Neues Berichtsheft"
hx-get="/write" hx-target="#main_content" hx-push-url="true" hx-swap="innerHTML"
<a class="{{ style.card }} flex items-center justify-center" title="Neues Berichtsheft"
href="/write" hx-get="/write" hx-target="#main_content" hx-push-url="true" hx-swap="innerHTML"
>
<span class="text-9xl font-bold"> + </span>
</button>
</a>
{% endif %} {% endif %}
{% include 'component/report.html' with report=report %}

View file

@ -0,0 +1,8 @@
{{ title|safe }}
<p class="text-lg font-bold mx-auto">
Benutzer:
</p>
<p> {{ user.display_name }} </p>
<p> {{ user.role.value|capfirst }} </p>

View file

@ -8,7 +8,7 @@
<!-- Main wrapper that will hold the header, sidebar, and content -->
<div class="flex flex-col min-h-screen">
<header class="w-full bg-red-600 text-white flex py-4 shadow-md max-h-20 h-full max-h-20">
<button id="menu-toggle" class="text-2xl focus:outline-none ml-5" onclick="toggleSidepanel()">
<button id="menu-toggle" class="text-2xl focus:outline-none ml-5 -mt-1" onclick="toggleSidepanel()">
&#9776;
</button>
@ -21,11 +21,18 @@
<div id="sidepanel" class="w-0 transition-all duration-250 ease-in-out bg-red-600 shadow-md text-white">
<ul class="space-y-2 font-medium">
<li>
<button href="#" onclick="toggleSidepanel()" class="rounded-lg lg:bg-transparent flex w-full items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-red-100 dark:hover:bg-red-700 group"
<a href="/" onclick="toggleSidepanel()" class="rounded-lg lg:bg-transparent flex w-full items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-red-100 dark:hover:bg-red-700 group"
hx-get="/" hx-target="#main_content" hx-push-url="true" hx-swap="innerHTML"
>
<span class="ms-3">Home</span>
</button>
</a>
<a href="/settings" onclick="toggleSidepanel()" class="rounded-lg lg:bg-transparent flex w-full items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-red-100 dark:hover:bg-red-700 group"
hx-get="/settings" hx-target="#main_content" hx-push-url="true" hx-swap="innerHTML"
>
<span class="ms-3">Settings</span>
</a>
</li>
</ul>
</div>