<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Gestion des Demandes de Documents - EST</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <link rel="stylesheet" href="../../../../../css/employee-styles.css">
</head>
<body>
<?php include "../../../../../layouts/employee/header.php" ?>
<?php include "../../../../../layouts/employee/demande-doc/nav-second-level.php" ?>

<main class="main-content">
    <div class="container">


                    <form id="demandeForm">
                        <input type="hidden" id="demandeId" value="">

                        <div class="form-group">
                            <label for="employee_id">Employee <span class="required">*</span></label>
                            <select id="employee_id" name="employee_id" required>
                                <option value="">Sélectionner un employee</option>
                                <option value="ZOUANI">ZOUANI</option>
                                <option value="BENJELLOUN">BENJELLOUN</option>
                                <option value="ELAMRANI">ELAMRANI</option>
                                <option value="BADAOUI">BADAOUI</option>
                                <option value="CHAKIR">CHAKIR</option>
                                <option value="RAJI">RAJI</option>
                                <option value="BENNANI">BENNANI</option>
                                <option value="ELHASSANI">ELHASSANI</option>
                                <option value="TAZI">TAZI</option>
                                <option value="BOUSSAID">BOUSSAID</option>
                                <option value="FENNANE">FENNANE</option>
                                <option value="ZEROUAL">ZEROUAL</option>
                                <option value="CHBANI">CHBANI</option>
                                <option value="MANSOURI">MANSOURI</option>
                                <option value="NACIRI">NACIRI</option>
                                <option value="GHANNAM">GHANNAM</option>
                                <option value="BENCHARAIF">BENCHARAIF</option>
                                <option value="AITOUAZZO">AITOUAZZO</option>
                                <option value="ZOUINE">ZOUINE</option>
                                <option value="ELMOKHTARI">ELMOKHTARI</option>
                            </select>
                        </div>

                        <div class="form-group">
                            <label for="libelle">Libellé <span class="required">*</span></label>
                            <input type="text" id="libelle" name="libelle"
                                   placeholder="Ex: Demande de congé annuel 2026" required>
                        </div>

                        <div class="form-group">
                            <label for="type_document_id">Type de Document <span class="required">*</span></label>
                            <select id="type_document_id" name="type_document_id" required>
                                <option value="">Sélectionner un type de document</option>
                                <option value="Demande de stage">Demande de stage</option>
                                <option value="Demande de congé">Demande de congé</option>
                                <option value="Demande de mission">Demande de mission</option>
                                <option value="Attestation Travail">Attestation Travail</option>
                            </select>
                        </div>

                        <div class="form-group">
                            <label for="etat_demande_document_id">État <span class="required">*</span></label>
                            <select id="etat_demande_document_id" name="etat_demande_document_id" required>
                                <option value="">Sélectionner un état</option>
                                <option value="En attente">En attente</option>
                                <option value="En cours">En cours</option>
                                <option value="Approuvée ">Approuvée</option>
                                 <option value="Rejetée ">Rejetée</option>
                                 <option value="En révision">En révision</option>
                            </select>
                        </div>

                        <div class="form-group">
                            <label for="date_soumission">Date de Soumission</label>
                            <input type="date" id="date_soumission" name="date_soumission">
                        </div>

                        <div class="form-group">
                            <label for="date_reponse">Date de Réponse</label>
                            <input type="date" id="date_reponse" name="date_reponse">
                        </div>

                        <div class="form-group">
                            <label for="description">Description</label>
                            <textarea id="description" name="description"
                                      rows="4" placeholder="Description détaillée de la demande..."></textarea>
                        </div>

                        <div class="form-actions">
                            <button type="button" class="btn btn-secondary" onclick="closeModal()">
                                <i class="fas fa-times"></i> Annuler
                            </button>
                            <button type="button" class="btn btn-primary" onclick="saveDemande()">
                                <i class="fas fa-save"></i> Enregistrer
                            </button>
                        </div>
                    </form>
            </div>


</main>

<?php include "../../../../../layouts/employee/footer.php" ?>

<!-- Modals -->
<?php include "../create/index.php" ?>
<?php include "../view/modal.php" ?>

<!-- Toast Container -->
<div class="toast-container" id="toastContainer"></div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js"></script>
<script src="main.js"></script>
</body>
</html>



