0a9588abb7
- Add pagination support to findAll (page, limit query params) - Add findByTemplateId method to service - Add GET /by-template/:templateId endpoint to controller - Service already includes CRUD for QuestionBank and QuestionBankItem
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
import React from 'react';
|
|
import { SidebarRail, NavItem } from './SidebarRail';
|
|
import { Database } from 'lucide-react';
|
|
import { useLanguage } from '../../contexts/LanguageContext';
|
|
|
|
interface AdminLayoutProps {
|
|
children: React.ReactNode;
|
|
currentView: string;
|
|
onViewChange: (view: string) => void;
|
|
onLogout: () => void;
|
|
currentUser: any;
|
|
appMode?: 'workspace' | 'admin';
|
|
onSwitchMode?: () => void;
|
|
}
|
|
|
|
export const AdminLayout: React.FC<AdminLayoutProps> = ({
|
|
children, currentView, onViewChange, onLogout, currentUser, appMode, onSwitchMode
|
|
}) => {
|
|
const { t } = useLanguage();
|
|
|
|
const navItems: NavItem[] = [
|
|
{ id: 'knowledge', icon: Database, label: t('navKnowledge') }
|
|
];
|
|
|
|
return (
|
|
<div className='flex h-screen w-full bg-slate-50 overflow-hidden relative'>
|
|
<SidebarRail
|
|
currentView={currentView}
|
|
onViewChange={onViewChange}
|
|
onLogout={onLogout}
|
|
currentUser={currentUser}
|
|
navItems={navItems}
|
|
appMode={appMode}
|
|
onSwitchMode={onSwitchMode}
|
|
/>
|
|
<div className="flex-1 overflow-hidden relative">
|
|
{children}
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|