<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* front/reserver.html.twig */
class __TwigTemplate_5b4d641963e62041a7c043fa8e9fb89ba66d5adb6faa03f0168b54c27473c0cc extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'contentBody' => [$this, 'block_contentBody'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/reserver.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/reserver.html.twig"));
$this->parent = $this->loadTemplate("layout.html.twig", "front/reserver.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_contentBody(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "contentBody"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "contentBody"));
// line 4
yield " ";
$context["title"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 4, $this->source); })()), "title", [], "any", false, false, false, 4);
// line 5
yield "
";
// line 6
if (((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 6, $this->source); })()) != "annulation")) {
// line 7
yield " <div class=\"bg-white kl-block-nav\">
<div class=\"kl-top-nav\">
";
// line 9
if (((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 9, $this->source); })()) != "confirmation")) {
// line 10
yield " <a href=\"";
yield (((((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 10, $this->source); })()) == "choice") || ((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 10, $this->source); })()) == ""))) ? ("/") : ((((array_key_exists("referer", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["referer"]) || array_key_exists("referer", $context) ? $context["referer"] : (function () { throw new RuntimeError('Variable "referer" does not exist.', 10, $this->source); })())))) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["referer"]) || array_key_exists("referer", $context) ? $context["referer"] : (function () { throw new RuntimeError('Variable "referer" does not exist.', 10, $this->source); })()), "html", null, true)) : ("/"))));
yield "\" class=\"kl-step-return\"><i>← Retour à l'étape précédente</i></a>
";
}
// line 12
yield "
<ul class=\"kl-step-menu mb-0\">
<li class=\"";
// line 14
yield (((((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 14, $this->source); })()) == "choice") || ((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 14, $this->source); })()) == ""))) ? ("active") : (""));
yield "\"><a href=\"";
yield ((((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 14, $this->source); })()) == "recap")) ? ("?step=choice") : ("#choice"));
yield "\" ";
yield ((((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 14, $this->source); })()) == "confirmation")) ? ("onclick=\"return false\"") : (""));
yield ">Choix de la formule</a></li>
<li class=\"";
// line 15
yield (((((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 15, $this->source); })()) == "recap") && CoreExtension::getAttribute($this->env, $this->source, ($context["datas"] ?? null), "commandes", [], "any", true, true, false, 15))) ? ("active") : (""));
yield "\"><a href=\"";
yield ((((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 15, $this->source); })()) == "choice")) ? ("?step=recap") : ("#recap"));
yield "\" ";
yield (((((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 15, $this->source); })()) == "choice") || ((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 15, $this->source); })()) == "confirmation"))) ? ("onclick=\"return false\"") : (""));
yield ">Récapitulatif</a></li>
<li class=\"\"><a href=\"#paiement\" onclick=\"return false\">Paiement</a></li>
<li class=\"";
// line 17
yield ((((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 17, $this->source); })()) == "confirmation")) ? ("active") : (""));
yield "\"><a href=\"#confirmation\" onclick=\"return false\">Confirmation</a></li>
</ul>
</div>
</div>
";
}
// line 22
yield "
<div class=\" max-container-3 block-texte mx-auto px-0 pb-lg-4\">
<div class=\"row titre-details mt-4\">
";
// line 25
if ((((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 25, $this->source); })()) != "confirmation") && ((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 25, $this->source); })()) != "annulation"))) {
// line 26
yield " <div class=\"col-md-12\"><h2 class=\"mb-3\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 26, $this->source); })()), "html", null, true);
yield " : </h2></div>
";
}
// line 28
yield "
";
// line 29
if (((CoreExtension::getAttribute($this->env, $this->source, ($context["datas"] ?? null), "commandes", [], "any", true, true, false, 29) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["datas"]) || array_key_exists("datas", $context) ? $context["datas"] : (function () { throw new RuntimeError('Variable "datas" does not exist.', 29, $this->source); })()), "commandes", [], "any", false, false, false, 29))) && CoreExtension::getAttribute($this->env, $this->source, ($context["datas"] ?? null), "paymentForm", [], "any", true, true, false, 29))) {
// line 30
yield " <div class=\"col-md-12\">
<div class=\"card\">
<div class=\"card-body\">
<div class=\"row\">
<div class=\"col-md-12\" id=\"id_liste\">
<table class=\"table table-striped table-hover\">
<thead class=\"thead-dark\">
<tr>
<th>Désignation</th>
<th>Qté</th>
<th class=\"text-right\">PU</th>
<th class=\"text-right\">Montant</th>
<th></th>
</tr>
</thead>
<tbody>
";
// line 46
$context["total"] = 0;
// line 47
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["datas"]) || array_key_exists("datas", $context) ? $context["datas"] : (function () { throw new RuntimeError('Variable "datas" does not exist.', 47, $this->source); })()), "commandes", [], "any", false, false, false, 47));
foreach ($context['_seq'] as $context["_key"] => $context["commandeItem"]) {
// line 48
yield " ";
$context["montant"] = (CoreExtension::getAttribute($this->env, $this->source, $context["commandeItem"], "qte", [], "any", false, false, false, 48) * CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["tarifs"]) || array_key_exists("tarifs", $context) ? $context["tarifs"] : (function () { throw new RuntimeError('Variable "tarifs" does not exist.', 48, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["commandeItem"], "tarif_id", [], "any", false, false, false, 48), [], "array", false, false, false, 48), "pu", [], "any", false, false, false, 48));
// line 49
yield " ";
$context["total"] = ((isset($context["total"]) || array_key_exists("total", $context) ? $context["total"] : (function () { throw new RuntimeError('Variable "total" does not exist.', 49, $this->source); })()) + (isset($context["montant"]) || array_key_exists("montant", $context) ? $context["montant"] : (function () { throw new RuntimeError('Variable "montant" does not exist.', 49, $this->source); })()));
// line 50
yield " <tr data-id=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["commandeItem"], "getId", [], "method", false, false, false, 50), "html", null, true);
yield "\">
<td>";
// line 51
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["tarifs"]) || array_key_exists("tarifs", $context) ? $context["tarifs"] : (function () { throw new RuntimeError('Variable "tarifs" does not exist.', 51, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["commandeItem"], "tarif_id", [], "any", false, false, false, 51), [], "array", false, false, false, 51), "description", [], "any", false, false, false, 51), "html", null, true);
yield "</td>
<td>";
// line 52
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["commandeItem"], "qte", [], "any", false, false, false, 52), "html", null, true);
yield (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["tarifs"]) || array_key_exists("tarifs", $context) ? $context["tarifs"] : (function () { throw new RuntimeError('Variable "tarifs" does not exist.', 52, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["commandeItem"], "tarif_id", [], "any", false, false, false, 52), [], "array", false, false, false, 52), "titre", [], "any", false, false, false, 52) == "SDR")) ? ("h") : (""));
yield "</td>
<td class=\"text-right\">";
// line 53
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["tarifs"]) || array_key_exists("tarifs", $context) ? $context["tarifs"] : (function () { throw new RuntimeError('Variable "tarifs" does not exist.', 53, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["commandeItem"], "tarif_id", [], "any", false, false, false, 53), [], "array", false, false, false, 53), "pu", [], "any", false, false, false, 53), "html", null, true);
yield " €</td>
<td class=\"text-right\"><span class=\"kl_montant\">";
// line 54
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["montant"]) || array_key_exists("montant", $context) ? $context["montant"] : (function () { throw new RuntimeError('Variable "montant" does not exist.', 54, $this->source); })()), "html", null, true);
yield "</span> €</td>
<td>
<a href=\"#\" class=\"kl-delete-cmd text-danger\" title=\"Supprimer ce commande\">
<i class=\"fa fa-trash\"></i>
</a>
</td>
</tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['commandeItem'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 62
yield " <tr class=\"bg-white\">
<th class=\"text-right\" colspan=3>Total HT</th>
<th class=\"text-right\"><span id=\"idTotalHt\">";
// line 64
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["total"]) || array_key_exists("total", $context) ? $context["total"] : (function () { throw new RuntimeError('Variable "total" does not exist.', 64, $this->source); })()), "html", null, true);
yield "</span> €</th>
<th></th>
</tr>
<tr class=\"bg-white\">
<th class=\"text-right\" colspan=3>TVA</th>
<th class=\"text-right\"><span id=\"idTva\">";
// line 69
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((isset($context["total"]) || array_key_exists("total", $context) ? $context["total"] : (function () { throw new RuntimeError('Variable "total" does not exist.', 69, $this->source); })()) * 0.2), "html", null, true);
yield "</span> €</th>
<th></th>
</tr>
<tr class=\"bg-white\">
<th class=\"text-right\" colspan=3>TTC</th>
<th class=\"text-right\"><span id=\"idTotalTtc\">";
// line 74
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((isset($context["total"]) || array_key_exists("total", $context) ? $context["total"] : (function () { throw new RuntimeError('Variable "total" does not exist.', 74, $this->source); })()) + ((isset($context["total"]) || array_key_exists("total", $context) ? $context["total"] : (function () { throw new RuntimeError('Variable "total" does not exist.', 74, $this->source); })()) * 0.2)), "html", null, true);
yield "</span> €</th>
<th></th>
</tr>
</tbody>
</table>
<div class=\"text-center\">
";
// line 80
yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["datas"]) || array_key_exists("datas", $context) ? $context["datas"] : (function () { throw new RuntimeError('Variable "datas" does not exist.', 80, $this->source); })()), "paymentForm", [], "any", false, false, false, 80);
yield "
</div>
</div>
</div>
</div>
</div>
</div>
";
} else {
// line 88
yield " <div class=\"col-md-7\">
<form method=\"POST\" id=\"idFormCmd\" action=\"";
// line 89
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 89, $this->source); })()), "request", [], "any", false, false, false, 89), "attributes", [], "any", false, false, false, 89), "get", ["_route"], "method", false, false, false, 89), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 89, $this->source); })()), "request", [], "any", false, false, false, 89), "attributes", [], "any", false, false, false, 89), "get", ["_route_params"], "method", false, false, false, 89)), "html", null, true);
yield "\">
";
// line 90
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["tarifs"]) || array_key_exists("tarifs", $context) ? $context["tarifs"] : (function () { throw new RuntimeError('Variable "tarifs" does not exist.', 90, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 91
yield " <div class=\"card mb-3 kl-tarif\" data-id=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 91), "html", null, true);
yield "\">
<div class=\"card-body d-flex\">
<figcaption class=\"kl-img-illustration\">
<img src=\"";
// line 94
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "logo", [], "any", false, false, false, 94), "html", null, true);
yield "\" alt=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "titre", [], "any", false, false, false, 94), "html", null, true);
yield "\">
</figcaption>
<article class=\"mt-a mb-a\">
<h5 class=\"card-title\">";
// line 97
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "description", [], "any", false, false, false, 97), "html", null, true);
yield "</h5>
<p class=\"mb-0\">Quantité :
<input type=\"number\"
inputmode=\"numeric\"
pattern=\"[0-9]*\"
name=\"data[";
// line 103
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 103), "html", null, true);
yield "]\"
data-tp=\"";
// line 104
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["item"], "titre", [], "any", false, false, false, 104) == "SDR")) ? ("h") : (""));
yield "\"
data-id=\"";
// line 105
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 105), "html", null, true);
yield "\"
data-price=\"";
// line 106
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "pu", [], "any", false, false, false, 106), "html", null, true);
yield "\"
min=\"0\"
value=\"\"
placeholder=\"0\"
class=\"kl-formInput form-control kl-inputReserve\">
<span class=\"ml-3\">Tarif :
<strong>
<span class=\"kl-price hide\">0</span>
<span class=\"kl-prices\">";
// line 114
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "pu", [], "any", false, false, false, 114), "html", null, true);
yield "</span> €
</strong>
</span>
</p>
";
// line 118
if ((CoreExtension::getAttribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 118) == "4")) {
// line 119
yield " <p class=\"mb-2\">
<a href=\"#\" data-bs-toggle=\"modal\" data-bs-target=\"#calendarModal\" class=\"kl-step-return\">
<i>Voir les disponibilités</i>
</a>
</p>
";
}
// line 125
yield " </article>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['item'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 129
yield " </form>
</div>
<div class=\"col-md-5\">
<div class=\"card\">
<div class=\"card-body\">
<h5 class=\"text-center\">Résumé</h5>
";
// line 136
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["tarifs"]) || array_key_exists("tarifs", $context) ? $context["tarifs"] : (function () { throw new RuntimeError('Variable "tarifs" does not exist.', 136, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 137
yield " <p class=\"mb-0 txt-gris hide\" id=\"idResume";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 137), "html", null, true);
yield "\"><em><span class=\"kl_cmd\"></span> ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "description", [], "any", false, false, false, 137), "html", null, true);
yield " </em></p>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['item'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 139
yield " <hr class=\"mb-10 mt-10\">
<p class=\"mb-0 clearfix\">Total HT : <strong class=\"float-right txt-green font-size-16\"><span id=\"totalHt\">0</span> €</strong></p>
<hr class=\"mb-10 mt-10\">
<p class=\"clearfix\">Total TTC : <strong class=\"float-right\"><span id=\"totalTtc\">0</span> €</strong></p>
<p><em class=\"text-muted\">En commandant j'accepte les conditions générales de vente</em></p>
<button type=\"button\" class=\"btn btn-link transition-bgcolor bg-green-s minw-sm btn-block disabled\" id=\"idButtonCmd\">COMMANDER</button>
<p class=\"text-muted text-center mt-3 mb-0\">Paiement sécurisé</p>
</div>
</div>
<div class=\"card mt-3 bg-green-avocate\">
<div class=\"card-body\">
<h5 class=\"txt-white\">Vous souhaitez<br/> un abonnement personnalisé ?</h5>
<div class=\"row\">
<div class=\"col-md-6\">
<h4 class=\"txt-green mb-0\">04 51 58 08 05</h4>
<small class=\"fs-12 txt-white\">Du lundi au vendredi de 9h à 18h</small>
</div>
<div class=\"col-md-6 text-right m-a\">
<a class=\"btn btn-small-link\" href=\"/contact\">Contact</a>
</div>
</div>
</div>
</div>
</div>
";
}
// line 164
yield " </div>
</div>
<div class=\"modal fade\" id=\"calendarModal\" tabindex=\"-1\" aria-labelledby=\"calendarModalLabel\" aria-hidden=\"true\">
<div class=\"modal-dialog modal-xl modal-dialog-scrollable\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<h5 class=\"modal-title\" id=\"calendarModalLabel\">Créneaux disponibles</h5>
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Fermer\"></button>
</div>
<div class=\"modal-body\" id=\"calendar-content\">
";
// line 175
yield from $this->loadTemplate("front/disponibilites_fragment.html.twig", "front/reserver.html.twig", 175)->unwrap()->yield($context);
// line 176
yield " </div>
</div>
</div>
</div>
<script src=\"https://code.jquery.com/jquery-3.6.4.min.js\"></script>
<script src=\"";
// line 182
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/assets/js/custom.js?v1"), "html", null, true);
yield "\"></script>
<script src=\"";
// line 183
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/assets/js/client/commande.js?v9"), "html", null, true);
yield "\"></script>
<script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js\"></script>
";
// line 186
yield from $this->unwrap()->yieldBlock('javascripts', $context, $blocks);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
yield from [];
}
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_javascripts(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 187
yield " ";
yield from $this->yieldParentBlock("javascripts", $context, $blocks);
yield "
<script>
const days = ";
// line 190
yield json_encode((isset($context["dates"]) || array_key_exists("dates", $context) ? $context["dates"] : (function () { throw new RuntimeError('Variable "dates" does not exist.', 190, $this->source); })()));
yield ";
const reservations = ";
// line 191
yield json_encode((isset($context["reservations"]) || array_key_exists("reservations", $context) ? $context["reservations"] : (function () { throw new RuntimeError('Variable "reservations" does not exist.', 191, $this->source); })()));
yield ";
function generateCalendar(reservations, days) {
const calendarBody = document.getElementById('calendar-body');
if (!calendarBody) return;
const hours = [\"08:00\", \"09:00\", \"10:00\", \"11:00\", \"12:00\", \"13:00\", \"14:00\", \"15:00\", \"16:00\", \"17:00\", \"18:00\", \"19:00\"];
const now = new Date();
const isMobile = window.innerWidth <= 768;
calendarBody.innerHTML = \"\";
hours.forEach(hour => {
const row = document.createElement('tr');
row.innerHTML = `<td>\${hour}</td>`;
days.forEach(day => {
const reservationForDay = reservations[day] || [];
const reservation = reservationForDay.find(res => res.time === hour);
const td = document.createElement('td');
const reservationDateTime = new Date(`\${day}T\${hour}:00`);
let text = \"\";
if (reservationDateTime <= now) {
if (reservation) {
td.className = \"past-reserved\";
text = \"Réservé\";
} else {
td.className = \"past\";
text = \"Indisponible\";
}
td.style.pointerEvents = \"none\";
} else if (reservation) {
td.className = \"reserved alias\";
text = \"Réservé\";
} else {
td.className = \"available\";
text = \"Disponible\";
}
if (!isMobile) {
td.textContent = text;
}
row.appendChild(td);
});
calendarBody.appendChild(row);
});
}
// Appel initial
document.addEventListener(\"DOMContentLoaded\", function () {
generateCalendar(reservations, days);
});
// Pagination calendrier (changer de semaine)
document.addEventListener(\"click\", function (e) {
const target = e.target.closest(\".change-week\");
if (target) {
e.preventDefault();
const date = target.dataset.date;
fetch(`/reservation?d=\${date}&modal=1`)
.then(res => res.text())
.then(html => {
document.getElementById(\"calendar-content\").innerHTML = html;
const parser = new DOMParser();
const doc = parser.parseFromString(html, \"text/html\");
const newScript = doc.querySelector(\"script[data-calendar-json]\");
if (newScript) {
const data = JSON.parse(newScript.textContent);
generateCalendar(data.reservations, data.dates);
}
});
}
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "front/reserver.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 449 => 191, 445 => 190, 438 => 187, 415 => 186, 409 => 183, 405 => 182, 397 => 176, 395 => 175, 382 => 164, 355 => 139, 344 => 137, 340 => 136, 331 => 129, 322 => 125, 314 => 119, 312 => 118, 305 => 114, 294 => 106, 290 => 105, 286 => 104, 282 => 103, 273 => 97, 265 => 94, 258 => 91, 254 => 90, 250 => 89, 247 => 88, 236 => 80, 227 => 74, 219 => 69, 211 => 64, 207 => 62, 193 => 54, 189 => 53, 184 => 52, 180 => 51, 175 => 50, 172 => 49, 169 => 48, 164 => 47, 162 => 46, 144 => 30, 142 => 29, 139 => 28, 133 => 26, 131 => 25, 126 => 22, 118 => 17, 109 => 15, 101 => 14, 97 => 12, 91 => 10, 89 => 9, 85 => 7, 83 => 6, 80 => 5, 77 => 4, 64 => 3, 41 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends \"layout.html.twig\" %}
{% block contentBody %}
{% set title = content.title %}
{% if step != \"annulation\" %}
<div class=\"bg-white kl-block-nav\">
<div class=\"kl-top-nav\">
{% if step != \"confirmation\" %}
<a href=\"{{ step == \"choice\" or step == \"\" ? '/' : (referer is defined and referer is not empty ? referer : '/')}}\" class=\"kl-step-return\"><i>← Retour à l'étape précédente</i></a>
{% endif %}
<ul class=\"kl-step-menu mb-0\">
<li class=\"{{ step == \"choice\" or step == \"\" ? 'active' : ''}}\"><a href=\"{{ step == 'recap' ? '?step=choice' : '#choice'}}\" {{ step == \"confirmation\" ? 'onclick=\"return false\"' : ''}}>Choix de la formule</a></li>
<li class=\"{{ step == \"recap\" and datas.commandes is defined ? 'active' : ''}}\"><a href=\"{{ step == \"choice\" ? '?step=recap' : '#recap'}}\" {{ step == \"choice\" or step == \"confirmation\" ? 'onclick=\"return false\"' : ''}}>Récapitulatif</a></li>
<li class=\"\"><a href=\"#paiement\" onclick=\"return false\">Paiement</a></li>
<li class=\"{{ step == \"confirmation\" ? 'active' : ''}}\"><a href=\"#confirmation\" onclick=\"return false\">Confirmation</a></li>
</ul>
</div>
</div>
{% endif %}
<div class=\" max-container-3 block-texte mx-auto px-0 pb-lg-4\">
<div class=\"row titre-details mt-4\">
{% if step != \"confirmation\" and step != \"annulation\" %}
<div class=\"col-md-12\"><h2 class=\"mb-3\">{{ title }} : </h2></div>
{% endif %}
{% if datas.commandes is defined and datas.commandes is not empty and datas.paymentForm is defined %}
<div class=\"col-md-12\">
<div class=\"card\">
<div class=\"card-body\">
<div class=\"row\">
<div class=\"col-md-12\" id=\"id_liste\">
<table class=\"table table-striped table-hover\">
<thead class=\"thead-dark\">
<tr>
<th>Désignation</th>
<th>Qté</th>
<th class=\"text-right\">PU</th>
<th class=\"text-right\">Montant</th>
<th></th>
</tr>
</thead>
<tbody>
{% set total = 0 %}
{% for commandeItem in datas.commandes %}
{% set montant = commandeItem.qte * tarifs[commandeItem.tarif_id].pu %}
{% set total = total + montant %}
<tr data-id=\"{{commandeItem.getId()}}\">
<td>{{ tarifs[commandeItem.tarif_id].description }}</td>
<td>{{commandeItem.qte}}{{tarifs[commandeItem.tarif_id].titre == 'SDR' ? 'h' : ''}}</td>
<td class=\"text-right\">{{tarifs[commandeItem.tarif_id].pu}} €</td>
<td class=\"text-right\"><span class=\"kl_montant\">{{montant}}</span> €</td>
<td>
<a href=\"#\" class=\"kl-delete-cmd text-danger\" title=\"Supprimer ce commande\">
<i class=\"fa fa-trash\"></i>
</a>
</td>
</tr>
{% endfor %}
<tr class=\"bg-white\">
<th class=\"text-right\" colspan=3>Total HT</th>
<th class=\"text-right\"><span id=\"idTotalHt\">{{total}}</span> €</th>
<th></th>
</tr>
<tr class=\"bg-white\">
<th class=\"text-right\" colspan=3>TVA</th>
<th class=\"text-right\"><span id=\"idTva\">{{total * 0.2}}</span> €</th>
<th></th>
</tr>
<tr class=\"bg-white\">
<th class=\"text-right\" colspan=3>TTC</th>
<th class=\"text-right\"><span id=\"idTotalTtc\">{{total + total * 0.2}}</span> €</th>
<th></th>
</tr>
</tbody>
</table>
<div class=\"text-center\">
{{ datas.paymentForm|raw }}
</div>
</div>
</div>
</div>
</div>
</div>
{% else %}
<div class=\"col-md-7\">
<form method=\"POST\" id=\"idFormCmd\" action=\"{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}\">
{% for item in tarifs %}
<div class=\"card mb-3 kl-tarif\" data-id=\"{{ item.id }}\">
<div class=\"card-body d-flex\">
<figcaption class=\"kl-img-illustration\">
<img src=\"{{ item.logo }}\" alt=\"{{ item.titre }}\">
</figcaption>
<article class=\"mt-a mb-a\">
<h5 class=\"card-title\">{{ item.description }}</h5>
<p class=\"mb-0\">Quantité :
<input type=\"number\"
inputmode=\"numeric\"
pattern=\"[0-9]*\"
name=\"data[{{ item.id }}]\"
data-tp=\"{{ item.titre == 'SDR' ? 'h' : ''}}\"
data-id=\"{{ item.id }}\"
data-price=\"{{ item.pu }}\"
min=\"0\"
value=\"\"
placeholder=\"0\"
class=\"kl-formInput form-control kl-inputReserve\">
<span class=\"ml-3\">Tarif :
<strong>
<span class=\"kl-price hide\">0</span>
<span class=\"kl-prices\">{{ item.pu }}</span> €
</strong>
</span>
</p>
{% if item.id == '4' %}
<p class=\"mb-2\">
<a href=\"#\" data-bs-toggle=\"modal\" data-bs-target=\"#calendarModal\" class=\"kl-step-return\">
<i>Voir les disponibilités</i>
</a>
</p>
{% endif %}
</article>
</div>
</div>
{% endfor %}
</form>
</div>
<div class=\"col-md-5\">
<div class=\"card\">
<div class=\"card-body\">
<h5 class=\"text-center\">Résumé</h5>
{% for item in tarifs %}
<p class=\"mb-0 txt-gris hide\" id=\"idResume{{ item.id }}\"><em><span class=\"kl_cmd\"></span> {{item.description}} </em></p>
{% endfor %}
<hr class=\"mb-10 mt-10\">
<p class=\"mb-0 clearfix\">Total HT : <strong class=\"float-right txt-green font-size-16\"><span id=\"totalHt\">0</span> €</strong></p>
<hr class=\"mb-10 mt-10\">
<p class=\"clearfix\">Total TTC : <strong class=\"float-right\"><span id=\"totalTtc\">0</span> €</strong></p>
<p><em class=\"text-muted\">En commandant j'accepte les conditions générales de vente</em></p>
<button type=\"button\" class=\"btn btn-link transition-bgcolor bg-green-s minw-sm btn-block disabled\" id=\"idButtonCmd\">COMMANDER</button>
<p class=\"text-muted text-center mt-3 mb-0\">Paiement sécurisé</p>
</div>
</div>
<div class=\"card mt-3 bg-green-avocate\">
<div class=\"card-body\">
<h5 class=\"txt-white\">Vous souhaitez<br/> un abonnement personnalisé ?</h5>
<div class=\"row\">
<div class=\"col-md-6\">
<h4 class=\"txt-green mb-0\">04 51 58 08 05</h4>
<small class=\"fs-12 txt-white\">Du lundi au vendredi de 9h à 18h</small>
</div>
<div class=\"col-md-6 text-right m-a\">
<a class=\"btn btn-small-link\" href=\"/contact\">Contact</a>
</div>
</div>
</div>
</div>
</div>
{% endif %}
</div>
</div>
<div class=\"modal fade\" id=\"calendarModal\" tabindex=\"-1\" aria-labelledby=\"calendarModalLabel\" aria-hidden=\"true\">
<div class=\"modal-dialog modal-xl modal-dialog-scrollable\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<h5 class=\"modal-title\" id=\"calendarModalLabel\">Créneaux disponibles</h5>
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Fermer\"></button>
</div>
<div class=\"modal-body\" id=\"calendar-content\">
{% include 'front/disponibilites_fragment.html.twig' %}
</div>
</div>
</div>
</div>
<script src=\"https://code.jquery.com/jquery-3.6.4.min.js\"></script>
<script src=\"{{ asset('/assets/js/custom.js?v1') }}\"></script>
<script src=\"{{ asset('/assets/js/client/commande.js?v9') }}\"></script>
<script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js\"></script>
{% block javascripts %}
{{ parent() }}
<script>
const days = {{ dates|json_encode|raw }};
const reservations = {{ reservations|json_encode|raw }};
function generateCalendar(reservations, days) {
const calendarBody = document.getElementById('calendar-body');
if (!calendarBody) return;
const hours = [\"08:00\", \"09:00\", \"10:00\", \"11:00\", \"12:00\", \"13:00\", \"14:00\", \"15:00\", \"16:00\", \"17:00\", \"18:00\", \"19:00\"];
const now = new Date();
const isMobile = window.innerWidth <= 768;
calendarBody.innerHTML = \"\";
hours.forEach(hour => {
const row = document.createElement('tr');
row.innerHTML = `<td>\${hour}</td>`;
days.forEach(day => {
const reservationForDay = reservations[day] || [];
const reservation = reservationForDay.find(res => res.time === hour);
const td = document.createElement('td');
const reservationDateTime = new Date(`\${day}T\${hour}:00`);
let text = \"\";
if (reservationDateTime <= now) {
if (reservation) {
td.className = \"past-reserved\";
text = \"Réservé\";
} else {
td.className = \"past\";
text = \"Indisponible\";
}
td.style.pointerEvents = \"none\";
} else if (reservation) {
td.className = \"reserved alias\";
text = \"Réservé\";
} else {
td.className = \"available\";
text = \"Disponible\";
}
if (!isMobile) {
td.textContent = text;
}
row.appendChild(td);
});
calendarBody.appendChild(row);
});
}
// Appel initial
document.addEventListener(\"DOMContentLoaded\", function () {
generateCalendar(reservations, days);
});
// Pagination calendrier (changer de semaine)
document.addEventListener(\"click\", function (e) {
const target = e.target.closest(\".change-week\");
if (target) {
e.preventDefault();
const date = target.dataset.date;
fetch(`/reservation?d=\${date}&modal=1`)
.then(res => res.text())
.then(html => {
document.getElementById(\"calendar-content\").innerHTML = html;
const parser = new DOMParser();
const doc = parser.parseFromString(html, \"text/html\");
const newScript = doc.querySelector(\"script[data-calendar-json]\");
if (newScript) {
const data = JSON.parse(newScript.textContent);
generateCalendar(data.reservations, data.dates);
}
});
}
});
</script>
{% endblock %}
{% endblock %}
", "front/reserver.html.twig", "/home/coworking/www_preprod/templates/front/reserver.html.twig");
}
}