Improve table formatting when no allocation items found

This commit is contained in:
Oliver Walters 2019-05-01 18:54:54 +10:00
parent 7c11d917de
commit ad1d75c259
3 changed files with 7 additions and 1 deletions

View File

@ -36,6 +36,7 @@
loadAllocationTable(
$("#allocate-table-id-{{ bom_item.sub_part.id }}"),
"{{ bom_item.sub_part.name }}",
"{% url 'api-build-item-list' %}?build={{ build.id }}&part={{ bom_item.sub_part.id }}",
$("#new-item-{{ bom_item.sub_part.id }}")
);

View File

@ -122,6 +122,10 @@
margin-right: 2px;
}
.panel-group {
margin-bottom: 5px;
}
.float-right {
float: right;
}

View File

@ -1,9 +1,10 @@
function loadAllocationTable(table, url, button) {
function loadAllocationTable(table, part, url, button) {
// Load the allocation table
table.bootstrapTable({
url: url,
sortable: false,
formatNoMatches: function() { return 'No parts allocated for ' + part; },
columns: [
{
field: 'stock_item_detail',