feat(frontend): schedule history dialog with rollback, wire ConfigHistorySheet
This commit is contained in:
@@ -28,6 +28,7 @@ import {
|
||||
} from "./components/import-channel-dialog";
|
||||
import { IptvExportDialog } from "./components/iptv-export-dialog";
|
||||
import { TranscodeSettingsDialog } from "./components/transcode-settings-dialog";
|
||||
import { ScheduleHistoryDialog } from "./components/schedule-history-dialog";
|
||||
import type {
|
||||
ChannelResponse,
|
||||
ProgrammingBlock,
|
||||
@@ -59,6 +60,7 @@ export default function DashboardPage() {
|
||||
const [editChannel, setEditChannel] = useState<ChannelResponse | null>(null);
|
||||
const [deleteTarget, setDeleteTarget] = useState<ChannelResponse | null>(null);
|
||||
const [scheduleChannel, setScheduleChannel] = useState<ChannelResponse | null>(null);
|
||||
const [scheduleHistoryChannelId, setScheduleHistoryChannelId] = useState<string | null>(null);
|
||||
|
||||
const handleCreate = (data: {
|
||||
name: string;
|
||||
@@ -186,6 +188,7 @@ export default function DashboardPage() {
|
||||
onExport={() => exportChannel(channel)}
|
||||
onMoveUp={() => handleMoveUp(channel.id)}
|
||||
onMoveDown={() => handleMoveDown(channel.id)}
|
||||
onScheduleHistory={() => setScheduleHistoryChannelId(channel.id)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
@@ -246,6 +249,14 @@ export default function DashboardPage() {
|
||||
}}
|
||||
/>
|
||||
|
||||
{scheduleHistoryChannelId && (
|
||||
<ScheduleHistoryDialog
|
||||
channelId={scheduleHistoryChannelId}
|
||||
open={!!scheduleHistoryChannelId}
|
||||
onOpenChange={open => !open && setScheduleHistoryChannelId(null)}
|
||||
/>
|
||||
)}
|
||||
|
||||
{deleteTarget && (
|
||||
<DeleteChannelDialog
|
||||
channelName={deleteTarget.name}
|
||||
|
||||
Reference in New Issue
Block a user