Refactor GridScheduleGenerator and related components to improve cursor management and group handling
Updated the GridScheduleGenerator to reset cursors for slots with no aired positions, ensuring proper state management during rebuilds. Introduced a new method, ResetUnairedCursorsAsync, to handle cursor resets effectively. Enhanced the handling of interstitial groups in the scheduling process, preventing them from being included in slots or fallback groups. Updated related tests to verify the correct behavior of these changes, ensuring robust scheduling logic and accurate group categorization.
This commit is contained in:
@@ -10,6 +10,19 @@ function EntryLabel({ entry }: Readonly<{ entry: ScheduleEntryDto }>) {
|
||||
|
||||
if (entry.kind === 'Ad') return <Badge variant="muted">{t('air.ad')}</Badge>
|
||||
|
||||
// Аварийный запас и конец вещания подписаны отдельно: у них есть и шоу, и номер серии, и без
|
||||
// метки полоса роликов из аварийной группы читается как обычная программа — то есть как будто
|
||||
// сетка так и задумана, хотя на деле это дыра.
|
||||
if (entry.kind === 'Fallback' || entry.kind === 'SignOff')
|
||||
return (
|
||||
<span className="flex min-w-0 items-center gap-2">
|
||||
<Badge variant="muted" className="shrink-0">
|
||||
{t(entry.kind === 'Fallback' ? 'air.fallback' : 'air.signOff')}
|
||||
</Badge>
|
||||
<span className="min-w-0 truncate text-muted-foreground">{entry.showName ?? '—'}</span>
|
||||
</span>
|
||||
)
|
||||
|
||||
if (entry.kind === 'Bumper')
|
||||
return (
|
||||
<span className="flex min-w-0 items-center gap-2">
|
||||
|
||||
Reference in New Issue
Block a user