From 98a9a98d1bff61860a7eeca5df917f7d4e65b5b1 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Wed, 9 Jul 2025 23:27:52 +0000 Subject: [PATCH] Improve admin user experience by showing all stores and removing store selection Fixes admin store visibility and removes unnecessary store selection for admins. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 91318273-c764-4fd4-be04-bdc12c38af32 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/9d9e1107-c416-4124-a939-a91c612c56a1.jpg --- client/src/components/Administration.tsx | 5 ++--- replit.md | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/client/src/components/Administration.tsx b/client/src/components/Administration.tsx index 4e68988..d820cd1 100644 --- a/client/src/components/Administration.tsx +++ b/client/src/components/Administration.tsx @@ -680,7 +680,7 @@ export default function Administration() { {user.email || "-"} {getRoleBadge(user.role)} - {stores.find(s => s.id === user.storeId)?.name || "-"} + {user.role === 'administrator' ? "Tous" : (stores.find(s => s.id === user.storeId)?.name || "-")} @@ -874,14 +874,13 @@ export default function Administration() { render={({ field }) => ( Magasin - field.onChange(parseInt(value))}> - Aucun magasin (accès à tous) {stores.map((store) => ( {store.name} diff --git a/replit.md b/replit.md index 7ed8794..0c90c21 100644 --- a/replit.md +++ b/replit.md @@ -170,6 +170,10 @@ Preferred communication style: Simple, everyday language. - ✅ Enhanced deletion confirmations in sales history and administration panels - ✅ Improved visual feedback with detailed confirmation dialogs showing item details - ✅ Added proper modal management with shadcn/ui AlertDialog components +- ✅ Fixed critical admin user permissions bug preventing profile modifications +- ✅ Added server-side protection against accidental admin role changes +- ✅ Enhanced UI with disabled role field for self-editing administrators +- ✅ Improved admin interface - "Tous" displayed for admin store access, no redundant store selector for admin profiles ### Database Backup & Recovery System (January 9, 2025) - ✅ Added complete database backup and restore functionality in administration panel