templates/content/consultant/consultant_page.html.twig line 1

Open in your IDE?
  1. <section class="d-sm-none d-block" style="height: 80px;">
  2. </section>
  3. <section class="d-none d-sm-block">
  4.     {% for message in app.flashes("NeedCredit")%}
  5.     <div class="alert alert-danger alert-icon col-9 mx-auto border border-danger" role=" alert">
  6.         <div class="card col mx-auto card-icon ">
  7.             <button class="btn-close" type="button" data-bs-dismiss="alert" aria-label="Close"></button>
  8.             <div class="row no-gutters">
  9.                 <div class="col-auto card-icon-aside bg-danger">
  10.                    <i class="fas fa-euro-sign fa-2x text-white"></i>
  11.                 </div>
  12.                 <div class="col">
  13.                     <div class="card-body py-5">
  14.                         <h5 class="card-title">Credit Insufissant</h5>
  15.                         <p class="card-text">{{message}}<a href="https://demo.media-technologies.fr/tarifs">ici</a></p>
  16.                     </div>
  17.                 </div>
  18.             </div>
  19.         </div>
  20.     </div>
  21.     {% endfor %}
  22.     <h1 class="text-center text-uppercase mt-5 mb-3 ">Comment Contacter {{conseiller[0].userPseudo}} pour une
  23.         consultation de voyance ?</h1>
  24.     {% if app.user %}
  25.     <div class="col-lg-8 mx-auto mb-5 text-center">
  26.         <h4> Pour consulter {{conseiller[0].userPseudo}} penser à créditer votre compte</h4>
  27.         <br> <a href="{{path('app_tarifs')}}"> <button class="btn btn-primary mt-2"> Créditer votre compte </button>
  28.     </div>
  29.     {% else %}
  30.     <div class="col-lg-8 mx-auto mb-5 text-center">
  31.         <h4>Créer votre compte client dès maintenant, c'est gratuit et sans engagement.
  32.             Pour se faire, rien de plus simple, vous n'avez qu'a remplir le formulaire suivant. </h4>
  33.         <br> <a href="{{path('app_register')}}"> <button class="btn btn-primary mt-2"> Créer votre compte</button>
  34.     </div>
  35.     {% endif %}
  36.     <div class="container-xl col-sm-10  row mx-auto mt-4 mb-4">
  37.         <div class="col-sm-3 ">
  38.             <div class="card shadow">
  39.                 <h5 class="card-title text-center">{{conseiller[0].userPseudo}} - {{conseiller[0].userExtensionCode}}
  40.                 </h5>
  41.                 <img src="{{conseiller[0].photo}}" class="card-img-top" alt="...">
  42.                 <div class="card-body">
  43.                     {% if conseiller[0].note == 0 %}
  44.                     <p class="text-center  text-dark small ">Avis des membres
  45.                         <i class="bi bi-star"></i>
  46.                         <i class="bi bi-star"></i>
  47.                         <i class="bi bi-star"></i>
  48.                         <i class="bi bi-star"></i>
  49.                         <i class="bi bi-star"></i>
  50.                     </p>
  51.                     {% elseif conseiller[0].note == 0.5 %}
  52.                     <p class="text-center text-dark  small ">Avis des membres
  53.                         <i class="bi bi-star-half" style="color: #d78316;"></i>
  54.                         <i class="bi bi-star"></i>
  55.                         <i class="bi bi-star"></i>
  56.                         <i class="bi bi-star"></i>
  57.                         <i class="bi bi-star"></i>
  58.                     </p>
  59.                     {% elseif conseiller[0].note == 1 %}
  60.                     <p class="text-center text-dark  small ">Avis des membres
  61.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  62.                         <i class="bi bi-star"></i>
  63.                         <i class="bi bi-star"></i>
  64.                         <i class="bi bi-star"></i>
  65.                         <i class="bi bi-star"></i>
  66.                     </p>
  67.                     {% elseif conseiller[0].note == 1.5 %}
  68.                     <p class="text-center text-dark  small ">Avis des membres
  69.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  70.                         <i class="bi bi-star-half" style="color: #d78316;"></i>
  71.                         <i class="bi bi-star"></i>
  72.                         <i class="bi bi-star"></i>
  73.                         <i class="bi bi-star"></i>
  74.                     </p>
  75.                     {% elseif conseiller[0].note == 2 %}
  76.                     <p class="text-center text-dark  small ">Avis des membres
  77.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  78.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  79.                         <i class="bi bi-star"></i>
  80.                         <i class="bi bi-star"></i>
  81.                         <i class="bi bi-star"></i>
  82.                     </p>
  83.                     {% elseif conseiller[0].note == 2.5 %}
  84.                     <p class="text-center  text-dark small ">Avis des membres
  85.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  86.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  87.                         <i class="bi bi-star-half" style="color: #d78316;"></i>
  88.                         <i class="bi bi-star"></i>
  89.                         <i class="bi bi-star"></i>
  90.                     </p>
  91.                     {% elseif conseiller[0].note == 3 %}
  92.                     <p class="text-center  text-dark small ">Avis des membres
  93.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  94.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  95.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  96.                         <i class="bi bi-star"></i>
  97.                         <i class="bi bi-star"></i>
  98.                     </p>
  99.                     {% elseif conseiller[0].note == 3.5 %}
  100.                     <p class="text-center text-dark  small ">Avis des membres
  101.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  102.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  103.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  104.                         <i class="bi bi-star-half" style="color: #d78316;"></i>
  105.                         <i class="bi bi-star"></i>
  106.                     </p>
  107.                     {% elseif conseiller[0].note == 4 %}
  108.                     <p class="text-center  text-dark small ">Avis des membres
  109.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  110.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  111.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  112.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  113.                         <i class="bi bi-star"></i>
  114.                     </p>
  115.                     {% elseif conseiller[0].note == 4.5 %}
  116.                     <p class="text-center text-dark  small ">Avis des membres
  117.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  118.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  119.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  120.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  121.                         <i class="bi bi-star-half" style="color: #d78316;"></i>
  122.                     </p>
  123.                     {% elseif conseiller[0].note == 5 %}
  124.                     <p class="text-center  text-dark small ">Avis des membres
  125.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  126.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  127.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  128.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  129.                         <i class="bi bi-star-fill" style="color: #d78316;"></i>
  130.                     </p>
  131.                     {% endif %}
  132.                     {% if app.user %}
  133.                     <ul class="list-group list-group-flush">
  134.                         <button class="btn btn-primary shadow  mt-2"> <a href="{{path('app_userComment')}}"
  135.                                 class="text-white"><i class="bi bi-eye"></i> Voir mon avis</button></a>
  136.                         {% if conseiller[0].userChatOnline %}
  137.                         <button class="btn btn-primary shadow  mt-2"> <a
  138.                                 href="{{path('app_chat', {userId: conseiller[0].userId, userPseudoId: conseiller[0].userPseudoId })}}"
  139.                                 class="text-white"><i class="bi bi-chat-fill col-12"></i> Chat</button></a>
  140.                         {%else%}
  141.                         <button class="btn btn-dark shadow  mt-2"> <a href="#" class="text-white"><i
  142.                                     class="bi bi-chat-fill col-12"></i> Chat</button></a>
  143.                         {% endif %}
  144.                         <!-- <button class="btn btn-primary shadow  mt-2"> <i class="bi bi-camera-video-fill"></i>
  145.                             Visio</button> -->
  146.                         <button class="btn btn-primary shadow  mt-2"> <a
  147.                                 href="{{path('question_mail',  {id : conseiller[0].complementId})}}"
  148.                                 class="text-white"><i class="bi bi-envelope-fill col-12"></i> Question Mail </a>
  149.                         </button>
  150.                         <button class="btn btn-primary shadow mt-2"> <i class="bi bi-heart-fill"></i> Ajouter aux
  151.                             Favoris</button>
  152.                     </ul>
  153.                     {% else %}
  154.                     <ul class="list-group list-group-flush">
  155.                         <button class="btn btn-primary shadow  mt-2">
  156.                             <a href="{{path('app_login')}}" class="text-white">
  157.                                 <i class="bi bi-box-arrow-in-right"></i> connexion </a>
  158.                         </button>
  159.                         <button class="btn btn-primary shadow  mt-2">
  160.                             <a href="{{path('app_register')}}" class="text-white">
  161.                                 <i class="bi bi-book"></i> Inscription </a>
  162.                         </button>
  163.                     </ul>
  164.                     {% endif %}
  165.                 </div>
  166.             </div>
  167.         </div>
  168.         <div class="card col-lg-9 ">
  169.             <div class="card-header border-bottom ">
  170.                 <!-- Wizard navigation-->
  171.                 <div class="nav nav-pills nav-justified flex-column flex-xl-row nav-wizard " id="cardTab"
  172.                     role="tablist">
  173.                     <!-- Wizard navigation item 1-->
  174.                     <a class="nav-item nav-link active" id="profil-tab" href="#profil" data-bs-toggle="tab" role="tab"
  175.                         aria-controls="profil" aria-selected="true">
  176.                         <div class="wizard-step-icon"><i class="bi bi-person"></i></div>
  177.                         <div class="wizard-step-text">
  178.                             <div class="wizard-step-text-name">Profil</div>
  179.                         </div>
  180.                     </a>
  181.                     <!-- Wizard navigation item 2-->
  182.                     <a class="nav-item nav-link" id="avis-tab" href="#avis" data-bs-toggle="tab" role="tab"
  183.                         aria-controls="avis" aria-selected="true">
  184.                         <div class="wizard-step-icon"><i class="bi bi-book"></i></div>
  185.                         <div class="wizard-step-text">
  186.                             <div class="wizard-step-text-name">Appréciations</div>
  187.                         </div>
  188.                     </a>
  189.                     {% if app.user %}
  190.                     <!-- Wizard navigation item 3-->
  191.                     <a class="nav-item nav-link" id="eval-tab" href="#eval" data-bs-toggle="tab" role="tab"
  192.                         aria-controls="eval" aria-selected="true">
  193.                         <div class="wizard-step-icon"><i class="bi bi-pen-fill"></i></div>
  194.                         <div class="wizard-step-text ">
  195.                             <div class="wizard-step-text-name "> Laissez un avis</div>
  196.                         </div>
  197.                     </a>
  198.                     {% endif %}
  199.                 </div>
  200.             </div>
  201.             <div class="card-body ">
  202.                 <div class="tab-content" id="cardTabContent">
  203.                     <!-- Wizard tab pane item 1-->
  204.                     <div class="tab-pane  fade show active" id="profil" role="tabpanel" aria-labelledby="profil-tab">
  205.                         <div class="row justify-content-center ">
  206.                             {% if conseiller[0].prixParMinute == 0%}
  207.                             {%else%}
  208.                             <strong class="text-warning text-center mt-n-5">--* Consultation CB à
  209.                                 {{conseiller[0].prixParMinute}} €/mn *--</strong>
  210.                             {%endif%}
  211.                             <h2 class=" text-center">{{conseiller[0].titrePage}}</h2>
  212.                             <h4 class=" text-center">{{conseiller[0].metaDescription}}</h4>
  213.                             <p>{{conseiller[0].descriptionLongue|raw}}</p>
  214.                         </div>
  215.                     </div>
  216.                     <!-- Wizard tab pane item 2-->
  217.                     <div class="tab-pane py-5 py-xl-10 fade text-white" id="avis" role="tabpanel"
  218.                         aria-labelledby="avis-tab">
  219.                         {% for avis in conseillerAvis %}
  220.                         {% if avis is empty %}
  221.                         <div class="card shadow border-white bg-primary px-3 py-3 mt-2">
  222.                             <p>Ce conseiller n'a pas encore reçu d'appréciation</p>
  223.                         </div>
  224.                         {% else %}
  225.                         {% endif %}
  226.                         {% endfor %}
  227.                     </div>
  228.                     {% if app.user %}
  229.                     <div class="tab-pane py-5 py-xl-10 fade" id="eval" role="tabpanel" aria-labelledby="eval-tab">
  230.                         <div class="row justify-content-center text-white">
  231.                             <h4 class="">Soumission d'une appréciation client</h4>
  232.                             {{ form_start(avisForm) }}
  233.                             <div class="mb-3">
  234.                                 <!-- <label for="exampleFormControlTextarea1">Commentaire</label>
  235.                                 <textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea> -->
  236.                                 {{ form_row(avisForm.message , {
  237.                                     label: 'Commentaire'
  238.                                 }) }}
  239.                             </div>
  240.                             <div class="mb-3">
  241.                                 {{ form_row(avisForm.note , {
  242.                                     label: 'Note'
  243.                                 }) }}
  244.                             </div>
  245.                             <div>
  246.                                 {{ form_row(avisForm.envoyer , {
  247.                                     label: 'Evaluer'
  248.                                 }) }}
  249.                               
  250.                             </div>
  251.                             {{ form_end(avisForm) }}
  252.                         </div>
  253.                     </div>
  254.                     {% endif %}
  255.                 </div>
  256.             </div>
  257.         </div>
  258.     </div>
  259.     <div class="container-xl px-4 mt-4">
  260.         <div class="card mb-4">
  261.             <div class="card-header">Planning</div>
  262.             <div class="card-body">
  263.                 <div class="table-responsive h-100 ">
  264.                     <!-- <div class="container-fluid row mx-auto">
  265.                         <p class="col-6">Disponible <i class="bi bi-square-fill" style="color: #198754;"></i> </p>
  266.                         <p class="col-6">Indisponible : <i class="bi bi-square-fill" style="color: #6c757d;"></i></p>
  267.                     </div> -->
  268.                     <div id="{{planningFormat}}">
  269.                        
  270.                     </div>
  271.                     <!-- <table class="calendar table table-bordered centered  h-100">
  272.                         <thead class="table-light">
  273.                             <tr>
  274.                                 <th scope="col"></th>
  275.                                 {% for day in weekdaysShort %}
  276.                                 <th scope="col" class='text-small text-center'>{{day}}</th>
  277.                                 {% endfor %}
  278.                             </tr>
  279.                         </thead>
  280.                         <tbody>
  281.                             {% for i in [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]%}
  282.                             <tr>
  283.                                 <th class="text-center text-small" scope="row">{{i}}:00</th>
  284.                                 {% for val in daysHoursShort[i] %}
  285.                                 </p>
  286.                                 {% if val == false %}
  287.                                 <td class="bg-gray-600"></td>
  288.                                 {% else %}
  289.                                 <td class="bg-green text-white text-small text-center"></td>
  290.                                 {% endif %}
  291.                                 {% endfor %}
  292.                             </tr>
  293.                             {% endfor %}
  294.                     </table> -->
  295.                 </div>
  296.             </div>
  297.         </div>
  298.     </div>
  299. </section>
  300. <section class="d-sm-none d-block">
  301.     <div class="col-12 ">
  302.         <div class="team-member ">
  303.             <div class=""> <img class="mx-auto rounded-circle mt-2 " src="{{conseiller[0].photo}}" alt="..."
  304.                     style="width: 150px; height: 150px;" /></div>
  305.             {% if conseiller[0].note == 0 %}
  306.             <p class="text-center  text-dark small ">Avis des membres
  307.                 <i class="bi bi-star"></i>
  308.                 <i class="bi bi-star"></i>
  309.                 <i class="bi bi-star"></i>
  310.                 <i class="bi bi-star"></i>
  311.                 <i class="bi bi-star"></i>
  312.             </p>
  313.             {% elseif conseiller[0].note == 0.5 %}
  314.             <p class="text-center text-dark  small ">Avis des membres
  315.                 <i class="bi bi-star-half" style="color: #d78316;"></i>
  316.                 <i class="bi bi-star"></i>
  317.                 <i class="bi bi-star"></i>
  318.                 <i class="bi bi-star"></i>
  319.                 <i class="bi bi-star"></i>
  320.             </p>
  321.             {% elseif conseiller[0].note == 1 %}
  322.             <p class="text-center text-dark  small ">Avis des membres
  323.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  324.                 <i class="bi bi-star"></i>
  325.                 <i class="bi bi-star"></i>
  326.                 <i class="bi bi-star"></i>
  327.                 <i class="bi bi-star"></i>
  328.             </p>
  329.             {% elseif conseiller[0].note == 1.5 %}
  330.             <p class="text-center text-dark  small ">Avis des membres
  331.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  332.                 <i class="bi bi-star-half" style="color: #d78316;"></i>
  333.                 <i class="bi bi-star"></i>
  334.                 <i class="bi bi-star"></i>
  335.                 <i class="bi bi-star"></i>
  336.             </p>
  337.             {% elseif conseiller[0].note == 2 %}
  338.             <p class="text-center text-dark  small ">Avis des membres
  339.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  340.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  341.                 <i class="bi bi-star"></i>
  342.                 <i class="bi bi-star"></i>
  343.                 <i class="bi bi-star"></i>
  344.             </p>
  345.             {% elseif conseiller[0].note == 2.5 %}
  346.             <p class="text-center  text-dark small ">Avis des membres
  347.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  348.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  349.                 <i class="bi bi-star-half" style="color: #d78316;"></i>
  350.                 <i class="bi bi-star"></i>
  351.                 <i class="bi bi-star"></i>
  352.             </p>
  353.             {% elseif conseiller[0].note == 3 %}
  354.             <p class="text-center  text-dark small ">Avis des membres
  355.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  356.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  357.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  358.                 <i class="bi bi-star"></i>
  359.                 <i class="bi bi-star"></i>
  360.             </p>
  361.             {% elseif conseiller[0].note == 3.5 %}
  362.             <p class="text-center text-dark  small ">Avis des membres
  363.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  364.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  365.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  366.                 <i class="bi bi-star-half" style="color: #d78316;"></i>
  367.                 <i class="bi bi-star"></i>
  368.             </p>
  369.             {% elseif conseiller[0].note == 4 %}
  370.             <p class="text-center  text-dark small ">Avis des membres
  371.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  372.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  373.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  374.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  375.                 <i class="bi bi-star"></i>
  376.             </p>
  377.             {% elseif conseiller[0].note == 4.5 %}
  378.             <p class="text-center text-dark  small ">Avis des membres
  379.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  380.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  381.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  382.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  383.                 <i class="bi bi-star-half" style="color: #d78316;"></i>
  384.             </p>
  385.             {% elseif conseiller[0].note == 5 %}
  386.             <p class="text-center  text-dark small ">Avis des membres
  387.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  388.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  389.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  390.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  391.                 <i class="bi bi-star-fill" style="color: #d78316;"></i>
  392.             </p>
  393.             {% endif %}
  394.             <h4>{{conseiller[0].userPseudo}}</h4>
  395.             <p class="text-muted"> {{conseiller[0].userExtensionCode}}</p>
  396.             {% if app.user %}
  397.             <a href="tel:01 72 89 19 56">
  398.                 <div class=" btn-primary btn-social mx-2 " href="#"><i class="bi bi-telephone-fill "></i>
  399.                 </div>
  400.             </a>
  401.             <a href="{{path('question_mail',  {id : conseiller[0].complementId})}}">
  402.                 <div class=" btn-primary btn-social mx-2" href="#!"><i class="bi bi-envelope-fill "></i></div>
  403.             </a>
  404.             {% if conseiller[0].userMailing %}
  405.             <a href="{{path('app_chat', {userId: conseiller[0].userId, userPseudoId: conseiller[0].userPseudoId })}}">
  406.                 <div class=" btn-primary btn-social mx-2" href="#!"><i class="bi bi-chat-fill "></i>
  407.                 </div>
  408.             </a>
  409.             {% endif %}
  410.             {% if conseiller[0].userMailing %}
  411.             <a href="{{path('app_login')}}">
  412.                 <div class=" btn-primary btn-social mx-2" href="#!"><i class="bi bi-camera-video-fill"></i></div>
  413.             </a>
  414.             {% endif %}
  415.             {% else %}
  416.             <a href="{{path('app_login')}}">
  417.                 <button class="btn btn-primary "><i class="bi bi-box-arrow-in-right"></i> &nbsp; connexion</button>
  418.             </a>
  419.             <a href="{{path('app_register')}}">
  420.                 <button class="btn btn-primary "><i class="bi bi-book"></i> &nbsp; Inscription</button>
  421.             </a>
  422.         </div>
  423.         {% endif %}
  424.     </div>
  425.     </div>
  426.     <div class="accordion accordion-flush mt-3" id="serviceFlush">
  427.         <div class="accordion-item">
  428.             <h2 class="accordion-header" id="flush-headingOne">
  429.                 <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
  430.                     data-bs-target="#serviceOne" aria-expanded="false" aria-controls="flush-collapseOne">
  431.                     <i class="bi bi-person"></i> &nbsp; Profil
  432.                 </button>
  433.             </h2>
  434.             <div id="serviceOne" class="accordion-collapse collapse" aria-labelledby="flush-headingOne"
  435.                 data-bs-parent="#serviceFlush">
  436.                 <div class="accordion-body text-center">
  437.                     <strong class="text-warning text-center mt-n-5">--* Consultation CB à
  438.                         {{conseiller[0].prixParMinute}} €/mn *--</strong>
  439.                     <h3 class=" text-center">{{conseiller[0].titrePage}}</h3>
  440.                     <h4 class=" text-center">{{conseiller[0].metaDescription}}</h4>
  441.                     <p>{{conseiller[0].descriptionLongue|raw}}</p>
  442.                 </div>
  443.             </div>
  444.         </div>
  445.         <div class="accordion-item mt-2">
  446.             <h2 class="accordion-header" id="flush-headingTwo">
  447.                 <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
  448.                     data-bs-target="#serviceTwo" aria-expanded="false" aria-controls="flush-collapseTwo">
  449.                     <i class="bi bi-book"></i> &nbsp; Appréciations
  450.                 </button>
  451.             </h2>
  452.             <div id="serviceTwo" class="accordion-collapse collapse " aria-labelledby="flush-headingTwo"
  453.                 data-bs-parent="#serviceFlush">
  454.                 <div class="accordion-body">
  455.                     {% for avis in conseillerAvis %}
  456.                     {% if avis is empty %}
  457.                     <div class="card shadow border-primary  ">
  458.                         <p>Ce conseiller n'a pas encore reçu d'appréciation</p>
  459.                     </div>
  460.                     {% else %}
  461.                     {% endif %}
  462.                     {% endfor %}
  463.                 </div>
  464.             </div>
  465.         </div>
  466.         {% if app.user%}
  467.         <div class="accordion-item mt-2">
  468.             <h2 class="accordion-header" id="flush-headingThree">
  469.                 <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
  470.                     data-bs-target="#serviceThree" aria-expanded="false" aria-controls="flush-collapseTwo">
  471.                     <i class="bi bi-pen-fill"></i> &nbsp; Laissez un avis
  472.                 </button>
  473.             </h2>
  474.             <div id="serviceThree" class="accordion-collapse collapse " aria-labelledby="flush-headingThree"
  475.                 data-bs-parent="#serviceFlush">
  476.                 <div class="accordion-body text-center">
  477.                     <div class="row justify-content-center ">
  478.                         <h4 class="">Soumission d'une appréciation client</h4>
  479.                         {{ form_start(avisFormMobile) }}
  480.                         <div class="mb-3">
  481.                             <!-- <label for="exampleFormControlTextarea1">Commentaire</label>
  482.                             <textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea> -->
  483.                             {{ form_row(avisFormMobile.message , {
  484.                                 label: 'Commentaire'
  485.                             }) }}
  486.                         </div>
  487.                         <div class="mb-3">
  488.                             {{ form_row(avisFormMobile.note , {
  489.                                 label: 'Note'
  490.                             }) }}
  491.                         </div>
  492.                         <div>
  493.                             {{ form_row(avisFormMobile.envoyer , {
  494.                                 label: 'Evaluer'
  495.                             }) }}
  496.                           
  497.                         </div>
  498.                         {{ form_end(avisFormMobile) }}
  499.                     </div>
  500.                 </div>
  501.             </div>
  502.         </div>
  503.         {% endif %}
  504.         <div class="accordion-item mt-2">
  505.             <h2 class="accordion-header" id="flush-headingFour">
  506.                 <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
  507.                     data-bs-target="#serviceFour" aria-expanded="false" aria-controls="flush-collapseTwo">
  508.                     <i class="bi bi-calendar"></i> &nbsp; Planning
  509.                 </button>
  510.             </h2>
  511.             <div id="serviceFour" class="accordion-collapse collapse " aria-labelledby="flush-headingFour"
  512.                 data-bs-parent="#serviceFlush">
  513.                 <div class="accordion-body text-center">
  514.                     <div class="table-responsive h-100">
  515.                         <div class="container-fluid row mx-auto">
  516.                             <p class="col-6">Disponible <i class="bi bi-square-fill" style="color: #198754;"></i> </p>
  517.                             <p class="col-6">Indisponible : <i class="bi bi-square-fill" style="color: #6c757d;"></i>
  518.                             </p>
  519.                         </div>
  520.                         <!-- 
  521.                         <div id="{{planningFormat}}">
  522.                         </div>
  523.                         -->
  524.                         <table class="calendar table table-bordered centered  h-100">
  525.                             <thead class="table-light">
  526.                                 <tr>
  527.                                     <th scope="col"></th>
  528.                                     {% for day in weekdaysShort %}
  529.                                     <th scope="col" class='text-small text-center'>{{day}}</th>
  530.                                     {% endfor %}
  531.                                 </tr>
  532.                             </thead>
  533.                            
  534.                             <tbody>
  535.                                 {% for i in [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]%}
  536.                                 <tr>
  537.                                     <th class="text-center text-small bg-white" scope="row">{{i}}:00</th>
  538.                                     {% for val in daysHoursShort[i] %}
  539.                                     </p>
  540.                                     {% if val == false %}
  541.                                     <td class="bg-gray-600"></td>
  542.                                     {% else %}
  543.                                     <td class="bg-green text-white text-small text-center"></td>
  544.                                     {% endif %}
  545.                                     {% endfor %}
  546.                                 </tr>
  547.                                 {% endfor %}
  548.                         </table>
  549.                     </div>
  550.                 </div>
  551.             </div>
  552.         </div>
  553.     </div>
  554. </section>
  555. <script type="text/javascript" nonce="{{ csp_nonce('script') }}">
  556.     function selectAll(ch) {
  557.         var tab = document.getElementsByTagName("input");
  558.         for (var i = 0; i < tab.length; i++) {
  559.             if (tab[i].type == "checkbox")
  560.                 tab[i].checked = ch.checked;
  561.         }
  562.     }
  563. </script>
  564. <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
  565. <script nonce="{{ csp_nonce('script') }}">
  566.     window.onload = () => {
  567.         let calendarEl2 = document.querySelector('#{{planningFormat}}');
  568.         if (('#{{planningFormat}}' == '#HebdomadaireUtilisateur') || ('#{{planningFormat}}' == '#HebdomadaireSimple') || ('#{{planningFormat}}' == '#JournalierSimple') || ('#{{planningFormat}}' == '#HoraireSimple')) {
  569.             let calendar2 = new FullCalendar.Calendar(calendarEl2, {
  570.                 schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
  571.                 initialView: 'timeGridWeek',
  572.                 locale: 'fr',
  573.                 timeZone: 'Europe/Paris',
  574.                 nowIndicator: true,
  575.                 themeSystem: 'bootstrap5',
  576.                 firstDay: 1,
  577.                 navLinks: false,
  578.                 editable: false,
  579.                 eventResizableFromStart: false,
  580.                 slotEventOverlap: false,
  581.                 allDaySlot: false,
  582.                 selectable: false,
  583.                 selectMirror: true,
  584.                 dayMaxEvents: true,
  585.                 aspectRatio: 1,
  586.                 // eventOrderStrict: true,
  587.                 headerToolbar: {
  588.                     start: '',
  589.                     center: '',
  590.                     end: '',
  591.                 },
  592.                 buttonText:
  593.                 {
  594.                     today: "Aujourd'hui",
  595.                     month: 'Mois',
  596.                     week: 'Semaine',
  597.                     day: 'Jour',
  598.                     resourceTimeline: 'Jour',
  599.                     list: 'Liste'
  600.                 },
  601.                 events: JSON.parse('{{ data|raw }}'),
  602.                 eventColor: '#00ac69',
  603.                 eventClick: function (info) {
  604.                     var hoursBegin = info.event.start.getHours() - 2;
  605.                     var minutesBegin = info.event.start.getMinutes();
  606.                     var hoursEnd = info.event.end.getHours() - 2;
  607.                     var minutesEnd = info.event.end.getMinutes();
  608.                     var id = info.event.id;
  609.                     var planningEventId = "{{planningEventId}}"
  610.                     var urlToDelete = "/deletePlanning/" + planningEventId + "/" + id;
  611.                     var urlToModify = "/modifyPlannig/" + planningEventId + "/" + id;
  612.                     $('#EventId').val(id);
  613.                     $('#modifyPlanningListId').attr("href", urlToModify);
  614.                     $('#planningListId').attr("href", urlToDelete);
  615.                     $('#showEventCalendarConseiller').html(info.event.title);
  616.                     $('#hoursBegin').val(hoursBegin);
  617.                     $('#minutesBegin').val(minutesBegin);
  618.                     $('#hoursEnd').val(hoursEnd);
  619.                     $('#minutesEnd').val(minutesEnd);
  620.                     var newHours = $('#hoursBegin').val();
  621.                     var modal = $("#showEventCalendar");
  622.                     modal.modal('show');
  623.                 },
  624.                 resourceAreaHeaderContent: 'Conseillers',
  625.                 resources: JSON.parse('{{ ressources|raw }}'),
  626.                 resourceAreaWidth: " 10%",
  627.                 eventOrder: "-userId",
  628.             });
  629.             calendar2.on('eventChange', (e) => {
  630.                 let url = `/gestionPlanning/{{planningEventId}}/edit`
  631.                 let donnees = {
  632.                     "id": e.event.id,
  633.                     "title": e.event.title,
  634.                     "daysOfWeek": e.event.extendedProps.weekDayNum,
  635.                     "startTime": e.event.start,
  636.                     "endTime": e.event.end
  637.                 }
  638.                 let xhr = new XMLHttpRequest
  639.                 xhr.open("POST", url)
  640.                 xhr.setRequestHeader("Content-Type", "application/json")
  641.                 xhr.send(JSON.stringify(donnees))
  642.             })
  643.             calendar2.render()
  644.         } else if (('#{{planningFormat}}' == '#HoraireMultiple')) {
  645.             let calendar2 = new FullCalendar.Calendar(calendarEl2, {
  646.                 schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
  647.                 initialView: 'resourceTimeline',
  648.                 locale: 'fr',
  649.                 timeZone: 'Europe/Paris',
  650.                 nowIndicator: true,
  651.                 themeSystem: 'bootstrap5',
  652.                 firstDay: 1,
  653.                 navLinks: true,
  654.                 editable: true,
  655.                 eventResizableFromStart: true,
  656.                 selectable: true,
  657.                 selectMirror: true,
  658.                 dayMaxEvents: true,
  659.                 // eventOrderStrict: true,
  660.                 headerToolbar: {
  661.                     start: 'prev,next today',
  662.                     center: 'title',
  663.                     end: 'timeGridWeek,resourceTimeline',
  664.                 },
  665.                 buttonText:
  666.                 {
  667.                     today: "Aujourd'hui",
  668.                     month: 'Mois',
  669.                     week: 'Semaine',
  670.                     day: 'Jour',
  671.                     resourceTimeline: 'Jour',
  672.                     list: 'Liste'
  673.                 },
  674.                 events: JSON.parse('{{ data|raw }}'),
  675.                 dayClick: function (date, allDay, jsEvent, view) {
  676.                     if (allDay) {
  677.                         alert('Clicked on the entire day: ' + date);
  678.                     } else {
  679.                         alert('Clicked on the slot: ' + date);
  680.                     }
  681.                     alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
  682.                     alert('Current view: ' + view.name);
  683.                     // change the day's background color just for fun
  684.                     $(this).css('background-color', 'red');
  685.                 },
  686.                 eventClick: function (info) {
  687.                     var hoursBegin = info.event.start.getHours() - 2;
  688.                     var minutesBegin = info.event.start.getMinutes();
  689.                     var hoursEnd = info.event.end.getHours() - 2;
  690.                     var minutesEnd = info.event.end.getMinutes();
  691.                     var param = "?hoursBegin=" + hoursBegin + "&minutesBegin=" + minutesBegin + "&hoursEnd=" + hoursEnd + "&minutesEnd=" + minutesEnd;
  692.                     var id = info.event.id;
  693.                     var planningEventId = "{{planningEventId}}"
  694.                     var urlToDelete = "/deletePlanning/" + planningEventId + "/" + id;
  695.                     var urlToModify = "/modifyPlannig/" + planningEventId + "/" + id + param;
  696.                     console.log(urlToModify);
  697.                     EventId
  698.                     $('#EventId').val(id);
  699.                     $('#modifyPlanningListId').attr("href", urlToModify);
  700.                     $('#planningListId').attr("href", urlToDelete);
  701.                     $('#showEventCalendarConseiller').html(info.event.title);
  702.                     $('#hoursBegin').val(hoursBegin);
  703.                     $('#minutesBegin').val(minutesBegin);
  704.                     $('#hoursEnd').val(hoursEnd);
  705.                     $('#minutesEnd').val(minutesEnd);
  706.                     var modal = $("#showEventCalendar");
  707.                     modal.modal('show');
  708.                     info.el.style.borderColor = 'red';
  709.                 },
  710.                 slotEventOverlap: false,
  711.                 resourceAreaHeaderContent: 'Touches',
  712.                 resources: JSON.parse('{{ ressources|raw }}'),
  713.                 resourceAreaWidth: " 10%",
  714.                 eventOrder: "-keypad",
  715.             });
  716.             calendar2.on('eventChange', (e) => {
  717.                 let url = `/gestionPlanning/{{planningEventId}}/edit`
  718.                 let donnees = {
  719.                     "id": e.event.id,
  720.                     "title": e.event.title,
  721.                     "daysOfWeek": e.event.daysOfWeek,
  722.                     "startTime": e.event.start,
  723.                     "endTime": e.event.end,
  724.                     "backgroundColor": e.event.backgroundColor,
  725.                 }
  726.                 console.log(donnees);
  727.                 let xhr = new XMLHttpRequest()
  728.                 xhr.open("POST", url)
  729.                 xhr.setRequestHeader("Content-Type", "application/json")
  730.                 xhr.send(JSON.stringify(donnees))
  731.             })
  732.             calendar2.render()
  733.         } else if (('#{{planningFormat}}' == '#JournalierMultiple')) {
  734.             let calendar2 = new FullCalendar.Calendar(calendarEl2, {
  735.                 schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
  736.                 initialView: 'resourceTimeGridDay',
  737.                 locale: 'fr',
  738.                 timeZone: 'Europe/Paris',
  739.                 nowIndicator: true,
  740.                 themeSystem: 'bootstrap5',
  741.                 firstDay: 1,
  742.                 navLinks: true,
  743.                 editable: true,
  744.                 initialDate: '{{date}}',
  745.                 eventResizableFromStart: true,
  746.                 slotEventOverlap: false,
  747.                 allDaySlot: false,
  748.                 selectable: true,
  749.                 selectMirror: true,
  750.                 dayMaxEvents: true,
  751.                 viewRender: function (view, element) {
  752.                     console.log(element);
  753.                 },
  754.                 // eventOrderStrict: true,
  755.                 headerToolbar: {
  756.                     start: 'today',
  757.                     center: 'title',
  758.                     end: 'resourceTimeGridDay',
  759.                 },
  760.                 resourceTimeline: {
  761.                     aspectRatio: 2.5,
  762.                 },
  763.                 buttonText:
  764.                 {
  765.                     today: "Aujourd'hui",
  766.                     month: 'Mois',
  767.                     week: 'Semaine',
  768.                     day: 'Jour',
  769.                     resourceTimeline: 'Jour',
  770.                     list: 'Liste',
  771.                 },
  772.                 events: JSON.parse('{{ data|raw }}'),
  773.                 eventClick: function (info) {
  774.                     var hoursBegin = info.event.start.getHours() - 2;
  775.                     var minutesBegin = info.event.start.getMinutes();
  776.                     var hoursEnd = info.event.end.getHours() - 2;
  777.                     var minutesEnd = info.event.end.getMinutes();
  778.                     var id = info.event.id;
  779.                     var planningEventId = "{{planningEventId}}"
  780.                     var urlToDelete = "/deletePlanning/" + planningEventId + "/" + id;
  781.                     var urlToModify = "/modifyPlannig/" + planningEventId + "/" + id;
  782.                     $('#EventId').val(id);
  783.                     $('#modifyPlanningListId').attr("href", urlToModify);
  784.                     $('#planningListId').attr("href", urlToDelete);
  785.                     $('#showEventCalendarConseiller').html(info.event.title);
  786.                     $('#hoursBegin').val(hoursBegin);
  787.                     $('#minutesBegin').val(minutesBegin);
  788.                     $('#hoursEnd').val(hoursEnd);
  789.                     $('#minutesEnd').val(minutesEnd);
  790.                     var newHours = $('#hoursBegin').val();
  791.                     console.log(id);
  792.                     var modal = $("#showEventCalendar");
  793.                     modal.modal('show');
  794.                 },
  795.                 resourceAreaHeaderContent: 'Conseillers',
  796.                 resources: JSON.parse('{{ ressources|raw }}'),
  797.                 resourceAreaWidth: " 10%",
  798.                 eventOrder: "-userId",
  799.             });
  800.             calendar2.on('eventChange', (e) => {
  801.                 let url = `/gestionPlanning/{{planningEventId}}/edit`
  802.                 let donnees = {
  803.                     "id": e.event.id,
  804.                     "title": e.event.title,
  805.                     "daysOfWeek": e.event.extendedProps.weekDayNum,
  806.                     "startTime": e.event.start,
  807.                     "endTime": e.event.end
  808.                 }
  809.                 let xhr = new XMLHttpRequest
  810.                 xhr.open("POST", url)
  811.                 xhr.setRequestHeader("Content-Type", "application/json")
  812.                 xhr.send(JSON.stringify(donnees))
  813.             })
  814.             calendar2.render()
  815.         } else if (('#{{planningFormat}}' == '#PresenceUtilisateur')) {
  816.             let calendar2 = new FullCalendar.Calendar(calendarEl2, {
  817.                 schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
  818.                 initialView: 'timeGrid',
  819.                 locale: 'fr',
  820.                 timeZone: 'Europe/Paris',
  821.                 nowIndicator: true,
  822.                 themeSystem: 'bootstrap5',
  823.                 firstDay: 1,
  824.                 navLinks: true,
  825.                 editable: true,
  826.                 dayCount: 2,
  827.                 initialDate: '{{date}}',
  828.                 eventResizableFromStart: true,
  829.                 slotEventOverlap: false,
  830.                 allDaySlot: false,
  831.                 selectable: true,
  832.                 selectMirror: true,
  833.                 dayMaxEvents: true,
  834.                 viewRender: function (view, element) {
  835.                     console.log(element);
  836.                 },
  837.                 // eventOrderStrict: true,
  838.                 headerToolbar: {
  839.                     start: 'today',
  840.                     center: 'title',
  841.                     end: 'timeGridDay',
  842.                 },
  843.                 resourceTimeline: {
  844.                     aspectRatio: 2.5,
  845.                 },
  846.                 buttonText:
  847.                 {
  848.                     today: "Aujourd'hui",
  849.                     month: 'Mois',
  850.                     week: 'Semaine',
  851.                     day: 'Jour',
  852.                     resourceTimeline: 'Jour',
  853.                     list: 'Liste',
  854.                     timeGrid: '2 Jours'
  855.                 },
  856.                 events: JSON.parse('{{ data|raw }}'),
  857.                 eventClick: function (info) {
  858.                     var hoursBegin = info.event.start.getHours() - 2;
  859.                     var minutesBegin = info.event.start.getMinutes();
  860.                     var hoursEnd = info.event.end.getHours() - 2;
  861.                     var minutesEnd = info.event.end.getMinutes();
  862.                     var id = info.event.id;
  863.                     var planningEventId = "{{planningEventId}}"
  864.                     var urlToDelete = "/deletePlanning/" + planningEventId + "/" + id;
  865.                     var urlToModify = "/modifyPlannig/" + planningEventId + "/" + id;
  866.                     $('#EventId').val(id);
  867.                     $('#modifyPlanningListId').attr("href", urlToModify);
  868.                     $('#planningListId').attr("href", urlToDelete);
  869.                     $('#showEventCalendarConseiller').html(info.event.title);
  870.                     $('#hoursBegin').val(hoursBegin);
  871.                     $('#minutesBegin').val(minutesBegin);
  872.                     $('#hoursEnd').val(hoursEnd);
  873.                     $('#minutesEnd').val(minutesEnd);
  874.                     var newHours = $('#hoursBegin').val();
  875.                     console.log(id);
  876.                     var modal = $("#showEventCalendar");
  877.                     modal.modal('show');
  878.                 },
  879.                 resourceAreaHeaderContent: 'Conseillers',
  880.                 resources: JSON.parse('{{ ressources|raw }}'),
  881.                 resourceAreaWidth: " 10%",
  882.                 eventOrder: "-userId",
  883.             });
  884.             calendar2.on('eventChange', (e) => {
  885.                 let url = `/gestionPlanning/{{planningEventId}}/edit`
  886.                 let donnees = {
  887.                     "id": e.event.id,
  888.                     "title": e.event.title,
  889.                     "daysOfWeek": e.event.extendedProps.weekDayNum,
  890.                     "startTime": e.event.start,
  891.                     "endTime": e.event.end
  892.                 }
  893.                 let xhr = new XMLHttpRequest
  894.                 xhr.open("POST", url)
  895.                 xhr.setRequestHeader("Content-Type", "application/json")
  896.                 xhr.send(JSON.stringify(donnees))
  897.             })
  898.             calendar2.render()
  899.         };
  900.     }
  901. </script>