@page "{Transaction_UID}"
@model EnotaryoPH.Web.Pages.Notary.TransactionStatus.IndexModel
@{
}

@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-xl-8">
                <h1>@Model.Title</h1>

                <div class="row">
                    <div class="col">
                        <p>Started on @Model.StartedOn.ToShortDateString() @Model.StartedOn.ToShortTimeString().</p>
                        <p>@Model.StatusDescription</p>
                        @if (Model.Signatories.Count > 0) {
                            <div class="table-responsive">
                                <table class="table">
                                    <thead>
                                        <tr>
                                            <th>Email</th>
                                            <th>Type</th>
                                            <th>Status</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        @foreach(var row in Model.Signatories)
                                        {
                                            <tr>
                                                <td>@row.Email</td>
                                                <td>@row.Type</td>
                                                <td>@row.Status</td>
                                            </tr>
                                        }
                                    </tbody>
                                </table>
                            </div>
                        }

                    </div>
                </div>

                <div class="mt-3 d-flex">
                    @if(Model.IsTaken) {
                        <a class="btn btn-primary btn-lg" role="button" href="/"><i class="fas fa-home me-2"></i>BACK TO HOME </a>
                    }
                    else {
                        <form method="post">
                            <input type="submit" class="btn btn-primary btn-lg" value="ACCEPT JOB" />
                        </form>
                    }
                </div>
            </div>
        </div>
    </div>
</section>