2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-27 17:20:49 +00:00
- 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:
Oliver Walters
2021-05-11 23:38:26 +10:00
parent 84bfffd5a7
commit 03a231bffb
11 changed files with 119 additions and 16 deletions

View File

@ -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>`;
}