IW4M-Admin/WebfrontCore/Views/Penalty/PenaltyInfoList.cshtml

17 lines
511 B
Plaintext
Raw Normal View History

2018-02-21 20:29:23 -05:00
@{
Layout = null;
2022-04-22 09:04:01 -04:00
bool CanSeeLevel(PenaltyInfo penalty) => (ViewBag.PermissionsSet as IEnumerable<string>).HasPermission(WebfrontEntity.ClientLevel, WebfrontPermission.Read) || penalty.PenaltyType == EFPenalty.PenaltyType.Report;
2018-02-21 20:29:23 -05:00
}
@using WebfrontCore.Permissions
@using SharedLibraryCore.Dtos
@using Data.Models
@model IList<SharedLibraryCore.Dtos.PenaltyInfo>
2018-02-21 20:29:23 -05:00
@{
foreach (var penalty in Model.Where(CanSeeLevel))
2018-02-21 20:29:23 -05:00
{
await Html.RenderPartialAsync("_Penalty", penalty);
2018-02-21 20:29:23 -05:00
}
}