mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-15 03:35:28 +00:00
Barcode workflow (#485)
* Refactor stock barcode operations into new file * Add setting to control confirmation of stock transfer actions * Update details when scannign stock item * Confirm movement when moving items into location * Cleanup
This commit is contained in:
@ -110,7 +110,7 @@ class _InvenTreeBarcodeSettingsState extends State<InvenTreeBarcodeSettingsWidge
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(L10().barcodes)),
|
||||
appBar: AppBar(title: Text(L10().barcodeSettings)),
|
||||
body: Container(
|
||||
child: ListView(
|
||||
children: [
|
||||
|
@ -19,6 +19,7 @@ class _InvenTreePartSettingsState extends State<InvenTreePartSettingsWidget> {
|
||||
bool partShowBom = true;
|
||||
bool stockShowHistory = false;
|
||||
bool stockShowTests = false;
|
||||
bool stockConfirmScan = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -32,6 +33,7 @@ class _InvenTreePartSettingsState extends State<InvenTreePartSettingsWidget> {
|
||||
partShowBom = await InvenTreeSettingsManager().getValue(INV_PART_SHOW_BOM, true) as bool;
|
||||
stockShowHistory = await InvenTreeSettingsManager().getValue(INV_STOCK_SHOW_HISTORY, false) as bool;
|
||||
stockShowTests = await InvenTreeSettingsManager().getValue(INV_STOCK_SHOW_TESTS, true) as bool;
|
||||
stockConfirmScan = await InvenTreeSettingsManager().getValue(INV_STOCK_CONFIRM_SCAN, false) as bool;
|
||||
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
@ -42,7 +44,7 @@ class _InvenTreePartSettingsState extends State<InvenTreePartSettingsWidget> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(L10().part)),
|
||||
appBar: AppBar(title: Text(L10().partSettings)),
|
||||
body: Container(
|
||||
child: ListView(
|
||||
children: [
|
||||
@ -74,6 +76,7 @@ class _InvenTreePartSettingsState extends State<InvenTreePartSettingsWidget> {
|
||||
},
|
||||
),
|
||||
),
|
||||
Divider(),
|
||||
ListTile(
|
||||
title: Text(L10().stockItemHistory),
|
||||
subtitle: Text(L10().stockItemHistoryDetail),
|
||||
@ -101,6 +104,20 @@ class _InvenTreePartSettingsState extends State<InvenTreePartSettingsWidget> {
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().confirmScan),
|
||||
subtitle: Text(L10().confirmScanDetail),
|
||||
leading: FaIcon(FontAwesomeIcons.qrcode),
|
||||
trailing: Switch(
|
||||
value: stockConfirmScan,
|
||||
onChanged: (bool value) {
|
||||
InvenTreeSettingsManager().setValue(INV_STOCK_CONFIRM_SCAN, value);
|
||||
setState(() {
|
||||
stockConfirmScan = value;
|
||||
});
|
||||
}
|
||||
),
|
||||
)
|
||||
]
|
||||
)
|
||||
|
Reference in New Issue
Block a user