diff --git a/frontend/src/api/hooks.ts b/frontend/src/api/hooks.ts index cf1f5fb..5b6367f 100644 --- a/frontend/src/api/hooks.ts +++ b/frontend/src/api/hooks.ts @@ -1295,3 +1295,4 @@ export function useMoveContactToFolder() { }, }); } + diff --git a/frontend/src/components/layout/AISidebar.tsx b/frontend/src/components/layout/AISidebar.tsx index 869b5a8..ff644cb 100644 --- a/frontend/src/components/layout/AISidebar.tsx +++ b/frontend/src/components/layout/AISidebar.tsx @@ -5,6 +5,8 @@ import { SuggestionList } from '@/components/ai/SuggestionSidebar'; import { createSession, fetchSessions } from '@/api/ai'; import { useUIStore } from '@/store/uiStore'; import { useTranslation } from 'react-i18next'; +import { useUsers, useGroups } from '@/api/hooks'; +import { Avatar } from '@/components/ui/Avatar'; const robotIcon = (className: string) => ( ); +const teamIcon = (className: string) => ( + +); + +const chatBubbleIcon = (className: string) => ( + +); + const chevronRightIcon = (
+
+

Mitarbeiter

+ {usersLoading ? ( +

Laden...

+ ) : users.length === 0 ? ( +

Keine Mitarbeiter

+ ) : ( +
+ {users.map((u) => ( +
+
+ + +
+
+

{u.name}

+

{u.email}

+
+ {u.role} +
+ ))} +
+ )} +
+
+

Gruppen

+ {groupsLoading ? ( +

Laden...

+ ) : groups.length === 0 ? ( +

Keine Gruppen

+ ) : ( +
+ {groups.map((g) => ( +
+
+ +
+
+

{g.name}

+ {g.description &&

{g.description}

} +
+
+ ))} +
+ )} +
+
+ ); +} + +function ChatPanel() { + return ( +
+
+

Chat-Sidebar - Coming Soon

+
+
+ ); +} + export function AISidebar() { const { t } = useTranslation(); const { aiSidebarCollapsed, toggleAISidebar, aiSidebarTab, setAISidebarTab, notifications, removeNotification } = useUIStore(); @@ -65,6 +149,8 @@ export function AISidebar() { { key: 'chat', label: 'KI Chat', icon: robotIcon, testId: 'ai-sidebar-tab-chat' }, { key: 'proactive', label: 'Live KI', icon: bulbIcon, testId: 'ai-sidebar-tab-proactive' }, { key: 'notifications', label: t('topbar.notifications'), icon: bellIcon, testId: 'ai-sidebar-tab-notifications' }, + { key: 'team', label: 'Team', icon: teamIcon, testId: 'ai-sidebar-tab-team' }, + { key: 'chatroom', label: 'Chat', icon: chatBubbleIcon, testId: 'ai-sidebar-tab-chatroom' }, ]; const activeTab = tabs.find((tab) => tab.key === aiSidebarTab) || tabs[0]; @@ -124,6 +210,12 @@ export function AISidebar() { ); } + if (aiSidebarTab === 'team') { + return ; + } + if (aiSidebarTab === 'chatroom') { + return ; + } // chat tab if (loading) { return ( diff --git a/frontend/src/store/uiStore.ts b/frontend/src/store/uiStore.ts index 7a9dbf0..bd2410b 100644 --- a/frontend/src/store/uiStore.ts +++ b/frontend/src/store/uiStore.ts @@ -2,7 +2,7 @@ import { create } from 'zustand'; export type Theme = 'light' | 'dark' | 'system'; export type Locale = 'de' | 'en'; -export type AISidebarTab = 'proactive' | 'chat' | 'notifications'; +export type AISidebarTab = 'proactive' | 'chat' | 'notifications' | 'team' | 'chatroom'; export interface Toast { id: string;