2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-12-04 03:09:56 +00:00

Project code support (#336)

* Determine if project codes are supported

* Add helpers for boolean functions

* Adds helper methods for generic "model" class

- Will allow us to do some good refactoring

* Refactor the refactor

* Add debug support and getMap function

* Major refactoring for model data accessors

* Handle null values

* Add sentry reporting if key is used incorrectly

* Fix typo

* Refactor createFromJson function

* Add model for ProjectCode

* Display and edit project code for purchase orders
This commit is contained in:
Oliver
2023-04-21 21:12:22 +10:00
committed by GitHub
parent 95573a2784
commit e23a8b4d5e
13 changed files with 383 additions and 299 deletions

View File

@@ -27,8 +27,8 @@ class InvenTreeNotification extends InvenTreeModel {
};
}
String get message => (jsondata["message"] ?? "") as String;
String get message => getString("message");
DateTime? get creationDate {
if (jsondata.containsKey("creation")) {
return DateTime.tryParse((jsondata["creation"] ?? "") as String);