Mostly working create rent. Awaiting migration
This commit is contained in:
@@ -23,6 +23,9 @@
|
||||
<th>
|
||||
End Date
|
||||
</th>
|
||||
<th>
|
||||
User
|
||||
</th>
|
||||
@if (this.User.IsInRole("Admin"))
|
||||
{
|
||||
<th>
|
||||
@@ -34,25 +37,28 @@
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Car.Id)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.StartDate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.EndDate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.User.UserName)
|
||||
</td>
|
||||
@if (this.User.IsInRole("Admin"))
|
||||
{
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Car.Id)
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.StartDate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.EndDate)
|
||||
</td>
|
||||
@if (this.User.IsInRole("Admin"))
|
||||
{
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user