parent
d3364af395
commit
d219c136c0
@ -1,10 +1,6 @@
|
|||||||
{% extends "problem.html" %}
|
{% extends "problem.html" %} {% block content %}
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
|
|
||||||
<h1>Error</h1>
|
<h1>Error</h1>
|
||||||
<p>
|
<p>Oops, something went wrong. Press the back button to try again.</p>
|
||||||
Oops, something went wrong. Press the back button to try again.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -1,48 +1,66 @@
|
|||||||
{% extends "main.html" %}
|
{% extends "main.html" %} {% block title %} Items {% endblock %} {% block
|
||||||
|
content %}
|
||||||
|
|
||||||
{% block title %} Items {% endblock %}
|
<h2 class="mb-4 flex items-center text-4xl font-extrabold">
|
||||||
|
{{item.name}} {% if !item.active %}
|
||||||
{% block content %}
|
<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"
|
||||||
<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
|
Inactive
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<section hx-get="/item/{{item_id}}/stats" hx-trigger="load" hx-swap="outerHTML"></section>
|
<section
|
||||||
|
hx-get="/item/{{item_id}}/stats"
|
||||||
|
hx-trigger="load"
|
||||||
|
hx-swap="outerHTML"
|
||||||
|
></section>
|
||||||
|
|
||||||
{% if item.active %}
|
{% if item.active %}
|
||||||
<section class="mx-auto mb-5"
|
<section
|
||||||
x-data="{ negative_form_open: false, positive_form_open: false }">
|
class="mx-auto mb-5"
|
||||||
|
x-data="{ negative_form_open: false, positive_form_open: false }"
|
||||||
|
>
|
||||||
<div class="flex justify-evenly">
|
<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"
|
<button
|
||||||
@click="negative_form_open = ! negative_form_open">
|
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
|
Minus
|
||||||
</button>
|
</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"
|
<button
|
||||||
@click="positive_form_open = ! positive_form_open">
|
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"
|
||||||
|
>
|
||||||
Plus
|
Plus
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div x-show="negative_form_open" @click.outside="negative_form_open = false">
|
<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
|
||||||
|
hx-get="/item/{{item_id}}/adjustment/negative"
|
||||||
|
hx-trigger="load"
|
||||||
|
hx-swap="outerHTML"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div x-show="positive_form_open" @click.outside="positive_form_open = false">
|
<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
|
||||||
|
hx-get="/item/{{item_id}}/adjustment/positive"
|
||||||
|
hx-trigger="load"
|
||||||
|
hx-swap="outerHTML"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<section class="mx-auto">
|
<section class="mx-auto">
|
||||||
<div hx-get="/item/{{item_id}}/adjustments" hx-trigger="load" hx-swap="outerHTML">
|
<div
|
||||||
</div>
|
hx-get="/item/{{item_id}}/adjustments"
|
||||||
|
hx-trigger="load"
|
||||||
|
hx-swap="outerHTML"
|
||||||
|
></div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -1,16 +1,18 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="color-scheme" content="light dark">
|
<meta name="color-scheme" content="light dark" />
|
||||||
<link rel="stylesheet" href="/css/pico.min.css">
|
<link rel="stylesheet" href="/css/pico.min.css" />
|
||||||
<script src="/js/htmx.min.js"></script>
|
<script src="/js/htmx.min.js"></script>
|
||||||
<title>Problem</title>
|
<title>Problem</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main class="container">
|
<main class="container">
|
||||||
{% block content %}<p>Something went wrong</p>{% endblock %}
|
{% block content %}
|
||||||
|
<p>Something went wrong</p>
|
||||||
|
{% endblock %}
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in new issue