mirror of
https://github.com/inventree/inventree-app.git
synced 2025-05-05 08:48:55 +00:00
Add accessor functions for SupplierPart and ManufacturerPart models
This commit is contained in:
parent
76e0dd6803
commit
21985584c2
@ -52,6 +52,14 @@ class InvenTreeSupplierPart extends InvenTreeModel {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int get manufacturerId => (jsondata['manufacturer'] ?? -1) as int;
|
||||||
|
|
||||||
|
int get manufacturerPartId => (jsondata['manufacturer_part'] ?? -1) as int;
|
||||||
|
|
||||||
|
int get supplierId => (jsondata['supplier'] ?? -1) as int;
|
||||||
|
|
||||||
|
String get SKU => (jsondata['SKU'] ?? '') as String;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
InvenTreeModel createFromJson(Map<String, dynamic> json) {
|
InvenTreeModel createFromJson(Map<String, dynamic> json) {
|
||||||
var part = InvenTreeSupplierPart.fromJson(json);
|
var part = InvenTreeSupplierPart.fromJson(json);
|
||||||
@ -71,6 +79,12 @@ class InvenTreeManufacturerPart extends InvenTreeModel {
|
|||||||
InvenTreeManufacturerPart.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
|
InvenTreeManufacturerPart.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int get partId => (jsondata['part'] ?? -1) as int;
|
||||||
|
|
||||||
|
int get manufacturerId => (jsondata['manufacturer'] ?? -1) as int;
|
||||||
|
|
||||||
|
String get MPN => (jsondata['MPN'] ?? '') as String;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
InvenTreeModel createFromJson(Map<String, dynamic> json) {
|
InvenTreeModel createFromJson(Map<String, dynamic> json) {
|
||||||
var part = InvenTreeManufacturerPart.fromJson(json);
|
var part = InvenTreeManufacturerPart.fromJson(json);
|
||||||
|
2
lib/l10n
2
lib/l10n
@ -1 +1 @@
|
|||||||
Subproject commit b49ea65800fd9e6bd96f59ae89e41829f4dd640a
|
Subproject commit f53df5968c451c511152d931ef32290644e21747
|
Loading…
x
Reference in New Issue
Block a user