@using System.Net @using WatchIt.Website.Components.Subcomponents.Common @using Blazorise @using Blazorise.Snackbar @using Refit @using WatchIt.DTO.Models.Controllers.Roles @using WatchIt.DTO.Models.Generics.Rating @inherits Component @typeparam TRole where TRole : WatchIt.DTO.Models.Controllers.Roles.Role.Response.RoleResponse @typeparam TRoleParent
@if (_loaded) {
@(Title) @if (RoleParents is null) { An error occured. @(ParentName) could not be obtained. } else if (_roles is null) { An error occured. Roles could not be obtained. } else if (!_roles.Any()) { No items found. } else if (_roleTypes is null) { An error occured. Role types could not be obtained. } else {
@foreach (IRoleTypeResponse roleType in _roleTypes) { @roleType.Name }
@{ IEnumerable roles = _roles.Where(x => x.TypeId == _checkedType); } @for (int i = 0; i < roles.Count(); i++) { TRole role = roles.ElementAt(i); TRoleParent parent = ParentFunc(role, RoleParents); if (i > 0) {
} }
}
} else { }