mirror of
https://github.com/inventree/inventree-app.git
synced 2025-05-01 23:16:49 +00:00
Refactorin'
This commit is contained in:
parent
8a8b38da93
commit
140687c386
@ -246,11 +246,11 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String? get updatedDateString {
|
String get updatedDateString {
|
||||||
var _updated = updatedDate;
|
var _updated = updatedDate;
|
||||||
|
|
||||||
if (_updated == null) {
|
if (_updated == null) {
|
||||||
return null;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
final DateFormat _format = DateFormat("yyyy-MM-dd");
|
final DateFormat _format = DateFormat("yyyy-MM-dd");
|
||||||
@ -266,11 +266,11 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String? get stocktakeDateString {
|
String get stocktakeDateString {
|
||||||
var _stocktake = stocktakeDate;
|
var _stocktake = stocktakeDate;
|
||||||
|
|
||||||
if (_stocktake == null) {
|
if (_stocktake == null) {
|
||||||
return null;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
final DateFormat _format = DateFormat("yyyy-MM-dd");
|
final DateFormat _format = DateFormat("yyyy-MM-dd");
|
||||||
|
@ -479,27 +479,23 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Last update?
|
// Last update?
|
||||||
var update_date = item.updatedDateString;
|
if (item.updatedDateString.isNotEmpty) {
|
||||||
|
|
||||||
if (update_date != null) {
|
|
||||||
|
|
||||||
tiles.add(
|
tiles.add(
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(L10().lastUpdated),
|
title: Text(L10().lastUpdated),
|
||||||
subtitle: Text(update_date),
|
subtitle: Text(item.updatedDateString),
|
||||||
leading: FaIcon(FontAwesomeIcons.calendarAlt)
|
leading: FaIcon(FontAwesomeIcons.calendarAlt)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stocktake?
|
// Stocktake?
|
||||||
var stocktake_date = item.stocktakeDateString;
|
if (item.stocktakeDateString.isNotEmpty) {
|
||||||
|
|
||||||
if (stocktake_date != null) {
|
|
||||||
tiles.add(
|
tiles.add(
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(L10().lastStocktake),
|
title: Text(L10().lastStocktake),
|
||||||
subtitle: Text(stocktake_date),
|
subtitle: Text(item.stocktakeDateString),
|
||||||
leading: FaIcon(FontAwesomeIcons.calendarAlt)
|
leading: FaIcon(FontAwesomeIcons.calendarAlt)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user