mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-20 14:06:19 +00:00
Add accessor functions for SupplierPart and ManufacturerPart models
This commit is contained in:
@ -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
Submodule lib/l10n updated: b49ea65800...f53df5968c
Reference in New Issue
Block a user