2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 05:26:47 +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 {
@override
_CompanyListState createState() => _CompanyListState("Customers", {"is_customer": "true"});

View File

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