IW4M-Admin/WebfrontCore/Views/Penalty/PenaltyInfoList.cshtml
2022-04-22 08:04:01 -05:00

17 lines
511 B
Plaintext

@{
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);
}
}