mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +00:00
Display "base" part when selecting substitutes
This commit is contained in:
parent
60c5635a21
commit
e879c97e1e
@ -319,7 +319,19 @@ function bomSubstitutesDialog(bom_item_id, substitutes, options={}) {
|
|||||||
rows += renderSubstituteRow(sub);
|
rows += renderSubstituteRow(sub);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var part_thumb = thumbnailImage(options.sub_part_detail.thumbnail || options.sub_part_detail.image);
|
||||||
|
var part_name = options.sub_part_detail.full_name;
|
||||||
|
var part_desc = options.sub_part_detail.description;
|
||||||
|
|
||||||
var html = `
|
var html = `
|
||||||
|
<div class='alert alert-block'>
|
||||||
|
<strong>{% trans "Base Part" %}</strong><hr>
|
||||||
|
${part_thumb} ${part_name} - <em>${part_desc}</em>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
|
||||||
|
// Add a table of individual rows
|
||||||
|
html += `
|
||||||
<table class='table table-striped table-condensed' id='substitute-table'>
|
<table class='table table-striped table-condensed' id='substitute-table'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -945,7 +957,9 @@ function loadBomTable(table, options={}) {
|
|||||||
subs,
|
subs,
|
||||||
{
|
{
|
||||||
table: table,
|
table: table,
|
||||||
|
part: row.part,
|
||||||
sub_part: row.sub_part,
|
sub_part: row.sub_part,
|
||||||
|
sub_part_detail: row.sub_part_detail,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user