mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Text formatting
This commit is contained in:
		| @@ -1453,10 +1453,20 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) { | ||||
|              | ||||
|                     var required = requiredQuantity(row); | ||||
|  | ||||
|                     var text = `${available_stock}`; | ||||
|                     var text = ''; | ||||
|                      | ||||
|                     if (available_stock > 0) { | ||||
|                         text += `${available_stock}`; | ||||
|                     } | ||||
|                      | ||||
|                     if (available_stock < required) { | ||||
|                         text += `<span class='fas fa-times-circle icon-red float-right' title='{% trans "Insufficient stock available" %}'></span>`; | ||||
|                     } else { | ||||
|                         text += `<span class='fas fa-check-circle icon-green float-right' title='{% trans "Sufficient stock available" %}'></span>`; | ||||
|                     } | ||||
|  | ||||
|                     if (available_stock <= 0) { | ||||
|                         text = `<span class='badge rounded-pill bg-danger'>{% trans "No Stock Available" %}</span>`; | ||||
|                         text += `<span class='badge rounded-pill bg-danger'>{% trans "No Stock Available" %}</span>`; | ||||
|                     } else { | ||||
|                         var extra = ''; | ||||
|                         if ((substitute_stock > 0) && (variant_stock > 0)) { | ||||
| @@ -1471,12 +1481,6 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) { | ||||
|                             text += `<span title='${extra}' class='fas fa-info-circle float-right icon-blue'></span>`; | ||||
|                         } | ||||
|                     } | ||||
|  | ||||
|                     if (available_stock < required) { | ||||
|                         text += `<span class='fas fa-times-circle icon-red float-right' title='{% trans "Insufficient stock available" %}'></span>`; | ||||
|                     } else { | ||||
|                         text += `<span class='fas fa-check-circle icon-green float-right' title='{% trans "Sufficient stock available" %}'></span>`; | ||||
|                     } | ||||
|          | ||||
|                     return renderLink(text, url); | ||||
|                 }, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user