{"id":1438,"date":"2026-04-11T10:55:49","date_gmt":"2026-04-11T10:55:49","guid":{"rendered":"https:\/\/eze-shuttle.com\/?page_id=1438"},"modified":"2026-04-11T10:57:44","modified_gmt":"2026-04-11T10:57:44","slug":"billet-collectif-chauffeur-admin","status":"publish","type":"page","link":"https:\/\/eze-shuttle.com\/en\/billet-collectif-chauffeur-admin\/","title":{"rendered":"Billet Collectif Chauffeur Admin"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1438\" class=\"elementor elementor-1438\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-5f1c5a69 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5f1c5a69\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;,&quot;shape_divider_bottom&quot;:&quot;triangle&quot;,&quot;shape_divider_bottom_negative&quot;:&quot;yes&quot;}\">\n\t\t\t\t\t\t\t<div class=\"elementor-background-overlay\"><\/div>\n\t\t\t\t\t\t<div class=\"elementor-shape elementor-shape-bottom\" aria-hidden=\"true\" data-negative=\"true\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 1000 100\" preserveAspectRatio=\"none\">\n\t<path class=\"elementor-shape-fill\" d=\"M500.2,94.7L0,0v100h1000V0L500.2,94.7z\"\/>\n<\/svg>\t\t<\/div>\n\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-no\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-683fe295\" data-id=\"683fe295\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-139b9492 elementor-icon-list--layout-inline elementor-align-center elementor-widget__width-auto elementor-list-item-link-full_width elementor-widget elementor-widget-icon-list\" data-id=\"139b9492\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"icon-list.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul class=\"elementor-icon-list-items elementor-inline-items\">\n\t\t\t\t\t\t\t<li class=\"elementor-icon-list-item elementor-inline-item\">\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"#\">\n\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-text\">Home<\/span>\n\t\t\t\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t<li class=\"elementor-icon-list-item elementor-inline-item\">\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"#\">\n\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-icon\">\n\t\t\t\t\t\t\t<svg aria-hidden=\"true\" class=\"e-font-icon-svg e-fas-angle-right\" viewBox=\"0 0 256 512\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z\"><\/path><\/svg>\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-text\"><\/span>\n\t\t\t\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-6f482b0d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6f482b0d\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-no\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-1d5a8b04\" data-id=\"1d5a8b04\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-376bd6c9 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"376bd6c9\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-no\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-693db08d\" data-id=\"693db08d\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<div class=\"elementor-element elementor-element-6b3de122 elementor-widget elementor-widget-shortcode\" data-id=\"6b3de122\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">    <script>\n    if (!localStorage.getItem('chauffeur_access')) {\n        document.write(`\n            <div style=\"max-width:420px;margin:3rem auto;text-align:center;padding:2rem;border:1px solid #e5e7eb;border-radius:16px;background:#fff;box-shadow:0 10px 30px rgba(0,0,0,0.06);\">\n                <h2 style=\"margin-bottom:1rem;\">\ud83d\udd10 Chauffeur Access<\/h2>\n                <form id=\"pin-form\">\n                    <input type=\"password\" id=\"chauffeur_pin\" placeholder=\"Code chauffeur\" required style=\"width:100%;padding:12px 14px;border:1px solid #d1d5db;border-radius:10px;margin-bottom:1rem;\" \/>\n                    <button type=\"submit\" style=\"width:100%;padding:12px 14px;border:none;border-radius:10px;background:#f28c28;color:#fff;font-weight:600;cursor:pointer;\">Valider<\/button>\n                    <p id=\"pin-error\" style=\"color:red;display:none;margin-top:0.75rem;\">Code incorrect<\/p>\n                <\/form>\n            <\/div>\n        `);\n        document.addEventListener('DOMContentLoaded', () => {\n            const form = document.getElementById('pin-form');\n            if (!form) return;\n            form.addEventListener('submit', function (e) {\n                e.preventDefault();\n                if (document.getElementById('chauffeur_pin').value === 'ZEZE2025Sachale') {\n                    localStorage.setItem('chauffeur_access', 'true');\n                    location.reload();\n                } else {\n                    document.getElementById('pin-error').style.display = 'block';\n                }\n            });\n        });\n    }\n    <\/script>\n\n    <style>\n        #chauffeur-interface-wrap {\n            display: none;\n            max-width: 1200px;\n            margin: 2.5rem auto;\n            padding: 0 1rem;\n            font-family: sans-serif;\n        }\n\n        .chauffeur-grid {\n            display: grid;\n            grid-template-columns: 1fr 1fr;\n            gap: 2rem;\n            align-items: start;\n        }\n\n        .chauffeur-card {\n            background: #fff;\n            border: 1px solid #e5e7eb;\n            border-radius: 18px;\n            padding: 2rem;\n            box-shadow: 0 12px 30px rgba(0,0,0,0.06);\n        }\n\n        .chauffeur-card h2 {\n            font-size: 2rem;\n            line-height: 1.1;\n            margin: 0 0 1.5rem 0;\n            color: #18223b;\n        }\n\n        .chauffeur-field {\n            margin-bottom: 1.2rem;\n        }\n\n        .chauffeur-field label {\n            display: block;\n            margin-bottom: 0.5rem;\n            color: #667085;\n            font-weight: 500;\n        }\n\n        .chauffeur-field input,\n        .chauffeur-field select {\n            width: 100%;\n            max-width: 100%;\n            padding: 12px 14px;\n            border: 1px solid #d0d5dd;\n            border-radius: 10px;\n            background: #fff;\n            box-sizing: border-box;\n        }\n\n        .chauffeur-actions {\n            margin-top: 1.25rem;\n        }\n\n        .chauffeur-btn {\n            display: inline-block;\n            width: 100%;\n            padding: 13px 16px;\n            border: none;\n            border-radius: 10px;\n            cursor: pointer;\n            font-weight: 700;\n            font-size: 1rem;\n            transition: 0.2s ease;\n        }\n\n        .chauffeur-btn:hover {\n            opacity: 0.92;\n            transform: translateY(-1px);\n        }\n\n        .chauffeur-btn-primary {\n            background: #f28c28;\n            color: #fff;\n        }\n\n        .chauffeur-btn-secondary {\n            background: #18223b;\n            color: #fff;\n        }\n\n        .chauffeur-help {\n            margin-top: 0.75rem;\n            color: #667085;\n            font-size: 0.92rem;\n        }\n\n        @media (max-width: 900px) {\n            .chauffeur-grid {\n                grid-template-columns: 1fr;\n            }\n\n            .chauffeur-card h2 {\n                font-size: 1.8rem;\n            }\n        }\n    <\/style>\n\n    <div id=\"chauffeur-interface-wrap\">\n        <div class=\"chauffeur-grid\">\n\n            <!-- FORMULAIRE BILLET COLLECTIF -->\n            <div class=\"chauffeur-card\">\n                <h2>\ud83d\udcc4 G\u00e9n\u00e9rer un billet collectif<\/h2>\n\n                <form method=\"GET\" id=\"form-billet\">\n                    <div class=\"chauffeur-field\">\n                        <label for=\"destination\">\ud83d\udea9 Destination :<\/label>\n                        <select name=\"destination\" id=\"destination\" required>\n                            <option value=\"\">-- Choisissez --<\/option>\n                            <option value=\"Eze Village\">Eze Village<\/option>\n                            <option value=\"Gare SNCF Eze bord de mer\">Gare SNCF Eze bord de mer<\/option>\n                        <\/select>\n                    <\/div>\n\n                    <div class=\"chauffeur-field\">\n                        <label for=\"date\">\ud83d\udcc5 Date :<\/label>\n                        <input type=\"date\" name=\"date\" id=\"date\" required>\n                    <\/div>\n\n                    <div class=\"chauffeur-field\">\n                        <label for=\"heure\">\ud83d\udd52 Horaire :<\/label>\n                        <select name=\"heure\" id=\"heure\" required>\n                            <option value=\"\">Choisissez une destination et une date<\/option>\n                        <\/select>\n                    <\/div>\n\n                    <div class=\"chauffeur-field\">\n                        <label for=\"chauffeur\">\ud83d\ude97 Nom du chauffeur :<\/label>\n                        <input type=\"text\" name=\"chauffeur\" id=\"chauffeur\" required>\n                    <\/div>\n\n                    <div class=\"chauffeur-actions\">\n                        <button type=\"submit\" class=\"chauffeur-btn chauffeur-btn-primary\">\ud83d\udda8 G\u00e9n\u00e9rer le billet<\/button>\n                    <\/div>\n                <\/form>\n            <\/div>\n\n            <!-- FORMULAIRE RAPPORT JOURNALIER -->\n            <div class=\"chauffeur-card\">\n                <h2>\ud83d\udcca G\u00e9n\u00e9rer un rapport journalier<\/h2>\n\n                <form method=\"GET\" id=\"form-rapport\">\n                    <div class=\"chauffeur-field\">\n                        <label for=\"chauffeur_rapport\">\ud83d\ude97 Nom du chauffeur :<\/label>\n                        <input type=\"text\" name=\"chauffeur_rapport\" id=\"chauffeur_rapport\" required>\n                    <\/div>\n\n                    <div class=\"chauffeur-field\">\n                        <label for=\"date_debut\">\ud83d\udcc5 Date de d\u00e9but :<\/label>\n                        <input type=\"date\" name=\"date_debut\" id=\"date_debut\" required>\n                    <\/div>\n\n                    <div class=\"chauffeur-field\">\n                        <label for=\"date_fin\">\ud83d\udcc5 Date de fin (facultative) :<\/label>\n                        <input type=\"date\" name=\"date_fin\" id=\"date_fin\">\n                    <\/div>\n\n                    <div class=\"chauffeur-actions\">\n                        <button type=\"submit\" class=\"chauffeur-btn chauffeur-btn-secondary\">\ud83d\udcc8 G\u00e9n\u00e9rer le rapport journalier<\/button>\n                    <\/div>\n\n                    <p class=\"chauffeur-help\">\n                        Laisse la date de fin vide pour g\u00e9n\u00e9rer le rapport d\u2019une seule journ\u00e9e.\n                    <\/p>\n                <\/form>\n            <\/div>\n\n        <\/div>\n    <\/div>\n\n    <script>\n    if (localStorage.getItem('chauffeur_access') === 'true') {\n        const wrap = document.getElementById('chauffeur-interface-wrap');\n        if (wrap) wrap.style.display = 'block';\n    }\n\n    document.addEventListener('DOMContentLoaded', function () {\n        const destination = document.getElementById('destination');\n        const dateInput = document.getElementById('date');\n        const heureSelect = document.getElementById('heure');\n\n        function updateHoraires() {\n            const dest = destination.value;\n            const date = dateInput.value;\n            if (!dest || !date) return;\n\n            fetch(`\/wp-admin\/admin-ajax.php?action=get_plages_disponibles&destination=${encodeURIComponent(dest)}`)\n                .then(res => res.json())\n                .then(plages => {\n                    fetch(`\/wp-admin\/admin-ajax.php?action=get_places_restantes&destination=${encodeURIComponent(dest)}&date=${encodeURIComponent(date)}`)\n                        .then(res => res.json())\n                        .then(restantes => {\n                            heureSelect.innerHTML = '';\n\n                            if (!Array.isArray(plages) || plages.length === 0) {\n                                const opt = document.createElement('option');\n                                opt.value = '';\n                                opt.textContent = 'Aucun horaire disponible';\n                                heureSelect.appendChild(opt);\n                                return;\n                            }\n\n                            plages.forEach(plage => {\n                                const dispo = restantes[plage.heure] ?? plage.places ?? 0;\n                                const opt = document.createElement('option');\n                                opt.value = plage.heure;\n                                opt.textContent = `${plage.heure} (${dispo} place${dispo > 1 ? 's' : ''} dispo)`;\n                                heureSelect.appendChild(opt);\n                            });\n                        });\n                });\n        }\n\n        destination?.addEventListener('change', updateHoraires);\n        dateInput?.addEventListener('change', updateHoraires);\n\n        \/\/ G\u00e9n\u00e9ration billet collectif\n        document.getElementById('form-billet')?.addEventListener('submit', function (e) {\n            e.preventDefault();\n\n            const dest = destination.value;\n            const date = dateInput.value;\n            const heure = heureSelect.value;\n            const chauffeur = document.getElementById('chauffeur').value;\n\n            if (!dest || !date || !heure || !chauffeur) {\n                alert(\"Veuillez remplir tous les champs du billet collectif.\");\n                return;\n            }\n\n            const url = `\/wp-content\/themes\/hello-elementor\/generer-billet.php?destination=${encodeURIComponent(dest)}&date=${encodeURIComponent(date)}&heure=${encodeURIComponent(heure)}&chauffeur=${encodeURIComponent(chauffeur)}`;\n            window.open(url, '_blank');\n        });\n\n        \/\/ G\u00e9n\u00e9ration rapport journalier\n        document.getElementById('form-rapport')?.addEventListener('submit', function (e) {\n            e.preventDefault();\n\n            const chauffeur = document.getElementById('chauffeur_rapport').value.trim();\n            const dateDebut = document.getElementById('date_debut').value;\n            let dateFin = document.getElementById('date_fin').value;\n\n            if (!chauffeur || !dateDebut) {\n                alert(\"Veuillez remplir le chauffeur et la date de d\u00e9but du rapport.\");\n                return;\n            }\n\n            if (!dateFin) {\n                dateFin = dateDebut;\n            }\n\n            if (dateFin < dateDebut) {\n                alert(\"La date de fin ne peut pas \u00eatre ant\u00e9rieure \u00e0 la date de d\u00e9but.\");\n                return;\n            }\n\n            const url = `\/wp-content\/themes\/hello-elementor\/generer-rapport-journalier.php?chauffeur=${encodeURIComponent(chauffeur)}&date_debut=${encodeURIComponent(dateDebut)}&date_fin=${encodeURIComponent(dateFin)}`;\n            window.open(url, '_blank');\n        });\n    });\n    <\/script>\n    <\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Home<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1438","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/eze-shuttle.com\/en\/wp-json\/wp\/v2\/pages\/1438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eze-shuttle.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/eze-shuttle.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/eze-shuttle.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eze-shuttle.com\/en\/wp-json\/wp\/v2\/comments?post=1438"}],"version-history":[{"count":7,"href":"https:\/\/eze-shuttle.com\/en\/wp-json\/wp\/v2\/pages\/1438\/revisions"}],"predecessor-version":[{"id":1445,"href":"https:\/\/eze-shuttle.com\/en\/wp-json\/wp\/v2\/pages\/1438\/revisions\/1445"}],"wp:attachment":[{"href":"https:\/\/eze-shuttle.com\/en\/wp-json\/wp\/v2\/media?parent=1438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}