feat: Add bulk delete and merge functionality for inventory items with DTOs and API endpoints
Test Suite / test (24.15.0) (push) Has been cancelled

This commit is contained in:
Nils-Johan Gynther
2026-05-11 09:36:15 +02:00
parent 8e6e0e96b8
commit d4a7983afb
9 changed files with 591 additions and 19 deletions
+2
View File
@@ -59,6 +59,8 @@ class RecipeApiPaths {
class InventoryApiPaths {
static const list = '/inventory';
static const mergeMany = '/inventory/merge-many';
static const bulkDelete = '/inventory/bulk-delete';
static String update(int id) => '/inventory/$id';
static String remove(int id) => '/inventory/$id';
static String moveToPantry(int id) => '/inventory/$id/move-to-pantry';
+17 -1
View File
@@ -168,12 +168,19 @@ class AppShell extends ConsumerWidget {
PopupMenuButton<String>(
tooltip: 'Profil och konto',
icon: const Icon(Icons.account_circle_outlined),
onSelected: (value) {
onSelected: (value) async {
switch (value) {
case 'profile':
if (location != '/profile' && context.mounted) {
onNavigateToPath('/profile');
}
break;
case 'logout':
await ref.read(authStateProvider.notifier).logout();
if (context.mounted) {
onNavigateToPath('/login');
}
break;
}
},
itemBuilder: (context) => const [
@@ -185,6 +192,15 @@ class AppShell extends ConsumerWidget {
contentPadding: EdgeInsets.zero,
),
),
PopupMenuDivider(),
PopupMenuItem<String>(
value: 'logout',
child: ListTile(
leading: Icon(Icons.logout),
title: Text('Logga ut'),
contentPadding: EdgeInsets.zero,
),
),
],
),
],