Cleanup audit page somewhat

demo-mode
Wes Holland 11 months ago
parent d219c136c0
commit cb5616c81f

@ -1,63 +1,63 @@
{% extends "main.html" %} {% block title %} Audit Log {% endblock %} {% block {% extends "main.html" %} {% block title %} Audit Log {% endblock %} {% block
content %} content %}
<h1>Audit Log (Coming soon)</h1> <h1 class="mb-4 text-4xl font-extrabold uppercase">Audit Log (Coming soon)</h1>
<section class="container mb-4"> <section class="mb-4">
<form <form
action="/history" action="/history"
hx-get="/history" hx-get="/history"
hx-trigger="change" hx-trigger="change"
hx-target="#items" hx-target="#items"
> >
<div class="row"> <div class="flex between">
<div class="col-sm-2"> <div class="px-2">
<label for="start-date" class="form-label">Start Date</label> <label for="start-date" class="block">Start Date</label>
<input <input
type="date" type="date"
id="start-date" id="start-date"
name="start-date" name="start-date"
value="{{ start_date }}" value="{{ start_date }}"
class="form-control" class="block"
/> />
</div> </div>
<div class="col-sm-2"> <div class="px-2">
<label for="start-time" class="form-label">Start Time</label> <label for="start-time" class="block">Start Time</label>
<input <input
type="time" type="time"
id="start-time" id="start-time"
name="start-time" name="start-time"
value="{{ start_time }}" value="{{ start_time }}"
class="form-control" class="block"
/> />
<small class="form-text">Timezone {{ time_zone }}</small> <small class="block text-sm">Timezone {{ time_zone }}</small>
</div> </div>
<div class="col-sm-2"> <div class="px-2">
<label for="end-date" class="form-label">End Date</label> <label for="end-date" class="block">End Date</label>
<input <input
type="date" type="date"
id="end-date" id="end-date"
name="end-date" name="end-date"
value="{{ end_date }}" value="{{ end_date }}"
class="form-control" class="block"
/> />
</div> </div>
<div class="col-sm-2"> <div class="px-2">
<label for="end-time" class="form-label">End Time</label> <label for="end-time" class="form-label">End Time</label>
<input <input
type="time" type="time"
id="end-time" id="end-time"
name="end-time" name="end-time"
value="{{ end_time }}" value="{{ end_time }}"
class="form-control" class="block"
/> />
<small class="form-text">Timezone {{ time_zone }}</small> <small class="text-sm block">Timezone {{ time_zone }}</small>
</div> </div>
</div> </div>
</form> </form>
</section> </section>
<section id="items" class="container"> <section id="items" class="mb-4">
{% include "history_item_fragment.html" %} {% include "history_item_fragment.html" %}
</section> </section>

@ -1,20 +1,29 @@
<div class="card"> <table class="table-auto">
<ul class="list-group list-group-flush"> <thead>
{% for item in items %} <tr class="mb-2">
<li class="list-group-item"> <th>Date</th>
<div class="row"> <th>Item</th>
<p class="col">{{ item.create_date }}</p> <th>User</th>
<p class="col">{{ item.item_name }}</p> <th>Desc</th>
<p class="col">{{ item.user_name }}</p> </tr>
<p class="col"> </thead>
{% match item.item_type %} {% when <tbody>
HistoryItemEntry::PositiveAdjustment with (entry) %} {{ entry.amount {% for item in items %}
}} @ {{ entry.unit_value }} {% when <tr class="mb-2">
HistoryItemEntry::NegativeAdjustment with (entry) %} {{ entry.amount <td class="px-2">{{ item.create_date }}</td>
}} {{ entry.reason }} {% endmatch %} <td class="px-2">{{ item.item_name }}</td>
</p> <td class="px-2">{{ item.user_name }}</td>
</div> <td class="px-2">
</li> {% match item.item_type %}
{% endfor %} {% when HistoryItemEntry::PositiveAdjustment with (entry) %}
</ul> {{ entry.amount }} @ {{ entry.unit_value }}
</div> {% when HistoryItemEntry::NegativeAdjustment with (entry) %}
{{ entry.amount }} {{ entry.reason }}
{% endmatch %}
</td>
</tr>
{% endfor %}
</tbody>
</table>

@ -18,7 +18,7 @@
<body <body
class="min-h-screen bg-slate-100 text-neutral-900 dark:bg-neutral-900 dark:text-slate-100" class="min-h-screen bg-slate-100 text-neutral-900 dark:bg-neutral-900 dark:text-slate-100"
> >
<header class="mx-auto mb-4 bg-space-cadet font-sans"> <header class="top-0 w-full mb-4 bg-space-cadet font-sans">
<nav <nav
class="mx-auto flex max-w-7xl justify-between gap-2 px-2 py-4 sm:px-6 lg:px-8" class="mx-auto flex max-w-7xl justify-between gap-2 px-2 py-4 sm:px-6 lg:px-8"
> >
@ -65,7 +65,7 @@
</nav> </nav>
</header> </header>
<main <main
class="mx-auto bg-slate-100 px-1 text-neutral-900 dark:bg-neutral-900 dark:text-slate-100" class="relative mx-auto max-w-[68.75rem] w-[95vw] bg-slate-100 px-1 text-neutral-900 dark:bg-neutral-900 dark:text-slate-100"
> >
{% block content %} {% block content %}
<p>Content Missing</p> <p>Content Missing</p>

Loading…
Cancel
Save

Powered by TurnKey Linux.