2018-02-21 20:29:23 -05:00
|
|
|
@{
|
2022-04-21 13:39:09 -04: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
|
|
|
}
|
2022-04-21 13:39:09 -04:00
|
|
|
@using WebfrontCore.Permissions
|
|
|
|
@using SharedLibraryCore.Dtos
|
|
|
|
@using Data.Models
|
2020-11-11 18:31:26 -05:00
|
|
|
@model IList<SharedLibraryCore.Dtos.PenaltyInfo>
|
2018-02-21 20:29:23 -05:00
|
|
|
|
|
|
|
@{
|
2022-04-21 13:39:09 -04:00
|
|
|
foreach (var penalty in Model.Where(CanSeeLevel))
|
2018-02-21 20:29:23 -05:00
|
|
|
{
|
2019-02-26 22:25:27 -05:00
|
|
|
await Html.RenderPartialAsync("_Penalty", penalty);
|
2018-02-21 20:29:23 -05:00
|
|
|
}
|
2022-04-21 13:39:09 -04:00
|
|
|
}
|