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.
inventory-app/templates/item/item.html

53 lines
1.6 KiB

{% extends "main.html" %}
{% block title %} Items {% endblock %}
{% block content %}
<div class="container mb-5">
<h2>{{item.name}} {% if !item.active %}<span class="badge text-bg-danger">Inactive</span> {% endif %}</h2>
</div>
<section class="container">
<div hx-get="/item/{{item_id}}/stats" hx-trigger="load" hx-swap="outerHTML">
</div>
</section>
{% if item.active %}
<section class="container-fluid">
<div x-data="{ open: false }" class="mb-3">
<div class="d-flex justify-content-start">
<div class="me-3">
<button class="btn btn-primary display-6" @click="open = ! open">
Minus
</button>
</div>
<div x-show="open" @click.outside="open = false">
<div hx-get="/item/{{item_id}}/adjustment/negative" hx-trigger="load" hx-swap="outerHTML"></div>
</div>
</div>
</div>
<div x-data="{ open: false }" class="mb-3">
<div class="d-flex justify-content-start">
<div class="me-3">
<button class="btn btn-primary" @click="open = ! open">
Plus
</button>
</div>
<div x-show="open" @click.outside="open = false">
<div hx-get="/item/{{item_id}}/adjustment/positive" hx-trigger="load" hx-swap="outerHTML">
</div>
</div>
</div>
</div>
</section>
{% endif %}
<section class="container">
<div hx-get="/item/{{item_id}}/adjustments" hx-trigger="load" hx-swap="outerHTML">
</div>
</section>
{% endblock %}

Powered by TurnKey Linux.