@model IEnumerable<SMS_MVCDTO.Models.DTOs.AttendantDTOs.AttendantResponseModel>

@{
    ViewData["Title"] = "Dashboard";
}

<partial name="_Notification" />

<main class="main">
    <!-- <div class="dashboard"> -->
    <div class="form-container">

        <!-- Signup Form -->
        @*<div id="Data-form">*@


        <div id="Data-form">

            <div>

            <h1>Attendants..</h1>

            <p>
                <a asp-action="Create">Create New Attendant</a>
            </p>

            <table class="table table-info">
                <thead>
                    <tr>

                        <th>
                            S/N
                        </th>

                        <th>
                            @Html.DisplayNameFor(model => model.Data.StaffId)
                        </th>

                        <th>
                            @Html.DisplayNameFor(model => model.Data.FirstName)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.Data.LastName)
                        </th>

                        <th>
                            @Html.DisplayNameFor(model => model.Data.Gender)
                        </th>

                        <th>
                            @Html.DisplayNameFor(model => model.Data.RoleName)
                        </th>

                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    @{
                        int serialNumber = 1;
                    }
                    @foreach (var item in Model)
                    {
                        <tr>
                            <td>
                                @serialNumber
                            </td>

                            <td>
                                @Html.DisplayFor(modelItem => item.Data.StaffId)
                            </td>

                            <td>
                                @Html.DisplayFor(modelItem => item.Data.FirstName)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.Data.LastName)
                            </td>

                            <td>
                                @Html.DisplayFor(modelItem => item.Data.Gender)
                            </td>

                            <td>
                                @Html.DisplayFor(modelItem => item.Data.RoleName)
                            </td>


                            <td>

                                <a asp-action="Details" asp-route-staffId="@item.Data.StaffId">Details</a>
                            </td>
                        </tr>
                        serialNumber++;
                    }
                </tbody>
            </table>
            </div>
        </div>

    </div>

    <!-- search box  -->
    <div class="search-container-side">

        <!-- search box  -->
        <div class="search-container">
            <form asp-controller="Attendant" asp-action="GetByStaffId">
                <input type="text" placeholder="Attendant Id.." name="staffId">
                <button type="submit">
                    <i class="fa fa-search"></i> Search
                </button>
            </form>
        </div>

        <!-- search box  -->
        <div class="search-container">
            <form asp-controller="Attendant" asp-action="GetByName">
                <input type="text" placeholder="Attendant Name..." name="name">
                <button type="submit">
                    <i class="fa fa-search"></i> Search
                </button>
            </form>
        </div>

    </div>


</main>





