// App.jsx — Root component (function () { const { useState, useEffect } = React; function Settings({ kanbanLeads, clients }) { const { useState } = React; const [gcal, setGcal] = useState(true); const [meta, setMeta] = useState(true); const [smsReminders, setSmsReminders] = useState(true); const [emailReminders, setEmailReminders] = useState(true); const [reminderTiming, setReminderTiming] = useState('24h'); const team = window.SEED.team.map((m,i) => ({ ...m, deals:[8,5,6,3][i]||4, value:[1240000,680000,815000,412000][i]||400000 })); const Toggle = ({ on, onClick }) => ( ); const fmtVal = v => v >= 1000000 ? (v/1000000).toFixed(1).replace('.',',')+' M zł' : Math.round(v/1000)+' k zł'; return (
{/* Team accounts */}
Konta zespołu
Podgląd pracy handlowców — właściciel widzi wyniki całego zespołu
{team.map((m, i) => (
{m.initials}
{m.name}
{m.role}
{fmtVal(m.value)}
{m.deals} wygranych
))}
{/* Integrations */}
Integracje
Automatyzacje działające w tle
{[ { label:'Kalendarz Google', on:gcal, set:setGcal }, { label:'Leady z reklam Meta (Facebook/Instagram)', on:meta, set:setMeta }, ].map(it => (
{it.label}
{it.on?'Połączono':'Rozłączone'} it.set(v=>!v)} />
))}
Przypomnienia SMS
setSmsReminders(v=>!v)} />
Przypomnienia e-mail
setEmailReminders(v=>!v)} />
Wyślij przypomnienie przed spotkaniem
{/* Data */}
Dane
Import i utrzymanie bazy klientów
System zainstalowany na Państwa serwerze — 0 zł / msc utrzymania
); } function LoginScreen({ onLogin }) { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [loading, setLoading] = useState(false); const submit = (e) => { e.preventDefault(); setLoading(true); setTimeout(() => onLogin(), 700); }; const inputStyle = { width:'100%', padding:'11px 14px', borderRadius:10, border:'1px solid var(--bdr)', background:'var(--bg-input)', color:'var(--t1)', fontSize:14, outline:'none' }; return (
DemoCRM
Zaloguj się, aby przejść do panelu sprzedaży
setEmail(e.target.value)} />
setPassword(e.target.value)} />
To wersja demonstracyjna — dowolne dane zalogują Cię jako Sales Manager.
); } function App() { const [loggedIn, setLoggedIn] = useState(false); const [darkMode, setDarkMode] = useState(true); const [activeView, setActiveView] = useState('dashboard'); const [kanbanLeads, setKanbanLeads] = useState(() => window.SEED.kanbanLeads); const [tasks, setTasks] = useState(() => window.SEED.tasks); const [todayTasks, setTodayTasks] = useState(() => window.SEED.todayTasks); // Apply theme class to useEffect(() => { if (darkMode) { document.documentElement.classList.remove('light'); } else { document.documentElement.classList.add('light'); } }, [darkMode]); // Allow Settings to deep-link into other views; allow Shell to trigger logout useEffect(() => { window.__navigateTo = setActiveView; window.__onLogout = () => { setLoggedIn(false); setActiveView('dashboard'); }; }, []); if (!loggedIn) return setLoggedIn(true)} />; // View transition key for re-mount animation const viewKey = activeView; let view; if (activeView === 'dashboard') view = ; else if (activeView === 'kanban') view = ; else if (activeView === 'clients') view = ; else if (activeView === 'tasks') view = ; else if (activeView === 'calendar') view = ; else if (activeView === 'reports') view = ; else if (activeView === 'settings') view = ; return (
{view}
); } ReactDOM.createRoot(document.getElementById('root')).render(); })();