2026-04-02 23:40:03 +02:00
|
|
|
import { useState, useMemo, useEffect } from 'react';
|
2026-03-23 18:32:18 +01:00
|
|
|
import {
|
|
|
|
|
Avatar,
|
|
|
|
|
Badge,
|
|
|
|
|
Button,
|
|
|
|
|
Input,
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
Select,
|
2026-03-23 18:32:18 +01:00
|
|
|
MonoText,
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
SectionHeader,
|
2026-03-23 18:32:18 +01:00
|
|
|
Tag,
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
InlineEdit,
|
|
|
|
|
MultiSelect,
|
2026-03-23 18:32:18 +01:00
|
|
|
ConfirmDialog,
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
AlertDialog,
|
|
|
|
|
SplitPane,
|
|
|
|
|
EntityList,
|
2026-03-23 18:32:18 +01:00
|
|
|
Spinner,
|
|
|
|
|
useToast,
|
|
|
|
|
} from '@cameleer/design-system';
|
|
|
|
|
import {
|
|
|
|
|
useGroups,
|
|
|
|
|
useGroup,
|
|
|
|
|
useCreateGroup,
|
|
|
|
|
useUpdateGroup,
|
|
|
|
|
useDeleteGroup,
|
|
|
|
|
useAssignRoleToGroup,
|
|
|
|
|
useRemoveRoleFromGroup,
|
|
|
|
|
useAddUserToGroup,
|
|
|
|
|
useRemoveUserFromGroup,
|
|
|
|
|
useUsers,
|
|
|
|
|
useRoles,
|
|
|
|
|
} from '../../api/queries/admin/rbac';
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
import type { GroupDetail } from '../../api/queries/admin/rbac';
|
2026-03-23 18:32:18 +01:00
|
|
|
import styles from './UserManagement.module.css';
|
|
|
|
|
|
|
|
|
|
const BUILTIN_ADMINS_ID = '00000000-0000-0000-0000-000000000010';
|
|
|
|
|
|
2026-04-02 23:40:03 +02:00
|
|
|
export default function GroupsTab({ highlightId, onHighlightConsumed }: { highlightId?: string | null; onHighlightConsumed?: () => void }) {
|
2026-03-23 18:32:18 +01:00
|
|
|
const { toast } = useToast();
|
|
|
|
|
const { data: groups = [], isLoading: groupsLoading } = useGroups();
|
|
|
|
|
const { data: users = [] } = useUsers();
|
|
|
|
|
const { data: roles = [] } = useRoles();
|
|
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
const [search, setSearch] = useState('');
|
|
|
|
|
const [selectedId, setSelectedId] = useState<string | null>(null);
|
|
|
|
|
const [creating, setCreating] = useState(false);
|
|
|
|
|
const [deleteTarget, setDeleteTarget] = useState<GroupDetail | null>(null);
|
|
|
|
|
const [removeRoleTarget, setRemoveRoleTarget] = useState<string | null>(null);
|
|
|
|
|
|
2026-04-02 23:40:03 +02:00
|
|
|
// Auto-select highlighted item from cmd-k navigation
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (highlightId && groups) {
|
|
|
|
|
const match = groups.find((g) => g.id === highlightId);
|
|
|
|
|
if (match) {
|
|
|
|
|
setSelectedId(match.id);
|
|
|
|
|
onHighlightConsumed?.();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, [highlightId, groups]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
// Create form state
|
|
|
|
|
const [newName, setNewName] = useState('');
|
|
|
|
|
const [newParent, setNewParent] = useState('');
|
|
|
|
|
|
|
|
|
|
// Detail query
|
|
|
|
|
const { data: selectedGroup, isLoading: detailLoading } = useGroup(selectedId);
|
|
|
|
|
|
|
|
|
|
// Mutations
|
2026-03-23 18:32:18 +01:00
|
|
|
const createGroup = useCreateGroup();
|
|
|
|
|
const updateGroup = useUpdateGroup();
|
|
|
|
|
const deleteGroup = useDeleteGroup();
|
|
|
|
|
const assignRoleToGroup = useAssignRoleToGroup();
|
|
|
|
|
const removeRoleFromGroup = useRemoveRoleFromGroup();
|
|
|
|
|
const addUserToGroup = useAddUserToGroup();
|
|
|
|
|
const removeUserFromGroup = useRemoveUserFromGroup();
|
|
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
const filtered = useMemo(() => {
|
|
|
|
|
if (!search) return groups;
|
|
|
|
|
const q = search.toLowerCase();
|
|
|
|
|
return groups.filter((g) => g.name.toLowerCase().includes(q));
|
|
|
|
|
}, [groups, search]);
|
|
|
|
|
|
|
|
|
|
const isBuiltinAdmins = selectedGroup?.id === BUILTIN_ADMINS_ID;
|
2026-03-23 18:32:18 +01:00
|
|
|
|
|
|
|
|
const parentOptions = [
|
|
|
|
|
{ value: '', label: 'Top-level' },
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
...groups
|
|
|
|
|
.filter((g) => g.id !== selectedId)
|
|
|
|
|
.map((g) => ({ value: g.id, label: g.name })),
|
2026-03-23 18:32:18 +01:00
|
|
|
];
|
|
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
const duplicateGroupName =
|
|
|
|
|
newName.trim() !== '' &&
|
|
|
|
|
groups.some(
|
|
|
|
|
(g) => g.name.toLowerCase() === newName.trim().toLowerCase(),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// Derived data for the detail pane
|
|
|
|
|
const children = selectedGroup?.childGroups ?? [];
|
|
|
|
|
const members = selectedGroup?.members ?? [];
|
|
|
|
|
const parentGroup = selectedGroup?.parentGroupId
|
|
|
|
|
? groups.find((g) => g.id === selectedGroup.parentGroupId)
|
|
|
|
|
: null;
|
|
|
|
|
|
|
|
|
|
const memberUserIds = new Set(members.map((m) => m.userId));
|
|
|
|
|
const assignedRoleIds = new Set(
|
|
|
|
|
(selectedGroup?.directRoles ?? []).map((r) => r.id),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const availableRoles = roles
|
|
|
|
|
.filter((r) => !assignedRoleIds.has(r.id))
|
|
|
|
|
.map((r) => ({ value: r.id, label: r.name }));
|
|
|
|
|
|
|
|
|
|
const availableMembers = users
|
|
|
|
|
.filter((u) => !memberUserIds.has(u.userId))
|
|
|
|
|
.map((u) => ({ value: u.userId, label: u.displayName }));
|
|
|
|
|
|
|
|
|
|
function parentName(parentGroupId: string | null): string {
|
2026-03-23 18:32:18 +01:00
|
|
|
if (!parentGroupId) return 'Top-level';
|
|
|
|
|
const parent = groups.find((g) => g.id === parentGroupId);
|
|
|
|
|
return parent ? parent.name : parentGroupId;
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
}
|
2026-03-23 18:32:18 +01:00
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
async function handleCreate() {
|
|
|
|
|
if (!newName.trim()) return;
|
2026-03-23 18:32:18 +01:00
|
|
|
try {
|
|
|
|
|
await createGroup.mutateAsync({
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
name: newName.trim(),
|
|
|
|
|
parentGroupId: newParent || null,
|
2026-03-23 18:32:18 +01:00
|
|
|
});
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
toast({ title: 'Group created', description: newName.trim(), variant: 'success' });
|
|
|
|
|
setCreating(false);
|
|
|
|
|
setNewName('');
|
|
|
|
|
setNewParent('');
|
2026-03-23 18:32:18 +01:00
|
|
|
} catch {
|
2026-04-02 19:08:00 +02:00
|
|
|
toast({ title: 'Failed to create group', variant: 'error', duration: 86_400_000 });
|
2026-03-23 18:32:18 +01:00
|
|
|
}
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
}
|
2026-03-23 18:32:18 +01:00
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
async function handleDelete() {
|
|
|
|
|
if (!deleteTarget) return;
|
|
|
|
|
try {
|
|
|
|
|
await deleteGroup.mutateAsync(deleteTarget.id);
|
|
|
|
|
toast({
|
|
|
|
|
title: 'Group deleted',
|
|
|
|
|
description: deleteTarget.name,
|
|
|
|
|
variant: 'warning',
|
|
|
|
|
});
|
|
|
|
|
if (selectedId === deleteTarget.id) setSelectedId(null);
|
|
|
|
|
setDeleteTarget(null);
|
|
|
|
|
} catch {
|
2026-04-02 19:08:00 +02:00
|
|
|
toast({ title: 'Failed to delete group', variant: 'error', duration: 86_400_000 });
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
setDeleteTarget(null);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function handleRename(newNameVal: string) {
|
2026-03-23 18:32:18 +01:00
|
|
|
if (!selectedGroup) return;
|
|
|
|
|
try {
|
|
|
|
|
await updateGroup.mutateAsync({
|
|
|
|
|
id: selectedGroup.id,
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
name: newNameVal,
|
2026-03-23 18:32:18 +01:00
|
|
|
parentGroupId: selectedGroup.parentGroupId,
|
|
|
|
|
});
|
|
|
|
|
toast({ title: 'Group renamed', variant: 'success' });
|
|
|
|
|
} catch {
|
2026-04-02 19:08:00 +02:00
|
|
|
toast({ title: 'Failed to rename group', variant: 'error', duration: 86_400_000 });
|
2026-03-23 18:32:18 +01:00
|
|
|
}
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
}
|
2026-03-23 18:32:18 +01:00
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
async function handleRemoveMember(userId: string) {
|
2026-03-23 18:32:18 +01:00
|
|
|
if (!selectedGroup) return;
|
|
|
|
|
try {
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
await removeUserFromGroup.mutateAsync({
|
|
|
|
|
userId,
|
2026-03-23 18:32:18 +01:00
|
|
|
groupId: selectedGroup.id,
|
|
|
|
|
});
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
toast({ title: 'Member removed', variant: 'success' });
|
2026-03-23 18:32:18 +01:00
|
|
|
} catch {
|
2026-04-02 19:08:00 +02:00
|
|
|
toast({ title: 'Failed to remove member', variant: 'error', duration: 86_400_000 });
|
2026-03-23 18:32:18 +01:00
|
|
|
}
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
}
|
2026-03-23 18:32:18 +01:00
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
async function handleAddMembers(userIds: string[]) {
|
2026-03-23 18:32:18 +01:00
|
|
|
if (!selectedGroup) return;
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
for (const userId of userIds) {
|
|
|
|
|
try {
|
|
|
|
|
await addUserToGroup.mutateAsync({
|
|
|
|
|
userId,
|
|
|
|
|
groupId: selectedGroup.id,
|
|
|
|
|
});
|
|
|
|
|
toast({ title: 'Member added', variant: 'success' });
|
|
|
|
|
} catch {
|
2026-04-02 19:08:00 +02:00
|
|
|
toast({ title: 'Failed to add member', variant: 'error', duration: 86_400_000 });
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
}
|
2026-03-23 18:32:18 +01:00
|
|
|
}
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
}
|
2026-03-23 18:32:18 +01:00
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
async function handleAddRoles(roleIds: string[]) {
|
|
|
|
|
if (!selectedGroup) return;
|
|
|
|
|
for (const roleId of roleIds) {
|
|
|
|
|
try {
|
|
|
|
|
await assignRoleToGroup.mutateAsync({
|
|
|
|
|
groupId: selectedGroup.id,
|
|
|
|
|
roleId,
|
|
|
|
|
});
|
|
|
|
|
toast({ title: 'Role assigned', variant: 'success' });
|
|
|
|
|
} catch {
|
2026-04-02 19:08:00 +02:00
|
|
|
toast({ title: 'Failed to assign role', variant: 'error', duration: 86_400_000 });
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
}
|
2026-03-23 18:32:18 +01:00
|
|
|
}
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
}
|
2026-03-23 18:32:18 +01:00
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
async function handleRemoveRole(roleId: string) {
|
2026-03-23 18:32:18 +01:00
|
|
|
if (!selectedGroup) return;
|
|
|
|
|
try {
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
await removeRoleFromGroup.mutateAsync({
|
|
|
|
|
groupId: selectedGroup.id,
|
|
|
|
|
roleId,
|
|
|
|
|
});
|
2026-03-23 18:32:18 +01:00
|
|
|
toast({ title: 'Role removed', variant: 'success' });
|
|
|
|
|
} catch {
|
2026-04-02 19:08:00 +02:00
|
|
|
toast({ title: 'Failed to remove role', variant: 'error', duration: 86_400_000 });
|
2026-03-23 18:32:18 +01:00
|
|
|
}
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
}
|
2026-03-23 18:32:18 +01:00
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
if (groupsLoading) return <Spinner size="md" />;
|
2026-03-23 18:32:18 +01:00
|
|
|
|
|
|
|
|
return (
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
<>
|
|
|
|
|
<SplitPane
|
|
|
|
|
list={
|
|
|
|
|
<>
|
|
|
|
|
{creating && (
|
|
|
|
|
<div className={styles.createForm}>
|
|
|
|
|
<Input
|
|
|
|
|
placeholder="Group name *"
|
|
|
|
|
value={newName}
|
|
|
|
|
onChange={(e) => setNewName(e.target.value)}
|
|
|
|
|
/>
|
|
|
|
|
{duplicateGroupName && (
|
|
|
|
|
<span style={{ color: 'var(--error)', fontSize: 11 }}>
|
|
|
|
|
Group name already exists
|
|
|
|
|
</span>
|
|
|
|
|
)}
|
|
|
|
|
<Select
|
|
|
|
|
options={parentOptions}
|
|
|
|
|
value={newParent}
|
|
|
|
|
onChange={(e) => setNewParent(e.target.value)}
|
|
|
|
|
/>
|
|
|
|
|
<div className={styles.createFormActions}>
|
|
|
|
|
<Button
|
|
|
|
|
size="sm"
|
|
|
|
|
variant="ghost"
|
|
|
|
|
onClick={() => setCreating(false)}
|
|
|
|
|
>
|
|
|
|
|
Cancel
|
|
|
|
|
</Button>
|
|
|
|
|
<Button
|
|
|
|
|
size="sm"
|
|
|
|
|
variant="primary"
|
|
|
|
|
onClick={handleCreate}
|
|
|
|
|
loading={createGroup.isPending}
|
|
|
|
|
disabled={!newName.trim() || duplicateGroupName}
|
|
|
|
|
>
|
|
|
|
|
Create
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-03-23 18:32:18 +01:00
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
<EntityList
|
|
|
|
|
items={filtered}
|
|
|
|
|
renderItem={(group) => {
|
|
|
|
|
const groupChildren = groups.filter(
|
|
|
|
|
(g) => g.parentGroupId === group.id,
|
|
|
|
|
);
|
|
|
|
|
const groupParent = group.parentGroupId
|
|
|
|
|
? groups.find((g) => g.id === group.parentGroupId)
|
|
|
|
|
: null;
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Avatar name={group.name} size="sm" />
|
|
|
|
|
<div className={styles.entityInfo}>
|
|
|
|
|
<div className={styles.entityName}>{group.name}</div>
|
|
|
|
|
<div className={styles.entityMeta}>
|
|
|
|
|
{groupParent
|
|
|
|
|
? `Child of ${groupParent.name}`
|
|
|
|
|
: 'Top-level'}
|
|
|
|
|
{' \u00b7 '}
|
|
|
|
|
{groupChildren.length} children
|
|
|
|
|
{' \u00b7 '}
|
|
|
|
|
{(group.members ?? []).length} members
|
|
|
|
|
</div>
|
|
|
|
|
<div className={styles.entityTags}>
|
|
|
|
|
{(group.directRoles ?? []).map((r) => (
|
|
|
|
|
<Badge key={r.id} label={r.name} color="warning" />
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
2026-03-23 18:32:18 +01:00
|
|
|
</div>
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
}}
|
|
|
|
|
getItemId={(group) => group.id}
|
|
|
|
|
selectedId={selectedId ?? undefined}
|
|
|
|
|
onSelect={setSelectedId}
|
|
|
|
|
searchPlaceholder="Search groups..."
|
|
|
|
|
onSearch={setSearch}
|
|
|
|
|
addLabel="+ Add group"
|
|
|
|
|
onAdd={() => setCreating(true)}
|
|
|
|
|
emptyMessage="No groups match your search"
|
|
|
|
|
/>
|
|
|
|
|
</>
|
|
|
|
|
}
|
|
|
|
|
detail={
|
|
|
|
|
selectedId && detailLoading ? (
|
|
|
|
|
<Spinner size="md" />
|
|
|
|
|
) : selectedGroup ? (
|
|
|
|
|
<>
|
|
|
|
|
<div className={styles.detailHeader}>
|
|
|
|
|
<Avatar name={selectedGroup.name} size="lg" />
|
|
|
|
|
<div className={styles.detailHeaderInfo}>
|
|
|
|
|
<div className={styles.detailName}>
|
|
|
|
|
{isBuiltinAdmins ? (
|
|
|
|
|
selectedGroup.name
|
|
|
|
|
) : (
|
|
|
|
|
<InlineEdit
|
|
|
|
|
value={selectedGroup.name}
|
|
|
|
|
onSave={handleRename}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
<div className={styles.detailEmail}>
|
|
|
|
|
{parentGroup
|
|
|
|
|
? `${parentGroup.name} > ${selectedGroup.name}`
|
|
|
|
|
: 'Top-level group'}
|
|
|
|
|
{isBuiltinAdmins && ' (built-in)'}
|
2026-03-23 18:32:18 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
<Button
|
|
|
|
|
size="sm"
|
|
|
|
|
variant="danger"
|
|
|
|
|
onClick={() => setDeleteTarget(selectedGroup)}
|
2026-03-23 18:32:18 +01:00
|
|
|
disabled={isBuiltinAdmins}
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
>
|
|
|
|
|
Delete
|
|
|
|
|
</Button>
|
2026-03-23 18:32:18 +01:00
|
|
|
</div>
|
|
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
<div className={styles.metaGrid}>
|
|
|
|
|
<span className={styles.metaLabel}>ID</span>
|
|
|
|
|
<MonoText size="xs">{selectedGroup.id}</MonoText>
|
|
|
|
|
</div>
|
2026-03-23 18:32:18 +01:00
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
{parentGroup && (
|
|
|
|
|
<>
|
|
|
|
|
<SectionHeader>Member of</SectionHeader>
|
|
|
|
|
<div className={styles.sectionTags}>
|
|
|
|
|
<Tag label={parentGroup.name} color="auto" />
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
2026-03-23 18:32:18 +01:00
|
|
|
)}
|
|
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
<SectionHeader>Members (direct)</SectionHeader>
|
|
|
|
|
<div className={styles.sectionTags}>
|
|
|
|
|
{members.map((u) => (
|
|
|
|
|
<Tag
|
|
|
|
|
key={u.userId}
|
|
|
|
|
label={u.displayName}
|
|
|
|
|
color="auto"
|
|
|
|
|
onRemove={() => handleRemoveMember(u.userId)}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
{members.length === 0 && (
|
|
|
|
|
<span className={styles.inheritedNote}>(no members)</span>
|
|
|
|
|
)}
|
|
|
|
|
<MultiSelect
|
|
|
|
|
options={availableMembers}
|
|
|
|
|
value={[]}
|
|
|
|
|
onChange={handleAddMembers}
|
|
|
|
|
placeholder="+ Add"
|
2026-03-23 18:32:18 +01:00
|
|
|
/>
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
</div>
|
|
|
|
|
{children.length > 0 && (
|
|
|
|
|
<span className={styles.inheritedNote}>
|
|
|
|
|
+ all members of {children.map((c) => c.name).join(', ')}
|
|
|
|
|
</span>
|
2026-03-23 18:32:18 +01:00
|
|
|
)}
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
|
|
|
|
|
<SectionHeader>Child groups</SectionHeader>
|
|
|
|
|
<div className={styles.sectionTags}>
|
|
|
|
|
{children.map((c) => (
|
|
|
|
|
<Tag key={c.id} label={c.name} color="success" />
|
|
|
|
|
))}
|
|
|
|
|
{children.length === 0 && (
|
|
|
|
|
<span className={styles.inheritedNote}>
|
|
|
|
|
(no child groups)
|
|
|
|
|
</span>
|
|
|
|
|
)}
|
2026-03-23 18:32:18 +01:00
|
|
|
</div>
|
|
|
|
|
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
<SectionHeader>Assigned roles</SectionHeader>
|
|
|
|
|
<div className={styles.sectionTags}>
|
|
|
|
|
{(selectedGroup.directRoles ?? []).map((r) => (
|
|
|
|
|
<Tag
|
|
|
|
|
key={r.id}
|
|
|
|
|
label={r.name}
|
|
|
|
|
color="warning"
|
|
|
|
|
onRemove={() => {
|
|
|
|
|
if (members.length > 0) {
|
|
|
|
|
setRemoveRoleTarget(r.id);
|
|
|
|
|
} else {
|
|
|
|
|
handleRemoveRole(r.id);
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
{(selectedGroup.directRoles ?? []).length === 0 && (
|
|
|
|
|
<span className={styles.inheritedNote}>(no roles)</span>
|
|
|
|
|
)}
|
|
|
|
|
<MultiSelect
|
|
|
|
|
options={availableRoles}
|
|
|
|
|
value={[]}
|
|
|
|
|
onChange={handleAddRoles}
|
|
|
|
|
placeholder="+ Add"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
) : null
|
|
|
|
|
}
|
|
|
|
|
emptyMessage="Select a group to view details"
|
|
|
|
|
/>
|
|
|
|
|
|
2026-03-23 18:32:18 +01:00
|
|
|
<ConfirmDialog
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
open={deleteTarget !== null}
|
|
|
|
|
onClose={() => setDeleteTarget(null)}
|
2026-03-23 18:32:18 +01:00
|
|
|
onConfirm={handleDelete}
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
message={`Delete group "${deleteTarget?.name}"? This cannot be undone.`}
|
|
|
|
|
confirmText={deleteTarget?.name ?? ''}
|
2026-03-23 18:32:18 +01:00
|
|
|
loading={deleteGroup.isPending}
|
|
|
|
|
/>
|
feat: replace UI with design system example pages wired to real API
Migrate all page components from the @cameleer/design-system v0.0.3
example UI, replacing mock data with real backend API hooks. This brings
richer visuals (KpiStrip, GroupCard, RouteFlow, ProcessorTimeline,
DateRangePicker, expandable rows) while preserving all existing API
integration, auth, and routing infrastructure.
Pages migrated: Dashboard, RoutesMetrics, RouteDetail, ExchangeDetail,
AgentHealth, AgentInstance, OidcConfig, AuditLog, RBAC (Users/Groups/Roles).
Also enhanced LayoutShell CommandPalette with real search data from catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:42:16 +01:00
|
|
|
<AlertDialog
|
|
|
|
|
open={removeRoleTarget !== null}
|
|
|
|
|
onClose={() => setRemoveRoleTarget(null)}
|
|
|
|
|
onConfirm={() => {
|
|
|
|
|
if (removeRoleTarget && selectedGroup) {
|
|
|
|
|
handleRemoveRole(removeRoleTarget);
|
|
|
|
|
}
|
|
|
|
|
setRemoveRoleTarget(null);
|
|
|
|
|
}}
|
|
|
|
|
title="Remove role from group"
|
|
|
|
|
description={`Removing this role will affect ${members.length} member(s) who inherit it. Continue?`}
|
|
|
|
|
confirmLabel="Remove"
|
|
|
|
|
variant="warning"
|
|
|
|
|
/>
|
|
|
|
|
</>
|
2026-03-23 18:32:18 +01:00
|
|
|
);
|
|
|
|
|
}
|