src/Flexy/FrontBundle/Themes/Lasalle/templates/front/customer/visit.html.twig line 1

  1.  
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <title>visite Adhérent la salle </title>
  6. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">
  7. <style> 
  8.     body {
  9.     margin: 0; /* Réinitialiser les marges par défaut */
  10.     padding: 0; /* Réinitialiser les paddings par défaut */
  11.     overflow: hidden; /* Empêche tout débordement de la vidéo */
  12.     background-color: black;
  13.     background-image: url('/uploads/lasalle/video/lasalle2.png');
  14.     background-size:cover;
  15.     width: 300px;
  16.     background-repeat: no-repeat;
  17.     background-position: center top;
  18.     }
  19. video {
  20.     position: fixed; /* Fixe la vidéo par rapport à la fenêtre du navigateur */
  21.     top: 50%; /* Déplace la vidéo à 50% du haut de la fenêtre */
  22.     left: 50%; /* Déplace la vidéo à 50% de la largeur de la fenêtre */
  23.     min-width: 100%; /* Remplit la largeur minimale de l'écran */
  24.     min-height: 100%; /* Remplit la hauteur minimale de l'écran */
  25.      /* Ajuste la largeur de la vidéo automatiquement */
  26.     height: 100%; /* Ajuste la hauteur de la vidéo automatiquement */
  27.     transform: translate(-50%, -50%); /* Centre la vidéo dans la fenêtre */
  28.     z-index: -1; /* Place la vidéo en arrière-plan (derrière le contenu) */
  29. }
  30. .user-card {
  31.     opacity: 88%;
  32. }
  33.  
  34. .wrapper{
  35.    display: flex;
  36.    justify-content: center;
  37.    align-items: center;
  38.    /*padding-top: 12%;*/
  39.    padding: 10px;
  40.    
  41.  }
  42.  .logo{
  43.     width: 25%;
  44.     position: absolute;
  45.     right: 100px;
  46.     bottom: 100px;
  47.      }
  48.  
  49.  .user-card {
  50.     display: flex;
  51.     flex-direction: column;
  52.     align-items: center;
  53.     justify-content: center;
  54.     background-color: #fff;
  55.     border-radius: 10px;
  56.     padding: 60px;
  57.     position: fixed;
  58.     top: 0;
  59.     bottom: 0;
  60.     left: 0;
  61.     right: 0;
  62.     overflow: hidden;
  63.     box-shadow: 0 2px 20px -5px rgba(0, 0, 0, 0.5);
  64. }
  65. .user-card-info h3 {
  66.     font-size: 70px;
  67.     margin: 0;
  68.     margin-bottom: 10px;
  69.     margin-top: 40px;
  70.     font-family: 'Bebas Neue', sans-serif;
  71.     letter-spacing: 3px;
  72. }
  73.  
  74. .user-card:before {
  75.    content: '';
  76.    position: absolute;
  77.    /*height: 300%;*/
  78.    height: 217%;
  79.    width: 173px;
  80.     background: linear-gradient(0deg, rgb(103, 70, 193) 0%, rgb(143, 105, 247) 100%);
  81.    top: -60px;
  82.    left: -125px;
  83.    z-index: 0;
  84.    transform: rotate(17deg);
  85.  }
  86.  
  87.  .user-card-img {
  88.    display: flex;
  89.    justify-content: start;
  90.    align-items: center;   
  91.    z-index: 3;
  92.  }
  93.  
  94.  .user-card-img img {
  95.    width: 380px;
  96.    height: 380px;
  97.    object-fit: cover;
  98.        border-radius: 50%;
  99.  }
  100.  
  101.  .user-card-info {
  102.    text-align: center;
  103.  }
  104.  
  105.  .user-card-info h2 {
  106.    font-size: 60px;
  107.    margin: 0;
  108.    margin-bottom: 10px;
  109.    font-family: 'Bebas Neue', sans-serif;
  110.    letter-spacing: 3px;
  111.  }
  112.  p{font-family: 'Bebas Neue', sans-serif;}
  113.  
  114. .d-none{display:none}
  115.  .user-card-info p {
  116.    /*font-size: 14px;
  117.    margin-bottom: 2px;*/
  118.     font-size: 45px;
  119.     margin-bottom: 2px;
  120.     text-align: center;
  121.  }
  122.  .user-card-info p span {
  123.     font-weight: 700;
  124.     margin-right: 10px;
  125. }
  126.  @media only screen and (min-width: 768px) {
  127.    .user-card {
  128.      flex-direction: row;
  129.      align-items: flex-start;
  130.    }   
  131.    .user-card-img {
  132.      /*margin-right: 20px;*/
  133.      margin-right: 80px;
  134.      margin-bottom: 0;
  135.    }
  136.  
  137.    .user-card-info {
  138.      text-align: left;
  139.    }
  140.  }
  141.  @media (max-width: 767px){
  142.    .wrapper{
  143.       padding-top: 3%;
  144.    }
  145.    .user-card:before {
  146.       width: 300%;
  147.       height: 200px;
  148.       transform: rotate(0);
  149.    }
  150.    .user-card-info h2 {
  151.       margin-top: 25px;
  152.       font-size: 40px;
  153.    }
  154.    .user-card-info p span {
  155.       display: block;
  156.       margin-bottom: 15px;
  157.       font-size: 18px;
  158.    }
  159.  }
  160.  
  161. </style>
  162. </head>
  163. <body>
  164.  <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap" rel="stylesheet">
  165.  <link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap" rel="stylesheet">
  166.  <!-- <video autoplay loop muted>
  167.         <source src="/uploads/lasalle/video/lasalle.mp4" type="video/mp4">
  168.         <!-- Vous pouvez ajouter d'autres sources pour une compatibilité avec différents navigateurs -->
  169.     <!--</video>-->
  170.     
  171. {#{{ dump(customer) }}#}
  172.  
  173. {% if customer and salle2 == true %}
  174.  <div class="wrapper" >
  175.         <div class="user-card">
  176.             <div class="user-card-img">
  177.               <img src="http://lasalleerp-h.com/uploads/lasalle/adherent/{{ customer['image']}}" alt="" style="width:380px">
  178.             </div>
  179.               
  180.             <div class="user-card-info">
  181.           
  182.                 
  183.               <h3> <img src="/uploads/lasalle/check-mark.png" alt="" style="width: 150px"> Bienvenue {{customer['first_name']}} {{customer['last_name']}}    </h3>
  184.               
  185.                 <h2>Salle : <b>Roche Noir </b> </h2>
  186.                  <h2>Fin Abonnement : {{customer['end_at']|date('d/m/Y') }}</h2>
  187.                  <h2><small>réference carte : {{customer['reference']}} </small></h2>
  188.                 
  189.                
  190.                
  191.                {% if timeStatus %}
  192.                 <!-- Alerte Bootstrap avec couleur personnalisée -->
  193.                 <div class="alert d-flex align-items-center mt-4" role="alert" 
  194.                     style="background: linear-gradient(45deg, #ff8a00, #e52e71); color: #fff; font-size: 1.2rem; padding: 9px; border-radius: 8px;">
  195.                    
  196.                     <i class="bi bi-sun-fill me-2" style="font-size: 1.5rem;"></i>
  197.                     <strong> &nbsp; &nbsp; &nbsp; <b> Offre Matinale  </b> </strong> 
  198.                 </div>
  199.             
  200.             {% endif %}
  201.             </div>
  202.             
  203.             <div ><img  class="logo" src="../themes/lasalle/admin/images/logo.png"></div>
  204.         </div>
  205.         
  206.     </div>
  207. {% endif %}
  208. {% if customer and salle2 == false %}
  209.  <div class="wrapper" >
  210.         <div class="user-card">
  211.             <div class="user-card-img">
  212.               <img src="/uploads/lasalle/adherent/{{ customer.image}}" alt="" style="width:380px">
  213.             </div>
  214.               
  215.             <div class="user-card-info">
  216.           
  217.                 
  218.               <h3> <img src="/uploads/lasalle/check-mark.png" alt="" style="width: 150px"> Bienvenue {{ customer.firstName}} {{ customer.lastName}}</h3>
  219.               
  220.                <!--<h2>Salle : {{ customer.store}}</h2>-->
  221.                <h2>Début Abonnement : {{customer.productSubscriptions|last.startAt|date("d/m/Y") }}</h2>
  222.                <h2>Fin Abonnement : {{customer.productSubscriptions|last.endAt|date("d/m/Y") }}</h2>
  223.                
  224.                {% if timeStatus %}
  225.                 <!-- Alerte Bootstrap avec couleur personnalisée -->
  226.                 <div class="alert d-flex align-items-center mt-4" role="alert" 
  227.                     style="background: linear-gradient(45deg, #ff8a00, #e52e71); color: #fff; font-size: 1.2rem; padding: 9px; border-radius: 8px;">
  228.                    
  229.                     <i class="bi bi-sun-fill me-2" style="font-size: 1.5rem;"></i>
  230.                     <strong> &nbsp; &nbsp; &nbsp; <b> Offre Matinale  </b> </strong> 
  231.                 </div>
  232.             
  233.             {% endif %}
  234.             </div>
  235.             
  236.             <div ><img  class="logo" src="../themes/lasalle/admin/images/logo.png"></div>
  237.         </div>
  238.         
  239.     </div>
  240. {% endif %}
  241.  <div class="failed-access wrapper d-none" >
  242.        
  243.         <div class="user-card">
  244.             
  245.               
  246.             <div class="user-card-info">
  247.              
  248.             
  249.               <h3><img src="/uploads/lasalle/supprimer.png" alt="" style="width: 120px"> Acces réfusé</h3>
  250.               <h2>Merci de vérifer avec l'accueil</h2>
  251.               <!--<h2>Date de visite {{ "now"|date("d/m/Y H:i:s") }}</h2>-->
  252.             </div>
  253.             
  254.             <div ><img  class="logo" src="../themes/lasalle/admin/images/logo.png" style="margin-top: 400px  !important;
  255.     margin-left: 0px !important;"></div>
  256.         </div>
  257.         
  258.    
  259.         
  260.     </div>
  261. {% set url = path("visit-customer") %}
  262. <script src="https://code.jquery.com/jquery-3.7.0.slim.min.js" integrity="sha256-tG5mcZUtJsZvyKAxYLVXrmjKBVLd6VpVccqz/r4ypFE=" crossorigin="anonymous"></script>
  263. <script>
  264.            // var notificationSound = new Audio('flexy/sounds/notification_sound.mp3');
  265.             
  266.             
  267.             setTimeout(function(){
  268.                           $(".wrapper").addClass("d-none");
  269.                         },12000);
  270.             
  271.             {% if settings.get.isMercureEnabled %}
  272.             
  273.             const eventSource = new EventSource("{{ mercure('https://hello.com/books/1')|escape('js') }}");
  274.             eventSource.onmessage = event => {
  275.               setTimeout(function(){
  276.                           $(".wrapper").addClass("d-none");
  277.                         },12000);
  278.                 // Will be called every time an update is published by the server
  279.                 var data = JSON.parse(event.data);
  280.                 if(data.status == "failed"){ 
  281.                     $(".failed-access").removeClass("d-none");
  282.                     // Init Page 
  283.                     // Init Page 
  284.                         
  285.                        
  286.                  }
  287.                 
  288.                 if(data.status == "success"){
  289.                     var customerId = data.customerId;
  290.                     var other = data.otherSalle;
  291.                     if(data.entity == "VisitCustomer"){
  292.                       
  293.                         //notificationSound.loop = true;
  294.                         //notificationSound.play();
  295.                         
  296.                         const flashMessages = document.getElementById('flash-messages');
  297.                         
  298.                         /*$("#flash-messages").append('<div class="alert alert-success alert-dismissible fade show" role="alert"><button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>Nouvelle commande a été crée</div>');*/
  299.                        
  300.                         
  301.                         window.location.href= "{{url}}?customerId="+customerId + "&other=" + other;
  302.                        
  303.                         
  304.                     }
  305.                 }
  306.                 
  307.                  
  308.                 
  309.             }
  310.             {% endif %}
  311.             
  312.             </script>
  313. </body>
  314. </html>