Add CreateTemplate endpoint and related functionality for channels without grids
build / backend (push) Successful in 3m23s
build / frontend (push) Successful in 34s
tests / backend-tests (push) Successful in 1m38s

Implement a new API endpoint to create a template for channels lacking a grid, enhancing the template management capabilities. Update frontend components to support the creation of templates directly from the channel detail view, including user feedback and translations for improved clarity. Add integration tests to ensure the new functionality works as expected.
This commit is contained in:
Leonid Pershin
2026-07-26 20:10:47 +03:00
parent 69c236d8cc
commit 9c865e1faa
7 changed files with 153 additions and 8 deletions
@@ -67,6 +67,11 @@ export function getChannelTemplate(channelId: string) {
return apiRequest<ScheduleTemplateDto>(`/admin/channels/${channelId}/template`)
}
/** Заводит каналу сетку, если её нет: у каналов из старой ротации шаблона может не быть. */
export function createChannelTemplate(channelId: string) {
return apiRequest<CreatedIdResponse>(`/admin/channels/${channelId}/template`, { method: 'POST' })
}
/** Применяет правила к эфиру: пересобирает будущий хвост. Правка слотов эфир не двигает. */
export function applyChannelTemplate(channelId: string) {
return apiRequest<ApplyResultDto>(`/admin/channels/${channelId}/template/apply`, {