mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Fix order of operations (#591)
This commit is contained in:
parent
1a5992042a
commit
f5e3b4ac80
1 changed files with 9 additions and 9 deletions
|
|
@ -738,19 +738,19 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||||
|
|
||||||
Widget? _expiryIcon;
|
Widget? _expiryIcon;
|
||||||
|
|
||||||
if (widget.item.stale) {
|
if (widget.item.expired) {
|
||||||
_expiryIcon = Text(L10().expiryStale, style: TextStyle(color: COLOR_WARNING));
|
|
||||||
} else if (widget.item.expired) {
|
|
||||||
_expiryIcon = Text(L10().expiryExpired, style: TextStyle(color: COLOR_DANGER));
|
_expiryIcon = Text(L10().expiryExpired, style: TextStyle(color: COLOR_DANGER));
|
||||||
|
} else if (widget.item.stale) {
|
||||||
|
_expiryIcon = Text(L10().expiryStale, style: TextStyle(color: COLOR_WARNING));
|
||||||
}
|
}
|
||||||
|
|
||||||
tiles.add(
|
tiles.add(
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(L10().expiryDate),
|
title: Text(L10().expiryDate),
|
||||||
subtitle: Text(widget.item.expiryDateString),
|
subtitle: Text(widget.item.expiryDateString),
|
||||||
leading: Icon(TablerIcons.calendar_x),
|
leading: Icon(TablerIcons.calendar_x),
|
||||||
trailing: _expiryIcon,
|
trailing: _expiryIcon,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue