{% extends "BASE.html" %}
{% load static %}     
{% block 'titre_page' %} Gestion des projets {% endblock %}
{% block 'css' %}
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@calendarjs/ce/dist/style.min.css" /> 
{% endblock %}
{% block 'contenu' %}
    {% if messages %}
        {% for message in messages %}
            <div class="alert alert-{% if message.tags == "error" %}danger{% else %}success{% endif %} alert-dismissible fade show" role="alert">
            {{ message }}
            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
            </div>
        {% endfor %}
    {% endif %}
    <div class="row">
        <div class="col py-2 px-4">
            <h1 class="text-center">Reservation de salle</h1>
            <hr>
            <div class="row d-flex justify-content-around">
                <div class="form-group col-5 me-2">
                    <label>Selectionner le jour concerné :</label>
                    <input type="date" class="form-control" id="semaineDate" />
                </div>
                <div class="form-group col-5 me-2">
                    <label>Selectionner une salle :</label>
                    <select class = "form-select" id="liste-salle">
                        <option value='Salle de formation'>Salle de formation</option>
                        <option value='Salle de réunion'>Salle de réunion</option>
                        <option value='Lien Zoom'>Lien Zoom</option>
                    </select>
                </div>
            </div>
            <div class="row mt-2">
                <div class="col d-flex justify-content-center">
                    <button class="btn btn-lg btn-primary me-2" data-bs-toggle="modal" data-bs-target="#modalReservation">Nouvelle reservation</button>
                    <button type="button" class="btn btn-warning" data-bs-toggle="modal" data-bs-target="#modalReservationAttente">
                        Validation en attente <span class="badge badge-light">{{ nb_reservation_attente }}</span>
                    </button>
                </div>
            </div>
            <hr>
            <div data-url="{% url 'gestion_salle:liste-reservation' %}" id="planning-reservation"></div>
        </div>
    </div>
{% endblock %}
{% block 'modal' %}
    {% include 'gestion_salle/parts/modalCreationReservation.html' %}
    {% include 'gestion_salle/parts/ModaleAjoutLienZoom.html' %}
    {% include 'gestion_salle/parts/ModalRefusReservation.html' %}
    {% include 'gestion_salle/parts/modalDetailResevation.html' %}
    {% include 'gestion_salle/parts/modalListeValidation.html' %}
{% endblock %}
{% block 'js' %}
<script src="https://cdn.jsdelivr.net/npm/lemonadejs/dist/lemonade.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@calendarjs/ce/dist/index.min.js"></script>
<script src="{% static 'gestion_salle/js/index.js' %}"></script>
{% endblock %}