templates/front/product/single.html.twig line 1

Open in your IDE?
  1. {% extends 'base_front.html.twig' %}
  2. {% block meta %}
  3.     {% if notes['globalNote']['count'] > 0 %}
  4.         {% set globalNote = notes['globalNote']['totalNote'] / notes['globalNote']['count'] %}
  5.     {% else %}
  6.         {% set globalNote = 0 %}
  7.     {% endif %}
  8.     <title>Produit
  9.         {{ product.name }}</title>
  10.     <meta name="description" content="Le produit {{ product.name }} de la catégorie {{ product.subCategories.first.name }} {% if globalNote > 0 %}possède une note de {{ globalNote|number_format(1, '.') }}/5 {% else %}à un stock limité à {{ product.quantity }} articles, dépéchez-vous !{% endif %}">
  11.     {% if not product.isActivated %}
  12.         <meta name="robots" content="noindex">
  13.     {% endif %}
  14. {% endblock %}
  15. {% block style %}
  16.     <link href="{{ asset('css/jquery.rateyo.css') }}" rel="stylesheet">
  17.     <link rel="stylesheet" href="{{ asset('css/jquery.datetimepicker.min.css') }}">
  18.     <link rel="preconnect" href="https://fonts.gstatic.com">
  19.     <link href="https://fonts.googleapis.com/css2?family=Mukta&display=swap" rel="stylesheet">
  20.     <link rel="stylesheet" href="{{ asset('css/formReservation.css') }}">
  21.     <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
  22.     <link rel="stylesheet" href="{{ asset('css/singleProduct/style.css') }}">
  23.     <link rel="stylesheet" href="{{ asset('css/front/promo.css') }}">
  24. {% endblock %}
  25.    
  26. {% form_theme formComment _self %}
  27. {% block body %}
  28.     <!-- Modal options groups -->
  29.     <div class="modal fade" id="modalOptionGP" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
  30.         <div class="modal-dialog myWidth" role="document">
  31.             <div class="modal-content">
  32.                 {# <form action=""> #}
  33.                     <div class="modal-header">
  34.                         <h5 class="modal-title" id="">Modifier les groupes d'options</h5>
  35.                         <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  36.                             <span aria-hidden="true">&times;</span>
  37.                         </button>
  38.                     </div>
  39.                     <div class="modal-body">
  40.                         <div class="row">
  41.                             {# <div class="col-lg-6 col-12" >
  42.                                 <div id="optionsimage">
  43.                                     <img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ product.photos.toArray()[0].url) }}" alt="">
  44.                                 </div>
  45.                             </div> #}
  46.                             
  47.                             <div class="col-12" id="valeurOpion" style="display: block">
  48.                                 {# <div class="mb-3">
  49.                                     <div class="name_option">Type de visite <span>(choisir une seule option)</span></div>
  50.                                     <div class="cont_valeurs_option">
  51.                                         <div class="cont_one_value">
  52.                                             <div class="custom-control custom-radio">
  53.                                                 <input class="custom-control-input" type="radio" name="flexRadioDefault" id="flexRadioDefault1">
  54.                                                 <label class="custom-control-label one_value" for="flexRadioDefault1">
  55.                                                     <div class="infos_value">Visite thématique (par exemple : Histoire médiévale) <span>10 €</span></div>
  56.                                                 </label>
  57.                                             </div>
  58.                                             <div>
  59.                                                 <label for="flexRadioDefault1" class="labelOneValue">
  60.                                                     <img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ product.photos[0].url) }}" alt="" srcset="">
  61.                                                 </label>
  62.                                             </div>
  63.                                         </div>
  64.                                         <div class="cont_one_value">
  65.                                             <div class="custom-control custom-radio">
  66.                                                 <input class="custom-control-input" type="radio" name="flexRadioDefault" id="flexRadioDefault1">
  67.                                                 <label class="custom-control-label one_value" for="flexRadioDefault1">
  68.                                                     <div class="infos_value">Type de visite<span>10 €</span></div>
  69.                                                 </label>
  70.                                             </div>
  71.                                             <div>
  72.                                                 <label for="flexRadioDefault1" class="labelOneValue">
  73.                                                     <img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ product.photos[0].url) }}" alt="" srcset="">
  74.                                                 </label>
  75.                                             </div>
  76.                                         </div>
  77.                                         <div class="cont_one_value">
  78.                                             <div class="custom-control custom-radio">
  79.                                                 <input class="custom-control-input" type="radio" name="flexRadioDefault" id="flexRadioDefault1">
  80.                                                 <label class="custom-control-label one_value" for="flexRadioDefault1">
  81.                                                     <div class="infos_value">Type de visite<span>10 €</span></div>
  82.                                                 </label>
  83.                                             </div>
  84.                                             <div>
  85.                                                 <label for="flexRadioDefault1" class="labelOneValue">
  86.                                                     <img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ product.photos[0].url) }}" alt="" srcset="">
  87.                                                 </label>
  88.                                             </div>
  89.                                         </div>
  90.                                     </div>
  91.                                 </div>
  92.                                 <div class="mb-3">
  93.                                     <div class="name_option">Options supplémentaires <span>(plusieurs choix possibles)</span></div>
  94.                                     <div class="cont_valeurs_option">
  95.                                         <div class="cont_one_value">
  96.                                             <div class="custom-control custom-checkbox">
  97.                                                 <input class="custom-control-input" type="checkbox" name="flexcheckboxDefault" id="flexcheckboxDefault1">
  98.                                                 <label class="custom-control-label one_value" for="flexcheckboxDefault1">
  99.                                                     <div class="infos_value">Visite thématique (par exemple : Histoire médiévale) <span>10 €</span></div>
  100.                                                 </label>
  101.                                             </div>
  102.                                             <label for="flexcheckboxDefault1" class="labelOneValue">
  103.                                                 <img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ product.photos[0].url) }}" alt="" srcset="">
  104.                                             </label>
  105.                                         </div>
  106.                                         <div class="cont_one_value">
  107.                                             <div class="custom-control custom-checkbox">
  108.                                                 <input class="custom-control-input" type="checkbox" name="flexcheckboxDefault" id="flexcheckboxDefault1">
  109.                                                 <label class="custom-control-label one_value" for="flexcheckboxDefault1">
  110.                                                     <div class="infos_value">Type de visite<span>10 €</span></div>
  111.                                                 </label>
  112.                                             </div>
  113.                                             <label for="flexcheckboxDefault1" class="labelOneValue">
  114.                                                 <img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ product.photos[0].url) }}" alt="" srcset="">
  115.                                             </label>
  116.                                         </div>
  117.                                         <div class="cont_one_value">
  118.                                             <div class="custom-control custom-checkbox">
  119.                                                 <input class="custom-control-input" type="checkbox" name="flexcheckboxDefault" id="flexcheckboxDefault1">
  120.                                                 <label class="custom-control-label one_value" for="flexcheckboxDefault1">
  121.                                                     <div class="infos_value">Type de visite<span>10 €</span></div>
  122.                                                 </label>
  123.                                             </div>
  124.                                             <label for="flexcheckboxDefault1" class="labelOneValue">
  125.                                                 <img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ product.photos[0].url) }}" alt="" srcset="">
  126.                                             </label>
  127.                                         </div>
  128.                                     </div>
  129.                                 </div> #}
  130.                             </div>
  131.                         </div>
  132.                         
  133.                     </div>
  134.                     {# {% endfor %}
  135.                     {% endif %} #}
  136.                     <div class="modal-footer">
  137.                         <button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
  138.                         <button type="submit" class="btn btn-primary" id="" onclick="validemodalgroupe('goptions')">Valider</button>
  139.                     </div>
  140.                 {# </form> #}
  141.             </div>
  142.         </div>
  143.     </div>
  144.     <!-- Fin Modal options groups -->
  145.     <!-- Modal option chambre -->
  146.     <div class="modal fade" id="modalOptionChambre" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
  147.         <div class="modal-dialog myWidth" role="document">
  148.             <div class="modal-content">
  149.                 {# <form action=""> #}
  150.                     <div class="modal-header">
  151.                         <h5 class="modal-title" id="">Selectionner les chambres</h5>
  152.                         <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  153.                             <span aria-hidden="true">&times;</span>
  154.                         </button>
  155.                     </div>
  156.                     <div class="modal-body">                        
  157.                         {# Option chambre #}
  158.                     {% if product.typeHebergements is not null %}
  159.                         <div class="container my-3">
  160.                             <div class="row">
  161.                                 {% if product.chambres.toArray()|length > 0 %}
  162.                                     {% for index, chambre in product.chambres %}
  163.                                         {% if chambre.imageChambre %}
  164.                                             <div class="col-lg-6 col-md-6 col-10 mb-4">
  165.                                                 <img src="{{ asset(constant('App\\Services\\File::IMAGE_ROOM_OPTION_DIR') ~ chambre.imageChambre) }}" alt="" class="imageChambre">
  166.                                             </div>
  167.                                         {% else %}
  168.                                             <div class="col-md-6 col-10 mb-4"></div>
  169.                                         {% endif %}
  170.                                         <div class="col-lg-4 col-md-4 col-4 my-auto para">
  171.                                             {# <p class="para-1">Chambre n° {{ index }}</h4> #}
  172.                                             {% if chambre.typeChambre %}
  173.                                                 <p class="para-1">{{ chambre.typeChambre }}</p>
  174.                                             {% endif %}
  175.                                             <p class="para-3"> 
  176.                                                 {% for Typelits, qt in chambre.litChambreData %}
  177.                                                     
  178.                                                     {% if product.typeHebergements.slugTypeHebergm == "hotel" %}
  179.                                                         {% set nbrParticipants = 0 %}
  180.                                                         {% for lit in chambre.typeDeLits.toArray() %}
  181.                                                             {% set nbrParticipants = nbrParticipants + lit.place %}
  182.                                                         {% endfor %}
  183.                                                         <input type="hidden" name="" id="roomParticipant_{{ chambre.id}}" value="{{nbrParticipants}}">
  184.                                                     {% endif %}
  185.                                                 
  186.                                                 {# {% if chambre.nombreLits %} #}
  187.                                                     <span class="span-1">{{ qt }} {{ Typelits }}{{ qt > 1 ? "s" : '' }} </span><br>
  188.                                                 {# {% endif %} #}
  189.                                                 {% endfor %}
  190.                                             </p>
  191.                                             {# Price if hotel #}
  192.                                             {% if product.typeHebergements.slugTypeHebergm == "hotel" %}
  193.                                                 <p>Prix par nuit : {{ chambre.tarifNuit }} €</p>
  194.                                                 <input type="hidden" name="" id="priceRoom_{{ chambre.id }}" value="{{ chambre.tarifNuit }}">
  195.                                                     {# Prix par jour : {{ chambre.tarifJour }} €</p> #}
  196.                                             {% else %} {# if not hotel#}
  197.                                                 {# <p>[prixnothotel]</p> #}
  198.                                             {% endif %}
  199.                                         </div> 
  200.                                         <div class="col-lg-2 col-md-2 col-3 my-auto">
  201.                                             <div class="buttonAdd" class="form-check">
  202.                                                 <input class="form-check-input" type="checkbox" value="" id="roomButton_{{ chambre.id }}">
  203.                                                 <label class="form-check-label" for="defaultCheck1" style="line-height: initial; font-weight: bold;">
  204.                                                     Ajouter
  205.                                                 </label>
  206.                                             </div>
  207.                                         </div>
  208.                                         {# <div class="col-lg-3 col-md-3 col-3 my-auto">
  209.                                             <button class="btn btn-primary btn-sm" id="roomButton{{ roomHebergment.id }}" data-statut="ajouter" onclick="toggleRoomSelection({{ roomHebergment.id }})" style="height: auto;">
  210.                                                 Ajouter
  211.                                             </button>
  212.                                         </div> #}
  213.                                     {% endfor %}
  214.                                 {% else %}
  215.                                     <p class="mx-auto">Pas de chambre...</p>
  216.                                 {% endif %}
  217.                             </div>
  218.                         </div>
  219.                     {% endif %}
  220.                         
  221.                     </div>
  222.                     {# {% endfor %}
  223.                     {% endif %} #}
  224.                     <div class="modal-footer">
  225.                         <button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
  226.                         <button type="submit" class="btn btn-primary" id="" onclick="validemodalgroupe('chambre')">Valider</button>
  227.                     </div>
  228.                 {# </form> #}
  229.             </div>
  230.         </div>
  231.     </div>
  232.     <!-- Fin Modal option chambre -->
  233.     <!-- Modal options -->
  234.     <div class="modal fade" id="modalOption" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
  235.         <div class="modal-dialog myWidth" role="document">
  236.             <div class="modal-content">
  237.                 {# <form action=""> #}
  238.                     <div class="modal-header">
  239.                         <h5 class="modal-title" id="">Modifier les options</h5>
  240.                         <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  241.                             <span aria-hidden="true">&times;</span>
  242.                         </button>
  243.                     </div>
  244.                     <div class="modal-body">
  245.                         <div class="row">
  246.                             <input type="hidden" id="id_optionmodal">
  247.                             <input type="hidden" id="name_optionmodal">
  248.                             <input type="hidden" id="image_optionmodal">
  249.                             <div class="col-lg-6 col-12" >
  250.                                 <div id="optionsimage"></div>
  251.                             </div>
  252.                             
  253.                             <div class="col-lg-6 col-12" style="display: block">
  254.                                 <div class="optionscolor">
  255.                                     <label >couleur d'option</label>
  256.                                     <select name="" id="optionscolor" class="form-control wide" style="display: block;">
  257.                                     </select>
  258.                                 </div><br>
  259.                                 <div class="optionsform">
  260.                                     <label for="optionsform">Format</label>
  261.                                     <select name="" id="optionsform" class="form-control wide" style="display: block !important;">    
  262.                                     </select>    
  263.                                 </div><br>
  264.                                 <div class="optionsfinition">
  265.                                     <label for="optionsfinition">Finition :</label>
  266.                                     <select name="" id="optionsfinition" class="form-control wide" style="display: block !important;">
  267.                                     </select>
  268.                                 </div><br>
  269.                                 <div class="optionspapier">
  270.                                     <label for="optionspapier">Papier :</label>
  271.                                     <select name="" id="optionspapier" class="form-control wide"style="display: block !important;">
  272.                                     </select>
  273.                                 </div><br>
  274.                                 <div class="optionsetiquette">
  275.                                     <label for="optionsetiquette">Étiquette :</label>
  276.                                     <select name="" id="optionsetiquette" class="form-control wide" style="display: block !important;">    
  277.                                     </select>
  278.                                 </div><br>
  279.                                 <div class="optionsruban">
  280.                                     <label for="optionsruban">Ruban: :</label>
  281.                                     <select name="" id="optionsruban" class="form-control wide" style="display: block !important;">    
  282.                                     </select>
  283.                                 </div><br>
  284.                                 <div class="optionsquantite">
  285.                                 <label for="optionsquantite">Quantité :</label>
  286.                                 <select name="" id="optionsquantite" class="form-control wide" style="display: block !important;">
  287.                                 </select>
  288.                                 </div><br>
  289.                             </div>
  290.                         </div>
  291.                     </div>
  292.                     {# {% endfor %}
  293.                     {% endif %} #}
  294.                     <div class="modal-footer">
  295.                         <button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
  296.                         <button type="submit" class="btn btn-primary" id="validemodaloption" onclick="validemodaloption()">Ok</button>
  297.                     </div>
  298.                 {# </form> #}
  299.             </div>
  300.         </div>
  301.     </div>
  302.     <!-- Fin Modal options -->
  303.     <!-- Modal Reductions -->
  304.     <div class="modal fade" id="modalReduction" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
  305.             <div class="modal-dialog myWidth" role="document">
  306.                     <div class="modal-content">
  307.                             <div class="modal-header">
  308.                                     <h5 class="modal-title" id="">Les réductions disponibles pour cet hébergement</h5>
  309.                                     <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  310.                                             <span aria-hidden="true">&times;</span>
  311.                                     </button>
  312.                             </div>
  313.                             <div class="modal-body">
  314.                                     {% for reductionData in product.productReductions %}
  315.                                         <div class="reduction-item">
  316.                                             <p class="p-3">
  317.                                                 - Recevez une réduction de <b>{{ reductionData.reduction }}%</b> 
  318.                                                 si vous faites une réservation à partir de 
  319.                                                 <b>{{ reductionData.startDay }} jours</b>.
  320.                                             </p>
  321.                                         </div>
  322.                                     {% endfor %}
  323.                             </div>
  324.                     </div>
  325.             </div>
  326.     </div>
  327.     <!-- Fin Modal Reductions -->
  328.     <!-- Modal Tarif Degressif -->
  329.     <div class="modal fade" id="modalTarif" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle"
  330.         aria-hidden="true">
  331.         <div class="modal-dialog myWidth" role="document">
  332.             <div class="modal-content">
  333.                 <div class="modal-header">
  334.                     <h5 class="modal-title" id="">Les tarifs degressifs disponibles pour cette activités</h5>
  335.                     <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  336.                         <span aria-hidden="true">&times;</span>
  337.                     </button>
  338.                 </div>
  339.                 <div class="modal-body">
  340.                     {% for tarif in product.tarifDegressifs %}
  341.                     <div class="tarif-item">
  342.                         <p class="p-3">
  343.                             - Si vous êtes à partir de <b>{{ tarif.nbrPers }} personnes</b>,
  344.                             vous recevriez une réduction de
  345.                             <b>{{ tarif.reduction }}%</b>.
  346.                         </p>
  347.                     </div>
  348.                     {% endfor %}
  349.                 </div>
  350.             </div>
  351.         </div>
  352.     </div>
  353.     <!-- Fin Modal Reductions -->
  354.     <!-- Modal caracteristique hebergement -->
  355.     <div class="modal fade" id="modalCarateristiqHeb" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle"
  356.         aria-hidden="true">
  357.         <div class="modal-dialog modal600" role="document">
  358.             <div class="modal-content">
  359.                 <div class="modal-header">
  360.                     <h5 class="modal-title" id="">Caractéristiques de l'hébergement</h5>
  361.                     <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  362.                         <span aria-hidden="true">&times;</span>
  363.                     </button>
  364.                 </div>
  365.                 <div class="modal-body">
  366.                         <div class="card-body info-hebegement">
  367.                             {% set totalChambre = 0 %}
  368.                             {% if product.chambres.toArray() != [] %} {# If the product have chambre #}    
  369.                                 {% for chambre in product.chambres %}
  370.                                     {% set totalChambre = totalChambre + chambre.NumChambre %}
  371.                                 {% endfor %}
  372.                             {% else %}
  373.                                 {% set totalChambre = product.nbChambre %}        
  374.                             {% endif %}
  375.                             
  376.                             <p class="card-text"><i class="fas fa-home" style="color:#FE7708"></i>  Nombre total de chambres: 
  377.                             <span style="color:#0DE8C7">{{ totalChambre }}</span> 
  378.                             </p>
  379.                             {% if product.securities.toArray() != [] %}
  380.                             <p class="card-text"><i class="fas fa-shield-alt" style="color:#FE7708"></i> Sécurité: 
  381.                             {% for securt in product.securities.toArray() %}
  382.                                 <span style="color:#0DE8C7"> {{ securt.labels }} </span>
  383.                                 {% if not loop.last %}, {% endif %}
  384.                             {% endfor %}
  385.                             </p>
  386.                             {% endif %}
  387.                             {% if product.typeLocalisations.toArray() != [] %}
  388.                             <p class="card-text"><i class="fas fa-map-marker-alt" style="color:#FE7708"></i> Localisation:
  389.                             {% for typeLocalisation in product.typeLocalisations.toArray() %}
  390.                                 <span style="color:#0DE8C7">
  391.                                     {{ typeLocalisation.labels }}
  392.                                 </span> {% if not loop.last %}, {% endif %}
  393.                             {% endfor %}
  394.                             </p>
  395.                             {% endif %}
  396.                             {% if product.equipment.toArray() != [] %}
  397.                             <p class="card-text"><i class="fas fa-tools" style="color:#FE7708"></i> Équipements: 
  398.                             {% for equipt in product.equipment.toArray() %}
  399.                                 <span style="color:#0DE8C7"> {{ equipt.labels }} </span>
  400.                                 {% if not loop.last %}, {% endif %}
  401.                             {% endfor %}
  402.                             </p>
  403.                             {% endif %}
  404.                             {% if product.caracteristics.toArray() != [] %}
  405.                             <p class="card-text"><i class="fas fa-cogs" style="color:#FE7708"></i> Confort: 
  406.                             {% for caract in product.caracteristics.toArray() %}
  407.                                 <span style="color:#0DE8C7"> {{ caract.labels }} </span>
  408.                                 {% if not loop.last %}, {% endif %}
  409.                             {% endfor %}
  410.                             </p>
  411.                             {% endif %}
  412.                             {% if product.langueHotes.toArray() != [] %}
  413.                             <p class="card-text"><i class="fa fa-language" style="color:#FE7708"></i> Langage propriétaire:
  414.                             {% for langue in product.langueHotes.toArray() %}
  415.                                 <span style="color:#0DE8C7"> {{ langue.labels }} </span>
  416.                                 {% if not loop.last %}, {% endif %}
  417.                             {% endfor %}
  418.                             </p>
  419.                             {% endif %}
  420.                             {% if product.equipementsCuisines.toArray() != [] %}
  421.                             <p class="card-text"><i class="fas fa-drumstick-bite" style="color:#FE7708"></i> Equipements de cuisine:
  422.                             {% for equipementCuisine in product.equipementsCuisines.toArray() %}
  423.                                 <span style="color:#0DE8C7"> {{ equipementCuisine.labels }} </span>
  424.                                 {% if not loop.last %}, {% endif %}
  425.                             {% endfor %}
  426.                             </p>
  427.                             {% endif %}
  428.                             {% if product.salleDeBains.toArray() != [] %}
  429.                             <p class="card-text"><i class="fas fa-sink" style="color:#FE7708"></i> Salle de bain:
  430.                             {% for oneSalleDeBain in product.salleDeBains.toArray() %}
  431.                                 <span style="color:#0DE8C7"> {{ oneSalleDeBain.labels }} </span>
  432.                                 {% if not loop.last %}, {% endif %}
  433.                             {% endfor %}
  434.                             </p>
  435.                             {% endif %}
  436.                             {% if product.accessoiresDeChambres.toArray() != [] %}
  437.                             <p class="card-text"><i class="fas fa-person-booth" style="color:#FE7708"></i> Accessoires de chambres:
  438.                             {% for oneAccessoiresDeChambres in product.accessoiresDeChambres.toArray() %}
  439.                                 <span style="color:#0DE8C7"> {{ oneAccessoiresDeChambres.labels }} </span>
  440.                                 {% if not loop.last %}, {% endif %}
  441.                             {% endfor %}
  442.                             </p>
  443.                             {% endif %}
  444.                             {% if product.mobilierExterieurs.toArray() != [] %}
  445.                             <p class="card-text"><i class="fas fa-seedling" style="color:#FE7708"></i> Mobilier extérieur:
  446.                             {% for oneMobilierExterieurs in product.mobilierExterieurs.toArray() %}
  447.                                 <span style="color:#0DE8C7"> {{ oneMobilierExterieurs.labels }} </span>
  448.                                 {% if not loop.last %}, {% endif %}
  449.                             {% endfor %}
  450.                             </p>
  451.                             {% endif %}
  452.                         </div>
  453.                     
  454.                 </div>
  455.             </div>
  456.         </div>
  457.     </div>
  458.     <!-- Fin Modal caracteristique hebergement -->    
  459.     <!-- Modal CGV-->
  460.     {% if (product.company.conditionsVente|raw)  is null or (product.company.conditionsVente|raw == '') %}
  461.         <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
  462.             <div class="modal-dialog modal-xl" role="document">
  463.                 <div class="modal-content">
  464.                 <div class="modal-header">
  465.                     <h5 class="modal-title" id="exampleModalCenterTitle">Condition générale de vente</h5>
  466.                     <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  467.                     <span aria-hidden="true">&times;</span>
  468.                     </button>
  469.                 </div>
  470.                 <div class="modal-body">
  471.                         Veulliez contactez votre prestataire pour connaitre la condition de vente
  472.                 </div>
  473.                 </div>
  474.             </div>
  475.         </div>
  476.     {% else %}
  477.         <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
  478.             <div class="modal-dialog modal-xl" role="document">
  479.                 <div class="modal-content">
  480.                 <div class="modal-header">
  481.                     <h5 class="modal-title" id="exampleModalCenterTitle">Condition générale de vente</h5>
  482.                     <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  483.                     <span aria-hidden="true">&times;</span>
  484.                     </button>
  485.                 </div>
  486.                 <div class="modal-body">
  487.                         {{ product.company.conditionsVente | raw }}
  488.                 </div>
  489.                 </div>
  490.             </div>
  491.         </div>                    
  492.     {% endif %}
  493.     <!-- Fin Modal CGV-->
  494.     <div class="list-single-carousel" style="margin-top:90px; position: relative">
  495.         <div class="owl-carousel owl-theme owl-second">
  496.             {% for photo in product.photos %}
  497.                 <div class="item" style="height:400px;background:url({{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ photo.url) }})no-repeat center;background-size: cover" alt="{{ photo.url }}"></div>
  498.             {% endfor %}
  499.         </div>
  500.         <div class="col-md-2 col-12 btnMedia">
  501.             <div class="vendor-head text-xl-right row">
  502.                 {% if product.photos is not empty %}
  503.                     <div class="col-md-12 mb-3">
  504.                         <a href="#" class="btn btn-default btn-sm ml-2 text-center" id="open-popup-images">Voir les photos</a>
  505.                     </div>
  506.                 {% endif %}
  507.                 {% if product.youtubeVideo %}
  508.                     <div class="col-md-12">
  509.                         <a class="popup-youtube btn btn-default btn-sm ml-2 text-center" href="{{ product.youtubeVideo }}">Voir la vidéo</a>
  510.                     </div>
  511.                 {% endif %}
  512.             </div>
  513.         </div>
  514.     </div>
  515.     <div id="search-date">
  516.         <input type="hidden" name="search-date" id="search-date-input" value={{ dateSearch|default('') }}>
  517.     </div>
  518.     {% if isPromoAdmin %}
  519.     <div class="bannier-promo mt-5">
  520.         <div class="cont container">
  521.             Promotion
  522.             <span class="percent">{{ isPromoAdmin.value }}%</span>
  523.             {# <svg class="outlined-text" width="80%" height="200" viewBox="0 0 800 200" preserveAspectRatio="xMidYMid meet">
  524.                 <text x="50" y="140">-20%</text>
  525.             </svg> #}
  526.             de commission en cours jusqu'au <span class="date-fin-prom">{{ isPromoAdmin.endAt|format_date('long', locale='fr') }}</span>
  527.             pour tous les serveices
  528.         </div>
  529.     </div>
  530.     {% endif %}    
  531.     <div class="list-single-second mt-1">
  532.         <div class="container">
  533.             <div class="row">
  534.                 <div class="col-md-7">
  535.                     <h2 class="mb10 card titreProduct">{{ product.name }}</h2>
  536.                 </div>
  537.                 <div class="col-md-5">
  538.                     <div class="mb-5 text-md-right">
  539.                         <p class="text-black-50">
  540.                             <span class="mr-2">
  541.                                 <i class="fas fa-map-marker-alt "></i>
  542.                             </span>
  543.                             {% for department in product.departments %}
  544.                                 {{ department.name }}
  545.                                 {% if not loop.last %},
  546.                                 {% endif %}
  547.                             {% else %}
  548.                                 Dans toute la France
  549.                             {% endfor %}
  550.                             <br>Service de la catégorie
  551.                             <a href="{{ path('front_product_subcategory', {'subCategorySlug': product.subCategories.first.subCategorySlug}) }}" class="btn-default-link">{{ product.subCategories.first.name }}</a>
  552.                         </p>
  553.                         
  554.                         
  555.                     </div>
  556.                 </div>
  557.             </div>
  558.             
  559.             <div class="vendor-meta bg-white border m-0 ">
  560.                 <div class="vendor-meta-item vendor-meta-item-bordered">
  561.                     {% if product.typeHebergements is null or product.typeHebergements.slugTypeHebergm != 'hotel' %}
  562.                             {% set today = "now"|date('Y-m-d') %}
  563.                             {% set customPriceFound = false %}
  564.                             {% set customPrice = 0 %}
  565.                             {% set currentPrice = 0 %}
  566.                             {% set price = 0 %}
  567.                             {% set difference = null %}
  568.                             {% set reductionPercentage = 0 %}
  569.                             {% set duration = null %}
  570.                             {% set countdown = null %}
  571.                             {% set reductionValid = false %}
  572.                             
  573.                             {% for dayPrice in product.dayPrice %}
  574.                                 {% set formattedDate = dayPrice.customDate|date('Y-m-d') %}
  575.                                 {% if formattedDate == today %}
  576.                                     {% set customPriceFound = true %}
  577.                                     {% set customPrice = dayPrice.customPrice|number_format(2, '.', '') %}
  578.                                 {% endif %}
  579.                             {% endfor %}
  580.                             
  581.                             {% set month = "now"|date('n') %}
  582.                                 {% if month >= 3 and month <= 5 %}
  583.                                     {% set springPrice = product.springPrice %}
  584.                                     {% if springPrice is not null %}
  585.                                         {% set currentPrice = product.springPrice %}
  586.                                     {% else %}
  587.                                         {% set currentPrice = 0 %}                                                                
  588.                                     {% endif %}
  589.                                 {% elseif month >= 6 and month <= 8 %}
  590.                                     {% set summerPrice = product.summerPrice %}
  591.                                     {% if summerPrice is not null %}
  592.                                         {% set currentPrice = product.summerPrice %}
  593.                                     {% else %}
  594.                                         {% set currentPrice = 0 %}                                                                
  595.                                     {% endif %}
  596.                                 {% elseif month >= 9 and month <= 11 %}
  597.                                     {% set autumnPrice = product.autumnPrice %}
  598.                                     {% if autumnPrice is not null %}
  599.                                         {% set currentPrice = product.autumnPrice %}
  600.                                     {% else %}
  601.                                         {% set currentPrice = 0 %}                                                                
  602.                                     {% endif %}
  603.                                 {% else %}
  604.                                     {% set winterPrice = product.winterPrice %}
  605.                                     {% if winterPrice is not null %}
  606.                                         {% set currentPrice = product.winterPrice %}
  607.                                     {% else %}
  608.                                         {% set currentPrice = 0 %}                                                                
  609.                                     {% endif %}
  610.                                 {% endif %}
  611.                                 {% set day = "now"|date('N') %}
  612.                                 {% if day == 6 or day == 7 %}
  613.                                     {% set weekEndPrice = product.weekEndPrice %}
  614.                                     {% if weekEndPrice is not null %}
  615.                                         {% set currentPrice = product.weekEndPrice %}    
  616.                                     {% else %}
  617.                                         {% set currentPrice = 0 %}                                                            
  618.                                     {% endif %}
  619.                                 {% endif %}
  620.                                 {% set periodPrice = 0 %}
  621.                                 {% for period in product.periodPrice.toArray() %}
  622.                                     {% set startDate = period.startDate|date("Y-m-d") %}
  623.                                     {% set endDate = period.endDate|date("Y-m-d") %}
  624.                                     {% if today >= startDate and today <= endDate and period.price is not null %}
  625.                                         {% set periodPrice = period.price %}
  626.                                     {% else %}
  627.                                         {% set currentPrice = 0 %}
  628.                                     {% endif %}
  629.                                 {% endfor %}
  630.                                 {% if periodPrice != 0 %}
  631.                                     {% set currentPrice = periodPrice %}
  632.                                 {% endif %}
  633.                             {% if customPriceFound and customPrice !=0 %}
  634.                                 {% set price = customPrice %}
  635.                             {% elseif currentPrice != 0 and currentPrice is not null and customPrice == 0 %}
  636.                                 {% set price = currentPrice %}
  637.                             {% elseif currentPrice == 0 or currentPrice is null and customPrice == 0 %}
  638.                                 {% set price = product.price %}
  639.                             {% endif %} 
  640.                             {% for autoReduce in product.productAutoReduction.toArray %}
  641.                                 {% if autoReduce.createdAt is not null and autoReduce.countdown is not null and autoReduce.duration is not null  and autoReduce.reductionPercentage is not null %}
  642.                                     {% set difference = date(today).diff(autoReduce.createdAt).days %}
  643.                                     {% set duration = autoReduce.duration %}
  644.                                     {% set countdown = autoReduce.countdown %}
  645.                                     {% set reductionPercentage = autoReduce.reductionPercentage %}
  646.                                     {% set durationout = duration + countdown %}
  647.                                     {# {{ dump(countdown,difference,durationout,duration) }} #}
  648.                                     {% set reductionValid = difference > countdown and difference <= durationout %}
  649.                                 {% endif %}
  650.                             {% endfor %}
  651.                             {% if product.company.type != "service" %}
  652.                                 <span class="vendor-price">
  653.                                     {{ product.price|number_format(2, '.', '') }}€
  654.                                 </span>
  655.                             {% elseif reductionValid %}
  656.                                 {% set priceReduced = price - ((price * reductionPercentage) / 100) %}
  657.                                 <span class="vendor-price">
  658.                                     {{ priceReduced|number_format(2, '.', '') }}€
  659.                                 </span>                                                        
  660.                             {% else %}
  661.                                 <span class="vendor-price">
  662.                                     {{ price|number_format(2, '.', '') }}€
  663.                                 </span>
  664.                             {% endif %}
  665.                     <span class="vendor-text">Prix</span>
  666.                     {% else %}
  667.                         {% set lengthRoomNight = 0 %}
  668.                         {% set statusByNight = false %}
  669.                         {% set allPriceByNight = 0 %}
  670.                         {% set lengthRoomDay = 0 %}
  671.                         {% set statusByDay = false %}
  672.                         {% set allPriceByDay = 0 %}
  673.                         {% if product.chambres is defined %}
  674.                             {% for roomOption in product.chambres.toArray %}
  675.                                 {% if roomOption.tarifNuit is defined %}
  676.                                     {% set lengthRoomNight = lengthRoomNight + 1 %}
  677.                                     {% set statusByNight = true %}
  678.                                     {% set allPriceByNight = allPriceByNight + roomOption.tarifNuit %}
  679.                                 {% endif %}
  680.                                 {% if roomOption.tarifJour is not null %}
  681.                                     {% set lengthRoomDay = lengthRoomDay + 1 %}
  682.                                     {% set statusByDay = true %}
  683.                                     {% set allPriceByDay = allPriceByDay + roomOption.tarifJour %}
  684.                                 {% endif %}
  685.                             {% endfor %}
  686.                             {% if statusByDay or statusByNight %}
  687.                                 <p>Prix moyen d'une chambre:</p>
  688.                             {% endif %}
  689.                             {% if statusByNight %}
  690.                                 <li>par nuit : <strong>{{ (allPriceByNight / lengthRoomNight)|number_format(2, '.') }}€</strong></li>
  691.                                 {# <li>Prix par nuit : <strong>{{ product.price|number_format(2, '.') }}€</strong></li> #}
  692.                             {% endif %}
  693.                             {% if statusByDay %}
  694.                                 {# <li>par jour : <strong>{{ (allPriceByDay / lengthRoomDay)|number_format(2, '.') }}€</strong></li> #}
  695.                                 {# <li>Prix de séjour : <strong>{{ product.price|number_format(2, '.') }}€</strong></li> #}
  696.                             {% endif %}
  697.                         {% endif %}
  698.                         {% if not statusByNight and not statusByDay %}
  699.                             <li>Prix : <strong>Veuillez definir le prix de votre hotel</strong></li>
  700.                         {% endif %}
  701.                             {# <span class="vendor-text">Prix</span>
  702.                             <span class="vendor-price">
  703.                                 {{ product.price|number_format(2, '.', '') }}€
  704.                             </span> #}
  705.                     {% endif %}
  706.                 </div>
  707.                 <div class="vendor-meta-item vendor-meta-item-bordered">
  708.                     {% if product.quantity %}
  709.                         <span class="vendor-guest">
  710.                             {{ product.quantity }}
  711.                         </span>
  712.                         <span class="vendor-text">Quantité restante</span>
  713.                     {% endif %}
  714.                 </div>
  715.                 {% set notesProduct = 0 %}
  716.                 {% for avi in product.avis %}
  717.                     {% set notesProduct = notesProduct + avi.globalNote %}
  718.                 {% endfor %}
  719.                 {% set noteTotalProduct = (notesProduct > 0) ? notesProduct / product.avis|length : 0 %}
  720.                 <div class="vendor-meta-item vendor-meta-item-bordered">
  721.                     <span class="rating-star">
  722.                         {% for i in 1..5 %}
  723.                             {% if i < noteTotalProduct %}
  724.                                 <i class="fa fa-star rated"></i>
  725.                             {% else %}
  726.                                 <i class="fa fa-star rate-mute"></i>
  727.                             {% endif %}
  728.                         {% endfor %}
  729.                     </span>
  730.                     <span class="rating-count vendor-text">({{ product.avis|length }})</span>
  731.                 </div>
  732.             </div>
  733.         </div>
  734.     </div>
  735.     <!-- /.page-header -->
  736.     <!-- page-header -->
  737.     {# Zoom img option #}
  738.     {% if product.company.isConfirmed %}
  739.         {% if product.productOptions %}
  740.             {% for option in product.productOptions %}
  741.                 {% if option.image1 %}
  742.                     <img id="{{ option.id }}btn1img" class="imgZoomOption" src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ option.image1) }}">
  743.                 {% endif %}
  744.                 {% if option.image2 %}
  745.                     <img id="{{ option.id }}btn2img" class="imgZoomOption" src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ option.image2) }}">
  746.                 {% endif %}
  747.             {% endfor %}
  748.         {% endif %}
  749.     {% endif %}
  750.     <div class="backgroundTrans"></div>
  751.     <button class="exitZoomOpt">X</button>
  752.     {# Zoom img option #}
  753.     {# Pannier #}
  754.     {# <div class="tab-pane fade active show" id="allguest" role="tabpanel" aria-labelledby="allguest-tab" style="width:100%">
  755.         <div class="card-body">
  756.             <h3>Mon panier ({{ products|length }} produit{% if products|length > 1 %}s{% endif %})</h3>
  757.         </div>
  758.         <div class="table-responsive" style="width:100%">
  759.             <table class="table mt-4">
  760.                 <thead>
  761.                 <tr>
  762.                     <th class="wedding-budget-event">Designation</th>
  763.                     <th class="wedding-budget-estimate">Aperçu</th>
  764.                     <th class="wedding-budget-estimate">Prix à l'unité</th>
  765.                     <th class="wedding-budget-actual">Quantité</th>
  766.                     <th class="wedding-budget-paid">Total produit</th>
  767.                     <th class="wedding-budget-paid"></th>
  768.                 </tr>
  769.                 </thead>
  770.                 <tbody>
  771.                 {% if pack %}
  772.                     <tr>
  773.                         <td>{{ pack.name }}</td>
  774.                         <td><img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR')) ~ pack.image }}" style="height:50px;border-radius:2px"></td>
  775.                         <td><span class="total-amount">{{ pack.price|number_format(2, '.') }}€</span></td>
  776.                         <td>1</td>
  777.                         <td><span class="total-amount">{{ pack.price|number_format(2, '.') }}€</span></td>
  778.                         <td class="paid-total"><a href="{{ path('front_my_basket_remove_pack', {'id': pack.id}) }}" class="btn btn-rounded btn-default">Supprimer du panier</a></td>
  779.                     </tr>
  780.                 {% endif %}
  781.                 {% set TotalPriceProduct = 0 %}
  782.                 {% for product in products %}
  783.                     <tr class="border-bottom">
  784.                         <td>{{ product.product.name }}
  785.                             {% set isClothing = null %}
  786.                             {% for subcategory in product.product.subCategories %}
  787.                                 {% if subcategory.isClothing %}
  788.                                     {% set isClothing = true %}
  789.                                 {% endif %}
  790.                             {% endfor %}
  791.                             {% if isClothing %}
  792.                                 <br><strong>Taille : {{ product.size }}</strong>
  793.                             {% endif %}
  794.                             {% set isColor = null %}
  795.                             {% for subcategory in product.product.subCategories %}
  796.                                 {% if subcategory.isColor %}
  797.                                     {% set isColor = true %}
  798.                                 {% endif %}
  799.                             {% endfor %}
  800.                             {% if isColor %}
  801.                                 <br><strong>Couleur : {{ product.color }}</strong>
  802.                             {% endif %}
  803.                         </td>
  804.                         <td><img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR')) ~ product.product.photos.first.url }}" style="height:50px;border-radius:2px"></td>
  805.                         {% if product.promo %}
  806.                             {% set ProductPrice = product.product.price - product.promo %}
  807.                         {% else %}
  808.                             {% set ProductPrice = product.product.price %}
  809.                         {% endif %}
  810.                         <td class="estimate-total"><span class="total-amount">{% if product.promo %}<small><del>{{ product.product.price|number_format(2, '.') }}€</del></small> <strong>{{ ProductPrice|number_format(2, '.') }}€</strong>{% else %}{{ ProductPrice|number_format(2, '.') }}€{% endif %}</span><br>{% if product.promo %}(code promo -{{ product.promo }}€){% endif %}</td>
  811.                         <td class="actual-total">{{ product.quantity }}</td>
  812.                         {% set TotalWithQuantity = product.quantity * ProductPrice %}
  813.                         {% set TotalPriceProduct = TotalPriceProduct + TotalWithQuantity %}
  814.                         <td class="paid-total"><span class="total-amount">{{ TotalWithQuantity|number_format(2, '.') }}€</span></td>
  815.                         <td class="paid-total"><a href="{{ path('front_my_basket_remove_product', {'id': product.product.id}) }}" class="btn btn-rounded btn-default">Supprimer du panier</a></td>
  816.                     </tr>
  817.                     {% for option in product.options %}
  818.                         {% set optionObject = filter_service.getProductOption(option) %}
  819.                         {% set TotalPriceProduct = TotalPriceProduct + optionObject.price %}
  820.                         <tr class="border-bottom" style="background:#fff">
  821.                             <td class="pl-4"><strong>Option :</strong> {{ optionObject.name }}</td>
  822.                             <td></td>
  823.                             <td class="estimate-total"><span class="total-amount">{{ optionObject.price|number_format(2, '.') }}€</span></td>
  824.                             <td class="actual-total"></td>
  825.                             <td class="paid-total"><span class="total-amount">{{ optionObject.price|number_format(2, '.') }}€</span></td>
  826.                             <td class="paid-total"></td>
  827.                         </tr>
  828.                     {% endfor %}
  829.                 {% endfor %}
  830.                 {% if pack or products is not empty %}
  831.                     <tr>
  832.                         <td>TOTAL :</td>
  833.                         <td></td>
  834.                         <td></td>
  835.                         <td></td>
  836.                         {% if pack %}
  837.                             {% set TotalPriceProduct = TotalPriceProduct + pack.price  %}
  838.                         {% endif %}
  839.                         <td>{{ TotalPriceProduct|number_format(2, '.') }}€</td>
  840.                     </tr>
  841.                 {% endif %}
  842.                 {% if not pack and products is empty %}
  843.                     <tr><td>Aucun produit ajouté au panier</td></tr>
  844.                 {% endif %}
  845.                 </tbody>
  846.             </table>
  847.         </div>
  848.         <div class="card-footer" style="height:70px">
  849.             {% if products|length > 0 or pack is not null %}
  850.                 {% if is_granted('ROLE_ENTERPRISE') == false %}
  851.                 <div class="float-left">
  852.                     {{ form_start(form, {'attr': {'class': 'form-inline'}}) }}
  853.                     <div class="form-group">
  854.                         {{ form_widget(form.codePromo) }}
  855.                     </div>
  856.                     <button type="submit" class="btn btn-default ml-3">Valider</button>
  857.                     {{ form_end(form) }}
  858.                     {% if isMessagePromo is defined and isMessagePromo %}
  859.                         <span style="color:green">Code promo valide !</span>
  860.                     {% endif %}
  861.                 </div>
  862.                 <div class="float-right">
  863.                     <a href="{{ path('front_command_livraison') }}" class="btn btn-primary">Commander</a>
  864.                 </div>
  865.                 {% endif %}
  866.             {% endif %}
  867.         </div>
  868.     </div> #}
  869.     {# Pannier #}
  870.     <div class="vendor-content-wrapper">
  871.         <div class="container">
  872.             <div class="row">
  873.                 <div
  874.                     class="col-xl-8 col-lg-9 col-md-9 col-sm-12 col-12">
  875.                     <!--vendor-details -->
  876.                     {# get qt max participant #}
  877.                     {% if product.typeHebergements is not null %}
  878.                         {% if product.typeHebergements.slugTypeHebergm != 'hotel' %}
  879.                             
  880.                             {% set nbrParticipants = 0 %}
  881.                             {% for chambre in product.chambres %}
  882.                                 {% for lit in chambre.typeDeLits.toArray() %}
  883.                                     {% set nbrParticipants = nbrParticipants + lit.place %}    
  884.                                 {% endfor %}                        
  885.                             {% endfor %}    
  886.                             <input id="participantsMax" type="hidden" name="" value={{ nbrParticipants }}>
  887.                         {% else %}
  888.                             <input id="participantsMax" type="hidden" name="participantsMax" min="1" value=1>
  889.                         {% endif %}
  890.                     {% endif %}
  891.                     <div style="overflow: hidden">
  892.                         <div class="card border card-shadow-none">
  893.                             <h3 class="card-header bg-white">À propos</h3>
  894.                             <div class="card-body card-box overflow-hidden">
  895.                                 <!--/.vendor-details -->
  896.                                 <!--vendor-description -->
  897.                                     {% if product.company.isEditorGuide %}
  898.                                         {% if product.productDescription and product.template %}
  899.                                         {{ include('front/html/template/template'~product.template~'.html.twig') }}
  900.                                     {% else %}
  901.                                         <p class="lead">{{ product.text|raw }}</p>
  902.                                     {% endif %}
  903.                                 {% else %}
  904.                                     <p class="lead">{{ product.text|raw }}</p>
  905.                                 {% endif %}
  906.                             </div>
  907.                         </div>
  908.                         <!--vendor-description -->
  909.                         <!-- Affichage options -->
  910.                         {% set optiongroups = product.productOptions.toArray %}
  911.                         {% if optiongroups != [] %}                        
  912.                             {% include "front/product/options/option.html.twig" with {'optiongroups' : optiongroups} %}                        
  913.                         {% endif %}
  914.                         <!-- review-block -->
  915.                         {% for message in app.flashes('success') %}
  916.                             <div class="alert alert-success">
  917.                                 {{ message }}
  918.                             </div>
  919.                         {% endfor %}
  920.                         <div id="reviews">
  921.                             <div class="card border card-shadow-none ">
  922.                                 <div class="card-header bg-white">
  923.                                     <h3 class="mb0 d-inline-block" id="global_notes">Notes</h3>
  924.                                     {% if app.user and app.user.roles[0] == 'ROLE_USER' %}
  925.                                         {% set tab = filter_service.getLocationUse(app.user, product) %}
  926.                                         {% if tab is not null and "now"|date("U") > tab.endAt|date("U") %}
  927.                                             {% set ifAvis = filter_service.getAvisUserExist(app.user, product) %}
  928.                                             {% if ifAvis == false %}
  929.                                                 {# A afficher seulement en fin de séjour #}
  930.                                                 <a href="#review-form" class="btn btn-default btn-sm float-right d-inline-block">Laissez un avis</a>
  931.                                             {% endif %}
  932.                                         {% endif %}
  933.                                     {% endif %}
  934.                                 </div>
  935.                                 <div class="card-body">
  936.                                     <div class="review-block">
  937.                                         <div class="row">
  938.                                             <div
  939.                                                 class="col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12">
  940.                                                 <!-- review-sidebar -->
  941.                                                 <div class="review-sidebar">
  942.                                                     {% if notes['globalNote']['count'] > 0 %}
  943.                                                         {% set globalNote = notes['globalNote']['totalNote'] / notes['globalNote']['count'] %}
  944.                                                     {% else %}
  945.                                                         {% set globalNote = 0 %}
  946.                                                     {% endif %}
  947.                                                     <div class="review-total">{{ globalNote|number_format(1, '.') }}</div>
  948.                                                     <div class="review-text">moyenne des notes</div>
  949.                                                     <span class="rated">
  950.                                                         {% for i in 1..5 %}
  951.                                                             {% if i <= globalNote|round %}
  952.                                                                 <i class="fa fa-star"></i>
  953.                                                             {% else %}
  954.                                                                 <i class="far fa-star"></i>
  955.                                                             {% endif %}
  956.                                                         {% endfor %}
  957.                                                     </span>
  958.                                                     {% if notes['globalNote']['count'] %}
  959.                                                         <p>Note de
  960.                                                             {{ globalNote|number_format(1, '.') }}
  961.                                                             basée sur
  962.                                                             {{ notes['globalNote']['count'] }}
  963.                                                             note
  964.                                                             {% if notes['globalNote']['count'] > 1 %}s
  965.                                                             {% endif %}.</p>
  966.                                                     {% else %}
  967.                                                         <p>Aucune note pour le moment</p>
  968.                                                     {% endif %}
  969.                                                 </div>
  970.                                                 <!-- /.review-sidebar -->
  971.                                             </div>
  972.                                             <div class="col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12">
  973.                                                 <div
  974.                                                     class="review-box">
  975.                                                     <!-- review-list -->
  976.                                                     <div class="review-list">
  977.                                                         {% set globalQualityService = notes['qualityService']['count'] ? notes['qualityService']['totalNote'] / notes['qualityService']['count'] : notes['qualityService']['count'] %}
  978.                                                         <div class="review-for">Qualité du service</div>
  979.                                                         <div class="review-rating">
  980.                                                             <span class="rated">
  981.                                                                 {% for i in 1..5 %}
  982.                                                                     {% if i <= globalQualityService %}
  983.                                                                         <i class="fa fa-star"></i>
  984.                                                                     {% else %}
  985.                                                                         <i class="far fa-star"></i>
  986.                                                                     {% endif %}
  987.                                                                 {% endfor %}
  988.                                                             </span>
  989.                                                         </div>
  990.                                                         <div class="review-number">{{ globalQualityService|number_format(1, '.') }}</div>
  991.                                                     </div>
  992.                                                     <!-- /.review-list -->
  993.                                                     <!-- review-list -->
  994.                                                     <div class="review-list">
  995.                                                         {% set globalPrice = notes['price']['count'] ? notes['price']['totalNote'] / notes['price']['count'] : notes['price']['count'] %}
  996.                                                         <div class="review-for">Prix</div>
  997.                                                         <div class="review-rating">
  998.                                                             <span class="rated">
  999.                                                                 {% for i in 1..5 %}
  1000.                                                                     {% if i <= globalPrice %}
  1001.                                                                         <i class="fa fa-star"></i>
  1002.                                                                     {% else %}
  1003.                                                                         <i class="far fa-star"></i>
  1004.                                                                     {% endif %}
  1005.                                                                 {% endfor %}
  1006.                                                             </span>
  1007.                                                         </div>
  1008.                                                         <div class="review-number">{{ globalPrice|number_format(1, '.') }}</div>
  1009.                                                     </div>
  1010.                                                     <!-- /.review-list -->
  1011.                                                     <!-- review-list -->
  1012.                                                     <div class="review-list">
  1013.                                                         {% set globalSpeed = notes['speed']['count'] ? notes['speed']['totalNote'] / notes['speed']['count'] : notes['speed']['count'] %}
  1014.                                                         <div class="review-for">Rapidité</div>
  1015.                                                         <div class="review-rating">
  1016.                                                             <span class="rated">
  1017.                                                                 {% for i in 1..5 %}
  1018.                                                                     {% if i <= globalSpeed %}
  1019.                                                                         <i class="fa fa-star"></i>
  1020.                                                                     {% else %}
  1021.                                                                         <i class="far fa-star"></i>
  1022.                                                                     {% endif %}
  1023.                                                                 {% endfor %}
  1024.                                                             </span>
  1025.                                                         </div>
  1026.                                                         <div class="review-number">{{ globalSpeed|number_format(1, '.') }}</div>
  1027.                                                     </div>
  1028.                                                     <div class="review-list">
  1029.                                                         {% set globalConformite = notes['conformDescription']['count'] ? notes['conformDescription']['totalNote'] / notes['conformDescription']['count'] : notes['conformDescription']['count'] %}
  1030.                                                         <div class="review-for">Description conforme</div>
  1031.                                                         <div class="review-rating">
  1032.                                                             <span class="rated">
  1033.                                                                 {% for i in 1..5 %}
  1034.                                                                     {% if i <= globalConformite %}
  1035.                                                                         <i class="fa fa-star"></i>
  1036.                                                                     {% else %}
  1037.                                                                         <i class="far fa-star"></i>
  1038.                                                                     {% endif %}
  1039.                                                                 {% endfor %}
  1040.                                                             </span>
  1041.                                                         </div>
  1042.                                                         <div class="review-number">{{ globalConformite|number_format(1, '.') }}</div>
  1043.                                                     </div>
  1044.                                                     <div class="review-list">
  1045.                                                         {% set globalCommunication = notes['communication']['count'] ? notes['communication']['totalNote'] / notes['communication']['count'] : notes['communication']['count'] %}
  1046.                                                         <div class="review-for">Communication</div>
  1047.                                                         <div class="review-rating">
  1048.                                                             <span class="rated">
  1049.                                                                 {% for i in 1..5 %}
  1050.                                                                     {% if i <= globalCommunication %}
  1051.                                                                         <i class="fa fa-star"></i>
  1052.                                                                     {% else %}
  1053.                                                                         <i class="far fa-star"></i>
  1054.                                                                     {% endif %}
  1055.                                                                 {% endfor %}
  1056.                                                             </span>
  1057.                                                         </div>
  1058.                                                         <div class="review-number">{{ globalCommunication|number_format(1, '.') }}</div>
  1059.                                                     </div>
  1060.                                                     <!-- /.review-list -->
  1061.                                                 </div>
  1062.                                             </div>
  1063.                                         </div>
  1064.                                     </div>
  1065.                                 </div>
  1066.                             </div>
  1067.                             <div class="card border card-shadow-none widget-vendor-list ">
  1068.                                 <div class="card-body pl-0 pr-0">
  1069.                                     <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
  1070.                                         <h3 class="mb20">Avis</h3>
  1071.                                     </div>
  1072.                                     {# <pre>
  1073.                                         {{ dump(productAvis|slice(0, 3)) }}
  1074.                                     </pre> #}
  1075.                                     {% for key,productAvi in productAvis|slice(0, 3) %}
  1076.                                         {% if productAvi.isDesactivatedByAdmin == null and productAvi.isDesactivatedByAdmin == false %}
  1077.                                             <div class="card border card-shadow-none ">
  1078.                                                 <!-- review-user -->
  1079.                                                 <div class="card-header bg-white mb0">
  1080.                                                     <div class="review-user">
  1081.                                                         <div class="user-img">
  1082.                                                             <img src="{{ asset(constant('App\\Services\\File::IMAGE_CLIENT_DIR') ~ productAvi.client.image) }}" alt="{{ productAvi.client.firstName }}" class="rounded-circle" style="width:50px;height:50px;object-fit:cover"></div>
  1083.                                                         <div class="user-meta">
  1084.                                                             <h5 class="user-name mb-0">{{ productAvi.client.firstName }}<span class="user-review-date">{{ productAvi.createdAt|date('d/m/Y') }}</span>
  1085.                                                             </h5>
  1086.                                                             <div class="given-review">
  1087.                                                                 <span class="rated">
  1088.                                                                         <i class="fa fa-star"></i>
  1089.                                                                     {% for i in 2..5 %}
  1090.                                                                         {% if i <= productAvi.globalNote|round %}
  1091.                                                                             <i class="fa fa-star"></i>
  1092.                                                                         {% else %}
  1093.                                                                             <i class="far fa-star"></i>
  1094.                                                                         {% endif %}
  1095.                                                                     {% endfor %}
  1096.                                                                 </span>
  1097.                                                             </div>
  1098.                                                         </div>
  1099.                                                     </div>
  1100.                                                 </div>
  1101.                                                 <!-- /.review-user -->
  1102.                                                 <div class="card-body">
  1103.                                                     <!-- review-descripttions -->
  1104.                                                     <div class="review-descriptions mb-2" id="cli_{{key}}">
  1105.                                                         <p>
  1106.                                                             <i>{{ productAvi.text }}</i>
  1107.                                                         </p>
  1108.                                                         <div class="cont_img_comment">
  1109.                                                         {% for imageComment in productAvi.imageComments.toArray() %}
  1110.                                                             <img src={{ asset(constant('App\\Services\\File::IMAGE_COMMENT_DIR') ~ imageComment.url) }} class="img_comment">
  1111.                                                         {% endfor %}
  1112.                                                         </div>
  1113.                                                     </div>
  1114.                                                     {% if productAvi.responseCompany %}
  1115.                                                         <div class="review-descriptions mb-2" id="prest_{{key}}">
  1116.                                                             Réponse du prestataire :<br>
  1117.                                                             <i>{{ productAvi.responseCompany }}</i>
  1118.                                                         </div>
  1119.                                                     {% endif %}
  1120.                                                     <!-- /.review-descripttions -->
  1121.                                                 </div>
  1122.                                             </div>
  1123.                                         {% endif %}
  1124.                                     {% else %}
  1125.                                         <p class="p-3">Aucun avis pour le moment</p>
  1126.                                     {% endfor %}
  1127.                                 </div>
  1128.                             </div>
  1129.                              {# <div id='calendar'></div> #}
  1130.                         </div>
  1131.                         {% if app.user and app.user.roles[0] == 'ROLE_USER' %}
  1132.                             {% set tab = filter_service.getLocationUse(app.user, product) %}
  1133.                             {% if tab is not null %}
  1134.                                 {% if "now"|date("U") > tab.endAt|date("U") %}
  1135.                             
  1136.                                 {% set ifAvis = filter_service.getAvisUserExist(app.user, product) %}
  1137.                                 {% if ifAvis == false %}
  1138.                             
  1139.                                 <div class="card border card-shadow-none leave-review" id="review-form">
  1140.                                     <div class="card-header bg-white mb0">
  1141.                                         <h3 class="mb0">Laissez un avis</h3>
  1142.                                     </div>
  1143.                                     <div class="card-body">
  1144.                                         <div class="review-rating-select">
  1145.                                             <div class="rate-selection">
  1146.                                                 <span class="text-dark">Qualité du service</span>
  1147.                                                 <span id="rateYo1" class="jq-ry-container ml-4" style="width: 70px;">
  1148.                                                     <div class="jq-ry-group-wrapper">
  1149.                                                         <div class="jq-ry-normal-group jq-ry-group"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3">
  1150.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1151.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1152.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1153.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1154.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1155.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1156.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1157.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1158.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1159.                                                             </svg>
  1160.                                                         </div>
  1161.                                                         <div class="jq-ry-rated-group jq-ry-group" id="rate1" style="width: 72%;"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227">
  1162.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1163.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1164.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1165.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1166.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1167.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1168.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1169.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1170.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1171.                                                             </svg>
  1172.                                                         </div>
  1173.                                                     </div>
  1174.                                                 </span>
  1175.                                             </div>
  1176.                                             <div class="rate-selection">
  1177.                                                 <span class="text-dark">Fiabilité</span>
  1178.                                                 <span id="rateYo2" class="jq-ry-container ml-4" style="width: 70px;">
  1179.                                                     <div class="jq-ry-group-wrapper">
  1180.                                                         <div class="jq-ry-normal-group jq-ry-group"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3">
  1181.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1182.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1183.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1184.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1185.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1186.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1187.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1188.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1189.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1190.                                                             </svg>
  1191.                                                         </div>
  1192.                                                         <div class="jq-ry-rated-group jq-ry-group" id="rate2" style="width: 72%;"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227">
  1193.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1194.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1195.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1196.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1197.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1198.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1199.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1200.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1201.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1202.                                                             </svg>
  1203.                                                         </div>
  1204.                                                     </div>
  1205.                                                 </span>
  1206.                                             </div>
  1207.                                             <div class="rate-selection">
  1208.                                                 <span class="text-dark">Prix</span>
  1209.                                                 <span id="rateYo3" class="jq-ry-container ml-4" style="width: 70px;">
  1210.                                                     <div class="jq-ry-group-wrapper">
  1211.                                                         <div class="jq-ry-normal-group jq-ry-group"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3">
  1212.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1213.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1214.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1215.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1216.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1217.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1218.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1219.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1220.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1221.                                                             </svg>
  1222.                                                         </div>
  1223.                                                         <div class="jq-ry-rated-group jq-ry-group" id="rate3" style="width: 72%;"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227">
  1224.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1225.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1226.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1227.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1228.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1229.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1230.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1231.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1232.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1233.                                                             </svg>
  1234.                                                         </div>
  1235.                                                     </div>
  1236.                                                 </span>
  1237.                                             </div>
  1238.                                             <div class="rate-selection">
  1239.                                                 <span class="text-dark">Rapidité</span>
  1240.                                                 <span id="rateYo4" class="jq-ry-container ml-4" style="width: 70px;">
  1241.                                                     <div class="jq-ry-group-wrapper">
  1242.                                                         <div class="jq-ry-normal-group jq-ry-group"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3">
  1243.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1244.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1245.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1246.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1247.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1248.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1249.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1250.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1251.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1252.                                                             </svg>
  1253.                                                         </div>
  1254.                                                         <div class="jq-ry-rated-group jq-ry-group" id="rate4" style="width: 72%;"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227">
  1255.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1256.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1257.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1258.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1259.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1260.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1261.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1262.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1263.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1264.                                                             </svg>
  1265.                                                         </div>
  1266.                                                     </div>
  1267.                                                 </span>
  1268.                                             </div>
  1269.                                             <div class="rate-selection">
  1270.                                                 <span class="text-dark">Conforme à la description</span>
  1271.                                                 <span id="rateYo5" class="jq-ry-container ml-4" style="width: 70px;">
  1272.                                                     <div class="jq-ry-group-wrapper">
  1273.                                                         <div class="jq-ry-normal-group jq-ry-group"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3">
  1274.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1275.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1276.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1277.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1278.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1279.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1280.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1281.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1282.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1283.                                                             </svg>
  1284.                                                         </div>
  1285.                                                         <div class="jq-ry-rated-group jq-ry-group" id="rate5" style="width: 72%;"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227">
  1286.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1287.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1288.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1289.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1290.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1291.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1292.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1293.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1294.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1295.                                                             </svg>
  1296.                                                         </div>
  1297.                                                     </div>
  1298.                                                 </span>
  1299.                                             </div>
  1300.                                             <div class="rate-selection">
  1301.                                                 <span class="text-dark">Communication</span>
  1302.                                                 <span id="rateYo6" class="jq-ry-container ml-4" style="width: 70px;">
  1303.                                                     <div class="jq-ry-group-wrapper">
  1304.                                                         <div class="jq-ry-normal-group jq-ry-group"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3">
  1305.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1306.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1307.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1308.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1309.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1310.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1311.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1312.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
  1313.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1314.                                                             </svg>
  1315.                                                         </div>
  1316.                                                         <div class="jq-ry-rated-group jq-ry-group" id="rate6" style="width: 72%;"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227">
  1317.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1318.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1319.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1320.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1321.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1322.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1323.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1324.                                                             </svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
  1325.                                                                 <polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
  1326.                                                             </svg>
  1327.                                                         </div>
  1328.                                                     </div>
  1329.                                                 </span>
  1330.                                             </div>
  1331.                                         </div>
  1332.                                         {{ form_start(formComment) }}
  1333.                                         <div class="row">
  1334.                                             {# <div style="color:red">{{ form_errors(formComment) }}</div> #}
  1335.                                             <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 mt30">
  1336.                                                 {# <div class="form-group">
  1337.                                                     {{ form_label(form.imageComment, '', {'label_attr': {'class': 'control-label'}}) }}
  1338.                                                     {{ form_widget(form.imageComment) }}
  1339.                                                 </div> #}
  1340.                                                 {# <div class="col-md-12"> #}
  1341.                                                     {{form_widget(formComment)}}
  1342.                                                 {# </div> #}
  1343.                                                 {# <div class="form-group">
  1344.                                                     {{ form_label(formComment.text, '', {'label_attr': {'class': 'control-label'}}) }}
  1345.                                                     {{ form_widget(formComment.text, {'attr': {'class': 'form-control', 'rows': 5}}) }}
  1346.                                                 </div> #}
  1347.                                             </div>
  1348.                                             <!-- Button -->
  1349.                                             <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
  1350.                                                 <div class="form-group">
  1351.                                                     <button id="submit" name="submit" class="btn btn-default">Ajouter mon avis</button>
  1352.                                                 </div>
  1353.                                             </div>
  1354.                                         </div>
  1355.                                         {# {{ form_rest(formComment) }} #}
  1356.                                         {{ form_end(formComment) }}
  1357.                                     </div>
  1358.                                 </div>
  1359.                                 {% endif %}
  1360.                                 {% endif %}
  1361.                             {% endif %}
  1362.                         {% endif %}
  1363.                     </div>
  1364.                     <!-- /.review-content -->
  1365.                 </div>
  1366.                 <!-- /.location -->
  1367.                 <!-- list-sidebar -->
  1368.                 <div class="col-xl-4 col-lg-3 col-md-3 col-sm-12 col-12">
  1369.                     <div
  1370.                         class="sidebar-venue">
  1371.                         {# for hebergement only#}
  1372.                         {% if product.typeHebergements is not null%}    
  1373.                         <div class="col-12">
  1374.                             <div class="card">
  1375.                                 <div class="card-body">
  1376.                                     {% set totalChambre = 0 %}
  1377.                                     {% if product.chambres.toArray() != [] %} {# If the product have chambre #}    
  1378.                                         {% for chambre in product.chambres %}
  1379.                                             {% set totalChambre = totalChambre + chambre.NumChambre %}
  1380.                                         {% endfor %}
  1381.                                     {% else %}
  1382.                                         {% set totalChambre = product.nbChambre %}        
  1383.                                     {% endif %}
  1384.                                     
  1385.                                     <p class="card-text"><i class="fas fa-home" style="color:#FE7708"></i>  Nombre total de chambres: 
  1386.                                     <span style="color:#0DE8C7">{{ totalChambre }}</span> 
  1387.                                     </p>
  1388.                                     
  1389.                                     {% if product.securities.toArray() != [] %}
  1390.                                     <p class="card-text"><i class="fas fa-shield-alt" style="color:#FE7708"></i> Sécurité: 
  1391.                                     {% for securt in product.securities.toArray() %}
  1392.                                         <span style="color:#0DE8C7"> {{ securt.labels }} </span>
  1393.                                         {% if not loop.last %}, {% endif %}
  1394.                                     {% endfor %}
  1395.                                     </p>
  1396.                                     {% endif %}
  1397.                                     {% if product.typeLocalisations.toArray() != [] %}
  1398.                                     <p class="card-text"><i class="fas fa-map-marker-alt" style="color:#FE7708"></i> Localisation:
  1399.                                     {% for typeLocalisation in product.typeLocalisations.toArray() %}
  1400.                                         <span style="color:#0DE8C7">
  1401.                                             {{ typeLocalisation.labels }}
  1402.                                         </span> {% if not loop.last %}, {% endif %}
  1403.                                     {% endfor %}
  1404.                                     </p>
  1405.                                     {% endif %}
  1406.                                     {% if product.equipment.toArray() != [] %}
  1407.                                     <p class="card-text"><i class="fas fa-tools" style="color:#FE7708"></i> Équipements: 
  1408.                                     {% for equipt in product.equipment.toArray() %}
  1409.                                         <span style="color:#0DE8C7"> {{ equipt.labels }} </span>
  1410.                                         {% if not loop.last %}, {% endif %}
  1411.                                     {% endfor %}
  1412.                                     </p>
  1413.                                     {% endif %}
  1414.                                     {% if product.caracteristics.toArray() != [] %}
  1415.                                     <p class="card-text"><i class="fas fa-cogs" style="color:#FE7708"></i> Confort: 
  1416.                                     {% for caract in product.caracteristics.toArray() %}
  1417.                                         <span style="color:#0DE8C7"> {{ caract.labels }} </span>
  1418.                                         {% if not loop.last %}, {% endif %}
  1419.                                     {% endfor %}
  1420.                                     </p>
  1421.                                     {% endif %}
  1422.                                     {% if product.langueHotes.toArray() != [] %}
  1423.                                     <p class="card-text"><i class="fa fa-language" style="color:#FE7708"></i> Langage propriétaire:
  1424.                                     {% for langue in product.langueHotes.toArray() %}
  1425.                                         <span style="color:#0DE8C7"> {{ langue.labels }} </span>
  1426.                                         {% if not loop.last %}, {% endif %}
  1427.                                     {% endfor %}
  1428.                                     </p>
  1429.                                     {% endif %}
  1430.                                 </div>
  1431.                                 <button type="button" class="btn btn-primary" id="btnMoreCaraqHeb" data-toggle="modal" data-target="#modalCarateristiqHeb">Plus de details</details></button>
  1432.                             </div>
  1433.                         </div>
  1434.                         {% endif %}
  1435.                         {# for location voiture only #}
  1436.                         {% set isVehicules = false %}
  1437.                         {% for singleCategory in product.subcategories %}
  1438.                             {% if singleCategory.id == 53 %} {# if subcategories is vehicules #}
  1439.                                 {% set isVehicules = true %}
  1440.                             {% endif %}
  1441.                         {% endfor %}
  1442.                         
  1443.                         {% if isVehicules == true %}
  1444.                         <div class="col-12">
  1445.                             <div class="card">
  1446.                                 <div class="card-body">
  1447.                                     <div class="oneInfoVehicl">
  1448.                                         <div class="cercle-icon">
  1449.                                             <img src="{{ asset('icon/vehicules/manual-transmission.png') }}" alt="">
  1450.                                         </div>
  1451.                                         {# Manuelle #}
  1452.                                         {{caracteristiques["gearboxType"] is not null ? caracteristiques["gearboxType"] : "-" }}
  1453.                                     </div>
  1454.                                     <div class="oneInfoVehicl">
  1455.                                         <div class="cercle-icon">
  1456.                                             <img src="{{ asset('icon/vehicules/canister.png') }}" alt="">
  1457.                                         </div>
  1458.                                         {# Essence #}
  1459.                                         {{caracteristiques["fuelType"] is not null ? caracteristiques["fuelType"] : "-" }}
  1460.                                     </div>
  1461.                                     <div class="oneInfoVehicl">
  1462.                                         <div class="cercle-icon">
  1463.                                             <img src="{{ asset('icon/vehicules/air-conditioner.png') }}" alt="">
  1464.                                         </div>
  1465.                                         {# Oui #}
  1466.                                         {% if caracteristiques["isAirConditioned"]%}
  1467.                                             Oui
  1468.                                         {% else %}
  1469.                                             Non
  1470.                                         {% endif %}
  1471.                                     </div>
  1472.                                     <div class="oneInfoVehicl">
  1473.                                         <div class="cercle-icon">
  1474.                                             <img src="{{ asset('icon/vehicules/car.png') }}" alt="">
  1475.                                         </div>
  1476.                                         {# 5 portes #}
  1477.                                         {{ caracteristiques["doorCount"] is not null ? caracteristiques["doorCount"] ~ " portes" : "-"  }}
  1478.                                     </div>
  1479.                                     <div class="oneInfoVehicl">
  1480.                                         <div class="cercle-icon">
  1481.                                             <img src="{{ asset('icon/vehicules/people.png') }}" alt="">
  1482.                                         </div>
  1483.                                         {# 5 places #}
  1484.                                         {{caracteristiques["seatCount"] is not null ? caracteristiques["seatCount"] ~ " places" : "-" }}
  1485.                                     </div>
  1486.                                     <div class="oneInfoVehicl">
  1487.                                         <div class="cercle-icon">
  1488.                                             <img src="{{ asset('icon/vehicules/download-speed.png') }}" alt="">
  1489.                                         </div>
  1490.                                         {# Illimité #}
  1491.                                         {{caracteristiques["speedLimit"] is not null ? caracteristiques["speedLimit"] ~ " Km/h" : "Illimité" }}
  1492.                                     </div>
  1493.                                 </div>
  1494.                             </div>
  1495.                         </div>
  1496.                         {% endif %}
  1497.                         <button type="button" class="link-cgv" data-toggle="modal" data-target="#exampleModalCenter">
  1498.                             Lire  les  conditions générales de vente
  1499.                         </button>
  1500.                         <!-- FORMULAIRE DU PANIER -->
  1501.                         {% set isService = false %}
  1502.                         {% for productSubCategory in product.subCategories %}
  1503.                             {% if productSubCategory.isService == true %}
  1504.                                 {% set isService = true %}
  1505.                             {% endif %}
  1506.                         {% endfor %}
  1507.                         {% if isService != true %}
  1508.                             {% include "front/product/cart/cart_form.html.twig" with {'product' : product} %}
  1509.                         {% endif %}
  1510.                         {% if isService == true %}
  1511.                             <!-- TEST DU TYPE DE SERVICE (location ou réservation) -->
  1512.                             {% set isLocation = false %}
  1513.                             {% for singleCategory in product.subcategories %}
  1514.                                 {% if singleCategory.name == "Location de salle" or singleCategory.name == "Location de vehicule"  %}
  1515.                                     {% set isLocation = true %}
  1516.                                 {% endif %}
  1517.                             {% endfor %}
  1518.                             {% if isLocation == true or product.typeLocation is not null %}
  1519.                                 <!-- FORMULAIRE DE LOCATION --> 
  1520.                                 {% include "front/product/location/location_form.html.twig" with {'product' : product} %}
  1521.                             {% endif %}
  1522.                             {% if isLocation == false and product.typeLocation is null %}
  1523.                                 <!-- FORMULAIRE DE RESERVATION DE SERVICES -->
  1524.                                 {% include "front/product/reservation/reservation_form.html.twig" with {'product' : product} %}
  1525.                             {% endif %}
  1526.                         {% endif %}
  1527.                         {% if product.company.type != "service" %}                            
  1528.                             <div class="vendor-owner-profile mb30">
  1529.                                 <div class="vendor-owner-profile-head">
  1530.                                     <h3 class="mb-0">Livraison</h3>
  1531.                                 </div>
  1532.                                 <div class="vendor-owner-profile-content">
  1533.                                     <ul class="list-group list-group-flush">
  1534.                                         <li class="list-group-item">
  1535.                                             <span class="mr-2">
  1536.                                                 <i class="fas fa-fw fa-map-marker-alt"></i>
  1537.                                             </span>
  1538.                                             {% for department in product.departments %}
  1539.                                                 {{ department.name }}
  1540.                                                 {% if not loop.last %},
  1541.                                                 {% endif %}
  1542.                                             {% else %}
  1543.                                                 Toute la France
  1544.                                             {% endfor %}
  1545.                                         </li>
  1546.                                     </ul>
  1547.                                 </div>
  1548.                             </div>
  1549.                         {% endif %}
  1550.                         <!-- venue-admin -->
  1551.                         <div class="vendor-owner-profile mb30">
  1552.                             <div class="vendor-owner-profile-head">
  1553.                                 <h3 class="mb-4">Prestataire</h3>
  1554.                             </div>
  1555.                             <div class="vendor-owner-profile-content">
  1556.                                 <ul class="list-group list-group-flush">
  1557.                                     <li class="list-group-item">
  1558.                                         <span class="mr-2">
  1559.                                             <a href="{{ path('front_company_single', {'companySlug': product.company.companySlug, 'id': product.company.id}) }}" class="btn btn-default btn-sm ml-2 text-center">Voir le prestataire</a>
  1560.                                         </span>
  1561.                                     </li>
  1562.                                 </ul>
  1563.                             </div>
  1564.                         </div>
  1565.                     </div>
  1566.                 </div>
  1567.             </div>
  1568.             <!-- /.list-sidebar -->
  1569.         </div>
  1570.     </div>
  1571.     <!-- vendor-thumbnail section -->
  1572.     <div class="space-small">
  1573.         <div class="container">
  1574.             <div class="row">
  1575.                 <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
  1576.                     <h2>Autres services du prestataire</h2>
  1577.                 </div>
  1578.             </div>
  1579.             <div class="row">
  1580.                 {% for otherProduct in otherProducts %}
  1581.                 {% set subCategorySlug = otherProduct.subCategories.toArray()[0].subCategorySlug %}
  1582.                     <div class="col-xl-4 col-lg-4 col-md-6 col-sm-6 col-12">
  1583.                         <div class="container-block-Pcompanies mb-3">
  1584.                             <div class="container-imageP zoomimg">
  1585.                             {% if otherProduct.subCategories[0].categories[0] is defined %}
  1586.                                 <a href="{{ path('front_product_single', {'slug': otherProduct.subCategories[0].categories[0].slug, 'subCategorySlug': otherProduct.subCategories[0].subCategorySlug, 'product_id': otherProduct.id, 'productSlug': otherProduct.productSlug}) }}">
  1587.                                     {% if otherProduct.photos is not empty %}
  1588.                                         <img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ otherProduct.photos.first.url) }}" alt="{{ otherProduct.name }}" class="img-fluid" style="object-fit: cover; border-radius: .5rem .5rem 0 0;">
  1589.                                     {% endif %}
  1590.                                 </a>
  1591.                             {% endif %}
  1592.                             
  1593.                             </div>
  1594.                             <div class="container-info-presta" style="padding-bottom: 80px;">
  1595.                                 <h2 class="vendor-title">
  1596.                                 {% set subCategory = otherProduct.subCategories.toArray()[0] %}                                
  1597.                                 {% set slug = "" %}
  1598.                                 {% if otherProduct.typeActivity is not null %}
  1599.                                     {% set slug = otherProduct.typeActivity.slug %}
  1600.                                 {% elseif otherProduct.typeHebergements is not null %}
  1601.                                     {% set slug = otherProduct.typeHebergements.slugTypeHebergm %}
  1602.                                 {% else %}
  1603.                                     {% set slug = subCategory.categories.toArray[0].slug %}
  1604.                                 {% endif %}
  1605.                                 {% if otherProduct.subCategories[0].categories[0] is defined %}
  1606.                                     <a href="{{ path('front_product_single', {
  1607.                                         'slug': slug, 
  1608.                                         'subCategorySlug': otherProduct.subCategories[0].subCategorySlug, 
  1609.                                         'product_id': otherProduct.id, 
  1610.                                         'productSlug': otherProduct.productSlug}) 
  1611.                                     }}" class="title">{{ otherProduct.name }}</a>
  1612.                                 {% endif %}
  1613.                                 </h2>
  1614.                                 <p class="vendor-address">
  1615.                                     {% for department in otherProduct.departments %}
  1616.                                         {{ department.name }}
  1617.                                         {% if not loop.last %},
  1618.                                         {% endif %}
  1619.                                     {% else %}
  1620.                                         Toute la France
  1621.                                     {% endfor %}
  1622.                                 </p>
  1623.                                 {# <p>
  1624.                                     <i class="fas fa-money-bill-wave"></i>
  1625.                                     Prix
  1626.                                     <strong>{{ otherProduct.price|number_format(2, '.', '') }}</strong>€
  1627.                                 </p> #}
  1628.                                 <p>
  1629.                                     {% if otherProduct.typeHebergements.slugTypeHebergm is defined and otherProduct.typeHebergements.slugTypeHebergm != 'hotel' %}
  1630.                                         <i class="fas fa-money-bill-wave"></i>
  1631.                                         Prix :
  1632.                                         <strong>{{ otherProduct.price|number_format(2, '.') }}</strong>€
  1633.                                     {% else %}
  1634.                                         {% set lengthRoomNight = 0 %}
  1635.                                         {% set statusByNight = false %}
  1636.                                         {% set allPriceByNight = 0 %}
  1637.                                         {% set lengthRoomDay = 0 %}
  1638.                                         {% set statusByDay = false %}
  1639.                                         {% set allPriceByDay = 0 %}
  1640.                                         {% if otherProduct.chambres is defined %}
  1641.                                             {% for roomOption in otherProduct.chambres.toArray %}
  1642.                                                 {% if roomOption.tarifNuit is defined %}
  1643.                                                     {% set lengthRoomNight = lengthRoomNight + 1 %}
  1644.                                                     {% set statusByNight = true %}
  1645.                                                     {% set allPriceByNight = allPriceByNight + roomOption.tarifNuit %}
  1646.                                                 {% endif %}
  1647.                                                 {% if roomOption.tarifJour is not null %}
  1648.                                                     {% set lengthRoomDay = lengthRoomDay + 1 %}
  1649.                                                     {% set statusByDay = true %}
  1650.                                                     {% set allPriceByDay = allPriceByDay + roomOption.tarifJour %}
  1651.                                                 {% endif %}
  1652.                                             {% endfor %}
  1653.                                             {% if statusByDay or statusByNight %}
  1654.                                                 <p>Prix moyen d'une chambre:</p>
  1655.                                             {% endif %}
  1656.                                             {% if statusByNight %}
  1657.                                                 <p>
  1658.                                                     <i class="fas fa-money-bill-wave"></i>
  1659.                                                     par nuit 
  1660.                                                     <strong>{{ (allPriceByNight / lengthRoomNight)|number_format(2, '.') }}</strong>€
  1661.                                                 </p>
  1662.                                             {% endif %}
  1663.                                             {% if statusByDay %}
  1664.                                                 {# <p>
  1665.                                                     <i class="fas fa-money-bill-wave"></i>
  1666.                                                     par jour 
  1667.                                                     <strong>{{ (allPriceByDay / lengthRoomDay)|number_format(2, '.') }}</strong>€
  1668.                                                 </p> #}
  1669.                                             {% endif %}
  1670.                                         {% endif %}
  1671.                                         {% if not statusByNight and not statusByDay %}
  1672.                                             <p>
  1673.                                                 Prix : <strong>Prix en attente</strong>
  1674.                                             </p>
  1675.                                         {% endif %}
  1676.                                         {# <i class="fas fa-money-bill-wave"></i>
  1677.                                         Prix :
  1678.                                         <strong>{{ otherProduct.price|number_format(2, '.') }}</strong>€ #}
  1679.                                     {% endif %}
  1680.                                 </p>
  1681.                                 <p>
  1682.                                     <i class="fa fa-star rated"></i>
  1683.                                     {{ otherProduct.avis|length }} Avis</p>
  1684.                                 {% if otherProduct.quantity %}
  1685.                                     <p>{{ otherProduct.quantity }}
  1686.                                         Quantité restante</p>
  1687.                                 {% else %}
  1688.                                     <p style="color: transparent;">Quantité restante</p>
  1689.                                 {% endif %}
  1690.                             </div>
  1691.                             <div class="wishlist-sign">
  1692.                                 <a href="#" class="btn-wishlist">
  1693.                                     <i class="fa fa-heart"></i>
  1694.                                 </a>
  1695.                             </div>
  1696.                             {% if otherProduct.subCategories[0].categories[0] is defined %}
  1697.                                 <a href="{{ path('front_product_single', {
  1698.                                     'slug': slug, 
  1699.                                     'subCategorySlug': otherProduct.subCategories[0].subCategorySlug, 
  1700.                                     'product_id': otherProduct.id, 
  1701.                                     'productSlug': otherProduct.productSlug
  1702.                                 }) }}" class="title">
  1703.                             
  1704.                                 <button class="btnVoirP btn">Voir {% if subCategorySlug == "hebergements"%}l'hébergement{% else %}plus{% endif %}
  1705.                                     </button>
  1706.                             
  1707.                                 </a>
  1708.                             {% endif %}
  1709.                             
  1710.                         </div>
  1711.                     </div>
  1712.                 {% else %}
  1713.                     <div class="col-md-12 mt-5 text-center">
  1714.                         <p>Aucun autre produit.</p>
  1715.                     </div>
  1716.                 {% endfor %}
  1717.             </div>
  1718.             {# <div class="row">
  1719.                 {% for otherProduct in otherProducts %}
  1720.                     <div class="col-xl-4 col-lg-4 col-md-6 col-sm-6 col-12">
  1721.                         <div
  1722.                             class="vendor-thumbnail">
  1723.                             <!-- Vendor thumbnail -->
  1724.                             <div
  1725.                                 class="vendor-img zoomimg">
  1726.                                 <!-- Vendor img -->
  1727.                                 <a href="{{ path('front_product_single', {'slug': otherProduct.subCategories[0].categories[0].slug, 'subCategorySlug': otherProduct.subCategories[0].subCategorySlug, 'product_id': otherProduct.id, 'productSlug': otherProduct.productSlug}) }}">
  1728.                                     {% if otherProduct.photos is not empty %}
  1729.                                         <img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ otherProduct.photos.first.url) }}" alt="{{ otherProduct.name }}" class="img-fluid">
  1730.                                     {% endif %}
  1731.                                 </a>
  1732.                                 <div class="wishlist-sign">
  1733.                                     <a href="#" class="btn-wishlist">
  1734.                                         <i class="fa fa-heart"></i>
  1735.                                     </a>
  1736.                                 </div>
  1737.                             </div>
  1738.                             <!-- /.Vendor img -->
  1739.                             <div
  1740.                                 class="vendor-content">
  1741.                                 <!-- Vendor Content -->
  1742.                                 <h2 class="vendor-title">
  1743.                                     <a href="{{ path('front_product_single', {'slug': otherProduct.subCategories[0].categories[0].slug, 'subCategorySlug': otherProduct.subCategories[0].subCategorySlug, 'product_id': otherProduct.id, 'productSlug': otherProduct.productSlug}) }}" class="title">{{ otherProduct.name }}</a>
  1744.                                 </h2>
  1745.                                 <p class="vendor-address">
  1746.                                     {% for department in otherProduct.departments %}
  1747.                                         {{ department.name }}
  1748.                                         {% if not loop.last %},
  1749.                                         {% endif %}
  1750.                                     {% else %}
  1751.                                         Toute la France
  1752.                                     {% endfor %}
  1753.                                 </p>
  1754.                             </div>
  1755.                             <div class="vendor-meta">
  1756.                                 <div class="vendor-meta-item vendor-meta-item-bordered">
  1757.                                     <span class="vendor-price">
  1758.                                         {{ otherProduct.price|number_format(2, '.', '') }}€
  1759.                                     </span>
  1760.                                     <span class="vendor-text">Prix</span>
  1761.                                 </div>
  1762.                                 <div class="vendor-meta-item vendor-meta-item-bordered">
  1763.                                     {% if otherProduct.quantity %}
  1764.                                         <span class="vendor-guest">
  1765.                                             {{ otherProduct.quantity }}
  1766.                                         </span>
  1767.                                         <span class="vendor-text">Quantité restante</span>
  1768.                                     {% endif %}
  1769.                                 </div>
  1770.                                 {% set notes = 0 %}
  1771.                                 {% for avi in otherProduct.avis %}
  1772.                                     {% set notes = notes + avi.globalNote %}
  1773.                                 {% endfor %}
  1774.                                 {% set noteTotal = (notes > 0) ? notes / otherProduct.avis|length : 0 %}
  1775.                                 <div class="vendor-meta-item vendor-meta-item-bordered">
  1776.                                     <span class="rating-star">
  1777.                                         {% for i in 1..5 %}
  1778.                                             {% if i < noteTotal %}
  1779.                                                 <i class="fa fa-star rated"></i>
  1780.                                             {% else %}
  1781.                                                 <i class="fa fa-star rate-mute"></i>
  1782.                                             {% endif %}
  1783.                                         {% endfor %}
  1784.                                     </span>
  1785.                                     <span class="rating-count vendor-text">({{ otherProduct.avis|length }})</span>
  1786.                                 </div>
  1787.                             </div>
  1788.                             <!-- /.Vendor Content -->
  1789.                         </div>
  1790.                         <!-- /.Vendor thumbnail -->
  1791.                     </div>
  1792.                 {% else %}
  1793.                     <div class="col-md-12 mt-5 text-center">
  1794.                         <p>Aucun autre produit.</p>
  1795.                     </div>
  1796.                 {% endfor %}
  1797.             </div> #}
  1798.         </div>
  1799.     </div>
  1800.     {# Question #}
  1801.     <div class="col-sm-12 col-md-5 col-lg-4 col-xl-3 position-fixed" id="chatbar" style="bottom:0;right:50px;z-index: 1000">
  1802.         <div class="panel panel-primary myradiuss">
  1803.                 {# <div class="d-flex justify-content-between panel-heading p-2" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" id="accordion" style="background:#A066F2;border-radius: 8px 8px 0 0;cursor:pointer">
  1804.                     <span style="color:#fff">
  1805.                         <i class="fas fa-comments"></i>
  1806.                         Une question sur ce
  1807.                         {% if product.company == 'product' %}produit{% else %}service{% endif%}
  1808.                         ?</span>
  1809.                     <div class="btn-group pull-right">
  1810.                         <a type="button" class="btn btn-default btn-xs">
  1811.                             <i class="fas fa-chevron-down"></i>
  1812.                         </a>
  1813.                     </div>
  1814.                 </div> #}
  1815.                 <div class="panel-collapse collapse" id="collapseOne" style="border:1px solid #A066F2">
  1816.                     {# <div class="modal-header">
  1817.                         {# <h5 class="modal-title" id="exampleModalLongTitle">Créer un ticket</h5> #}
  1818.                         {# <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  1819.                         <span aria-hidden="true">&times;</span>
  1820.                         </button> 
  1821.                     </div> #}
  1822.                     <div class="titreSMS"><h3 style="margin-bottom: 0">Discutez avec le prestataire</h3></div>
  1823.                     {{ form_start(formTicket) }}
  1824.                     <span class="collapseMessage" data-toggle="collapse" data-parent="#accordion" href="#collapseOne">X</span>
  1825.                     <div class="modal-body">
  1826.                         {# supprime d'apres le retour 12/08/22
  1827.                         <div class="col-xl-12 col-lg-12 col-md-12 col-sm-6 col-12">
  1828.                             <div class="form-group">
  1829.                                 {{ form_row(formTicket.subject) }}
  1830.                             </div>
  1831.                         </div> #}
  1832.                         <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
  1833.                             <div class="form-group">
  1834.                                 {{ form_row(formTicket.messagings) }}
  1835.                             </div>
  1836.                         </div>
  1837.                         <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
  1838.                             <div class="form-group">
  1839.                                 <input class='form-control' name="productID" type="hidden" value={{ product.id }} readonly>
  1840.                             </div>
  1841.                         </div>
  1842.                     </div>
  1843.                     <div class="modal-footer">
  1844.                         {# <button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button> #}
  1845.                         <button type="submit" class="btn btn-primary">Envoyer</button>
  1846.                     </div>
  1847.                     {{ form_end(formTicket) }}
  1848.                     {# <div class="p-3" id="messageSuccessContact" style="background:green;color:#fff;display:none">Message envoyé !</div>
  1849.                     {{ form_start(formContact, {'attr': {'id': 'contactFormProduct'}}) }}
  1850.                     <div class="panel-body" style="background:#fff">
  1851.                         <div class="chat">
  1852.                             {{ form_widget(formContact.message, {'attr': {'rows': 12}}) }}
  1853.                         </div>
  1854.                     </div>
  1855.                     <div class="panel-footer">
  1856.                         <div class="input-group">
  1857.                             {{ form_widget(formContact.email) }}
  1858.                             <span class="input-group-btn">
  1859.                                 <button type="submit" class="btn btn-warning btn-sm" id="btn-chat">Envoyer</button>
  1860.                             </span>
  1861.                         </div>
  1862.                     </div>
  1863.                     {{ form_end(formContact) }} #}
  1864.                 </div>
  1865.             </div>
  1866.         </div>
  1867.     </div>
  1868.     {# Modal chat #}
  1869.     <!-- Button trigger modal -->
  1870.         {% if app.user %}
  1871.         <div class="position-fixed" id="MyChat" data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
  1872.             <i class="fas fa-comments MyIconChat"></i>
  1873.         </div>
  1874.         {# <div class="position-fixed" id="MyChat" data-toggle="modal" data-target="#modalChat">
  1875.             <i class="fas fa-comments MyIconChat"></i>
  1876.             </a>
  1877.         </div> #}
  1878.          {% else %}
  1879.          <script src="">
  1880.              function connect(){
  1881.                 window.open("{{ path('connection-test', {'product_id': product.id, 'productSlug': product.productSlug }) }}", "pub", "menubar=no");
  1882.             }
  1883.          </script>
  1884.             <div class="position-fixed" id="MyChat">
  1885.                 {% if product.subCategories[0].categories[0] is defined %}
  1886.                     <a href="{{ path('front_product_single', {'slug': product.subCategories[0].categories[0].slug, 'subCategorySlug': product.subCategories[0].subCategorySlug, 'product_id': product.id, 'productSlug': product.productSlug}) }}" onclick="connect();">
  1887.                 {% endif %}
  1888.                 <a href="{{ path('connection-test', {'product_id': product.id, 'productSlug': product.productSlug }) }}" onclick="connect();" rel="noopener" target="_blank">
  1889.                 <i class="fas fa-comments MyIconChat"></i>
  1890.                 </a>
  1891.             </div>
  1892.         {% endif %}
  1893.     
  1894.     {# Modal chat #}
  1895. {% endblock %}
  1896.      {% block _avis_imageComments_widget %}
  1897.         <p>Ici, vous pouvez ajouter vos image, sa taille ne doit pas dépasser 400ko !</p>
  1898.         <div class="form-group">
  1899.             <button class="btn btn-primary" id="add_image" data-target="#block_{{id}}" type="button">Ajouter une image</button>
  1900.         </div>
  1901.         {{form_widget(form)}}
  1902.         <input type="hidden" id="widgets-counter" value="0">
  1903.         <input type="hidden" id="conteur-input" value="0">
  1904.     {% endblock %}
  1905.     {% block _avis_imageComments_entry_row %}
  1906.         {{form_widget(form)}}
  1907.     {% endblock %}
  1908.     {% block _avis_imageComments_entry_widget %}
  1909.         <div class="form-group" id="block_{{id}}">
  1910.             <div class="row">
  1911.                 <div class="col-10 mt-3">
  1912.                     <div class="row">
  1913.                         <div class="col-md-12 image-errors">
  1914.                             {{ form_widget(form.url, {'attr': {'class': 'form-control file-input'}}) }}
  1915.                             {{ form_errors(form.url, {'attr': {'class': 'form-control message'}}) }}
  1916.                         </div>
  1917.                     </div>
  1918.                 </div>
  1919.                 <div class="col-2 mt-3">
  1920.                     <button type="button" data-action="delete" data-target="#block_{{id}}" class="btn btn-danger">X</button>
  1921.                 </div>
  1922.             </div>
  1923.         </div>
  1924.     {% endblock %}
  1925.     {% block javascript %}
  1926.         <script src="{{ asset('js/formLocationHebergemtn.js')}}"></script>
  1927.         <script src='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/4.2.0/core/locales-all.min.js'></script>
  1928.         <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
  1929.     
  1930.         <script title="zoom img comment">
  1931.             {% for key,productAvi in productAvis|slice(0, 3) %}
  1932.                 if ($('.img_comment').length) {
  1933.                     $('#cli_{{key}} .img_comment').magnificPopup({
  1934.                         items: [{% for imageComment in productAvi.imageComments.toArray() %}{
  1935.                                 src: "{{ asset(constant('App\\Services\\File::IMAGE_COMMENT_DIR') ~ imageComment.url) }}",
  1936.                                 title: 'Photo ' + {{ loop.index }}
  1937.                             },{% endfor %}],
  1938.                         gallery: {
  1939.                             enabled: true
  1940.                         },
  1941.                         type: 'image' // this is a default type
  1942.                     });
  1943.                 }
  1944.             {% endfor %}
  1945.         </script>
  1946.         <script>
  1947.             if (document.getElementById("profil_user_image")) {
  1948.                 document.getElementById("profil_user_image").addEventListener('change', function() {
  1949.                     var reader = new FileReader();
  1950.                     reader.onload = function (e) {
  1951.                         // get loaded data and render thumbnail.
  1952.                         console.log(e.target)
  1953.                         document.getElementById("image-preview").style.background = `url(${e.target.result})no-repeat center`;
  1954.                         document.getElementById("image-preview").style.backgroundSize = `cover`;
  1955.                     };
  1956.                     // read the image file as a data URL.
  1957.                     reader.readAsDataURL(this.files[0]);
  1958.                 });
  1959.             }
  1960.         </script>
  1961.         {{ parent() }}
  1962.         {# Script zoom option #}
  1963.         <script>
  1964.             let backgroundFlou = document.querySelector('.backgroundTrans');
  1965.             let exitBtn = document.querySelector('.exitZoomOpt');
  1966.             //Affiche image clikee
  1967.             function afficheImgOption(idbtn) {
  1968.                 let img = document.getElementById(idbtn + "img");
  1969.                 //console.log(img);
  1970.                 //img.classList.add('showImgOption');
  1971.                 img.style.display = "block";
  1972.                 backgroundFlou.style.display = "block";
  1973.                 exitBtn.style.display = "block";
  1974.             }    
  1975.             //Fermer par contoure image
  1976.             backgroundFlou.addEventListener('click', function () {
  1977.                 let imgZoomOp = document.querySelectorAll(".imgZoomOption");
  1978.                 imgZoomOp.forEach(function(item,index){
  1979.                     imgZoomOp[index].style.display = "none";
  1980.                 })
  1981.                 backgroundFlou.style.display = "none";
  1982.                 exitBtn.style.display = "none";
  1983.             })
  1984.             
  1985.             //Fermer par boutton X
  1986.             exitBtn.addEventListener('click', function () {
  1987.                 let imgZoomOp = document.querySelectorAll(".imgZoomOption");
  1988.                 imgZoomOp.forEach(function(item,index){
  1989.                     imgZoomOp[index].style.display = "none";
  1990.                 })
  1991.                 backgroundFlou.style.display = "none";
  1992.                 exitBtn.style.display = "none";
  1993.             })
  1994.         </script>
  1995. <script>
  1996. var counte = [];
  1997. $('#add_image').click(function () {
  1998. const index = + $('#widgets-counter').val();
  1999. var tab = this.dataset.target;
  2000. var valeur = tab + "_" + index;
  2001. if (counte.length < 3) {
  2002. counte.push(valeur);
  2003. const tmpl = $('#avis_imageComments').data('prototype').replace(/__name__/g, index);
  2004. $('#avis_imageComments').append(tmpl);
  2005. $('#widgets-counter').val(index + 1);
  2006. }
  2007. handleDeleteButtons();
  2008. })
  2009. function handleDeleteButtons() {
  2010. $('button[data-action="delete"]').click(function (event) {
  2011. event.preventDefault();
  2012. const target = this.dataset.target;
  2013. var num = counte.indexOf(target);
  2014. $(target).remove();
  2015. if (num != -1) {
  2016. counte.splice(num, 1);
  2017. }
  2018. });
  2019. }
  2020. function updateCounter() {
  2021. const count = + $('#comment_imageComment div.form-group').length;
  2022. $('#widgets-counter').val(count);
  2023. }
  2024. updateCounter();
  2025. handleDeleteButtons();
  2026. // OnFileValidation();
  2027. var previewPicture  = function (e) {
  2028.     // e.files contient un objet FileList
  2029.     const [picture] = e.files
  2030.     // "picture" est un objet File
  2031.     if (picture) {
  2032.         // On change l'URL de l'image
  2033.         document.getElementById("img_profil").src = URL.createObjectURL(picture)
  2034.     }
  2035. }
  2036.             </script>
  2037.         <script tite="gestion options front" src="{{ asset('js/gestion_option.js') }}">
  2038.         </script>
  2039.         <script>
  2040. $(document).ready(function () {
  2041.     $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
  2042.         disableOn: 700,
  2043.         type: 'iframe',
  2044.         mainClass: 'mfp-fade',
  2045.         removalDelay: 160,
  2046.         preloader: false,
  2047.         fixedContentPos: false
  2048.     });
  2049. });
  2050. {# Moins Plus Qty #}
  2051. function wcqib_refresh_quantity_increments() {
  2052.     jQuery("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").each(function (a, b) {
  2053.         var c = jQuery(b);
  2054.         c.addClass("buttons_added"),
  2055.             c.children().first().before('<input type="button" value="-" class="minus" />'),
  2056.             c.children().last().after('<input type="button" value="+" class="plus" />')
  2057.     })
  2058. }
  2059. String.prototype.getDecimals || (String.prototype.getDecimals = function () {
  2060.     var a = this,
  2061.         b = ("" + a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
  2062.     return b ? Math.max(0, (b[1] ? b[1].length : 0) - (b[2] ? + b[2] : 0)) : 0
  2063. }),
  2064.     jQuery(document).ready(function () {
  2065.         wcqib_refresh_quantity_increments()
  2066.     }),
  2067.     jQuery(document).on("updated_wc_div", function () {
  2068.         wcqib_refresh_quantity_increments()
  2069.     }),
  2070.     jQuery(document).on("click", ".plus, .minus", function () {
  2071.         var a = jQuery(this).closest(".quantity").find(".qty"),
  2072.             b = parseFloat(a.val()),
  2073.             c = parseFloat(a.attr("max")),
  2074.             d = parseFloat(a.attr("min")),
  2075.             e = a.attr("step");
  2076.         b && "" !== b && "NaN" !== b || (b = 0),
  2077.             "" !== c && "NaN" !== c || (c = ""),
  2078.             "" !== d && "NaN" !== d || (d = 0),
  2079.             "any" !== e && "" !== e && void 0 !== e && "NaN" !== parseFloat(e) || (e = 1),
  2080.             jQuery(this).is(".plus") ? c && b >= c ? a.val(c) : a.val((b + parseFloat(e)).toFixed(e.getDecimals())) : d && b <= d ? a.val(d) : b > 0 && a.val((b - parseFloat(e)).toFixed(e.getDecimals())),
  2081.             a.trigger("change")
  2082.     });
  2083. {# Moins Plus Qty #}
  2084. if ($('#open-popup-images').length) {
  2085.     $('#open-popup-images').magnificPopup({
  2086.         items: [{% for photo in product.photos %}{
  2087.         src: "{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ photo.url) }}",
  2088.         title: 'Photo ' + {{ loop.index }}
  2089.     },{% endfor %}],
  2090.         gallery: {
  2091.         enabled: true
  2092.     },
  2093.         type: 'image' // this is a default type
  2094.     });
  2095. }
  2096.         </script>
  2097.         <script>
  2098. {# window.addEventListener('load', (event) => {
  2099.     localStorage.clear();
  2100. }); #}
  2101. {# Call option article  #}
  2102. function modiffOption(id_option,url) {
  2103.     console.log('zaaa',url);
  2104.     fetch(`${url}/option/${id_option}`)
  2105.     .then(response=> response.json())
  2106.     .then(data=>{
  2107.         
  2108.         $(".nice-select").attr("style", "display: none !important");
  2109.         $("#id_optionmodal").val(id_option);
  2110.         $("#name_optionmodal").val(data.options.name);
  2111.         $("#image_optionmodal").val(data.options.image1);
  2112.         var imageopt=`<img id="optionbtn1img" src="/upload/produits/${data.options.image1}">`;
  2113.         $("#optionsimage").html(imageopt);
  2114.         console.log('image',imageopt);
  2115.         console.log('subcates',data.options);
  2116.         console.log('olor',data.options.colorsOption);
  2117.         if ( typeof data.options.colorsOption != "undefined" && data.options.colorsOption != null && data.options.colorsOption.length != null && data.options.colorsOption.length > 0) {
  2118.             var colorso ="";
  2119.             for (let i = 0; i < data.options.colorsOption.length; i++) {
  2120.                 colorso +='<option>'+ data.options.colorsOption[i]+'</option>'
  2121.             }
  2122.             $("#optionscolor").html(colorso);
  2123.             $(".optionscolor").attr("style", "display: block !important");
  2124.             $("#optionscolor").attr("style", "display: block !important");
  2125.         }else{
  2126.             $(".optionscolor").attr("style", "display: none !important");
  2127.         }
  2128.         if (typeof data.options.format != "undefined" && data.options.format != null && data.options.format.length != null && data.options.format.length > 0) {
  2129.             var formatopt ="";
  2130.             for (let i = 0; i < data.options.format.length; i++) {
  2131.                 formatopt +='<option>'+data.options.format[i]+'</option>'
  2132.             }
  2133.             $("#optionsform").html(formatopt);
  2134.             $(".optionsform").attr("style", "display: block !important");
  2135.             $("#optionsform").attr("style", "display: block !important");
  2136.         }
  2137.         else{
  2138.             $(".optionsform").attr("style", "display: none !important");
  2139.         }
  2140.         if (typeof data.options.finition != "undefined" && data.options.finition != null && data.options.finition.length != null && data.options.finition.length > 0) {
  2141.             var finitions ="";
  2142.             for (let i = 0; i < data.options.finition.length; i++) {
  2143.                 finitions +='<option>'+data.options.finition[i]+'</option>'
  2144.             }
  2145.             $("#optionsfinition").html(finitions);
  2146.             $(".optionsfinition").attr("style", "display: block !important");
  2147.             $("#optionsfinition").attr("style", "display: block !important");
  2148.         }
  2149.         else{
  2150.             $(".optionsfinition").attr("style", "display: none !important");
  2151.         }
  2152.         if (typeof data.options.papier != "undefined" && data.options.papier != null && data.options.papier.length != null && data.options.papier.length > 0) {
  2153.             var papiers ="";
  2154.             for (let i = 0; i < data.options.papier.length; i++) {
  2155.                 papiers +='<option>'+data.options.papier[i]+'</option>'
  2156.             }
  2157.             $("#optionspapier").html(papiers);
  2158.             $(".optionspapier").attr("style", "display: block !important");
  2159.             $("#optionspapier").attr("style", "display: block !important");
  2160.         }
  2161.         else{
  2162.             $(".optionspapier").attr("style", "display: none !important");
  2163.         }
  2164.         if (typeof data.options.quantite != "undefined" && data.options.quantite != null && data.options.quantite.length != null && data.options.quantite.length > 0) {
  2165.             var quantites ="";
  2166.             for (let i = 0; i < data.options.quantite.length; i++) {
  2167.                 quantites +='<option>'+data.options.quantite[i]+'</option>'
  2168.             }
  2169.             $("#optionsquantite").html(quantites);
  2170.             $(".optionsquantite").attr("style", "display: block !important");
  2171.             $("#optionsquantite").attr("style", "display: block !important");
  2172.         }
  2173.         else{
  2174.             $(".optionsquantite").attr("style", "display: none !important");
  2175.         }
  2176.         if (typeof data.options.etiquette != "undefined" && data.options.etiquette != null && data.options.etiquette.length != null && data.options.etiquette.length > 0) {
  2177.             var etiquettes ="";
  2178.             for (let i = 0; i < data.options.etiquette.length; i++) {
  2179.                 etiquettes +='<option>'+data.options.etiquette[i]+'</option>'
  2180.             }
  2181.             $("#optionsetiquette").html(etiquettes);
  2182.             $(".optionsetiquette").attr("style", "display: block !important");
  2183.             $("#optionsetiquette").attr("style", "display: block !important");
  2184.         }
  2185.         else{
  2186.             $(".optionsetiquette").attr("style", "display: none !important");
  2187.         }
  2188.         if (typeof data.options.ruban != "undefined" && data.options.ruban != null && data.options.ruban.length != null && data.options.ruban.length > 0) {
  2189.             var rubans ="";
  2190.             for (let i = 0; i < data.options.ruban.length; i++) {
  2191.                 rubans +='<option>'+data.options.ruban[i]+'</option>'
  2192.             }
  2193.             $("#optionsruban").html(rubans);
  2194.             $(".optionsruban").attr("style", "display: block !important");
  2195.             $("#optionsruban").attr("style", "display: block !important");
  2196.         }
  2197.         else{
  2198.             $(".optionsruban").attr("style", "display: none !important");
  2199.         }
  2200.         
  2201.         $("#modalOption").modal("show");
  2202.             
  2203.     });
  2204.     
  2205. }
  2206. // function envoiGroupOption(params) {
  2207. //     console.log("io fa tonga");
  2208. //      var valeuroptions = localStorage.getItem('produit_option');
  2209. //     $("#storageGroupsOption").val(valeuroptions);
  2210. // }
  2211. // valide modal option article only
  2212. function validemodaloption() {
  2213.     //$("#optionscolor").val();
  2214.      $("#modalOption").modal("hide");
  2215.     console.log($("#optionscolor").val(),$("#id_optionmodal").val());
  2216.      const data = {
  2217.             idoption: $("#id_optionmodal").val(),
  2218.             nomoption: $("#name_optionmodal").val(),
  2219.             imageoption: $("#image_optionmodal").val(),
  2220.             color: $("#optionscolor").val(),
  2221.             form: $("#optionsform").val(),
  2222.             finition: $("#optionsfinition").val(),
  2223.             papier: $("#optionspapier").val(),
  2224.             quantite: $("#optionsquantite").val(),
  2225.             etiquette: $("#optionsetiquette").val(),
  2226.             ruban: $("#optionsruban").val(),
  2227.         };
  2228.     //     let datas = new FormData();
  2229.     //   return  datas.append("data", JSON.stringify(data));
  2230.     
  2231.     localStorage.setItem($("#id_optionmodal").val(), JSON.stringify(data));
  2232.     // if chambre
  2233.     if(document.querySelectorAll('.buttonAdd')) {
  2234.         const buttons = document.querySelectorAll('.buttonAdd');
  2235.         const labells = new Array()
  2236.         buttons.forEach(function(button){
  2237.             const idRoom = button.querySelector('input[type="checkbox"]:checked')
  2238.             if(idRoom){
  2239.                 idRoom.value = idRoom.id.split('_')[1]
  2240.                 labells.push(idRoom.value)
  2241.             }
  2242.         })
  2243.         // put array labells in localStorage
  2244.         localStorage.setItem('room_option', JSON.stringify(labells));
  2245.     }
  2246. }
  2247. // Fonction afiches toute reduction
  2248. function voirtouteReduction(id_product,url){
  2249.     $("#modalReduction").modal("hide");
  2250. }
  2251. // Fonction afiches toute caracteristique hebergement
  2252.     function voirtouteReduction(id_product, url) {
  2253.         $("#modalReduction").modal("hide");
  2254.     }
  2255. // Fonction afiches tous option (onfly for service)
  2256. function voirtoutOption(id_product,url) {
  2257.     console.log('kokokoko',url);
  2258.     console.log('isID',id_product);
  2259.     // var id_product=314;
  2260.     $("#valeurOpion").html("");
  2261.     fetch(`${url}/tous-options-product/${id_product}`)
  2262.     .then(response=> response.json())
  2263.     .then(data=>{ // return front/product/cart/optionHtml/row.html.twig
  2264.         $("#valeurOpion").append(data);
  2265.     });
  2266.     
  2267.     // Vérifier si les données sur les chambres sont stockées dans le localStorage
  2268.     console.log("veridier si les données sont stockées dans le localStorage")
  2269.     if (localStorage.getItem('room_option')) {
  2270.         // Récupérer les données sous forme d'Array
  2271.         const labells = JSON.parse(localStorage.getItem('room_option'));
  2272.         console.log("labells",labells)
  2273.         // Pour chaque valeur de l'Array, cocher la case correspondante
  2274.         labells.forEach(function(idRoom){
  2275.             const checkbox = document.querySelector('#roomButton_' + idRoom);
  2276.             if (checkbox) {
  2277.                 checkbox.checked = true;
  2278.             }
  2279.     });
  2280.     }
  2281.     if (localStorage.getItem('produit_option')) {
  2282.         // Récupérer les données sous forme d'Array
  2283.         const labells = JSON.parse(localStorage.getItem('produit_option'));
  2284.         console.log("labells",labells)
  2285.         // Pour chaque valeur de l'Array, cocher la case correspondante
  2286.         labells.forEach(function(idRoom){
  2287.             const checkbox = document.querySelector('#roomButton_' + idRoom);
  2288.             if (checkbox) {
  2289.                 checkbox.checked = true;
  2290.             }
  2291.     });
  2292.     }
  2293. }
  2294. {# Save infos group d'option and chambre in localstorage and update prix total #}
  2295. function validemodalgroupe(modalToHide) {
  2296.     // Hide modal depend of options
  2297.     if (modalToHide == "chambre") {
  2298.         $("#modalOptionChambre").modal("hide");
  2299.     } else {
  2300.         $("#modalOptionGP").modal("hide");
  2301.     }
  2302.     // If group option exist on the page
  2303.     if(document.getElementsByClassName('goption')) {
  2304.         var goption= document.getElementsByClassName('goption');
  2305.         var labels =new Array();
  2306.         var totalPriceOption = 0;
  2307.         for (let i = 0; i < goption.length; i++) {
  2308.             var id_goption = goption[i].id.split("_");
  2309.             var label= document.getElementsByClassName('label_'+id_goption[1]);
  2310.             var hidden= document.getElementsByClassName('hidden_'+id_goption[1]);
  2311.             var qte= document.getElementsByClassName('qte_'+id_goption[1]);
  2312.             
  2313.             // console.log('labeb',label);
  2314.             var compter=0;
  2315.             
  2316.             var lab =new Array();
  2317.             var qt =new Array();
  2318.             
  2319.             for (let l = 0; l < label.length; l++) {
  2320.             console.log('type', label[l].type);
  2321.                 if ((label[l].type=="checkbox" && label[l].checked) || 
  2322.             (label[l].type == "radio" && label[l].checked)) {
  2323.                     
  2324.                     lab[compter] = hidden[l].value;
  2325.                     qt[compter] = qte[l].value;
  2326.                      // Extract the price from hidden[l].value
  2327.                     let priceString = hidden[l].value.split("#_#")[1];
  2328.                     let price = parseFloat(priceString);
  2329.                     
  2330.                     // Multiply by the corresponding quantity and add to the total price
  2331.                     totalPriceOption += price * parseFloat(qte[l].value);
  2332.                     compter++
  2333.                 }
  2334.             }
  2335.             labels[i] = {idoption: id_goption[1], labelo: lab, qte: qt};
  2336.         }
  2337.             console.log('valin label',labels);
  2338.             
  2339.             localStorage.setItem('produit_option', JSON.stringify(labels));
  2340.             // update prix total in front
  2341.             calculerPrixTotal(totalPriceOption);
  2342.     }
  2343.     // If option chambre
  2344.     if(document.querySelectorAll('.buttonAdd')) {
  2345.         let totalPriceRoom = 0;
  2346.         let totalPlaceParticipant = 0;
  2347.         const buttons = document.querySelectorAll('.buttonAdd');
  2348.         const labells = new Array()
  2349.         buttons.forEach(function(button){
  2350.             const idRoom = button.querySelector('input[type="checkbox"]:checked')
  2351.             if(idRoom){
  2352.                 idRoom.value = idRoom.id.split('_')[1]
  2353.                 labells.push(idRoom.value)
  2354.                 if (document.getElementById(`priceRoom_${idRoom.value}`)) {
  2355.                     totalPriceRoom += parseFloat(document.getElementById(`priceRoom_${idRoom.value}`).value);
  2356.                 }
  2357.                 if(document.getElementById(`roomParticipant_${idRoom.value}`)){ // if it's an hotel
  2358.                     totalPlaceParticipant += parseInt(document.getElementById(`roomParticipant_${idRoom.value}`).value);
  2359.                 }
  2360.             }
  2361.         })
  2362.         // put array labells in localStorage
  2363.         localStorage.setItem('room_option', JSON.stringify(labells));
  2364.         console.log('localstorage',localStorage.getItem('room_option'));
  2365.         if(totalPlaceParticipant > 0){
  2366.             document.getElementById("participantsMax").value = totalPlaceParticipant;
  2367.             validationQtParticipant();
  2368.         }
  2369.         if (totalPriceRoom > 0) { // if totalPriceRoom positif -> it's an hotel
  2370.             document.getElementById("totalPriceHidden").value = totalPriceRoom;
  2371.             calculerPrixTotal(); // Actualisez le prix total apres avoir choisir des chambres
  2372.         }
  2373.     }
  2374. }
  2375.         // Ajouter au panier (only for article)
  2376. document.addEventListener('DOMContentLoaded', function () {
  2377.     if (!document.getElementById('form_add_bascket')) {
  2378.         return;
  2379.     }
  2380.     var form = document.getElementById('form_add_bascket');
  2381.     // var url = window.location.href.split('/');
  2382.         // var param_url = url[0]+'//'+url[2];
  2383.         // var checkOpt = document.querySelectorAll('.option-product');
  2384.         // var dataOptios = [];
  2385.         // for (var i = 0; i < checkOpt.length; i++) {
  2386.             // checkOpt[i].addEventListener('change', (option) => {
  2387.         //     // console.log('pppp',this);
  2388.         //     var idop = option.target.getAttribute('data-id');
  2389.         //     // console.log("izzz",param_url, idop);
  2390.         //     fetch(`${param_url}/option/${idop}`)
  2391.         //     .then(response=> response.json())
  2392.         //     .then(data=>{
  2393.         //         console.log('qqqqqq',data.options);
  2394.         //         console.log('nn',option.target.checked);
  2395.         //         if (option.target.checked) {
  2396.                     
  2397.         //             var dataOption={
  2398.         //                     idoption: data.options.id ? data.options.id : null,
  2399.         //                     nomoption: data.options.name ? data.options.name : null,
  2400.         //                     imageoption: data.options.image1 ? data.options.image1 : null,
  2401.         //                     color: data.options.colorsOption[0] ? data.options.colorsOption[0] : null,
  2402.         //                     form: data.options.format[0] ? data.options.format[0] : null,
  2403.         //                     finition: data.options.finition[0] ? data.options.finition[0] : null,
  2404.         //                     papier: data.options.papier[0] ? data.options.papier[0] : null,
  2405.         //                     quantite: data.options.quantite[0] ? data.options.quantite[0] : null,
  2406.         //                     etiquette: data.options.etiquette[0] ? data.options.etiquette[0] : null,
  2407.         //                     ruban: data.options.ruban[0] ? data.options.ruban[0] : null ,
  2408.         //                     }
  2409.         //             dataOptios.push(dataOption);
  2410.         //         }else{
  2411.         //             console.log('miala checked');
  2412.             //             console.log('donnée',dataOptios);
  2413.         //             for (let g = 0; g < dataOptios.length; g++) {    
  2414.         //                 if (dataOptios[g].idoption == idop) {
  2415.         //                     console.log('données_hita',dataOptios[g].idoption);
  2416.         //                 }
  2417.         //             }
  2418.         //         }
  2419.         //     });
  2420.         // })
  2421.     // }    
  2422.     
  2423.     form.addEventListener('submit', (e) => {
  2424.         e.preventDefault();
  2425.          let form = e.target;
  2426.         const formData = new FormData(form);
  2427.         // for (let h = 0; h < dataOptios.length; h++) {    
  2428.         //     //  formData.append("OpId_"+j, values[j]);
  2429.         //     //  console.log("valuo",values[j]);
  2430.         //     console.log('tonga_aty',dataOptios[h]);
  2431.         // }  
  2432.      var valeuroptions=localStorage.getItem('produit_option');
  2433.      localStorage.removeItem('produit_option');
  2434.      console.log("localstor", valeuroptions);
  2435.      formData.append("groupOption", valeuroptions);
  2436.     //  var table=[];
  2437.     //  for (let o = 0; o < valeuroptions.length; o++) {
  2438.     //     table[]= valeuroptions[o];    
  2439.     //  }
  2440.     //  console.log('valertab', table);
  2441.       if (Object.keys(localStorage).length != 0) {
  2442.         
  2443.           var values = [];
  2444.           keys = Object.keys(localStorage);
  2445.           i = keys.length;
  2446.   
  2447.           while ( i-- ) {
  2448.               values.push( localStorage.getItem(keys[i]) );
  2449.               localStorage.removeItem(keys[i]);
  2450.           }       
  2451.           formData.append("tail",values.length);
  2452.           
  2453.           for (let j = 0; j < values.length; j++) {    
  2454.              formData.append("OpId_"+j, values[j]);
  2455.              console.log("valuo",values[j]);
  2456.           }
  2457.       }
  2458.         fetch(form.action, {
  2459.             method: form.method,
  2460.             body: formData
  2461.         }).then(response => response.json())
  2462.         .then(data => {
  2463.             if (data.message === 'ok') {
  2464.                 if (data.response === 'added') {
  2465.                     const btnAdd = document.getElementById('btn_add');
  2466.                     btnAdd.classList.replace('btn-primary', 'btn-danger');
  2467.                     btnAdd.textContent = 'Supprimer du panier';
  2468.                     const msgElt = document.getElementById('message_form');
  2469.                     msgElt.classList.replace('text-danger', 'text-success');
  2470.                     msgElt.classList.add('text-center');
  2471.                     msgElt.textContent = 'Produit ajouté au panier !';
  2472.                     
  2473.                     let nbProducts = parseInt(document.getElementById('nb_basket').innerHTML);
  2474.                     nbProducts++;
  2475.                     document.getElementById('nb_basket').textContent = nbProducts;
  2476.                 } else if (data.response === 'removed') {
  2477.                     const btnAdd = document.getElementById('btn_add');
  2478.                     btnAdd.classList.replace('btn-danger', 'btn-primary');
  2479.                     btnAdd.textContent = 'Ajouter au panier';
  2480.                     const msgElt = document.getElementById('message_form');
  2481.                     msgElt.classList.replace('text-danger', 'text-success');
  2482.                     msgElt.classList.add('text-center');
  2483.                     msgElt.textContent = 'Produit supprimé du panier !';
  2484.                     let nbProducts = parseInt(document.getElementById('nb_basket').innerHTML);
  2485.                     nbProducts--;
  2486.                     document.getElementById('nb_basket').textContent = nbProducts;
  2487.                 } else if (data.response === 'error') {
  2488.                     const msgElt = document.getElementById('message_form');
  2489.                     msgElt.textContent = data.response;
  2490.                 }
  2491.             } else if (data.message === 'error') {
  2492.                 if (data.response === 'Quantité non disponible'){
  2493.                     const msgElt = document.getElementById('message_form');
  2494.                     msgElt.classList.replace('text-success', 'text-danger');
  2495.                     msgElt.classList.add('text-center');
  2496.                     msgElt.textContent = 'Quantité pas disponible';
  2497.                     return;
  2498.                 }
  2499.                 if (data.response === 'Quantité option non disponible') {
  2500.                     const msgElt = document.getElementById('message_form');
  2501.                     msgElt.classList.replace('text-success', 'text-danger');
  2502.                     msgElt.classList.add('text-center');
  2503.                     msgElt.textContent = 'Il y a une quantité d\'option pas disponible';
  2504.                     return;
  2505.                 }
  2506.             }
  2507.         });
  2508.         return false;
  2509.     })
  2510.     const btnWish = document.getElementById('btn_add_wish');
  2511.     if (btnWish) {
  2512.         btnWish.addEventListener('click', () => {
  2513.             fetch("{{ path('front_add_wish', {'id': product.id}) }}", { method: "POST" }).then(response => response.json()).then(data => {
  2514.                 if (data.message === 'ok') {
  2515.                     if (data.response === 'added') {
  2516.                         btnWish.style.color = '#fff';
  2517.                         btnWish.style.backgroundColor = '#ff4d4d';
  2518.                         document.getElementById('text_btn').textContent = "Supprimer";
  2519.                     } else if (data.response === 'removed') {
  2520.                         btnWish.style.color = '#ff4d4d';
  2521.                         btnWish.style.backgroundColor = '#fff';
  2522.                         document.getElementById('text_btn').textContent = "Ajouter";
  2523.                     }
  2524.                 }
  2525.             });
  2526.         })
  2527.     }
  2528. })
  2529.         </script>
  2530.         <script>
  2531. const formContact = document.getElementById('contactFormProduct');
  2532. if (formContact) {
  2533.     formContact.addEventListener('submit', (e) => {
  2534.         e.preventDefault();
  2535.         let form = e.target;
  2536.         const formData = new FormData(form);
  2537.         fetch(form.action, {
  2538.         method: form.method,
  2539.         body: formData
  2540.         }).then(response => response.json()).then(data => {
  2541.             if (data.status === 'ok') {
  2542.                 document.getElementById('messageSuccessContact').style.display = 'block';
  2543.                 formContact.reset();
  2544.             }
  2545.         });
  2546.         return false;
  2547.     })
  2548. }
  2549.         </script>
  2550.         <script src="{{ asset('js/jquery.rateyo.min.js') }}"></script>
  2551.         <script>
  2552.             $(function () {
  2553. $("#rateYo1, #rateYo2, #rateYo3, #rateYo4, #rateYo5, #rateYo6 ").rateYo({rating: 3.6});
  2554. });
  2555. $("#rateYo1").rateYo().on("rateyo.change", function (e, data) {
  2556. var $rateYo = $("#rateYo1").rateYo("rating");
  2557. $('#avis_serviceQuality').val($rateYo);
  2558. });
  2559. $("#rateYo2").rateYo().on("rateyo.change", function (e, data) {
  2560. var $rateYo = $("#rateYo2").rateYo("rating");
  2561. $('#avis_fiability').val($rateYo);
  2562. });
  2563. $("#rateYo3").rateYo().on("rateyo.change", function (e, data) {
  2564. var $rateYo = $("#rateYo3").rateYo("rating");
  2565. $('#avis_price').val($rateYo);
  2566. });
  2567. $("#rateYo4").rateYo().on("rateyo.change", function (e, data) {
  2568. var $rateYo = $("#rateYo4").rateYo("rating");
  2569. $('#avis_speed').val($rateYo);
  2570. });
  2571. $("#rateYo5").rateYo().on("rateyo.change", function (e, data) {
  2572. var $rateYo = $("#rateYo5").rateYo("rating");
  2573. $('#avis_conformDescription').val($rateYo);
  2574. });
  2575. $("#rateYo6").rateYo().on("rateyo.change", function (e, data) {
  2576. var $rateYo = $("#rateYo6").rateYo("rating");
  2577. $('#avis_communication').val($rateYo);
  2578. });
  2579.         </script>
  2580.         {% set isService = false %}
  2581.         {% for productSubCategory in product.subCategories %}
  2582.             {% if productSubCategory.isService == true %}
  2583.                 {% set isService = true %}
  2584.             {% endif %}
  2585.         {% endfor %}
  2586.         {% if isService == true %}
  2587.             <!-- LOCATIONS -->
  2588.             {% set isLocation = false %}
  2589.             {% for singleCategory in product.subcategories %}
  2590.                 {% if singleCategory.name == "Location de salle" or singleCategory.name == "Location de vehicule"  %}
  2591.                     {% set isLocation = true %}
  2592.                 {% endif %}
  2593.             {% endfor %}
  2594.             {% if isLocation is defined %}
  2595.                 <!-- LOCATIONS -->
  2596.                 {% if isLocation == true or product.typeLocation is not null %}
  2597.                     {% set locations = [] %}
  2598.                  
  2599.                     {% for location in product.locations %}
  2600.                         {#% if annonce.categorie.libelle != 'SERVICES' %#}
  2601.                         {#% Si la location est en attente ou si la location est acceptée, elle est ajoutée au tableau locations %#}
  2602.                             {% if location.isAccepted is same as(null) or location.isAccepted is same as(true) and location.isLannul != 1 %}
  2603.                                 {% set locations = locations|merge([{debut: location.startAt, fin: location.endAt, typeLocation: location.product.typeLocation ? location.product.typeLocation.label : "" }]) %}
  2604.                             {% endif %}
  2605.                         {#% else %}
  2606.                             {% set locations = locations|merge([{debut: location.dateDebut|date("d/m/Y H:i"), fin: location.dateFin|date("d/m/Y H:i"), statut: location.statutLocation.id }]) %}
  2607.                         {% endif %#}
  2608.                     {% endfor %}
  2609.                     {% set planningCompanies = [] %}
  2610.                     {% for planningCompanie in product.company.planningCompanies %}
  2611.                         {% if planningCompanie is defined %}
  2612.                             {% set planningCompanies = planningCompanies|merge([{debut: planningCompanie.start, fin: planningCompanie.end }]) %}
  2613.                         {% endif %}
  2614.                     {% endfor %}
  2615.         
  2616.                     <script>
  2617.                         const checkOptLocation = document.querySelectorAll('.cheklocationclass');
  2618.                         
  2619.                         for (var i = 0; i < checkOptLocation.length; i++) {
  2620.                             checkOptLocation[i].addEventListener('change', (option) => {
  2621.                                 if (option.target.checked) {
  2622.                                     const priceOptionre = option.target.getAttribute('data-price');
  2623.                                     console.log('yyyaaa',$("#totalPricese").html());
  2624.                                     var total= parseFloat($("#totalPricese").html()) + parseFloat(priceOptionre);
  2625.                                     $("#totalPricese").html(total);
  2626.                                 }else{
  2627.                                     const priceOptionre = option.target.getAttribute('data-price');
  2628.                                     var total= parseFloat($("#totalPricese").html()) - parseFloat(priceOptionre);
  2629.                                     $("#totalPricese").html(total);
  2630.                                 }
  2631.                             })
  2632.                         }
  2633.                     </script>
  2634.                     <script>
  2635.                         let locations = {{ locations|json_encode|raw }};
  2636.                         let planningCompanies = {{ planningCompanies|json_encode|raw }};
  2637.                     </script>
  2638.                     {% if product.typeLocation %}
  2639.                         {% if product.typeLocation.label == 'heure' %}
  2640.                             <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment-with-locales.min.js"></script>
  2641.                             <script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.8.1/baguetteBox.min.js"></script>
  2642.                             <script src="{{asset('/js/jquery.datetimepicker.full.js')}}"></script>
  2643.                             <script src="{{ asset('/js/calendrierLocationHeure.js') }}"></script>
  2644.                         {% else %}
  2645.                             <script src="{{ asset('/js/calendrierJours.js') }}"></script>
  2646.                             <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
  2647.                         {% endif %}
  2648.                     {% else %}
  2649.                         <script src="{{ asset('/js/calendrierJours.js') }}"></script>
  2650.                         <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
  2651.                     {% endif %}
  2652.                 {% endif %}
  2653.                 <!-- RESERVATIONS -->
  2654.                 {% if isLocation is same as(false) and product.typeLocation is null %}
  2655.                     {% set reservationsList = [] %}
  2656.                     {% for reservation in product.reservations %}
  2657.                         {% if reservation.isAccepted is same as(null) or reservation.isAccepted is same as(true)%}
  2658.                             {% set reservationsList = reservationsList|merge([{date_livraison: reservation.reservationPlannedAt}]) %}
  2659.                         {% endif %}
  2660.                     {% endfor %}
  2661.                      {# <script>
  2662.                         const checkOptResevatio = document.querySelectorAll('.chekboxclass');
  2663.                         // console.log('ffafffa', checkOptResevatio);
  2664.                         for (var i = 0; i < checkOptResevatio.length; i++) {
  2665.                             checkOptResevatio[i].addEventListener('change', (option) => {
  2666.                                 console.log('vvvvvvv', option.target.checked, parseFloat($("#totalPricere").html()));
  2667.                                 if (option.target.checked) {
  2668.                                     const priceOptionre = option.target.getAttribute('data-price');
  2669.                                     var total= parseFloat($("#totalPricere").html()) + parseFloat(priceOptionre);
  2670.                                     $("#totalPricere").html(total);
  2671.                                 }else{
  2672.                                     const priceOptionre = option.target.getAttribute('data-price');
  2673.                                     var total= parseFloat($("#totalPricere").html()) - parseFloat(priceOptionre);
  2674.                                     $("#totalPricere").html(total);
  2675.                                 }
  2676.                             })
  2677.                         }
  2678.                      </script> #}
  2679.                     <script>
  2680.                         let reservationsList = {{ reservationsList|json_encode|raw }};
  2681.                     </script>
  2682.                     <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment-with-locales.min.js"></script>
  2683.                     <script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.8.1/baguetteBox.min.js"></script>
  2684.                     <script src="{{asset('/js/jquery.datetimepicker.full.js')}}"></script>
  2685.                     <script src="{{ asset('/js/calendrierReservation.js') }}"></script>
  2686.                 {% endif %}
  2687.             {% endif %}
  2688.         {% endif %}
  2689.     {% endblock %}