2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 13:36:50 +00:00

Add view for list of manufacturers

This commit is contained in:
Oliver Walters 2020-04-16 21:00:49 +10:00
parent 83ac6041cb
commit 7a7fc84ffe
2 changed files with 19 additions and 1 deletions

View File

@ -25,6 +25,12 @@ class SupplierListWidget extends CompanyListWidget {
} }
class ManufacturerListWidget extends CompanyListWidget {
@override
_CompanyListState createState() => _CompanyListState("Manufacturers", {"is_manufacturer": "true"});
}
class CustomerListWidget extends CompanyListWidget { class CustomerListWidget extends CompanyListWidget {
@override @override
_CompanyListState createState() => _CompanyListState("Customers", {"is_customer": "true"}); _CompanyListState createState() => _CompanyListState("Customers", {"is_customer": "true"});

View File

@ -75,6 +75,13 @@ class InvenTreeDrawer extends StatelessWidget {
Navigator.push(context, MaterialPageRoute(builder: (context) => SupplierListWidget())); Navigator.push(context, MaterialPageRoute(builder: (context) => SupplierListWidget()));
} }
void _showManufacturers() {
if (!InvenTreeAPI().checkConnection(context)) return;
_closeDrawer();
Navigator.push(context, MaterialPageRoute(builder: (context) => ManufacturerListWidget()));
}
void _showCustomers() { void _showCustomers() {
if (!InvenTreeAPI().checkConnection(context)) return; if (!InvenTreeAPI().checkConnection(context)) return;
_closeDrawer(); _closeDrawer();
@ -128,9 +135,14 @@ class InvenTreeDrawer extends StatelessWidget {
), ),
new ListTile( new ListTile(
title: new Text("Suppliers"), title: new Text("Suppliers"),
leading: new FaIcon(FontAwesomeIcons.industry), leading: new FaIcon(FontAwesomeIcons.building),
onTap: _showSuppliers, onTap: _showSuppliers,
), ),
new ListTile(
title: Text("Manufacturers"),
leading: new FaIcon(FontAwesomeIcons.industry),
onTap: _showManufacturers,
),
new ListTile( new ListTile(
title: new Text("Customers"), title: new Text("Customers"),
leading: new FaIcon(FontAwesomeIcons.users), leading: new FaIcon(FontAwesomeIcons.users),