added null check on view shifts
This commit is contained in:
Родитель
d5b5e9fb34
Коммит
6e8c82ae0f
|
@ -11,12 +11,15 @@
|
|||
<h1>@Localizer["Title"]</h1>
|
||||
|
||||
|
||||
@if (ViewData.ContainsKey("NoShifts"))
|
||||
@if(ViewData.ContainsKey("NoShifts"))
|
||||
{
|
||||
<div class="alert alert-info">
|
||||
<strong>@Localizer["ErrorTitle"]</strong> @ViewData["NoShifts"]
|
||||
</div>}
|
||||
</div>
|
||||
}
|
||||
|
||||
@if(Model != null && Model.Any())
|
||||
{
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="d-none d-xs-block d-sm-block col-md-4 font-weight-bold">@Localizer["TableStoreName"]</div>
|
||||
|
@ -37,7 +40,9 @@
|
|||
<div class="col-xs-6 col-sm-6 col-md-2">@shift.WorkType</div>
|
||||
|
||||
<a class="btn btn-danger col-xs-6 col-sm-6 col-md-2" asp-controller="Shift" asp-action="CancelShift" asp-route-StoreName="@shift.StoreName" asp-route-Start="@shift.Start.ToString("yyyy-MM-ddTHH:mm")" asp-route-End="@shift.End.ToString("yyyy-MM-ddTHH:mm")" asp-route-WorkType="@shift.WorkType">@Localizer["CancelButton"]</a>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче