diff --git a/app/main/views.py b/app/main/views.py index 9348ba4b9de21227f876825c039b4e8022cf108a..479ba274b9610e8de33fed0bb16af4388ac3b765 100644 --- a/app/main/views.py +++ b/app/main/views.py @@ -53,6 +53,7 @@ def retrieve_items(): utils.format_field(item.model), utils.format_field(item.location), utils.format_field(item.status), + utils.format_field(item.parent), ] for item in items] return jsonify(data=data) diff --git a/app/static/js/inventory.js b/app/static/js/inventory.js index dbd50eb04ab5f52747bc3348e9cf8383ed36a8cb..68f95b9a230066012ad7854f892c0baa910c80e8 100644 --- a/app/static/js/inventory.js +++ b/app/static/js/inventory.js @@ -19,7 +19,7 @@ $(document).ready(function() { "searchable": false }, { - "targets": [1], + "targets": [1, 9], "render": function(data, type, row) { // render funtion to create link to Item view page if ( data === null ) { diff --git a/app/templates/index.html b/app/templates/index.html index 62cff4dad2d5b6424b8541b33e6bfaa32c8c4da2..f76de15d8221da58c4f193f0ec99a637af071352 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -16,6 +16,7 @@ <th>Model</th> <th>Location</th> <th>Status</th> + <th>Parent</th> </tr> </thead> </table> diff --git a/tests/functional/test_web.py b/tests/functional/test_web.py index dfb119dcc4c587c09328fbbf6378cd4e044631fa..93ca521d66d20e3e545f4d5ceab1c6a72d79cd54 100644 --- a/tests/functional/test_web.py +++ b/tests/functional/test_web.py @@ -82,4 +82,4 @@ def test_retrieve_items(logged_client, session): response = get(logged_client, '/_retrieve_items') items = response.json['data'] assert set(serial_numbers) == set(item[4] for item in items) - assert len(items[0]) == 9 + assert len(items[0]) == 10