mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-14 20:16:25 +00:00
Toot toot, it's the refactor tractor
- Introduces the concept of a "BarcodeHandler" - Re-uses most of the code - Custom handlers for barcode success / failure
This commit is contained in:
parent
e39cd4c009
commit
c15d3a6524
4 changed files with 290 additions and 147 deletions
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
|
||||
import 'package:InvenTree/barcode.dart';
|
||||
import 'package:InvenTree/inventree/stock.dart';
|
||||
import 'package:InvenTree/inventree/part.dart';
|
||||
import 'package:InvenTree/widget/dialogs.dart';
|
||||
|
|
@ -374,9 +375,22 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
trailing: Text("${item.quantity}"),
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text("Add Barcode"),
|
||||
leading: FaIcon(FontAwesomeIcons.qrcode),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => InvenTreeQRView(StockItemBarcodeAssignmentHandler(item)))
|
||||
);
|
||||
//Navigator.push(context, MaterialPageRoute(builder: (context) => AssignBarcodeToStockItemView(item)));
|
||||
},
|
||||
)
|
||||
);
|
||||
|
||||
// Location information
|
||||
if ((item.locationId > 0) && (item.locationName != null) && (item.locationName.isNotEmpty)) {
|
||||
tiles.add(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue