mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Reload purchase order table after part order (#4219)
* Reload purchase order table after part order When on the part page, going to the "Purchase order" sidebar tab. You can order the part by pressing the "Order Part" button. After a succefull order, the form closes but the table on the page was never refreshed. * Fixed a js styling check error
This commit is contained in:
parent
1862904a2f
commit
11f147fd34
@ -757,7 +757,11 @@
|
|||||||
success: function(part) {
|
success: function(part) {
|
||||||
orderParts(
|
orderParts(
|
||||||
[part],
|
[part],
|
||||||
{}
|
{
|
||||||
|
onSuccess: function() {
|
||||||
|
$("#purchase-order-table").bootstrapTable('refresh');
|
||||||
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1032,7 +1032,7 @@ function exportOrder(redirect_url, options={}) {
|
|||||||
/*
|
/*
|
||||||
* Create a new form to order parts based on the list of provided parts.
|
* Create a new form to order parts based on the list of provided parts.
|
||||||
*/
|
*/
|
||||||
function orderParts(parts_list, options={}) {
|
function orderParts(parts_list, options) {
|
||||||
|
|
||||||
var parts = [];
|
var parts = [];
|
||||||
|
|
||||||
@ -1162,6 +1162,10 @@ function orderParts(parts_list, options={}) {
|
|||||||
// If the modal is now "empty", dismiss it
|
// If the modal is now "empty", dismiss it
|
||||||
if (!($(opts.modal).find('.part-order-row').exists())) {
|
if (!($(opts.modal).find('.part-order-row').exists())) {
|
||||||
closeModal(opts.modal);
|
closeModal(opts.modal);
|
||||||
|
// If there is a onSuccess callback defined, call it
|
||||||
|
if (options && options.onSuccess) {
|
||||||
|
options.onSuccess();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user