{% load static %}


{% include "diaxeirisi/00_head.html" %}
<body id="app-container" class="menu-default show-spinner">
{% include "diaxeirisi/01_menu.html" %}

    <main>
        <div class="container-fluid">
            <div class="row mb-4">
             <div class="col-12">
                <h2>Κρατήσεις</h2>
                <div class="separator mb-5"></div>
                 {% if messages %}
                    <div class="alert alert-success">
                        {% for m in messages %}
                        <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ m }}</li>
                        {% endfor %}
                    </div>
                 {% endif %}
             </div>
                <div class="col-12 mb-4">
                    <div class="card">
                        <div class="card-body">
                            <table class="data-table data-table-feature">
                                <thead>
                                    <tr>
                                        <th>Α/Α</th>
                                        <th>Αποδοχή</th>
                                        <th>Επίθετο</th>
                                        <th>Όνομα</th>
                                        <th>Τηλέφωνο</th>
                                        <th>Κατηγορία</th>
                                        <th>Check In</th>
                                        <th>Check Out</th>
                                        <th>Τιμή</th>
                                        <th>Προβολή</th>
                                    </tr>
                                </thead>
                                <tbody>
                                {% for booking in  BookingObj %}
                                    <tr>
                                        <td>{{ booking.id }}</td>
                                        <td>
                                            {% if booking.accept == "NΑΙ" %}
                                                <span class="badge badge-pill badge-outline-success mb-1">{{ booking.accept }}:{{ booking.room.number }}</span>
                                            {% elif booking.accept == "ΝΕΟ" %}
                                                <span class="badge badge-pill badge-info mb-1">{{ booking.accept }}</span>
                                            {% else %}
                                                <span class="badge badge-pill badge-outline-danger mb-1">{{ booking.accept }}</span>
                                            {% endif %}
                                        </td>
                                        <td>{{ booking.surname }}</td>
                                        <td>{{ booking.name }}</td>
                                        <td>{{ booking.telephone }}</td>
                                        <td>{{ booking.category}}</td>
                                        <td>{{ booking.check_in }}</td>
                                        <td>{{ booking.check_out }}</td>

                                        <td>
                                            {% if booking.accept == "ΟΧΙ" %}
                                                <span class="badge badge-pill badge-outline-danger mb-1">{{ booking.final_price }}</span>
                                            {% elif booking.accept == "ΝΕΟ" %}
                                                <span class="badge badge-pill badge-info mb-1">{{ booking.accept }}</span>
                                            {% else %}
                                                {{ booking.final_price }}
                                            {% endif %}
                                        </td>
                                        <td>
                                            <a href="/dx/{{ booking.id }}/update">
                                            <button type="button" class="btn btn-outline-primary">
                                                Επεξεργασία</button>
                                        </a>
                                        </td>
                                    </tr>
                                {% endfor %}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </main>


{% include "diaxeirisi/99_footer.html" %}