More layout improvements to inventory.
This commit is contained in:
parent
5f7354c055
commit
a87dbc6b81
3 changed files with 27 additions and 10 deletions
|
|
@ -95,6 +95,7 @@ def inventory_item(id):
|
|||
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()
|
||||
notes = [note for log in worklog for note in log.updates]
|
||||
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?']}
|
||||
|
||||
|
|
@ -113,7 +114,8 @@ def inventory_item(id):
|
|||
worklog=worklog,
|
||||
worklog_headers=filtered_worklog_headers,
|
||||
worklog_rows=[{"id": log.id, "cells": [fn(log) for fn in filtered_worklog_headers.values()]} for log in worklog],
|
||||
types=types
|
||||
types=types,
|
||||
notes=notes
|
||||
)
|
||||
|
||||
@main.route("/inventory_item/new", methods=["GET"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue