import React, { useEffect, useState } from 'react'; import { navigateSystem, parseRoute, SYSTEM_SECTION_LABELS, type SystemSection, } from '../navigation'; import { OrganizationSection } from './OrganizationSection'; import { NetworkSection } from './NetworkSection'; import { AppTemplatesSection } from './AppTemplatesSection'; const SECTIONS: { id: SystemSection; icon: React.ReactNode; hint: string }[] = [ { id: 'organization', hint: 'Đuôi email & tổ chức', icon: ( ), }, { id: 'network', hint: 'WiFi được phép', icon: ( ), }, { id: 'templates', hint: 'Bộ keyword app', icon: ( ), }, ]; export const SystemTab: React.FC = () => { const [section, setSection] = useState(() => parseRoute().systemSection); useEffect(() => { const sync = () => setSection(parseRoute().systemSection); window.addEventListener('popstate', sync); return () => window.removeEventListener('popstate', sync); }, []); const selectSection = (id: SystemSection) => { setSection(id); navigateSystem(id); }; return (

Quản lý hệ thống

Cấu hình tổ chức, mạng WiFi và khung ứng dụng dùng chung cho toàn hệ thống.

{section === 'organization' && } {section === 'network' && } {section === 'templates' && }
); };