From acefd969582b18ecdc948143511be1f168c0ecd1 Mon Sep 17 00:00:00 2001 From: Yaro Kasear Date: Fri, 24 Oct 2025 11:05:57 -0500 Subject: [PATCH] More condition work. --- inventory/routes/entry.py | 2 +- inventory/routes/listing.py | 4 ++-- inventory/templates/entry_buttons.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/inventory/routes/entry.py b/inventory/routes/entry.py index 6f303d8..62a3cfa 100644 --- a/inventory/routes/entry.py +++ b/inventory/routes/entry.py @@ -53,7 +53,7 @@ def _fields_for_model(model: str): "attrs": {"class": "form-control"}, "label_attrs": {"class": "form-label"}, "label_spec": "{name} - {room_function.description}"}, {"name": "condition", "label": "Condition", "row": "status", "wrap": {"class": "col"}, - "label_attrs": {"class": "form-label"}}, + "label_attrs": {"class": "form-label"}, "label_spec": "{description}"}, # {"name": "condition", "label": "Condition", "row": "status", "wrap": {"class": "col"}, # "type": "select", "options": [ # {"label": "Deployed", "value": "Deployed"}, diff --git a/inventory/routes/listing.py b/inventory/routes/listing.py index ff3e2a9..ed7e38c 100644 --- a/inventory/routes/listing.py +++ b/inventory/routes/listing.py @@ -36,7 +36,7 @@ def init_listing_routes(app): if model.lower() == 'inventory': spec = {"fields": [ "label", "name", "barcode", "serial", "brand.name", "model", - "device_type.description", "condition", "owner.label", "location.label", + "device_type.description", "condition.description", "owner.label", "location.label", ]} columns = [ {"field": "label"}, @@ -46,7 +46,7 @@ def init_listing_routes(app): {"field": "brand.name", "label": "Brand"}, {"field": "model"}, {"field": "device_type.description", "label": "Device Type"}, - {"field": "condition"}, + {"field": "condition.description", "label": "Condition"}, {"field": "owner.label", "label": "Contact", "link": {"endpoint": "entry.entry", "params": {"id": "{owner.id}", "model": "user"}}}, {"field": "location.label", "label": "Room"}, diff --git a/inventory/templates/entry_buttons.html b/inventory/templates/entry_buttons.html index 608bb7b..89a5b1b 100644 --- a/inventory/templates/entry_buttons.html +++ b/inventory/templates/entry_buttons.html @@ -1,7 +1,7 @@