diff --git a/admin/src/app/layout.tsx b/admin/src/app/layout.tsx
index ce87198..7d895d5 100644
--- a/admin/src/app/layout.tsx
+++ b/admin/src/app/layout.tsx
@@ -4,6 +4,9 @@ import "./globals.css";
export const metadata: Metadata = {
title: "AgendaPRO Admin — Gerenciador de Assinaturas",
description: "Painel administrativo para gerenciamento de assinaturas, tenants e planos do AgendaPRO SaaS.",
+ icons: {
+ icon: 'data:image/svg+xml,🛡️ '
+ }
};
export default function RootLayout({ children }: { children: React.ReactNode }) {
diff --git a/admin/src/app/page.tsx b/admin/src/app/page.tsx
index 0b6adf7..46f9910 100644
--- a/admin/src/app/page.tsx
+++ b/admin/src/app/page.tsx
@@ -196,11 +196,18 @@ export default function AdminPage() {
}}>
{notifications.map(n => (
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 1201bb7..6870f4d 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -4,6 +4,9 @@ import "./globals.css";
export const metadata: Metadata = {
title: "AgendaPRO — Sistema de Agendamento SaaS",
description: "Plataforma completa de agendamento para barbearias, manicures, massagens e estética. Gerencie sua agenda, clientes e pagamentos.",
+ icons: {
+ icon: 'data:image/svg+xml,
📅 '
+ }
};
export default function RootLayout({ children }: { children: React.ReactNode }) {
diff --git a/src/app/page.tsx b/src/app/page.tsx
index bfee4a2..f12bc72 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -143,6 +143,7 @@ export default function Home() {
title={pages[currentPage]?.title || 'Dashboard'}
subtitle={pages[currentPage]?.subtitle || ''}
onMenuClick={() => setSidebarOpen(true)}
+ onNavigate={setCurrentPage}
/>
{renderPage()}
diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx
index a70535b..769494b 100644
--- a/src/components/Settings.tsx
+++ b/src/components/Settings.tsx
@@ -1,5 +1,5 @@
import { useState, useEffect } from 'react';
-import { Store, Clock, Globe, Bell, Palette, Shield, Save, Copy, ExternalLink, Check, Link, Eye, EyeOff } from 'lucide-react';
+import { Store, Clock, Globe, Bell, Palette, Shield, Save, Copy, ExternalLink, Check, Link } from 'lucide-react';
const tabs = [
{ id: 'general', label: 'Geral', icon: Store },
@@ -397,54 +397,25 @@ export default function Settings() {
)}
{activeTab === 'security' && (
-
+
+
Segurança
+
+ Senha Atual
+
+
+
+
{saved ? '✓ Salvo!' : 'Salvar'}
+
)}
);
}
-
-function SecurityTab({ handleSave, saved }: { handleSave: () => void; saved: boolean }) {
- const [showCurrent, setShowCurrent] = useState(false);
- const [showNew, setShowNew] = useState(false);
- const [showConfirm, setShowConfirm] = useState(false);
-
- // Re-importing specific lucide icons dynamically if possible, or we can use a generic button.
- // Actually, we can use Eye and EyeOff if we import them at the top. Let's assume they are imported.
- // Wait, I need to add the import at the top of the file!
- // For now, I'll just use a button that says "Mostrar" or "Ocultar", or try to use Eye/EyeOff.
- return (
-
-
Segurança
-
-
Senha Atual
-
-
- setShowCurrent(!showCurrent)} style={{ position: 'absolute', right: '4px', top: '50%', transform: 'translateY(-50%)', padding: '4px' }}>
- {showCurrent ? : }
-
-
-
-
-
-
Nova Senha
-
-
- setShowNew(!showNew)} style={{ position: 'absolute', right: '4px', top: '50%', transform: 'translateY(-50%)', padding: '4px' }}>
- {showNew ? : }
-
-
-
-
-
Confirmar Nova Senha
-
-
- setShowConfirm(!showConfirm)} style={{ position: 'absolute', right: '4px', top: '50%', transform: 'translateY(-50%)', padding: '4px' }}>
- {showConfirm ? : }
-
-
-
-
-
{saved ? '✓ Salvo!' : 'Salvar'}
-
- );
-}
diff --git a/src/components/Topbar.tsx b/src/components/Topbar.tsx
index b16a29e..36de9e0 100644
--- a/src/components/Topbar.tsx
+++ b/src/components/Topbar.tsx
@@ -5,6 +5,7 @@ interface TopbarProps {
title: string;
subtitle: string;
onMenuClick: () => void;
+ onNavigate?: (page: string) => void;
}
const mockNotifications = [
@@ -13,10 +14,10 @@ const mockNotifications = [
{ id: 3, title: 'Estoque Baixo', message: 'Pomada modeladora abaixo de 5 unidades', type: 'warning', time: '1 dia atrás', read: true },
];
-export default function Topbar({ title, subtitle, onMenuClick }: TopbarProps) {
+export default function Topbar({ title, subtitle, onMenuClick, onNavigate }: TopbarProps) {
const [avatarInitials, setAvatarInitials] = useState('AD');
const [tenantName, setTenantName] = useState('Administrador');
- const [email, setEmail] = useState('');
+ const [email, setEmail] = useState('admin@agendapro.com');
const [showNotifications, setShowNotifications] = useState(false);
const [showProfile, setShowProfile] = useState(false);
@@ -88,9 +89,12 @@ export default function Topbar({ title, subtitle, onMenuClick }: TopbarProps) {
};
const logout = () => {
+ localStorage.removeItem('agendapro_token');
localStorage.removeItem('agendapro_tenant_slug');
localStorage.removeItem('agendapro_tenant_name');
- window.location.href = '/';
+ localStorage.removeItem('agendapro_email');
+ localStorage.removeItem('agendapro_role');
+ window.location.href = '/login';
};
const unreadCount = notifications.filter(n => !n.read).length;
@@ -133,11 +137,18 @@ export default function Topbar({ title, subtitle, onMenuClick }: TopbarProps) {
}}>
Notificações
- {unreadCount > 0 && (
-
- Marcar lidas
-
- )}
+
+ {unreadCount > 0 && (
+
+ Marcar lidas
+
+ )}
+ {notifications.length > 0 && (
+ setNotifications([])}>
+ Limpar
+
+ )}
+
{notifications.map(n => (
@@ -181,7 +192,7 @@ export default function Topbar({ title, subtitle, onMenuClick }: TopbarProps) {
{email}
-
+ { if(onNavigate) onNavigate('settings'); setShowProfile(false); }} style={{ width: '100%', justifyContent: 'flex-start', padding: '10px 12px', fontSize: '13px' }}>
Meu Perfil