feat(frontend): extend schedule dialog to support show/series selection
This commit is contained in:
@@ -114,8 +114,12 @@ export function ScheduleFromLibraryDialog({ selectedItems, selectedShows }: Prop
|
|||||||
|
|
||||||
const canConfirm = !!channelId && selectedDays.size > 0;
|
const canConfirm = !!channelId && selectedDays.size > 0;
|
||||||
const daysLabel = [...selectedDays].map(d => WEEKDAY_LABELS[d]).join(", ");
|
const daysLabel = [...selectedDays].map(d => WEEKDAY_LABELS[d]).join(", ");
|
||||||
|
const hasShows = selectedShows && selectedShows.length > 0;
|
||||||
|
const contentLabel = hasShows
|
||||||
|
? (selectedShows!.length === 1 ? selectedShows![0].series_name : `${selectedShows!.length} shows`)
|
||||||
|
: `${selectedItems.length} item(s)`;
|
||||||
const preview = canConfirm
|
const preview = canConfirm
|
||||||
? `${selectedDays.size} block(s) will be created on ${selectedChannel?.name} — ${daysLabel} at ${startTime}, ${strategy}`
|
? `${selectedDays.size} block(s) of ${contentLabel} will be created on ${selectedChannel?.name} — ${daysLabel} at ${startTime}, ${strategy}`
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user