Enhance channel management: add support for preferred weight multipliers and preferred hours in channel shows, update related data models and API endpoints, and implement validation for new properties. Refactor scheduling logic to utilize preferred hours for weight adjustments during show planning.

This commit is contained in:
Leonid Pershin
2026-07-25 18:44:28 +03:00
parent 358adbff21
commit 8718e8b6bf
36 changed files with 2921 additions and 97 deletions
+10 -1
View File
@@ -8,6 +8,7 @@ import type {
ChannelDto,
ChannelSummaryDto,
CreatedIdResponse,
HourWindow,
OverrideMode,
ScheduleEntryDto,
} from '@/shared/api/types'
@@ -52,7 +53,14 @@ export function addChannelShow(id: string, body: ChannelShowBody) {
export function updateChannelShow(
id: string,
channelShowId: string,
body: { weight: number; blockMode: BlockMode; blockValue: number; isEnabled: boolean },
body: {
weight: number
blockMode: BlockMode
blockValue: number
isEnabled: boolean
preferredWeightMultiplier: number
preferredHours: HourWindow[]
},
) {
return apiRequest<void>(`/admin/channels/${id}/shows/${channelShowId}`, { method: 'PUT', body })
}
@@ -147,6 +155,7 @@ export type BumperVariantBody = {
line1: string
line2: string
trigger: BumperTrigger
weight: number
}
export function addBumperVariant(id: string, templateId: string, name: string) {