2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-13 10:45:29 +00:00

Supplier part support (#253)

* Bump version and release noes

* Add barebone list and detail widgets for the SupplierPart model

* Launch into SupplierPartList from CompanyDetail

* Update StockDetail widget

* Fixes for SupplierPart model

* Add images to supplier part list

* Add search functionality to SupplierPart list

* Added details to SupplierPartDetail widget

* Link through to supplier company

* Add some more details

* Adds ability to edit SupplierPart information

* Navigate to supplier part list from part detail page

* Display supplier part information on stock item detail page

* Add barcode scan response for SupplierPart

* Refactor barcode scanning code

* Navigate to supplier part detail from stock item page

* Support custom barcode for SupplierPart via app

* Cleanup comment

* linting

* Fix override

* Enable display of supplier list on home screen

* Code cleanup

* Update release noets
This commit is contained in:
Oliver
2023-02-04 09:05:36 +11:00
committed by GitHub
parent ce37d0e757
commit 15bf109296
22 changed files with 798 additions and 295 deletions

View File

@ -25,6 +25,7 @@ import "package:inventree/widget/part_image_widget.dart";
import "package:inventree/widget/snacks.dart";
import "package:inventree/widget/stock_detail.dart";
import "package:inventree/widget/stock_list.dart";
import "package:inventree/widget/supplier_part_list.dart";
/*
@ -117,6 +118,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
if (!result || part.pk == -1) {
// Part could not be loaded, for some reason
Navigator.of(context).pop();
return;
}
// If the part points to a parent "template" part, request that too
@ -522,21 +524,24 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
}
if (part.isPurchaseable) {
tiles.add(
ListTile(
title: Text(L10().suppliers),
leading: FaIcon(FontAwesomeIcons.industry),
trailing: Text("${part.supplierCount}"),
/* TODO:
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => PartSupplierWidget(part))
);
},
*/
)
);
if (part.supplierCount > 0) {
tiles.add(
ListTile(
title: Text(L10().suppliers),
leading: FaIcon(FontAwesomeIcons.industry, color: COLOR_CLICK),
trailing: Text("${part.supplierCount}"),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => SupplierPartList({
"part": part.pk.toString()
}))
);
},
)
);
}
}
if (showParameters) {