feat(frontend): schedule history dialog with rollback, wire ConfigHistorySheet
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user