diff --git a/src/invenflask/app.py b/src/invenflask/app.py index 5c5af01..2992c89 100644 --- a/src/invenflask/app.py +++ b/src/invenflask/app.py @@ -473,12 +473,14 @@ def single_history(rq_type, item_id): if rq_type == 'asset': conn = get_db() + item_info = get_asset(item_id, 'edit') current = conn.execute( 'select * from checkouts where assetid = ?', (item_id,)) history = conn.execute( 'select * from history where assetid = ?', (item_id,)) conn.commit() if rq_type == 'staff': + item_info = get_staff(item_id) conn = get_db() current = conn.execute( 'select * from checkouts where staffid = ?', (item_id,)) @@ -486,4 +488,4 @@ def single_history(rq_type, item_id): 'select * from history where staffid = ?', (item_id,)) conn.commit() return render_template('single_history.html', hist_type=rq_type, - current=current, history=history) + current=current, history=history, item_info=item_info) diff --git a/src/invenflask/templates/single_history.html b/src/invenflask/templates/single_history.html index b60f373..9187984 100644 --- a/src/invenflask/templates/single_history.html +++ b/src/invenflask/templates/single_history.html @@ -3,7 +3,31 @@ {% block content %} {% if hist_type == 'staff' %}

Staff History

- + + + + + + + + + + + + + + + + + + + + + + +
First NameLast NameStaff IDDivisionDepartmentTitle
{{ item_info.first_name }}{{ item_info.last_name }}{{ item_info.id }}{{ item_info.division }}{{ item_info.department }}{{ item_info.title }}
+ +

Current Assets

@@ -21,7 +45,7 @@

Staff History

- +

History

@@ -41,9 +65,27 @@

Staff History

+ {% else %} +

Asset History

+ + + + + + + + + + + + + + + +
Radio IDTypeStatus
{{ item_info.id }}{{ item_info.asset_type }}{{ item_info.asset_status }}