chore(import): improve error handling and add flyer integration
- Replace BadRequestException with UnauthorizedException for authentication failures in flyer-import and flyer-selection controllers - Add bulk selection endpoint in FlyerSelectionController for creating multiple selections in one request - Update FlyerSelectionModule to include new FlyerSelectionMatcherService and FlyerSelectionSyncController - Extend FlyerSelectionService with createMany method for bulk operations - Add new DTOs for bulk selection and receipt matching functionality - Update ReceiptImportService to accept FlyerSelectionService dependency and track successful rows - Extend SaveReceiptResponse with flyerAutoSync field for receipt-to-flyer matching results - Add new API paths for flyer import and selection endpoints - Update Flutter UI to include Flyer import tab and adjust tab controller length - Add new domain models and repository methods for flyer import functionality - Update test files to include new FlyerSelectionService dependency - Modify .kilo plan documentation to reflect current system architecture
This commit is contained in:
@@ -33,10 +33,20 @@ class CategoryApiPaths {
|
||||
static const tree = '/categories/tree';
|
||||
}
|
||||
|
||||
class ReceiptImportApiPaths {
|
||||
static const refreshCategories = '/receipt-import/refresh-categories';
|
||||
static const unitMappings = '/receipt-import/unit-mappings';
|
||||
}
|
||||
class ReceiptImportApiPaths {
|
||||
static const refreshCategories = '/receipt-import/refresh-categories';
|
||||
static const unitMappings = '/receipt-import/unit-mappings';
|
||||
}
|
||||
|
||||
class FlyerImportApiPaths {
|
||||
static const parse = '/flyer-import/parse';
|
||||
}
|
||||
|
||||
class FlyerSelectionApiPaths {
|
||||
static String bySession(int sessionId) => '/flyer-sessions/$sessionId/selections';
|
||||
static String bulkBySession(int sessionId) => '/flyer-sessions/$sessionId/selections/bulk';
|
||||
static const open = '/flyer-selections/open';
|
||||
}
|
||||
|
||||
class HelpTextApiPaths {
|
||||
static String byKey(String key) => '/help-texts/${Uri.encodeComponent(key)}';
|
||||
@@ -131,4 +141,4 @@ class MealPlanApiPaths {
|
||||
|
||||
static String removeByDate(String date) =>
|
||||
'$list/${Uri.encodeComponent(date)}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,13 +142,17 @@ class AppShell extends ConsumerWidget {
|
||||
icon: Icon(Icons.restaurant_menu_outlined),
|
||||
text: 'Recept',
|
||||
),
|
||||
Tab(
|
||||
icon: Icon(Icons.receipt_long_outlined),
|
||||
text: 'Kvitto',
|
||||
),
|
||||
],
|
||||
)
|
||||
: null,
|
||||
Tab(
|
||||
icon: Icon(Icons.receipt_long_outlined),
|
||||
text: 'Kvitto',
|
||||
),
|
||||
Tab(
|
||||
icon: Icon(Icons.local_offer_outlined),
|
||||
text: 'Flyer',
|
||||
),
|
||||
],
|
||||
)
|
||||
: null,
|
||||
actions: [
|
||||
if (isRecipesRoute)
|
||||
Consumer(
|
||||
@@ -278,9 +282,9 @@ class AppShell extends ConsumerWidget {
|
||||
),
|
||||
);
|
||||
|
||||
if (isImportRoute) {
|
||||
shell = DefaultTabController(length: 2, child: shell);
|
||||
}
|
||||
if (isImportRoute) {
|
||||
shell = DefaultTabController(length: 3, child: shell);
|
||||
}
|
||||
|
||||
return shell;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user