@page
@model EnotaryoPH.Web.Pages.Principal.Dashboard.DashboardModel
@{
}

@section Head {
    <link href="~/lib/fontawesome-free-6.7.1-web/css/all.min.css" rel="stylesheet" />
}

<section class="my-5">
    <div class="container">
        <div class="row">
            <div class="col-2 col-sm-1 col-md-3 g-0">
                <div class="sidemenu">
                    <div class="align-items-center sidemenu__menuitem"><a class="d-flex flex-grow-1 justify-content-center align-items-center justify-content-md-start p-1 text-decoration-none" href="/Principal/NotaryoSteps/UploadIdentification"><i class="fas fa-magic fs-4 text-dark sidemenu__menuitem__icon" style="padding: 5px;"></i><span class="d-none d-md-inline-block ms-1 sidemenu__menuitem__text">Create New</span></a></div>
                    <div class="align-items-center sidemenu__menuitem"><a class="d-flex flex-grow-1 justify-content-center align-items-center justify-content-md-start p-1 text-decoration-none" href="#completed-docs"><i class="far fa-check-circle fs-4 text-success sidemenu__menuitem__icon" style="padding: 5px;"></i><span class="d-none d-md-inline-block ms-1 sidemenu__menuitem__text">Completed</span></a></div>
                    <div class="align-items-center sidemenu__menuitem"><a class="d-flex flex-grow-1 justify-content-center align-items-center justify-content-md-start p-1 text-decoration-none" href="#incomplete-docs"><i class="far fa-clock fs-4 text-warning sidemenu__menuitem__icon" style="padding: 5px;"></i><span class="d-none d-md-inline-block ms-1 sidemenu__menuitem__text">Incomplete</span></a></div>
                    <div class="align-items-center sidemenu__menuitem"><a class="d-flex flex-grow-1 justify-content-center align-items-center justify-content-md-start p-1 text-decoration-none" href="#identification-docs"><i class="far fa-address-card fs-4 text-dark sidemenu__menuitem__icon" style="padding: 5px;"></i><span class="d-none d-md-inline-block ms-1 sidemenu__menuitem__text">Identification Docs</span></a></div>
                </div>
            </div>
            <div class="col g-0 mx-2">
                <div id="completed-docs" class="row g-0 mb-5">
                    <div class="col">
                        <h3>Completed Documents</h3>
                        <div class="table-responsive">
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>Type</th>
                                        <th>Date</th>
                                        <th>Link</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @if (Model.CompletedDocuments.Count > 0)
                                    {
                                        @foreach (var item in Model.CompletedDocuments)
                                        {
                                            <tr>
                                                <td>@item.Type</td>
                                                <td>@item.Date.ToShortDateString()</td>
                                                <td><a href="@item.Link">View</a></td>
                                            </tr>
                                        }
                                    }
                                    else
                                    {
                                        <tr>
                                            <td colspan="3">
                                                No records to display.
                                            </td>
                                        </tr>
                                    }
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div id="incomplete-docs" class="row g-0 mb-5">
                    <div class="col">
                        <h3>Incomplete Documents</h3>
                        <div class="table-responsive">
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>Type</th>
                                        <th>Status</th>
                                        <th>Created</th>
                                        <th>Link</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @if(Model.IncompleteDocuments.Count > 0){
                                        @foreach (var item in Model.IncompleteDocuments)
                                        {
                                            <tr>
                                                <td>@item.Type</td>
                                                <td>@item.Status</td>
                                                <td>@item.Date.ToString("g")</td>
                                                <td><a href="@item.Link">View</a></td>
                                            </tr>
                                        }
                                    }
                                    else {
                                        <tr>
                                            <td colspan="3">
                                                No records to display.
                                            </td>
                                        </tr>
                                    }
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div id="identification-docs" class="row g-0 mb-5">
                    <div class="col">
                        <h3>Identification Documents</h3>
                        <div class="table-responsive">
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>Type</th>
                                        <th>Uploaded</th>
                                        <th>Link</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @if (Model.IdentificationDocuments.Count > 0)
                                    {
                                        @foreach (var item in Model.IdentificationDocuments)
                                        {
                                            <tr>
                                                <td>@item.Type</td>
                                                <td>@item.Date.ToShortDateString()</td>
                                                <td><a href="@item.Link">View</a></td>
                                            </tr>
                                        }
                                    }
                                    else
                                    {
                                        <tr>
                                            <td colspan="3">
                                                No records to display.
                                            </td>
                                        </tr>
                                    }
                                </tbody>
                            </table>
                        </div>
                        <div>
                            <a href="/Principal/IdentificationDocument/IdentificationDocument/" class="btn btn-primary btn-sm" type="button">
                                <i class="fas fa-upload me-1"></i>
                                Upload
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>