mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Tweaks
- Can't edit build status directly - Refresh BOM table on reload - Hide Company tabs that are not yet functional
This commit is contained in:
parent
fb89574c42
commit
7e7ac60a1a
@ -23,8 +23,6 @@ class EditBuildForm(HelperForm):
|
||||
'batch',
|
||||
'URL',
|
||||
'notes',
|
||||
'status',
|
||||
# 'completion_date',
|
||||
]
|
||||
|
||||
|
||||
|
@ -6,11 +6,13 @@
|
||||
<li{% if tab == 'parts' %} class='active'{% endif %}>
|
||||
<a href="{% url 'company-detail-parts' company.id %}">Supplier Parts <span class='badge'>{{ company.part_count }}</span></a>
|
||||
</li>
|
||||
{% if 0 %}
|
||||
<li{% if tab == 'po' %} class='active'{% endif %}>
|
||||
<a href="#">Purchase Orders</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if company.is_customer %}
|
||||
{% endif %}
|
||||
{% if company.is_customer and 0 %}
|
||||
<li{% if tab == 'co' %} class='active'{% endif %}>
|
||||
<a href="#">Sales Orders</a>
|
||||
</li>
|
||||
|
@ -60,7 +60,14 @@
|
||||
});
|
||||
|
||||
$("#bom-item-new").click(function () {
|
||||
launchModalForm("{% url 'bom-item-create' %}?parent={{ part.id }}", {});
|
||||
launchModalForm(
|
||||
"{% url 'bom-item-create' %}?parent={{ part.id }}",
|
||||
{
|
||||
success: function() {
|
||||
$("#bom-table").bootstrapTable('refresh');
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
{% else %}
|
||||
|
@ -114,22 +114,12 @@ function loadBomTable(table, options) {
|
||||
}
|
||||
);
|
||||
|
||||
// Part notes
|
||||
cols.push(
|
||||
{
|
||||
field: 'note',
|
||||
title: 'Notes',
|
||||
searchable: true,
|
||||
sortable: false,
|
||||
}
|
||||
);
|
||||
|
||||
if (options.editable) {
|
||||
cols.push({
|
||||
formatter: function(value, row, index, field) {
|
||||
var bEdit = "<button class='btn btn-success bom-edit-button btn-sm' type='button' url='/part/bom/" + row.pk + "/edit'>Edit</button>";
|
||||
var bDelt = "<button class='btn btn-danger bom-delete-button btn-sm' type='button' url='/part/bom/" + row.pk + "/delete'>Delete</button>";
|
||||
|
||||
|
||||
return "<div class='btn-group'>" + bEdit + bDelt + "</div>";
|
||||
}
|
||||
});
|
||||
@ -143,7 +133,7 @@ function loadBomTable(table, options) {
|
||||
sortable: true,
|
||||
formatter: function(value, row, index, field) {
|
||||
var text = "";
|
||||
|
||||
|
||||
if (row.quantity < row.sub_part_detail.available_stock)
|
||||
{
|
||||
text = "<span class='label label-success'>" + value + "</span>";
|
||||
@ -152,22 +142,32 @@ function loadBomTable(table, options) {
|
||||
{
|
||||
text = "<span class='label label-warning'>" + value + "</span>";
|
||||
}
|
||||
|
||||
|
||||
return renderLink(text, row.sub_part.url + "stock/");
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// Part notes
|
||||
cols.push(
|
||||
{
|
||||
field: 'note',
|
||||
title: 'Notes',
|
||||
searchable: true,
|
||||
sortable: false,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// Configure the table (bootstrap-table)
|
||||
|
||||
table.bootstrapTable({
|
||||
sortable: true,
|
||||
search: true,
|
||||
clickToSelect: true,
|
||||
queryParams: function(p) {
|
||||
return {
|
||||
part: options.parent_id,
|
||||
// Configure the table (bootstrap-table)
|
||||
|
||||
table.bootstrapTable({
|
||||
sortable: true,
|
||||
search: true,
|
||||
clickToSelect: true,
|
||||
queryParams: function(p) {
|
||||
return {
|
||||
part: options.parent_id,
|
||||
}
|
||||
},
|
||||
columns: cols,
|
||||
|
Loading…
Reference in New Issue
Block a user