2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 18:25:26 +00:00

Refactor company list views:

- Suppliers
- Manufacturers
- Customers
This commit is contained in:
Oliver
2021-08-03 01:38:58 +10:00
parent e5f09acf3f
commit 293750dce7
6 changed files with 191 additions and 112 deletions

View File

@ -8,6 +8,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:inventree/inventree/part.dart';
import 'package:inventree/inventree/company.dart';
import 'package:inventree/widget/company_detail.dart';
import 'package:inventree/widget/refreshable_state.dart';
class PartSupplierWidget extends StatefulWidget {
@ -57,7 +58,19 @@ class _PartSupplierState extends RefreshableState<PartSupplierWidget> {
height: 40,
),
title: Text("${_part.SKU}"),
subtitle: Text("${_part.manufacturerName}: ${_part.MPN}")
subtitle: Text("${_part.manufacturerName}: ${_part.MPN}"),
onTap: () async {
var company = await InvenTreeCompany().get(_part.supplierId);
if (company != null && company is InvenTreeCompany) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CompanyDetailWidget(company)
)
);
}
},
);
}