2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 02:05:29 +00:00

Display a list of companies, with filtering

This commit is contained in:
Oliver Walters
2020-04-06 23:43:29 +10:00
parent aa8a3602e8
commit d2168b2cb9
5 changed files with 126 additions and 12 deletions

View File

@ -2,6 +2,7 @@ import 'dart:async';
import 'package:InvenTree/inventree/stock.dart';
import 'package:InvenTree/widget/category_display.dart';
import 'package:InvenTree/widget/company_list.dart';
import 'package:InvenTree/widget/location_display.dart';
import 'package:InvenTree/widget/drawer.dart';
import 'package:flutter/cupertino.dart';
@ -207,12 +208,17 @@ class _MyHomePageState extends State<MyHomePage> {
}
void _stock() {
if (!InvenTreeAPI().checkConnection(context)) return;
Navigator.push(context, MaterialPageRoute(builder: (context) => LocationDisplayWidget(null)));
}
void _suppliers() {
if (!InvenTreeAPI().checkConnection(context)) return;
Navigator.push(context, MaterialPageRoute(builder: (context) => CompanyListWidget()));
}
void _unsupported() {
showDialog(
context: context,
@ -311,7 +317,7 @@ class _MyHomePageState extends State<MyHomePage> {
IconButton(
icon: new FaIcon(FontAwesomeIcons.industry),
tooltip: 'Suppliers',
onPressed: _unsupported,
onPressed: _suppliers,
),
Text("Suppliers"),
]