feat: enhance ProductPickerField to use rawName for initial query in receipt import
This commit is contained in:
@@ -98,13 +98,14 @@ class _EditDialogState extends State<_EditDialog> {
|
||||
_productName = item.suggestedProductName;
|
||||
});
|
||||
} else if (aiCategory != null) {
|
||||
// Öppna pickern med kategorinamnet sökt
|
||||
// Öppna pickern med råtexten från kvittot som sökord — kategorinamnet
|
||||
// matchar inte produktnamn, men rawName gör det troligtvis
|
||||
ProductPickerField.showSheet(
|
||||
context,
|
||||
products: widget.products,
|
||||
value: _productId,
|
||||
label: 'Produkt',
|
||||
initialQuery: aiCategory,
|
||||
initialQuery: item.rawName,
|
||||
).then((id) {
|
||||
if (id != null && mounted) {
|
||||
setState(() {
|
||||
|
||||
Reference in New Issue
Block a user