mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 13:36:50 +00:00
Add isManufacturer accessor for Company
This commit is contained in:
parent
944f1e2cdc
commit
5429c06349
@ -24,11 +24,11 @@ class InvenTreeCompany extends InvenTreeModel {
|
|||||||
|
|
||||||
bool get isSupplier => jsondata['is_supplier'] ?? false;
|
bool get isSupplier => jsondata['is_supplier'] ?? false;
|
||||||
|
|
||||||
|
bool get isManufacturer => jsondata['is_manufacturer'] ?? false;
|
||||||
|
|
||||||
bool get isCustomer => jsondata['is_customer'] ?? false;
|
bool get isCustomer => jsondata['is_customer'] ?? false;
|
||||||
|
|
||||||
InvenTreeCompany.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
|
InvenTreeCompany.fromJson(Map<String, dynamic> json) : super.fromJson(json);
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
InvenTreeModel createFromJson(Map<String, dynamic> json) {
|
InvenTreeModel createFromJson(Map<String, dynamic> json) {
|
||||||
@ -57,9 +57,7 @@ class InvenTreeSupplierPart extends InvenTreeModel {
|
|||||||
|
|
||||||
InvenTreeSupplierPart() : super();
|
InvenTreeSupplierPart() : super();
|
||||||
|
|
||||||
InvenTreeSupplierPart.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
|
InvenTreeSupplierPart.fromJson(Map<String, dynamic> json) : super.fromJson(json);
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
int get manufacturerId => (jsondata['manufacturer'] ?? -1) as int;
|
int get manufacturerId => (jsondata['manufacturer'] ?? -1) as int;
|
||||||
|
|
||||||
@ -92,8 +90,7 @@ class InvenTreeManufacturerPart extends InvenTreeModel {
|
|||||||
|
|
||||||
InvenTreeManufacturerPart() : super();
|
InvenTreeManufacturerPart() : super();
|
||||||
|
|
||||||
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 partId => (jsondata['part'] ?? -1) as int;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user