2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-15 03:35:28 +00:00

[refactor] Scan improvements (#577)

* Handle error on unexpected barcode response

* Add ManufacturerPart detail view

* Support barcode scanning for manufacturer part

* Refactoring for null checks

* Ignore selected errors in sentry

* Fix API implementation for ManufacturerPart

* Update release notes

* More error handling

* Decode quantity betterer

* Refactoring

* Add option to confirm checkin details

* Improve response handlign

* Cleanup

* Remove unused imports

* Fix async function

* Fix for assigning custom barcode

* Handle barcode scan result for company

* Fix

* Adjust scan priority

* Refactoring MODEL_TYPE

- Use instead of duplicated const strings

* @override fix
This commit is contained in:
Oliver
2024-12-14 15:24:23 +11:00
committed by GitHub
parent 6b179d108c
commit 524c5469f1
24 changed files with 576 additions and 220 deletions

View File

@ -19,6 +19,7 @@ class _InvenTreePurchaseOrderSettingsState extends State<InvenTreePurchaseOrderS
bool poEnable = true;
bool poShowCamera = true;
bool poConfirmScan = true;
@override
void initState() {
@ -30,6 +31,7 @@ class _InvenTreePurchaseOrderSettingsState extends State<InvenTreePurchaseOrderS
Future<void> loadSettings() async {
poEnable = await InvenTreeSettingsManager().getBool(INV_PO_ENABLE, true);
poShowCamera = await InvenTreeSettingsManager().getBool(INV_PO_SHOW_CAMERA, true);
poConfirmScan = await InvenTreeSettingsManager().getBool(INV_PO_CONFIRM_SCAN, true);
if (mounted) {
setState(() {
@ -75,6 +77,20 @@ class _InvenTreePurchaseOrderSettingsState extends State<InvenTreePurchaseOrderS
},
),
),
ListTile(
title: Text(L10().purchaseOrderConfirmScan),
subtitle: Text(L10().purchaseOrderConfirmScanDetail),
leading: Icon(TablerIcons.barcode),
trailing: Switch (
value: poConfirmScan,
onChanged: (bool value) {
InvenTreeSettingsManager().setValue(INV_PO_CONFIRM_SCAN, value);
setState(() {
poConfirmScan = value;
});
},
),
)
]
)
)