|
|
|
|
@ -1,7 +1,48 @@
|
|
|
|
|
{% extends "main.html" %} {% block title %} Items {% endblock %} {% block
|
|
|
|
|
content %}
|
|
|
|
|
{% extends "main.html" %}
|
|
|
|
|
|
|
|
|
|
<div class="relative h-auto mx-auto max-w-[68.75rem] w-[95vw] px-4 py-4">
|
|
|
|
|
{% block title %} Items {% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
|
|
<div class="relative h-auto"
|
|
|
|
|
x-data="{ show_sidebar: false, sidebar_content: 'negative-adjustment-form' }"
|
|
|
|
|
x-on:form-submit-success="show_sidebar = false;"
|
|
|
|
|
>
|
|
|
|
|
<div class="absolute w-screen h-lvh" x-show="show_sidebar">
|
|
|
|
|
<div class="relative w-full h-full bg-neutral-300 backdrop-blur-md opacity-90 py-4 z-10">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="py-2 px-4 absolute rounded-tl-xl inset-y-0 right-0 bg-slate-100 opacity-100 w-11/12 max-w-[40rem] z-20">
|
|
|
|
|
<div class="flex">
|
|
|
|
|
<div class="flex-1 inline-flex items-center">
|
|
|
|
|
<h2 class="text-lg font-semibold uppercase" x-show="sidebar_content === 'negative-adjustment-form'">Negative Adjustment</h2>
|
|
|
|
|
<h2 class="text-lg font-semibold uppercase" x-show="sidebar_content === 'positive-adjustment-form'">Positive Adjustment</h2>
|
|
|
|
|
</div>
|
|
|
|
|
<button
|
|
|
|
|
class="inline-flex items-center whitespace-nowrap p-2 text-sm font-medium tracking-wide text-neutral-900 transition focus:outline-none focus:ring-4 focus:ring-dark-cyan dark:border-neutral-900 dark:text-slate-100"
|
|
|
|
|
@click="show_sidebar = ! show_sidebar"
|
|
|
|
|
>
|
|
|
|
|
<span class="sr-only">Close Sidebar</span>
|
|
|
|
|
X
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div x-show="sidebar_content === 'positive-adjustment-form'">
|
|
|
|
|
<div
|
|
|
|
|
hx-get="/item/{{item_id}}/adjustment/positive"
|
|
|
|
|
hx-trigger="load"
|
|
|
|
|
hx-swap="outerHTML"
|
|
|
|
|
></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div x-show="sidebar_content === 'negative-adjustment-form'">
|
|
|
|
|
<div
|
|
|
|
|
hx-get="/item/{{item_id}}/adjustment/negative"
|
|
|
|
|
hx-trigger="load"
|
|
|
|
|
hx-swap="outerHTML"
|
|
|
|
|
></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="relative h-auto mx-auto max-w-[68.75rem] w-[95vw] px-4 py-4">
|
|
|
|
|
|
|
|
|
|
<h2 class="mb-4 flex items-center text-4xl font-extrabold">
|
|
|
|
|
{{item.name}} {% if !item.active %}
|
|
|
|
|
@ -20,40 +61,21 @@ content %}
|
|
|
|
|
></section>
|
|
|
|
|
|
|
|
|
|
{% if item.active %}
|
|
|
|
|
<section
|
|
|
|
|
class="mx-auto mb-5"
|
|
|
|
|
x-data="{ negative_form_open: false, positive_form_open: false }"
|
|
|
|
|
>
|
|
|
|
|
<section class="mx-auto mb-5">
|
|
|
|
|
<div class="flex justify-evenly">
|
|
|
|
|
<button
|
|
|
|
|
class="mb-2 me-2 rounded-lg bg-paynes-gray px-5 py-2.5 text-sm font-medium text-slate-100 hover:bg-dark-cyan focus:outline-none focus:ring-4 focus:ring-dark-cyan"
|
|
|
|
|
@click="negative_form_open = ! negative_form_open"
|
|
|
|
|
@click="sidebar_content = 'negative-adjustment-form'; show_sidebar = true"
|
|
|
|
|
>
|
|
|
|
|
Minus
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
class="mb-2 me-2 rounded-lg bg-paynes-gray px-5 py-2.5 text-sm font-medium text-slate-100 hover:bg-dark-cyan focus:outline-none focus:ring-4 focus:ring-dark-cyan"
|
|
|
|
|
@click="positive_form_open = ! positive_form_open"
|
|
|
|
|
@click="sidebar_content = 'positive-adjustment-form'; show_sidebar = true"
|
|
|
|
|
>
|
|
|
|
|
Plus
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div x-show="negative_form_open" @click.outside="negative_form_open = false">
|
|
|
|
|
<div
|
|
|
|
|
hx-get="/item/{{item_id}}/adjustment/negative"
|
|
|
|
|
hx-trigger="load"
|
|
|
|
|
hx-swap="outerHTML"
|
|
|
|
|
></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div x-show="positive_form_open" @click.outside="positive_form_open = false">
|
|
|
|
|
<div
|
|
|
|
|
hx-get="/item/{{item_id}}/adjustment/positive"
|
|
|
|
|
hx-trigger="load"
|
|
|
|
|
hx-swap="outerHTML"
|
|
|
|
|
></div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
@ -64,6 +86,7 @@ content %}
|
|
|
|
|
hx-swap="outerHTML"
|
|
|
|
|
></div>
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|