From c99be189bb394417e4cb2b9b2db14033f8fd5f3a Mon Sep 17 00:00:00 2001
From: Oliver <oliver.henry.walters@gmail.com>
Date: Tue, 20 Jul 2021 19:32:48 +1000
Subject: [PATCH 1/5] Updates!

- Add "last update date" to StockDetail view
- Add 'stocktake date" to StockDetail view
---
 lib/inventree/stock.dart     | 45 ++++++++++++++++++++++++++++--------
 lib/l10n                     |  2 +-
 lib/widget/stock_detail.dart | 25 ++++++++++++++++++++
 3 files changed, 62 insertions(+), 10 deletions(-)

diff --git a/lib/inventree/stock.dart b/lib/inventree/stock.dart
index 865aa88b..678fa83e 100644
--- a/lib/inventree/stock.dart
+++ b/lib/inventree/stock.dart
@@ -1,3 +1,4 @@
+import 'package:intl/intl.dart';
 import 'package:inventree/inventree/part.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:http/http.dart' as http;
@@ -222,20 +223,46 @@ class InvenTreeStockItem extends InvenTreeModel {
   int get trackingItemCount => (jsondata['tracking_items'] ?? 0) as int;
 
   // Date of last update
-  String get updated => jsondata["updated"] ?? "";
-
-  DateTime? get stocktakeDate {
-    if (jsondata.containsKey("stocktake_date")) {
-      if (jsondata["stocktake_date"] == null) {
-        return null;
-      }
-
-      return DateTime.tryParse(jsondata["stocktake_date"]) ?? null;
+  DateTime? get updatedDate {
+    if (jsondata.containsKey("updated")) {
+      return DateTime.tryParse(jsondata["updated"] ?? '');
     } else {
       return null;
     }
   }
 
+  String? get updatedDateString {
+    var _updated = updatedDate;
+
+    if (_updated == null) {
+      return null;
+    }
+
+    final DateFormat _format = DateFormat("yyyy-MM-dd");
+
+    return _format.format(_updated);
+  }
+
+  DateTime? get stocktakeDate {
+    if (jsondata.containsKey("stocktake_date")) {
+      return DateTime.tryParse(jsondata["stocktake_date"] ?? '');
+    } else {
+      return null;
+    }
+  }
+
+  String? get stocktakeDateString {
+    var _stocktake = stocktakeDate;
+
+    if (_stocktake == null) {
+      return null;
+    }
+
+    final DateFormat _format = DateFormat("yyyy-MM-dd");
+
+    return _format.format(_stocktake);
+  }
+
   String get partName {
 
     String nm = '';
diff --git a/lib/l10n b/lib/l10n
index 84f6ed3f..af4cd902 160000
--- a/lib/l10n
+++ b/lib/l10n
@@ -1 +1 @@
-Subproject commit 84f6ed3faf63cbf371016e134196400e5f822759
+Subproject commit af4cd9026a96d44d60f9187119f5ce19c74738d3
diff --git a/lib/widget/stock_detail.dart b/lib/widget/stock_detail.dart
index fd50798c..1029b021 100644
--- a/lib/widget/stock_detail.dart
+++ b/lib/widget/stock_detail.dart
@@ -418,7 +418,32 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
       );
     }
 
+    // Last update?
+    var update_date = item.updatedDateString;
+
+    if (update_date != null) {
+
+      tiles.add(
+        ListTile(
+          title: Text(L10().lastUpdated),
+          subtitle: Text(update_date),
+          leading: FaIcon(FontAwesomeIcons.calendarAlt)
+        )
+      );
+    }
+
     // Stocktake?
+    var stocktake_date = item.stocktakeDateString;
+
+    if (stocktake_date != null) {
+      tiles.add(
+        ListTile(
+          title: Text(L10().lastStocktake),
+          subtitle: Text(stocktake_date),
+          leading: FaIcon(FontAwesomeIcons.calendarAlt)
+        )
+      );
+    }
 
     // Supplier part?
     // TODO: Display supplier part info page?

From 7e55dbb260bc4692b1bc4cd9bb9e02679307550e Mon Sep 17 00:00:00 2001
From: Oliver <oliver.henry.walters@gmail.com>
Date: Tue, 20 Jul 2021 19:33:29 +1000
Subject: [PATCH 2/5] Update release notes

---
 assets/release_notes.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/assets/release_notes.md b/assets/release_notes.md
index 60448e9b..2819880e 100644
--- a/assets/release_notes.md
+++ b/assets/release_notes.md
@@ -1,6 +1,12 @@
 ## InvenTree App Release Notes
 ---
 
+### 0.3.0 - July 2021
+---
+
+- Add "last updated" date to StockDetail view
+- Add "stocktake" date to StockDetail view
+
 ### 0.2.9 - July 2021
 ---
 

From 6b226fafc9cfe98d076705dcb0afef159bea81bf Mon Sep 17 00:00:00 2001
From: Oliver <oliver.henry.walters@gmail.com>
Date: Tue, 20 Jul 2021 19:36:19 +1000
Subject: [PATCH 3/5] Improve display of StockList tiles

---
 lib/inventree/stock.dart         | 8 +++++++-
 lib/widget/location_display.dart | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/inventree/stock.dart b/lib/inventree/stock.dart
index 678fa83e..889ed4d4 100644
--- a/lib/inventree/stock.dart
+++ b/lib/inventree/stock.dart
@@ -415,7 +415,13 @@ class InvenTreeStockItem extends InvenTreeModel {
 
     if (locationId == -1 || !jsondata.containsKey('location_detail')) return L10().locationNotSet;
 
-    return jsondata['location_detail']['pathstring'] ?? '';
+    String _loc = jsondata['location_detail']['pathstring'] ?? '';
+
+    if (_loc.isNotEmpty) {
+      return _loc;
+    } else {
+      return locationName;
+    }
   }
 
   String get displayQuantity {
diff --git a/lib/widget/location_display.dart b/lib/widget/location_display.dart
index ae8d1692..a6313382 100644
--- a/lib/widget/location_display.dart
+++ b/lib/widget/location_display.dart
@@ -517,7 +517,7 @@ class _PaginatedStockListState extends State<PaginatedStockList> {
   Widget _buildItem(BuildContext context, InvenTreeStockItem item) {
     return ListTile(
       title: Text("${item.partName}"),
-      subtitle: Text("${item.partDescription}"),
+      subtitle: Text("${item.locationPathString}"),
       leading: InvenTreeAPI().getImage(
         item.partThumbnail,
         width: 40,

From ece875ac3eb519edf0d2b051f17292f8489cc6cf Mon Sep 17 00:00:00 2001
From: Oliver <oliver.henry.walters@gmail.com>
Date: Thu, 22 Jul 2021 16:54:44 +1000
Subject: [PATCH 4/5] Update release notes

---
 assets/release_notes.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/assets/release_notes.md b/assets/release_notes.md
index 2819880e..434cdeef 100644
--- a/assets/release_notes.md
+++ b/assets/release_notes.md
@@ -6,6 +6,7 @@
 
 - Add "last updated" date to StockDetail view
 - Add "stocktake" date to StockDetail view
+- Display location of stock items in list view
 
 ### 0.2.9 - July 2021
 ---

From c83c164624f5199e2f8c21095f6b390e03adccc9 Mon Sep 17 00:00:00 2001
From: Oliver <oliver.henry.walters@gmail.com>
Date: Thu, 22 Jul 2021 16:56:34 +1000
Subject: [PATCH 5/5] 0.2.10

---
 assets/release_notes.md                   | 2 +-
 ios/Flutter/flutter_export_environment.sh | 4 ++--
 pubspec.yaml                              | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/assets/release_notes.md b/assets/release_notes.md
index 434cdeef..6b7bc7d2 100644
--- a/assets/release_notes.md
+++ b/assets/release_notes.md
@@ -1,7 +1,7 @@
 ## InvenTree App Release Notes
 ---
 
-### 0.3.0 - July 2021
+### 0.2.10 - July 2021
 ---
 
 - Add "last updated" date to StockDetail view
diff --git a/ios/Flutter/flutter_export_environment.sh b/ios/Flutter/flutter_export_environment.sh
index cc5e66dc..559a5a7f 100644
--- a/ios/Flutter/flutter_export_environment.sh
+++ b/ios/Flutter/flutter_export_environment.sh
@@ -6,8 +6,8 @@ export "COCOAPODS_PARALLEL_CODE_SIGN=true"
 export "FLUTTER_TARGET=lib\main.dart"
 export "FLUTTER_BUILD_DIR=build"
 export "SYMROOT=${SOURCE_ROOT}/../build\ios"
-export "FLUTTER_BUILD_NAME=0.2.9"
-export "FLUTTER_BUILD_NUMBER=17"
+export "FLUTTER_BUILD_NAME=0.2.10"
+export "FLUTTER_BUILD_NUMBER=18"
 export "DART_OBFUSCATION=false"
 export "TRACK_WIDGET_CREATION=false"
 export "TREE_SHAKE_ICONS=false"
diff --git a/pubspec.yaml b/pubspec.yaml
index 4b76b81b..6bea3c99 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -7,7 +7,7 @@ description: InvenTree stock management
 # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
 # Read more about iOS versioning at
 # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
-version: 0.2.9+17
+version: 0.2.10+18
 
 environment:
   sdk: ">=2.12.0 <3.0.0"