feat: add schedule sheet and tag input components

- Implemented ScheduleSheet component to display channel schedules with a timeline view.
- Added DayRow subcomponent for rendering daily schedule slots with color coding.
- Integrated ScheduleSheet into the DashboardPage for viewing schedules of selected channels.
- Created TagInput component for managing tags with add and remove functionality.
- Updated package dependencies to include zod version 4.3.6.
This commit is contained in:
2026-03-11 21:14:42 +01:00
parent b813594059
commit 477de2c49d
8 changed files with 781 additions and 179 deletions

View File

@@ -1,5 +1,5 @@
import Link from "next/link";
import { Pencil, Trash2, RefreshCw, Tv2 } from "lucide-react";
import { Pencil, Trash2, RefreshCw, Tv2, CalendarDays } from "lucide-react";
import { Button } from "@/components/ui/button";
import type { ChannelResponse } from "@/lib/types";
@@ -9,6 +9,7 @@ interface ChannelCardProps {
onEdit: () => void;
onDelete: () => void;
onGenerateSchedule: () => void;
onViewSchedule: () => void;
}
export function ChannelCard({
@@ -17,6 +18,7 @@ export function ChannelCard({
onEdit,
onDelete,
onGenerateSchedule,
onViewSchedule,
}: ChannelCardProps) {
const blockCount = channel.schedule_config.blocks.length;
@@ -74,11 +76,18 @@ export function ChannelCard({
disabled={isGenerating}
className="flex-1"
>
<RefreshCw
className={`size-3.5 ${isGenerating ? "animate-spin" : ""}`}
/>
<RefreshCw className={`size-3.5 ${isGenerating ? "animate-spin" : ""}`} />
{isGenerating ? "Generating…" : "Generate schedule"}
</Button>
<Button
variant="outline"
size="icon-sm"
onClick={onViewSchedule}
title="View schedule"
className="border-zinc-700 text-zinc-400 hover:text-zinc-100"
>
<CalendarDays className="size-3.5" />
</Button>
<Button
variant="outline"
size="icon-sm"