Add reset template functionality to channel management
Implemented a new endpoint for resetting the channel template, which clears the grid and removes future scheduled entries while preserving past and current recordings. Updated the frontend to include a reset button in the channel management interface, along with corresponding localization strings in English and Russian. Enhanced integration tests to verify the reset functionality, ensuring that the expected number of slots, layers, and entries are accurately reported after the reset operation.
This commit is contained in:
@@ -16,6 +16,7 @@ import type {
|
||||
GridProfileKind,
|
||||
LayerApplicability,
|
||||
PlanningRules,
|
||||
ResetTemplateResultDto,
|
||||
RestoreTemplateResultDto,
|
||||
ScheduleDiffDto,
|
||||
ScheduleEntryDto,
|
||||
@@ -89,6 +90,16 @@ export function restoreChannelTemplate(channelId: string) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Полный сброс: снимает сетку и удаляет будущий эфир, собранный по ней. Прошлое и идущая сейчас
|
||||
* запись остаются — их нельзя вырезать из-под зрителя.
|
||||
*/
|
||||
export function resetChannelTemplate(channelId: string) {
|
||||
return apiRequest<ResetTemplateResultDto>(`/admin/channels/${channelId}/template/reset`, {
|
||||
method: 'POST',
|
||||
})
|
||||
}
|
||||
|
||||
/** Проверки сетки по правилам — считаются по шаблону, без прогона генератора. */
|
||||
export function getTemplateIssues(channelId: string) {
|
||||
return apiRequest<TemplateIssueDto[]>(`/admin/channels/${channelId}/template/issues`)
|
||||
|
||||
Reference in New Issue
Block a user