feat: implement hybrid alias model for receipt import and enhance alias learning in UI

This commit is contained in:
Nils-Johan Gynther
2026-05-02 00:24:30 +02:00
parent d64f34f4ff
commit d6fef0145c
3 changed files with 34 additions and 12 deletions
@@ -333,11 +333,11 @@ class _EditDialogState extends State<_EditDialog> {
final aiLabel = (aiPath != null && aiPath.isNotEmpty)
? aiPath
: ((aiCategory != null && aiCategory.isNotEmpty) ? aiCategory : null);
final suggestedProductLabel = (item.suggestedProductId != null &&
item.suggestedProductName?.isNotEmpty == true &&
item.matchedProductId == null)
? _normalizeProductName(item.suggestedProductName!)
: null;
final suggestedProductLabel = item.suggestedProductName?.isNotEmpty == true
? _normalizeProductName(item.suggestedProductName!)
: (item.matchedProductName?.isNotEmpty == true
? _normalizeProductName(item.matchedProductName!)
: null);
final currentQuantity =
double.tryParse(_quantityCtrl.text.replaceAll(',', '.')) ?? widget.item.quantity;
final currentUnit = _unitCtrl.text.trim().isEmpty ? widget.item.unit : _unitCtrl.text.trim();