parent
705f8d9902
commit
5977cbae77
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="EMPTY_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="alpinejs" level="application" />
|
||||
</component>
|
||||
</module>
|
||||
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@ -1,69 +1,92 @@
|
||||
{% 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 %}
|
||||
|
||||
<h2 class="mb-4 flex items-center text-4xl font-extrabold">
|
||||
{{item.name}} {% if !item.active %}
|
||||
<span
|
||||
class="me-2 ms-2 rounded border border-cerise bg-orchid-pink px-2.5 py-0.5 text-2xl font-semibold text-cerise"
|
||||
>
|
||||
Inactive
|
||||
</span>
|
||||
{% endif %}
|
||||
</h2>
|
||||
{% block content %}
|
||||
|
||||
<section
|
||||
hx-get="/item/{{item_id}}/stats"
|
||||
hx-trigger="load"
|
||||
hx-swap="outerHTML"
|
||||
></section>
|
||||
<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>
|
||||
|
||||
{% if item.active %}
|
||||
<section
|
||||
class="mx-auto mb-5"
|
||||
x-data="{ negative_form_open: false, positive_form_open: false }"
|
||||
>
|
||||
<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"
|
||||
>
|
||||
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"
|
||||
<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 %}
|
||||
<span
|
||||
class="me-2 ms-2 rounded border border-cerise bg-orchid-pink px-2.5 py-0.5 text-2xl font-semibold text-cerise"
|
||||
>
|
||||
Plus
|
||||
</button>
|
||||
</div>
|
||||
Inactive
|
||||
</span>
|
||||
{% endif %}
|
||||
</h2>
|
||||
|
||||
<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>
|
||||
<section
|
||||
hx-get="/item/{{item_id}}/stats"
|
||||
hx-trigger="load"
|
||||
hx-swap="outerHTML"
|
||||
></section>
|
||||
|
||||
<div x-show="positive_form_open" @click.outside="positive_form_open = false">
|
||||
{% if item.active %}
|
||||
<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="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="sidebar_content = 'positive-adjustment-form'; show_sidebar = true"
|
||||
>
|
||||
Plus
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<section class="mx-auto">
|
||||
<div
|
||||
hx-get="/item/{{item_id}}/adjustment/positive"
|
||||
hx-get="/item/{{item_id}}/adjustments"
|
||||
hx-trigger="load"
|
||||
hx-swap="outerHTML"
|
||||
></div>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<section class="mx-auto">
|
||||
<div
|
||||
hx-get="/item/{{item_id}}/adjustments"
|
||||
hx-trigger="load"
|
||||
hx-swap="outerHTML"
|
||||
></div>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Loading…
Reference in new issue