mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26:47 +00:00
Add support for "quarantined" stock item status
This commit is contained in:
parent
9a5cf59efb
commit
aa4317a2fe
@ -1,6 +1,11 @@
|
||||
## InvenTree App Release Notes
|
||||
---
|
||||
|
||||
### 0.7.2 - June 2022
|
||||
---
|
||||
|
||||
- Add "quarantined" status flag for stock items
|
||||
|
||||
### 0.7.1 - May 2022
|
||||
---
|
||||
|
||||
|
@ -129,11 +129,12 @@ class InvenTreeStockItem extends InvenTreeModel {
|
||||
static const int DESTROYED = 60;
|
||||
static const int REJECTED = 65;
|
||||
static const int LOST = 70;
|
||||
static const int QUARANTINED = 75;
|
||||
static const int RETURNED = 85;
|
||||
|
||||
String statusLabel(BuildContext context) {
|
||||
String statusLabel() {
|
||||
|
||||
// TODO: Delete me - The translated status values are provided by the API!
|
||||
// TODO: Delete me - The translated status values should be provided by the API!
|
||||
|
||||
switch (status) {
|
||||
case OK:
|
||||
@ -148,6 +149,8 @@ class InvenTreeStockItem extends InvenTreeModel {
|
||||
return L10().rejected;
|
||||
case LOST:
|
||||
return L10().lost;
|
||||
case QUARANTINED:
|
||||
return L10().quarantined;
|
||||
case RETURNED:
|
||||
return L10().returned;
|
||||
default:
|
||||
@ -166,6 +169,8 @@ class InvenTreeStockItem extends InvenTreeModel {
|
||||
case DESTROYED:
|
||||
case REJECTED:
|
||||
return Color(0xFFe35a57);
|
||||
case QUARANTINED:
|
||||
return Color(0xFF0DCAF0);
|
||||
case LOST:
|
||||
default:
|
||||
return Color(0xFFAAAAAA);
|
||||
|
@ -664,6 +664,9 @@
|
||||
"quantityPositive": "Quantity must be positive",
|
||||
"@quantityPositive": {},
|
||||
|
||||
"quarantined": "Quarantined",
|
||||
"@quarantined": {},
|
||||
|
||||
"queryEmpty": "Enter search query",
|
||||
"@queryEmpty": {},
|
||||
|
||||
|
@ -458,7 +458,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
subtitle: Text("${item.partDescription}"),
|
||||
leading: InvenTreeAPI().getImage(item.partImage),
|
||||
trailing: Text(
|
||||
item.statusLabel(context),
|
||||
item.statusLabel(),
|
||||
style: TextStyle(
|
||||
color: item.statusColor
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user