Hide cart for admin users and remove confirmation from view-only modals
Admin Cart Visibility: - Hide cart icon/badge in mobile header for admin users - Cart was already hidden in desktop sidebar - Admins don't need to purchase products Modal Confirmation Improvements: - Removed confirmation from AdminOrders detail dialog (view-only) - Removed confirmation from AdminMembers detail dialog (view-only) - Kept confirmation on AdminProducts form dialog (has form inputs) - Kept confirmation on AdminEvents form dialogs (Event and Block forms) - Kept confirmation on AdminConsulting meet link dialog (has form input) This prevents annoying confirmations on simple view/close actions while still protecting users from accidentally closing forms with unsaved data. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -244,14 +244,16 @@ export function AppLayout({ children }: AppLayoutProps) {
|
||||
<span>{brandName}</span>
|
||||
</Link>
|
||||
<div className="flex items-center gap-2">
|
||||
<Link to="/checkout" className="relative p-2">
|
||||
<ShoppingCart className="w-5 h-5" />
|
||||
{items.length > 0 && (
|
||||
<span className="absolute top-0 right-0 bg-primary text-primary-foreground text-xs w-4 h-4 flex items-center justify-center">
|
||||
{items.length}
|
||||
</span>
|
||||
)}
|
||||
</Link>
|
||||
{!isAdmin && (
|
||||
<Link to="/checkout" className="relative p-2">
|
||||
<ShoppingCart className="w-5 h-5" />
|
||||
{items.length > 0 && (
|
||||
<span className="absolute top-0 right-0 bg-primary text-primary-foreground text-xs w-4 h-4 flex items-center justify-center">
|
||||
{items.length}
|
||||
</span>
|
||||
)}
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user