feat: enhance ProductPickerField and ParsedReceiptItem to support category filtering in receipt import
This commit is contained in:
@@ -15,6 +15,7 @@ class ParsedReceiptItem {
|
||||
// AI-kategorisuggestion (premium)
|
||||
final String? categorySuggestionName;
|
||||
final String? categorySuggestionPath;
|
||||
final int? categorySuggestionId;
|
||||
|
||||
ParsedReceiptItem({
|
||||
required this.rawName,
|
||||
@@ -29,6 +30,7 @@ class ParsedReceiptItem {
|
||||
this.suggestedProductName,
|
||||
this.categorySuggestionName,
|
||||
this.categorySuggestionPath,
|
||||
this.categorySuggestionId,
|
||||
});
|
||||
|
||||
factory ParsedReceiptItem.fromJson(Map<String, dynamic> json) {
|
||||
@@ -46,6 +48,7 @@ class ParsedReceiptItem {
|
||||
suggestedProductName: json['suggestedProductName'] as String?,
|
||||
categorySuggestionName: cat?['categoryName'] as String?,
|
||||
categorySuggestionPath: cat?['path'] as String?,
|
||||
categorySuggestionId: (cat?['categoryId'] as num?)?.toInt(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user