You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.7 KiB
48 lines
1.7 KiB
{% extends "main.html" %}
|
|
|
|
{% block title %} Items {% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<h2 class="flex items-center text-4xl font-extrabold mb-4">
|
|
{{item.name}}
|
|
{% if !item.active %}
|
|
<span class="bg-orchid-pink text-cerise border border-cerise text-2xl font-semibold me-2 px-2.5 py-0.5 rounded ms-2">
|
|
Inactive
|
|
</span>
|
|
{% endif %}
|
|
</h2>
|
|
|
|
<section hx-get="/item/{{item_id}}/stats" hx-trigger="load" hx-swap="outerHTML"></section>
|
|
|
|
{% 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="text-slate-100 bg-paynes-gray hover:bg-dark-cyan focus:ring-4 focus:ring-dark-cyan font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 focus:outline-none"
|
|
@click="negative_form_open = ! negative_form_open">
|
|
Minus
|
|
</button>
|
|
<button class="text-slate-100 bg-paynes-gray hover:bg-dark-cyan focus:ring-4 focus:ring-dark-cyan font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 focus:outline-none"
|
|
@click="positive_form_open = ! positive_form_open">
|
|
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 %}
|
|
|
|
<section class="mx-auto">
|
|
<div hx-get="/item/{{item_id}}/adjustments" hx-trigger="load" hx-swap="outerHTML">
|
|
</div>
|
|
</section>
|
|
|
|
{% endblock %} |