mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Shorten string fix (#5187)
* Fix for model renderer code - Handles string shortening without corrupting HTML * Fix for BOM table
This commit is contained in:
parent
35defe78c0
commit
2d2a084866
@ -1155,7 +1155,7 @@ function loadBomTable(table, options={}) {
|
||||
|
||||
var available_stock = availableQuantity(row);
|
||||
|
||||
var text = `${available_stock}`;
|
||||
var text = renderLink(`${available_stock}`, url);
|
||||
|
||||
if (row.sub_part_detail && row.sub_part_detail.units) {
|
||||
text += ` <small>${row.sub_part_detail.units}</small>`;
|
||||
@ -1179,8 +1179,6 @@ function loadBomTable(table, options={}) {
|
||||
}
|
||||
}
|
||||
|
||||
text = renderLink(text, url);
|
||||
|
||||
if (row.on_order && row.on_order > 0) {
|
||||
text += makeIconBadge(
|
||||
'fa-shopping-cart',
|
||||
|
@ -129,15 +129,19 @@ function renderModel(data, options={}) {
|
||||
}
|
||||
}
|
||||
|
||||
let text = `<span>${data.text}</span>`;
|
||||
let text = data.text;
|
||||
|
||||
if (showLink && data.url) {
|
||||
text = renderLink(text, data.url);
|
||||
}
|
||||
|
||||
text = `<span>${text}</span>`;
|
||||
|
||||
if (data.textSecondary) {
|
||||
text += ` - <small><em>${data.textSecondary}</em></small>`;
|
||||
}
|
||||
|
||||
if (showLink && data.url) {
|
||||
text = renderLink(text, data.url);
|
||||
}
|
||||
|
||||
|
||||
html += text;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user