@{ 
    Layout = null;
    
    bool CanSeeLevel(PenaltyInfo penalty) => (ViewBag.PermissionsSet as IEnumerable<string>).HasPermission(WebfrontEntity.ClientLevel, WebfrontPermission.Read) || penalty.PenaltyType == EFPenalty.PenaltyType.Report;
}
@using WebfrontCore.Permissions
@using SharedLibraryCore.Dtos
@using Data.Models
@model IList<SharedLibraryCore.Dtos.PenaltyInfo>

@{
    foreach (var penalty in Model.Where(CanSeeLevel))
    {
        await Html.RenderPartialAsync("_Penalty", penalty);
    }
}
