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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user