2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 20:45:44 +00:00

Add action buttons to the sales order page

This commit is contained in:
Oliver Walters
2020-04-21 22:02:17 +10:00
parent 15166c7797
commit b75c343236
3 changed files with 42 additions and 1 deletions

View File

@ -156,7 +156,30 @@ $("#so-lines-table").inventreeTable({
{
field: 'buttons',
formatter: function(value, row, index, field) {
return '-';
var html = '';
var pk = row.pk;
if (row.part) {
var part = row.part_detail;
html = `<div class='btn-group float-right' role='group'>`;
html += makeIconButton('fa-plus', `button-add-${pk}`);
if (part.purchaseable) {
html += makeIconButton('fa-shopping-cart', `button-buy-${pk}`);
}
if (part.assembly) {
html += makeIconButton('fa-tools', `button-build-${pk}`);
}
html += `</div>`;
}
return html;
}
},
],