mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-14 12:06:24 +00:00
PO Line Item Improvements (#340)
* Refactor thumbnail image * Add paginated list of purchase order line items * Refactor getBody() function - No longer "have" to specify - Can use getTiles for a simpler interface * Add detail widget for polineitem * add pricing info * Receive line items via action button * tweak color * update release notes * linting fixes
This commit is contained in:
parent
2c5ceeabdb
commit
b7e806efee
23 changed files with 442 additions and 343 deletions
|
|
@ -102,7 +102,8 @@ class _SupplierPartDisplayState extends RefreshableState<SupplierPartDetailWidge
|
|||
/*
|
||||
* Build a set of tiles to display for this SupplierPart
|
||||
*/
|
||||
List<Widget> detailTiles(BuildContext context) {
|
||||
@override
|
||||
List<Widget> getTiles(BuildContext context) {
|
||||
List<Widget> tiles = [];
|
||||
|
||||
if (loading) {
|
||||
|
|
@ -116,11 +117,7 @@ class _SupplierPartDisplayState extends RefreshableState<SupplierPartDetailWidge
|
|||
title: Text(L10().internalPart),
|
||||
subtitle: Text(widget.supplierPart.partName),
|
||||
leading: FaIcon(FontAwesomeIcons.shapes, color: COLOR_ACTION),
|
||||
trailing: InvenTreeAPI().getImage(
|
||||
widget.supplierPart.partImage,
|
||||
width: 40,
|
||||
height: 40,
|
||||
),
|
||||
trailing: InvenTreeAPI().getThumbnail(widget.supplierPart.partImage),
|
||||
onTap: () async {
|
||||
showLoadingOverlay(context);
|
||||
final part = await InvenTreePart().get(widget.supplierPart.partId);
|
||||
|
|
@ -140,11 +137,7 @@ class _SupplierPartDisplayState extends RefreshableState<SupplierPartDetailWidge
|
|||
title: Text(L10().supplier),
|
||||
subtitle: Text(widget.supplierPart.supplierName),
|
||||
leading: FaIcon(FontAwesomeIcons.building, color: COLOR_ACTION),
|
||||
trailing: InvenTreeAPI().getImage(
|
||||
widget.supplierPart.supplierImage,
|
||||
width: 40,
|
||||
height: 40,
|
||||
),
|
||||
trailing: InvenTreeAPI().getThumbnail(widget.supplierPart.supplierImage),
|
||||
onTap: () async {
|
||||
showLoadingOverlay(context);
|
||||
var supplier = await InvenTreeCompany().get(widget.supplierPart.supplierId);
|
||||
|
|
@ -175,11 +168,7 @@ class _SupplierPartDisplayState extends RefreshableState<SupplierPartDetailWidge
|
|||
title: Text(L10().manufacturer),
|
||||
subtitle: Text(widget.supplierPart.manufacturerName),
|
||||
leading: FaIcon(FontAwesomeIcons.industry, color: COLOR_ACTION),
|
||||
trailing: InvenTreeAPI().getImage(
|
||||
widget.supplierPart.manufacturerImage,
|
||||
width: 40,
|
||||
height: 40,
|
||||
),
|
||||
trailing: InvenTreeAPI().getThumbnail(widget.supplierPart.manufacturerImage),
|
||||
onTap: () async {
|
||||
showLoadingOverlay(context);
|
||||
var supplier = await InvenTreeCompany().get(widget.supplierPart.manufacturerId);
|
||||
|
|
@ -230,14 +219,4 @@ class _SupplierPartDisplayState extends RefreshableState<SupplierPartDetailWidge
|
|||
return tiles;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget getBody(BuildContext context) {
|
||||
return ListView(
|
||||
children: ListTile.divideTiles(
|
||||
context: context,
|
||||
tiles: detailTiles(context),
|
||||
).toList()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue