feat(frontend): schedule history dialog with rollback, wire ConfigHistorySheet

This commit is contained in:
2026-03-17 14:48:39 +01:00
parent ba6abad602
commit 6d350940b9
4 changed files with 125 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ import {
Download,
ChevronUp,
ChevronDown,
History,
} from "lucide-react";
import { Button } from "@/components/ui/button";
import { useActiveSchedule } from "@/hooks/use-channels";
@@ -29,6 +30,7 @@ interface ChannelCardProps {
onExport: () => void;
onMoveUp: () => void;
onMoveDown: () => void;
onScheduleHistory: () => void;
}
function useScheduleStatus(channelId: string) {
@@ -69,6 +71,7 @@ export function ChannelCard({
onExport,
onMoveUp,
onMoveDown,
onScheduleHistory,
}: ChannelCardProps) {
const [confirmOpen, setConfirmOpen] = useState(false);
const blockCount = Object.values(channel.schedule_config.day_blocks).reduce(
@@ -185,6 +188,15 @@ export function ChannelCard({
>
<CalendarDays className="size-3.5" />
</Button>
<Button
size="icon-sm"
variant="ghost"
onClick={onScheduleHistory}
title="Schedule history"
className="text-zinc-600 hover:text-zinc-200"
>
<History className="size-3.5" />
</Button>
<Button
size="icon-sm"
asChild