mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-29 14:06: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
|
## InvenTree App Release Notes
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### 0.7.2 - June 2022
|
||||||
|
---
|
||||||
|
|
||||||
|
- Add "quarantined" status flag for stock items
|
||||||
|
|
||||||
### 0.7.1 - May 2022
|
### 0.7.1 - May 2022
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -129,11 +129,12 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||||||
static const int DESTROYED = 60;
|
static const int DESTROYED = 60;
|
||||||
static const int REJECTED = 65;
|
static const int REJECTED = 65;
|
||||||
static const int LOST = 70;
|
static const int LOST = 70;
|
||||||
|
static const int QUARANTINED = 75;
|
||||||
static const int RETURNED = 85;
|
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) {
|
switch (status) {
|
||||||
case OK:
|
case OK:
|
||||||
@ -148,6 +149,8 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||||||
return L10().rejected;
|
return L10().rejected;
|
||||||
case LOST:
|
case LOST:
|
||||||
return L10().lost;
|
return L10().lost;
|
||||||
|
case QUARANTINED:
|
||||||
|
return L10().quarantined;
|
||||||
case RETURNED:
|
case RETURNED:
|
||||||
return L10().returned;
|
return L10().returned;
|
||||||
default:
|
default:
|
||||||
@ -166,6 +169,8 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||||||
case DESTROYED:
|
case DESTROYED:
|
||||||
case REJECTED:
|
case REJECTED:
|
||||||
return Color(0xFFe35a57);
|
return Color(0xFFe35a57);
|
||||||
|
case QUARANTINED:
|
||||||
|
return Color(0xFF0DCAF0);
|
||||||
case LOST:
|
case LOST:
|
||||||
default:
|
default:
|
||||||
return Color(0xFFAAAAAA);
|
return Color(0xFFAAAAAA);
|
||||||
|
@ -664,6 +664,9 @@
|
|||||||
"quantityPositive": "Quantity must be positive",
|
"quantityPositive": "Quantity must be positive",
|
||||||
"@quantityPositive": {},
|
"@quantityPositive": {},
|
||||||
|
|
||||||
|
"quarantined": "Quarantined",
|
||||||
|
"@quarantined": {},
|
||||||
|
|
||||||
"queryEmpty": "Enter search query",
|
"queryEmpty": "Enter search query",
|
||||||
"@queryEmpty": {},
|
"@queryEmpty": {},
|
||||||
|
|
||||||
|
@ -458,7 +458,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||||||
subtitle: Text("${item.partDescription}"),
|
subtitle: Text("${item.partDescription}"),
|
||||||
leading: InvenTreeAPI().getImage(item.partImage),
|
leading: InvenTreeAPI().getImage(item.partImage),
|
||||||
trailing: Text(
|
trailing: Text(
|
||||||
item.statusLabel(context),
|
item.statusLabel(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: item.statusColor
|
color: item.statusColor
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user