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
Test Suite / test (24.15.0) (push) Has been cancelled
This commit is contained in:
@@ -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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user