2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-07-11 08:04:14 +00:00

Yet more linting

This commit is contained in:
Oliver
2021-09-28 20:35:19 +10:00
parent ad0cc36540
commit 77bac9af36
29 changed files with 251 additions and 253 deletions

View File

@ -12,6 +12,10 @@ import "package:inventree/api.dart";
class InvenTreeStockItemTestResult extends InvenTreeModel {
InvenTreeStockItemTestResult() : super();
InvenTreeStockItemTestResult.fromJson(Map<String, dynamic> json) : super.fromJson(json);
@override
String get URL => "stock/test/";
@ -41,10 +45,6 @@ class InvenTreeStockItemTestResult extends InvenTreeModel {
String get date => (jsondata["date"] ?? "") as String;
InvenTreeStockItemTestResult() : super();
InvenTreeStockItemTestResult.fromJson(Map<String, dynamic> json) : super.fromJson(json);
@override
InvenTreeStockItemTestResult createFromJson(Map<String, dynamic> json) {
var result = InvenTreeStockItemTestResult.fromJson(json);
@ -56,6 +56,10 @@ class InvenTreeStockItemTestResult extends InvenTreeModel {
class InvenTreeStockItem extends InvenTreeModel {
InvenTreeStockItem() : super();
InvenTreeStockItem.fromJson(Map<String, dynamic> json) : super.fromJson(json);
// Stock status codes
static const int OK = 10;
static const int ATTENTION = 50;
@ -128,33 +132,23 @@ class InvenTreeStockItem extends InvenTreeModel {
@override
Map<String, String> defaultGetFilters() {
var headers = new Map<String, String>();
headers["part_detail"] = "true";
headers["location_detail"] = "true";
headers["supplier_detail"] = "true";
headers["cascade"] = "false";
return headers;
return {
"part_detail": "true",
"location_detail": "true",
"supplier_detail": "true",
"cascade": "false"
};
}
@override
Map<String, String> defaultListFilters() {
var headers = new Map<String, String>();
headers["part_detail"] = "true";
headers["location_detail"] = "true";
headers["supplier_detail"] = "true";
headers["cascade"] = "false";
return headers;
}
InvenTreeStockItem() : super();
InvenTreeStockItem.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
// TODO
return {
"part_detail": "true",
"location_detail": "true",
"supplier_detail": "true",
"cascade": "false"
};
}
List<InvenTreePartTestTemplate> testTemplates = [];
@ -533,6 +527,10 @@ class InvenTreeStockItem extends InvenTreeModel {
class InvenTreeStockLocation extends InvenTreeModel {
InvenTreeStockLocation() : super();
InvenTreeStockLocation.fromJson(Map<String, dynamic> json) : super.fromJson(json);
@override
String get URL => "stock/location/";
@ -566,10 +564,6 @@ class InvenTreeStockLocation extends InvenTreeModel {
int get itemcount => (jsondata["items"] ?? 0) as int;
InvenTreeStockLocation() : super();
InvenTreeStockLocation.fromJson(Map<String, dynamic> json) : super.fromJson(json);
@override
InvenTreeModel createFromJson(Map<String, dynamic> json) {