src/Flexy/FrontBundle/Themes/Lasalle/templates/front/customer/visit-customer.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/shop/Backgroundsalle3.png'); 
  14.     background-size:cover;
  15.     width: 100px;
  16.     background-repeat: no-repeat;
  17.      
  18.      background-position: center -120px;
  19.     }
  20.     
  21.   
  22. video {
  23.     position: fixed; /* Fixe la vidéo par rapport à la fenêtre du navigateur */
  24.     top: 50%; /* Déplace la vidéo à 50% du haut de la fenêtre */
  25.     left: 50%; /* Déplace la vidéo à 50% de la largeur de la fenêtre */
  26.     min-width: 100%; /* Remplit la largeur minimale de l'écran */
  27.     min-height: 100%; /* Remplit la hauteur minimale de l'écran */
  28.      /* Ajuste la largeur de la vidéo automatiquement */
  29.     height: 100%; /* Ajuste la hauteur de la vidéo automatiquement */
  30.     transform: translate(-50%, -50%); /* Centre la vidéo dans la fenêtre */
  31.     z-index: -1; /* Place la vidéo en arrière-plan (derrière le contenu) */
  32. }
  33. .user-card {
  34.     opacity: 88%;
  35. }
  36.  
  37. .wrapper{
  38.    display: flex;
  39.    justify-content: center;
  40.    align-items: center;
  41.    /*padding-top: 12%;*/
  42.    padding: 10px;
  43.    
  44.  }
  45.  .logo{
  46.     width: 25%;
  47.     position: absolute;
  48.     right: 100px;
  49.     bottom: 100px;
  50.      }
  51.  
  52.  .user-card {
  53.     display: flex;
  54.     flex-direction: column;
  55.     align-items: center;
  56.     justify-content: center;
  57.     background-color: #fff;
  58.     border-radius: 10px;
  59.     padding: 60px;
  60.     position: fixed;
  61.     top: 0;
  62.     bottom: 0;
  63.     left: 0;
  64.     right: 0;
  65.     overflow: hidden;
  66.     box-shadow: 0 2px 20px -5px rgba(0, 0, 0, 0.5);
  67. }
  68. .user-card-info h3 {
  69.     font-size: 70px;
  70.     margin: 0;
  71.     margin-bottom: 10px;
  72.     margin-top: 40px;
  73.     font-family: 'Bebas Neue', sans-serif;
  74.     letter-spacing: 3px;
  75. }
  76.  
  77. .user-card:before {
  78.    content: '';
  79.    position: absolute;
  80.    /*height: 300%;*/
  81.    height: 217%;
  82.    width: 173px;
  83.     background: linear-gradient(0deg, rgb(103, 70, 193) 0%, rgb(143, 105, 247) 100%);
  84.    top: -60px;
  85.    left: -125px;
  86.    z-index: 0;
  87.    transform: rotate(17deg);
  88.  }
  89.  
  90.  .user-card-img {
  91.    display: flex;
  92.    justify-content: start;
  93.    align-items: center;   
  94.    z-index: 3;
  95.  }
  96.  
  97.  .user-card-img img {
  98.    width: 380px;
  99.    height: 380px;
  100.    object-fit: cover;
  101.        border-radius: 50%;
  102.  }
  103.  
  104.  .user-card-info {
  105.    text-align: center;
  106.  }
  107.  
  108.  .user-card-info h2 {
  109.    font-size: 60px;
  110.    margin: 0;
  111.    margin-bottom: 10px;
  112.    font-family: 'Bebas Neue', sans-serif;
  113.    letter-spacing: 3px;
  114.  }
  115.  p{font-family: 'Bebas Neue', sans-serif;}
  116.  
  117. .d-none{display:none}
  118.  .user-card-info p {
  119.    /*font-size: 14px;
  120.    margin-bottom: 2px;*/
  121.     font-size: 45px;
  122.     margin-bottom: 2px;
  123.     text-align: center;
  124.  }
  125.  .user-card-info p span {
  126.     font-weight: 700;
  127.     margin-right: 10px;
  128. }
  129.  @media only screen and (min-width: 768px) {
  130.    .user-card {
  131.      flex-direction: row;
  132.      align-items: flex-start;
  133.    }   
  134.    .user-card-img {
  135.      /*margin-right: 20px;*/
  136.      margin-right: 80px;
  137.      margin-bottom: 0;
  138.    }
  139.  
  140.    .user-card-info {
  141.      text-align: left;
  142.    }
  143.  }
  144.  @media (max-width: 767px){
  145.    .wrapper{
  146.       padding-top: 3%;
  147.    }
  148.    .user-card:before {
  149.       width: 300%;
  150.       height: 200px;
  151.       transform: rotate(0);
  152.    }
  153.    .user-card-info h2 {
  154.       margin-top: 25px;
  155.       font-size: 40px;
  156.    }
  157.    .user-card-info p span {
  158.       display: block;
  159.       margin-bottom: 15px;
  160.       font-size: 18px;
  161.    }
  162.  }
  163.  
  164. </style>
  165. </head>
  166. <body>
  167.  <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap" rel="stylesheet">
  168.  <link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap" rel="stylesheet">
  169.  <!-- <video autoplay loop muted>
  170.         <source src="/uploads/lasalle/video/lasalle.mp4" type="video/mp4">
  171.         <!-- Vous pouvez ajouter d'autres sources pour une compatibilité avec différents navigateurs -->
  172.     <!--</video>-->
  173.     
  174. {% if customer and salle2 == true %}
  175.  <div class="wrapper" >
  176.         <div class="user-card">
  177.             <div class="user-card-img">
  178.               <img src="https://lasalleerp.com/uploads/lasalle/adherent/{{ customer['image']}}" alt="" style="width:380px">
  179.             </div>
  180.               
  181.             <div class="user-card-info">
  182.           
  183.                 
  184.               <h3> <img src="/uploads/lasalle/check-mark.png" alt="" style="width: 150px"> Bienvenue {{customer['first_name']}} {{customer['last_name']}}    </h3>
  185.               
  186.                 <h2>Salle : <b>Ain sebaa </b> </h2>
  187.                 <h2>Fin Abonnement : {{customer['end_at']|date('d/m/Y') }}</h2>
  188.                 <h2><small>réference carte : {{customer['reference']}} </small></h2>
  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: 15px; border-radius: 8px;">
  228.                    
  229.                     <i class="bi bi-sun-fill me-2" style="font-size: 1.5rem;"></i>
  230.                     <strong>Offre Matinale : </strong>&nbsp;Profitez de nos avantages matinaux ! 
  231.                 </div>
  232.             {% endif %}
  233.             
  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-customers") %}
  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>