mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Refactor company list views:
- Suppliers - Manufacturers - Customers
This commit is contained in:
parent
e5f09acf3f
commit
293750dce7
6 changed files with 191 additions and 112 deletions
|
|
@ -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)
|
||||
)
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue