beUI Pro für Mobile ist live: 50 React Native Blöcke und Screens
Audit Trail
1 Variante
A searchable event history with day groups, actor filters, before-and-after values, and focused event details.
Workspace history
audit-trail.tsxSee who changed what, narrow the history by category or actor, and inspect recorded values in an animated modal.
Audit trail
Changes across your workspace
Today4
- Maya Chenchanged the role for Leo MartinAccessRole:ViewerEditor
- Nina Brookspublished Getting started guideContentStatus:DraftPublished
- Leo Martinupdated Workspace settingsWorkspace3 fields changed
- Workspace automationarchived Spring researchWorkspaceStatus:CompletedArchived
Yesterday3
- Maya Cheninvited Sam RiveraAccessAccess:Not setGuest
- Nina Brooksupdated Release checklistContent2 fields changed
- Workspace automationremoved expired access to Partner workspaceAccessPermission:GuestNot set
TSXcomponents/previews/premium/audit-trail-preview.tsx
"use client";
import { FileText, Folder, KeyRound, Settings2 } from "lucide-react";
import {
type AuditActor,
type AuditEvent,
AuditTrail,
} from "@/components/premium/audit-trail/audit-trail";
const people: AuditActor[] = [
{
id: "maya",
name: "Maya Chen",
avatarUrl:
"https://images.unsplash.com/photo-1494790108377-be9c29b29330?auto=format&fit=crop&fm=webp&q=80&w=96",
},
{
id: "leo",
name: "Leo Martin",
avatarUrl:
"https://images.unsplash.com/photo-1500648767791-00dcc994a43e?auto=format&fit=crop&fm=webp&q=80&w=96",
},
{
id: "nina",
name: "Nina Brooks",
avatarUrl:
"https://images.unsplash.com/photo-1534528741775-53994a69daeb?auto=format&fit=crop&fm=webp&q=80&w=96",
},
{ id: "automation", name: "Workspace automation", kind: "system" },
];
const today = { id: "2026-10-07", label: "Today" };
const yesterday = { id: "2026-10-06", label: "Yesterday" };
const events: AuditEvent[] = [
{
id: "evt_role_029",
actor: people[0],
action: "changed the role for",
target: "Leo Martin",
category: "Access",
icon: <KeyRound />,
occurredAt: "2026-10-07T10:42:00+05:30",
timeLabel: "10:42 AM",
day: today,
description:
"Leo can now edit documents and manage project content in the design workspace.",
changes: [{ label: "Role", before: "Viewer", after: "Editor" }],
metadata: [
{ label: "Workspace", value: "Product design" },
{ label: "Source", value: "Web app" },
{ label: "Request", value: "REQ-029" },
{ label: "IP address", value: "192.0.2.24" },
],
},
{
id: "evt_publish_028",
actor: people[2],
action: "published",
target: "Getting started guide",
category: "Content",
icon: <FileText />,
occurredAt: "2026-10-07T10:18:00+05:30",
timeLabel: "10:18 AM",
day: today,
description:
"The updated setup guide is available to everyone in the workspace.",
changes: [{ label: "Status", before: "Draft", after: "Published" }],
metadata: [
{ label: "Collection", value: "Help center" },
{ label: "Revision", value: "12" },
{ label: "Source", value: "Web app" },
],
},
{
id: "evt_settings_027",
actor: people[1],
action: "updated",
target: "Workspace settings",
category: "Workspace",
icon: <Settings2 />,
occurredAt: "2026-10-07T09:56:00+05:30",
timeLabel: "9:56 AM",
day: today,
description: "Default preferences for new project members were updated.",
changes: [
{ label: "Default role", before: "Editor", after: "Viewer" },
{ label: "Join requests", before: "Off", after: "On" },
{ label: "Project visibility", before: "Workspace", after: "Private" },
],
metadata: [
{ label: "Workspace", value: "Product design" },
{ label: "Source", value: "Web app" },
],
},
{
id: "evt_archive_026",
actor: people[3],
action: "archived",
target: "Spring research",
category: "Workspace",
icon: <Folder />,
occurredAt: "2026-10-07T09:30:00+05:30",
timeLabel: "9:30 AM",
day: today,
description:
"The project was archived after its completion window. Its documents remain available.",
changes: [{ label: "Status", before: "Completed", after: "Archived" }],
metadata: [
{ label: "Source", value: "Scheduled workflow" },
{ label: "Rule", value: "Archive completed projects after 30 days" },
],
},
{
id: "evt_invite_025",
actor: people[0],
action: "invited",
target: "Sam Rivera",
category: "Access",
icon: <KeyRound />,
occurredAt: "2026-10-06T16:32:00+05:30",
timeLabel: "4:32 PM",
day: yesterday,
description: "A new invitation was issued for the release project.",
changes: [{ label: "Access", before: null, after: "Guest" }],
metadata: [
{ label: "Project", value: "Autumn release" },
{ label: "Duration", value: "30 days" },
{ label: "Source", value: "Web app" },
],
},
{
id: "evt_document_024",
actor: people[2],
action: "updated",
target: "Release checklist",
category: "Content",
icon: <FileText />,
occurredAt: "2026-10-06T15:10:00+05:30",
timeLabel: "3:10 PM",
day: yesterday,
changes: [
{ label: "Owner", before: "Maya Chen", after: "Nina Brooks" },
{ label: "Due date", before: "Oct 10", after: "Oct 12" },
],
metadata: [
{ label: "Project", value: "Autumn release" },
{ label: "Revision", value: "08" },
],
},
{
id: "evt_revoke_023",
actor: people[3],
action: "removed expired access to",
target: "Partner workspace",
category: "Access",
icon: <KeyRound />,
occurredAt: "2026-10-06T14:05:00+05:30",
timeLabel: "2:05 PM",
day: yesterday,
description:
"The time-limited workspace permission ended at its scheduled expiry.",
changes: [{ label: "Permission", before: "Guest", after: null }],
metadata: [
{ label: "Source", value: "Scheduled workflow" },
{ label: "Policy", value: "Time-limited partner access" },
],
},
];
export function AuditTrailPreview() {
return <AuditTrail events={events} />;
}
Der Quellcode ist gesperrt
Hol dir Zugang, um Premium-Komponenten zu installieren und den vollständigen Quellcode zu sehen.
Dashboard öffnenInstallieren
$ bunx --bun shadcn add @beui-pro/audit-trail