<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>
        All Listings
    </title>

    {% include 'admin/includes/imports.top.html' %}
    <!-- <link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css" rel="stylesheet"> -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.20/summernote-bs5.min.css"
        integrity="sha512-ngQ4IGzHQ3s/Hh8kMyG4FC74wzitukRMIcTOoKT3EyzFZCILOPF0twiXOQn75eDINUfKBYmzYn2AA8DkAk8veQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />


</head>

<body class="g-sidenav-show  bg-gray-100">
    {% include 'admin/includes/part.menu.html' %}
    <main class="main-content position-relative max-height-vh-100 h-100 border-radius-lg ">
        <!-- Navbar -->
        {% include 'admin/includes/part.header.html' %}
        <!-- End Navbar -->
        <div class="container-fluid py-4">
            <div class="row g-1">
                <div class="col-md-12">
                    <div class="card">
                        <div class="card-header pb-0 px-3">
                            <div class="d-flex justify-content-between">
                                <h6 class="mb-0">Request form {{ request.name }} </h6>
                                <div class="d-flex">
                                    <button class="btn btn-sm btn-dark me-2" onclick="history.back()">Go Back</button>
                                    <a href="{{url_for('completed_request', id = request.id)}}"
                                        class="btn btn-sm btn-info">Mark as Completed</a>
                                </div>
                            </div>
                        </div>
                        <div class="card-body p-3 mb-4" style="overflow: visible !important;">
                            <div class="row g-4">
                                <div class="col-lg-6">
                                    <div class="">
                                        <h5>Requested car</h5>
                                    </div>
                                    <div>

                                    </div>
                                    <div>
                                        <ul class="list-group">
                                            <li
                                                class="list-group-item d-flex justify-content-between align-items-center">
                                                Color Image
                                                <span class="badge"><img alt=""
                                                        src="{{url_for('static', filename='files')}}/{{request.requests.images[0]}}"
                                                        class="img-fluid" style="height: 70px !important;"></span>
                                            </li>
                                            <li
                                                class="list-group-item d-flex justify-content-between align-items-center">
                                                Make
                                                <span
                                                    class="badge text-bg-primary">{{request.requests.model2.car_make.name}}</span>
                                            </li>
                                            <li
                                                class="list-group-item d-flex justify-content-between align-items-center">
                                                Model
                                                <span
                                                    class="badge text-bg-primary">{{request.requests.model2.name}}</span>
                                            </li>
                                            <li
                                                class="list-group-item d-flex justify-content-between align-items-center">
                                                Year
                                                <span class="badge text-bg-primary">{{request.requests.year}}</span>
                                            </li>
                                            <li
                                                class="list-group-item d-flex justify-content-between align-items-center">
                                                Price
                                                <span class="badge text-bg-primary">{{ "Kshs
                                                    {:,.0f}".format(request.requests.price)}}</span>
                                            </li>
                                            <li
                                                class="list-group-item d-flex justify-content-between align-items-center">
                                                Fuel
                                                <span
                                                    class="badge text-bg-primary">{{request.requests.fuel_type2.name}}</span>
                                            </li>
                                            <li
                                                class="list-group-item d-flex justify-content-between align-items-center">
                                                External Color
                                                <span
                                                    class="badge text-bg-primary">{{request.requests.color2.name}}</span>
                                            </li>

                                        </ul>
                                    </div>
                                </div>

                                <div class="col-lg-6">
                                    <h5>Request Details</h5>
                                    <ul class="list-group">
                                        <li class="list-group-item d-flex justify-content-between align-items-center">
                                            <strong>Name</strong>
                                            <span class="">{{ request.name }}</span>
                                        </li>
                                        <li class="list-group-item d-flex justify-content-between align-items-center">
                                            <strong>Phone Number</strong>
                                            <span class="">{{ request.phone }}</span>
                                        </li>
                                        <li class="list-group-item d-flex justify-content-between align-items-center">
                                            <strong>Email</strong>
                                            <span class="">{{ request.email }}</span>
                                        </li>
                                        <li class="list-group-item d-flex justify-content-between align-items-center">
                                            <strong>Subject</strong>
                                            <span class="">{{ request.subject }}</span>
                                        </li>
                                        <li class="list-group-item">
                                            <strong>Message</strong><br>
                                            <p>{{ request.message }}</p>
                                        </li>
                                    </ul>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            {% include 'admin/includes/part.footer.html' %}
        </div>
    </main>

    <!--   Core JS Files   -->
    {% include 'admin/includes/imports.bottom.html' %}
    <script>
        var win = navigator.platform.indexOf('Win') > -1;
        if (win && document.querySelector('#sidenav-scrollbar')) {
            var options = {
                damping: '0.5'
            }
            Scrollbar.init(document.querySelector('#sidenav-scrollbar'), options);
        }
    </script>
</body>

</html>