Sort inventory-related queries and fix toast message syntax in inventory template

This commit is contained in:
Yaro Kasear 2025-07-08 10:16:24 -05:00
parent bb564809ea
commit 1ba0380dde
2 changed files with 5 additions and 5 deletions

View file

@ -89,12 +89,12 @@ def inventory_item(id):
inventory_query = db.session.query(Inventory)
item = eager_load_inventory_relationships(inventory_query).filter(Inventory.id == id).first()
brands = db.session.query(Brand).all()
users = eager_load_user_relationships(db.session.query(User)).all()
rooms = eager_load_room_relationships(db.session.query(Room)).all()
brands = db.session.query(Brand).order_by(Brand.name).all()
users = eager_load_user_relationships(db.session.query(User).order_by(User.first_name)).all()
rooms = eager_load_room_relationships(db.session.query(Room).order_by(Room.name)).all()
worklog_query = db.session.query(WorkLog).filter(WorkLog.work_item_id == id)
worklog = eager_load_worklog_relationships(worklog_query).all()
types = db.session.query(Item).all()
types = db.session.query(Item).order_by(Item.description).all()
filtered_worklog_headers = {k: v for k, v in worklog_headers.items() if k not in ['Work Item', 'Contact', 'Follow Up?', 'Quick Analysis?']}
if item: