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

@section Header { @Model.AccountReference }

@section Subheader { Account holder details }

@section Actions {
    @if (Model.ShowSelect)
    {
        @Html.ActionLink("Select", "SelectAccountReference", "Payment", new { id = Model.AccountReference }, new { @class = "btn btn-secondary" })
    }
    @Html.ActionLink("Edit", "Edit", new { id = Model.AccountReference }, new { @class = "btn btn-secondary" })
}

<div>

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

    @if (!string.IsNullOrEmpty(Model.Title))
    {
        <div class="mb-3">
            @Html.LabelFor(m => m.Title, new { @class = "form-label fw-bold" })
            <div class="form-label">
                @Html.DisplayFor(m => m.Title)
            </div>
        </div>
    }

    @if (!string.IsNullOrEmpty(Model.Forename))
    {
        <div class="mb-3">
            @Html.LabelFor(m => m.Forename, new { @class = "form-label fw-bold" })
            <div class="form-label">
                @Html.DisplayFor(m => m.Forename)
            </div>
        </div>
    }

    @if (!string.IsNullOrEmpty(Model.Surname))
    {
        <div class="mb-3">
            @Html.LabelFor(m => m.Surname, new { @class = "form-label fw-bold" })
            <div class="form-label">
                @Html.DisplayFor(m => m.Surname)
            </div>
        </div>
    }

    @if (!string.IsNullOrEmpty(Model.Address))
    {
        <div class="mb-3">
            @Html.LabelFor(m => m.Address, new { @class = "form-label fw-bold" })
            <div class="form-label">
                @Html.DisplayFor(m => m.Address)
            </div>
        </div>
    }

    @if (!string.IsNullOrEmpty(Model.Postcode))
    {
        <div class="mb-3">
            @Html.LabelFor(m => m.Postcode, new { @class = "form-label fw-bold" })
            <div class="form-label">
                @Html.DisplayFor(m => m.Postcode)
            </div>
        </div>
    }
    @if (!string.IsNullOrEmpty(Model.FundName))
    {
        <div class="mb-3">
            @Html.LabelFor(m => m.FundName, new { @class = "form-label fw-bold" })
            <div class="form-label">
                @Html.DisplayFor(m => m.FundName)
            </div>
        </div>
    }

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

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

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

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

    @if (!string.IsNullOrEmpty(Model.UserFieldsFormatted))
    {
        <div class="mb-3">
            @Html.LabelFor(m => m.UserFieldsFormatted, new { @class = "form-label fw-bold" })
            <div class="form-label">
                @Html.DisplayFor(m => m.UserFieldsFormatted)
            </div>
        </div>
    }

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

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

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

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

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

</div>