"This is the final Enterprise UX/UI update for V1. Do NOT break existing features (Pagination, Search, Tabs, Mobile cards, Replit API connections). Add the following features to the Families Table:
Bulk Selection: Add a checkbox column on the far left. Include a 'Select All' checkbox in the table header.
Floating Action Bar: When 1 or more rows are selected, reveal a premium, glassmorphism floating action bar at the bottom center of the screen. It should display the count of selected items and have buttons: 'Export Selected (CSV)', 'Freeze Selected', and 'Delete Selected' (styled in danger red).
API Promise Handling: For bulk freeze/delete, iterate over the selected IDs and use Promise.all to send the existing API requests concurrently, then refresh the table once and clear the selection.
Micro-Interactions: Make the 'Email' text in the table rows clickable. When clicked, copy the email address to the user's clipboard and show a subtle, premium 'Email Copied!' toast.
Maintain the absolute premium Black & Gold aesthetic, RTL orientation, and LanguageContext."
I have the context. Now let me add the new translations for bulk actions and email copy, then update the families table with all the new features.
Now let me rewrite the families table with all the new features - bulk selection, floating action bar, click-to-copy email, and Promise.all for bulk operations:
I've implemented all the enterprise-grade V1 features:
bg-card/80 backdrop-blur-xl) appears at the bottom center when items are selected, showing the count and action buttons: Export Selected (CSV), Freeze Selected, and Delete Selected (styled in danger red).Promise.all to send concurrent requests for all selected IDs, then refresh the table once and clear selection on success."Critical Security Fix: Implement strict Role-Based Access Control (RBAC) in the application UI.
Read the role of the logged-in user from the AuthContext state.
Admin View (user.role === 'admin'): Render the complete current Dashboard exactly as it is (Stats, Families Table, Actions Menu, Bulk Actions, Add Family).
Client View (user.role === 'user'): Completely hide the Admin Dashboard, Stats, and Families Table. Do not show the admin sidebar. Instead, render a clean, premium 'Client Portal' view. It should display a gold/black welcome header ('Welcome, [Family Name]') and a sleek placeholder card stating 'Your personal event hub is being prepared. Gallery and points will be available here.'
Ensure standard users have absolutely zero access to administrative buttons, other families' data, or edit/delete capabilities.
Maintain the absolute premium Black & Gold aesthetic, RTL orientation, and LanguageContext. Do not break existing API calls."
Now I have all the context. I need to:
Let me add the translations first:
Now let me create the ClientPortal component:
Now let me update the main page to implement the RBAC logic:
I've implemented strict Role-Based Access Control (RBAC) in the application:
user.role === 'admin') - Full access to the complete Dashboard with Stats, Families Table, Actions Menu, Bulk Actions, Add Family, and the admin sidebar.user.role === 'user') - A clean, premium Client Portal that completely hides all admin functionality. It displays a gold/black welcome header with the family name, a main card stating the event hub is being prepared, and two placeholder feature cards for Gallery and Points (coming soon).Standard users have zero access to administrative buttons, other families' data, or any edit/delete capabilities while maintaining the premium black and gold aesthetic with full RTL support.
You can send messages while the preview loads