* add blocks, block groups * basic block and block item editing * add template groups and basic template editing (name) * add blocks to template calendar * edit playout templates * add calendar preview to playout templates * add basic block playout building * add mysql migration * update changelog
38 lines
924 B
C#
38 lines
924 B
C#
using ErsatzTV.Application.Scheduling;
|
|
using MudBlazor;
|
|
using S = System.Collections.Generic;
|
|
|
|
namespace ErsatzTV.ViewModels;
|
|
|
|
public class TemplateTreeItemViewModel
|
|
{
|
|
public TemplateTreeItemViewModel(TemplateGroupViewModel templateGroup)
|
|
{
|
|
Text = templateGroup.Name;
|
|
TreeItems = [];
|
|
CanExpand = templateGroup.TemplateCount > 0;
|
|
TemplateGroupId = templateGroup.Id;
|
|
Icon = Icons.Material.Filled.Folder;
|
|
}
|
|
|
|
public TemplateTreeItemViewModel(TemplateViewModel template)
|
|
{
|
|
Text = template.Name;
|
|
TreeItems = [];
|
|
CanExpand = false;
|
|
TemplateId = template.Id;
|
|
}
|
|
|
|
public string Text { get; }
|
|
|
|
public string Icon { get; }
|
|
|
|
public bool CanExpand { get; }
|
|
|
|
public int? TemplateId { get; }
|
|
|
|
public int? TemplateGroupId { get; }
|
|
|
|
public S.HashSet<TemplateTreeItemViewModel> TreeItems { get; }
|
|
}
|