feat: implement admin product management panel with bulk categorization and premium user toggle
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:go_router/go_router.dart';
|
||||
import '../../../core/api/api_error_mapper.dart';
|
||||
import '../../admin/presentation/admin_ai_panel.dart';
|
||||
import '../../admin/presentation/admin_pending_products_panel.dart';
|
||||
import '../../admin/presentation/admin_products_panel.dart';
|
||||
import '../../admin/presentation/admin_users_panel.dart';
|
||||
import '../../auth/data/auth_providers.dart';
|
||||
import '../data/profile_repository.dart';
|
||||
@@ -297,14 +298,7 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
|
||||
buttonLabel: 'Öppna baslager',
|
||||
);
|
||||
case _DatabaseTab.products:
|
||||
activeSection = sectionCard(
|
||||
icon: Icons.category_outlined,
|
||||
title: 'Produkter',
|
||||
description:
|
||||
'Adminhantering av produktkatalogen, inklusive standardisering och vidare produktadministration.',
|
||||
onPressed: () => context.go('/admin'),
|
||||
buttonLabel: 'Öppna Admin',
|
||||
);
|
||||
activeSection = const AdminProductsPanel(embedded: true);
|
||||
}
|
||||
|
||||
return Column(
|
||||
@@ -338,32 +332,6 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildAdminPlaceholder(
|
||||
BuildContext context, {
|
||||
required String title,
|
||||
required String description,
|
||||
}) {
|
||||
return Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(title, style: Theme.of(context).textTheme.titleMedium),
|
||||
const SizedBox(height: 8),
|
||||
Text(description),
|
||||
const SizedBox(height: 12),
|
||||
FilledButton.icon(
|
||||
onPressed: () => context.go('/admin'),
|
||||
icon: const Icon(Icons.admin_panel_settings_outlined),
|
||||
label: const Text('Öppna Admin'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildActiveTabContent(BuildContext context, ThemeData theme) {
|
||||
switch (_activeTab) {
|
||||
case _ProfileTab.profile:
|
||||
|
||||
Reference in New Issue
Block a user