mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-27 17:20:49 +00:00
Updates
- Add StockHistoryCode to custom context - Add simple form for editing stock item history - Add tracking entry when stock status is changed
This commit is contained in:
@ -14,7 +14,7 @@ var {{ label }}Codes = {
|
||||
* Uses the values specified in "status_codes.py"
|
||||
* This function is generated by the "status_codes.html" template
|
||||
*/
|
||||
function {{ label }}StatusDisplay(key) {
|
||||
function {{ label }}StatusDisplay(key, options={}) {
|
||||
|
||||
key = String(key);
|
||||
|
||||
@ -31,5 +31,11 @@ function {{ label }}StatusDisplay(key) {
|
||||
label = '';
|
||||
}
|
||||
|
||||
return `<span class='label ${label}'>${value}</span>`;
|
||||
var classes = `label ${label}`;
|
||||
|
||||
if (options.classes) {
|
||||
classes += ' ' + options.classes;
|
||||
}
|
||||
|
||||
return `<span class='${classes}'>${value}</span>`;
|
||||
}
|
||||
|
Reference in New Issue
Block a user