LocalGovIMS_localgov-ims/src/Admin/Views/User/Details.cshtml
@model Admin.Models.User.DetailsViewModel
@{
    ViewBag.Title = "User";
}

@section Header { @Model.UserName }

@section Subheader { User details }

@section Actions {
    @Html.ActionLink("Edit", "Edit", new { id = Model.UserId }, new { @class = "btn btn-secondary" })
}

<div>

    @Html.HiddenFor(m => m.UserId)

    <div class="mb-3">
        @Html.LabelFor(m => m.LastLogin, new { @class = "form-label fw-bold" })
        <div class="form-label">
            @if (Model.LastLogin.HasValue)
            {
                @Html.DisplayFor(m => m.LastLogin)
            }
            else
            {
                <span>The user has never logged in</span>
            }
        </div>
    </div>

    <div class="mb-3">
        @Html.LabelFor(m => m.DisplayName, new { @class = "form-label fw-bold" })
        <div class="form-label">
            @Html.DisplayFor(m => m.DisplayName)
        </div>
    </div>

    <div class="mb-3">
        @Html.LabelFor(m => m.ExpiryDays, new { @class = "form-label fw-bold" })
        <div class="form-label">
            @Html.DisplayFor(m => m.ExpiryDays)
        </div>
    </div>

    <div class="mb-3">
        @Html.LabelFor(m => m.OfficeCode, new { @class = "form-label fw-bold" })
        <div class="form-label">
            @Html.DisplayFor(m => m.OfficeCode)
        </div>
    </div>

    <div class="mb-3">
        @Html.LabelFor(m => m.Disabled, new { @class = "form-label fw-bold" })
        <div class="form-label">
            <div class="form-check form-switch">
                @Html.CheckBoxFor(m => m.Disabled, new { @class = "form-check-input", role = "switch", @disabled = true })
            </div>
        </div>
    </div>

    <div class="d-flex flex-wrap mb-3">
        <div class="me-auto p-0">
            <h3>
                User roles
            </h3>
        </div>
    </div>

    <div class="mb-3">
        @Html.Action("_ListForUser", "UserRole", new { id = Model.UserId })
    </div>

    <div class="d-flex flex-wrap mb-3">
        <div class="me-auto p-0">
            <h3>
                User fund groups
            </h3>
        </div>
    </div>

    <div class="mb-3">
        @Html.Action("_ListForUser", "UserFundGroup", new { id = Model.UserId })
    </div>

    <div class="d-flex flex-wrap mb-3">
        <div class="me-auto p-0">
            <h3>
                User templates
            </h3>
        </div>
    </div>

    <div class="mb-3">
        @Html.Action("_ListForUser", "UserTemplate", new { id = Model.UserId })
    </div>

    <div class="d-flex flex-wrap mb-3">
        <div class="me-auto p-0">
            <h3>
                User methods of payment
            </h3>
        </div>
    </div>

    <div class="mb-3">
        @Html.Action("_ListForUser", "UserMethodOfPayment", new { id = Model.UserId })
    </div>

    @Html.ActionLink("Back", "Back", "User", null, new { @class = "btn btn-secondary" })

</div>
