{% extends 'base.html.twig' %}
{% set currentPath = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
{% block title %}Ween par Aviséa
{% endblock %}
{% block body %}
{% if is_mobile() %}
<main role="main" id="main" class="container-fluid py-5 bg_client">
{% else %}
<main role="main" id="main" class="container-fluid pb-5 bg-client" {% if client.background starts with "background." %} style="background: url('/img/background/client/{{client.id}}/{{client.background}}');" {% else %} style="background-color: {{client.background}};" {% endif %}>
{% endif %}
<!-- PAGE D'ACCUEIL -->
<div class="d-block d-sm-none mt-5 container px-2">
{% if is_granted('ROLE_USER') %}
{% else %}
<div class="border bg-white text-center b-radius-5 mb-3 py-2">
<span class="fa-sharp fa-solid fa-lock text-notice d-block avisea-homepage-lock-icon opacity-50"></span>
<h2 class="h4 work-sans-bold l-text text-graphite my-3">Bienvenue
<span class="fa-sharp fa-regular fa-hand-wave"></span>
</h2>
<p class="work-sans-medium text-carbone fs-6 px-2">Connectez-vous pour accéder au contenu !</p>
<div class="d-flex flex-column align-items-center">
{% if client is defined %}
{% if client.isSecure is same as true %}
<a href="{{path('app_login', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="btn-notice text-decoration-none work-sans-medium ns-text">Se connecter</a>
{% else %}
<a href="{{path('app_login_unsecure', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="btn-notice text-decoration-none work-sans-medium ns-text">Se connecter</a>
{% endif %}
<a href="{{path('app_register', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="text-graphite mt-2 ns-text work-sans-semi-bold">S'inscrire</a>
{% else %}
{{ render(controller('App\\Controller\\PageController::renderLoginRegisterBtn')) }}
{% endif %}
</div>
</div>
{% endif %}
</div>
<div class="container px-2 pt-4 mb-2">
{% if is_mobile() %}
<div class="">
<div class="card card-img-top-hp">
<img src="{{asset('img/alt-logo/client/' ~ client.id ~ '/' ~ client.altLogo)}}" class="card-img-top" alt="">
<div class="card-body">
<h1 class="card-title text-graphite work-sans-bold mb-4 l-text">Informations</h1>
<span class="fa-sharp fa-solid fa-link text-{{client.slug}} mb-2"></span>
<a href="/document/guide-plateforme-ween.pdf" target="_blank" class="text-graphite work-sans-bold ns-text">Télécharger le guide</a>
<p class="card-text work-sans-medium text-carbone m-text">{{client.description|raw}}</p>
</div>
</div>
<div>
<!-- Login / Regsiter card -->
<div class="d-none d-sm-block">
{% if is_granted('ROLE_USER') %}
<div class="bg-white ms-4 b-radius-5 mb-3">
<div class="bg_secondary_client py-5 text-end b-radius-5">
<a href="{{path('app_my_profile')}}" class="editEncart text-graphite me-4 work-sans-medium">
<span class="fa-sharp fa-solid fa-pen me-1"></span>Éditer</a>
</div>
<div class="text-center pb-4">
<div class="bg-white mx-auto mb-4 my-account-logo-background-homepage">
{% if app.user.avatar != null %}
{{app.user.avatar.code|raw}}
{% else %}
<span class="fa-duotone fa-user-robot"></span>
{% endif %}
</div>
<h3 class="work-sans-bold mb-0">{{app.user.firstName}}
<span class="text-uppercase">{{app.user.lastName}}</span>
</h3>
<p class="mb-0 work-sans-medium">{{app.user.jobTitle}}</p>
{% if app.user.location != null %}
<p class="work-sans-medium-italic mb-0">{{app.user.location.name}}</p>
{% endif %}
<p class="work-sans-bold text-uppercase mt-1">{{app.user.client.name}}</p>
</div>
</div>
{% else %}
<div class="bg-white ms-4 p-4 text-center b-radius-5 mb-3">
<span class="fa-sharp fa-solid fa-lock text-notice d-block avisea-homepage-lock-icon opacity-50"></span>
<h2 class="h4 work-sans-bold l-text text-graphite my-3">Bienvenue
<span class="fa-sharp fa-regular fa-hand-wave"></span>
</h2>
<p class="work-sans-medium m-text text-carbone">Connectez-vous pour accéder au contenu !</p>
<div class="d-flex flex-column align-items-center">
<a href="{{path('app_login', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="btn-notice text-decoration-none work-sans-medium ns-text">Se connecter</a>
<a href="{{path('app_register', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="text-graphite mt-2 ns-text work-sans-semi-bold">S'inscrire</a>
</div>
</div>
{% endif %}
</div>
{% for clientProduct in client.clientProducts %}
{% if clientProduct.product.name == 'Defi-inclusion' and app.user != null and userProduct != null and clientProduct.isActive == 1 and clientProduct.hasLocationLadder == 1 %}
{% if locationsArray is defined and locationsArray is not empty %}
<div class="bg-white mt-4 px-4 py-4 b-radius-5">
<div class="d-flex align-items-center mb-3">
<span class="fa-sharp fa-solid fa-crown text-{{client.slug}}"></span>
<h5 class="work-sans-bold ms-2 mb-0">Classement du défi de l'inclusion</h3>
</div>
<div style="max-height: 385px;" class="overflow-auto">
<table class="table table-striped">
<tbody>
{% for location, score in locationsArray %}
<tr>
<td class="ps-4">
{% if loop.index <= 3 %}
<span class="fa-sharp fa-solid fa-trophy text-{{client.slug}} me-2"></span>
{% else %}
<span class="fa-sharp fa-solid fa-medal text-{{client.slug}} me-2"></span>
{% endif %}
{{loop.index}}
</td>
<td class="text-uppercase">Team {{location}}</td>
<td class="ps-4">{{score}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
{% elseif clientProduct.product.slug == 'autodiagnostic-handicap' and userProduct == null and clientProduct.isActive == 1 and clientProduct.startAt|date("Y-m-d") >= "now"|date("Y-m-d") %}
<div class="bg-white pt-4 px-2 pb-5 b-radius-5 d-flex align-items-start position-relative mb-5 mt-5">
<span class="fa-sharp fa-solid fa-stethoscope text-{{client.slug}} avisea-homepage-stetoscop-icon"></span>
<div class="ms-3">
<h2 class="h4 work-sans-bold text-graphite m-text">Autodiagnostic Handicap</h2>
<p class="work-sans-medium text-carbone ns-text pe-2">En moins de deux minutes et 8 questions, il vous permet de faire le point sur votre situation et d'identifier les acteurs pour vous accompagner.</p>
<div class="row">
<small class="col-12 text-smoke work-sans-medium ns-text mb-4 mt-3">8 questions (2min)</small>
{% for question in clientProduct.product.diagQuestions %}
{% if question.position == 1 %}
<div class="col-12 position-relative">
<a href="{{path('app_auto_diagnostic_quizz', {'clientSlug': client.slug, 'id': question.id})}}" target="_blank" class="btn-notice text-decoration-none arrow-link">
<span class="text-white work-sans-medium ml-text">Faire le test</span>
<span class="fa-sharp fa-solid fa-arrow-right"></span>
</a>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
{% elseif clientProduct.product.slug == 'autodiagnostic-handicap-2' and userProduct == null and clientProduct.isActive == 1 and clientProduct.startAt|date("Y-m-d") >= "now"|date("Y-m-d") %}
<div class="bg-white pt-4 px-2 pb-5 b-radius-5 d-flex align-items-start position-relative mb-5 mt-5">
<span class="fa-sharp fa-solid fa-stethoscope text-{{client.slug}} avisea-homepage-stetoscop-icon"></span>
<div class="ms-3">
<h2 class="h4 work-sans-bold text-graphite m-text">Autodiagnostic : faites le point sur votre situation de santé au travail</h2>
<p class="work-sans-medium text-carbone ns-text pe-2">En moins de 5 minutes et 15 questions, il vous permet de réfléchir à l’impact éventuel de votre état de santé sur votre activité professionnelle et d’identifier des ressources adaptées à vos besoins. Ce test est anonyme et confidentiel : aucune donnée ne sera collectée ou communiquée à votre employeur. </p>
<div class="row">
<small class="col-12 text-smoke work-sans-medium ns-text mb-4 mt-3">15 questions (5min)</small>
{% for question in clientProduct.product.diagQuestions %}
{% if question.position == 1 %}
<div class="col-12 position-relative">
<a href="{{path('app_auto_diagnostic_quizz', {'clientSlug': client.slug, 'id': question.id})}}" target="_blank" class="btn-notice text-decoration-none arrow-link">
<span class="text-white work-sans-medium ml-text">Faire le test</span>
<span class="fa-sharp fa-solid fa-arrow-right"></span>
</a>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
{% elseif clientProduct.product.slug == 'test-auditif' and userProduct == null and clientProduct.isActive == 1 and clientProduct.startAt|date("Y-m-d") <= 'now' | date('Y-m-d') %}
<!-- Test Auditif -->
<div class="bg-white pt-4 px-2 pb-5 b-radius-5 d-flex align-items-start position-relative mb-5 mt-2">
<span class="fa-sharp fa-regular fa-ear-listen text-{{client.slug}} avisea-homepage-hear-icon"></span>
<div class="ms-3">
<h2 class="h4 work-sans-bold text-graphite m-text">Test auditif</h2>
<p class="work-sans-medium text-carbone ns-textt pe-2">Vous vous posez des questions quant à votre niveau d'audition ? Réalisez notre test auditif et faisons le point ensemble !</p>
<div class="row">
<small class="col-12 text-smoke work-sans-medium ns-text mb-4 mt-3">6 questions (5min)</small>
<div class="col-12 position-relative">
<a href="{{path('app_audition_test_age', {'clientSlug': client.slug, 'id': clientProduct.id})}}" target="_blank" class="btn-notice text-decoration-none arrow-link">
<span class="text-white work-sans-medium ml-text">Faire le test</span>
<span class="fa-sharp fa-solid fa-arrow-right"></span>
</a>
</div>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
{% else %}
<div class="d-flex justify-content-center">
<div class="col-md-7 card card-img-top-hp">
<img src="{{asset('img/alt-logo/client/' ~ client.id ~ '/' ~ client.altLogo)}}" class="card-img-top" alt="">
<div class="card-body">
<h1 class="card-title text-graphite work-sans-bold mb-4 l-text">Informations</h1>
<span class="fa-sharp fa-solid fa-link text-{{client.slug}} mb-4"></span>
<a href="/document/guide-plateforme-ween.pdf" target="_blank" class="ms-2 text-graphite work-sans-bold ns-text">Télécharger le guide de la plateforme</a>
<p class="card-text work-sans-medium text-carbone m-text">{{client.description|raw}}</p>
</div>
</div>
<div class="col-md-5">
<!-- Login / Regsiter card -->
<div class="d-none d-sm-block">
{% if is_granted('ROLE_USER') %}
<div class="bg-white ms-4 b-radius-5 mb-3">
<div class="bg_secondary_client py-5 text-end b-radius-5">
<a href="{{path('app_my_profile')}}" class="editEncart text-graphite me-4 work-sans-medium">
<span class="fa-sharp fa-solid fa-pen me-1"></span>Éditer</a>
</div>
<div class="text-center pb-4">
<div class="bg-white mx-auto mb-4 my-account-logo-background-homepage">
{% if app.user.avatar != null %}
{{app.user.avatar.code|raw}}
{% else %}
<span class="fa-duotone fa-user-robot"></span>
{% endif %}
</div>
<h3 class="work-sans-bold mb-0">{{app.user.firstName}}
<span class="text-uppercase">{{app.user.lastName}}</span>
</h3>
<p class="mb-0 work-sans-medium">{{app.user.jobTitle}}</p>
{% if app.user.location != null %}
<p class="work-sans-medium-italic mb-0">{{app.user.location.name}}</p>
{% endif %}
<p class="work-sans-bold text-uppercase mt-1">{{app.user.client.name}}</p>
</div>
</div>
{% else %}
<div class="bg-white ms-4 p-4 text-center b-radius-5 mb-3">
<span class="fa-sharp fa-solid fa-lock text-notice d-block avisea-homepage-lock-icon opacity-50"></span>
<h2 class="h4 work-sans-bold l-text text-graphite my-3">Bienvenue
<span class="fa-sharp fa-regular fa-hand-wave"></span>
</h2>
<p class="work-sans-medium m-text text-carbone">Connectez-vous pour accéder au contenu !</p>
<div class="d-flex flex-column align-items-center">
{% if client is defined %}
{% if client.isSecure is same as true %}
<a href="{{path('app_login', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="btn-notice text-decoration-none work-sans-medium ns-text">Se connecter</a>
{% else %}
<a href="{{path('app_login_unsecure', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="btn-notice text-decoration-none work-sans-medium ns-text">Se connecter</a>
{% endif %}
<a href="{{path('app_register', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="text-graphite mt-2 ns-text work-sans-semi-bold">S'inscrire</a>
{% else %}
{{ render(controller('App\\Controller\\PageController::renderLoginRegisterBtn')) }}
{% endif %}
</div>
</div>
{% endif %}
</div>
{% for clientProduct in client.clientProducts %}
{% if clientProduct.product.name == 'Defi-inclusion' and app.user != null and userProduct != null and clientProduct.isActive == 1 and clientProduct.hasLocationLadder == 1 %}
{% if locationsArray is defined and locationsArray is not empty %}
<div class="bg-white ms-4 px-4 py-4 b-radius-5">
<div class="d-flex align-items-center mb-3">
<span class="fa-sharp fa-solid fa-crown text-{{client.slug}}"></span>
<h5 class="work-sans-bold ms-2 mb-0">Classement du défi de l'inclusion</h3>
</div>
<div style="max-height: 385px;" class="overflow-auto">
<table class="table table-striped">
<tbody>
{% for location, score in locationsArray %}
<tr>
<td class="ps-4">
{% if loop.index <= 3 %}
<span class="fa-sharp fa-solid fa-trophy text-{{client.slug}} me-2"></span>
{% else %}
<span class="fa-sharp fa-solid fa-medal text-{{client.slug}} me-2"></span>
{% endif %}
{{loop.index}}
</td>
<td class="text-uppercase">Team {{location}}</td>
<td class="ps-4">{{score}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
{% endif %}
{% if clientProduct.product.slug == 'autodiagnostic-handicap' and userProduct == null and clientProduct.isActive is same as true and clientProduct.startAt|date("Y-m-d") <= "now"|date("Y-m-d") %}
<div class="bg-white p-4 b-radius-5 d-flex align-items-start ms-4 position-relative mt-3">
<span class="fa-sharp fa-solid fa-stethoscope text-{{client.slug}} avisea-homepage-stetoscop-icon"></span>
<div class="ms-3">
<h2 class="h4 work-sans-bold text-graphite m-text">Autodiagnostic Handicap</h2>
<p class="work-sans-medium text-carbone ns-text">En moins de deux minutes et 8 questions, il vous permet de faire le point sur votre situation et d'identifier les acteurs pour vous accompagner.</p>
<div class="d-flex align-items-center mt-5 mb-3">
<small class="text-smoke work-sans-medium ns-text">8 questions (2min)</small>
{% for question in clientProduct.product.diagQuestions %}
{% if question.position == 1 %}
<a href="{{path('app_auto_diagnostic_quizz', {'clientSlug': client.slug, 'id': question.id})}}" target="_blank" class="btn-notice text-decoration-none arrow-link">
{% endif %}
{% endfor %}
<span class="text-white work-sans-medium ml-text">Faire le test</span>
<span class="fa-sharp fa-solid fa-arrow-right"></span>
</a>
</div>
</div>
</div>
{% endif %}
{% if clientProduct.product.slug == 'autodiagnostic-handicap-2' and userProduct == null and clientProduct.isActive is same as true and clientProduct.startAt|date("Y-m-d") <= "now"|date("Y-m-d") %}
<div class="bg-white pt-4 px-2 pb-5 b-radius-5 d-flex align-items-start position-relative mb-5 mt-5 ms-4">
<span class="ps-2 fa-sharp fa-solid fa-stethoscope text-{{client.slug}} avisea-homepage-stetoscop-icon"></span>
<div class="ms-3">
<h2 class="h4 work-sans-bold text-graphite m-text">Autodiagnostic : faites le point sur votre</h2>
<h2 class="h4 work-sans-bold text-graphite m-text">situation de santé au travail</h2>
<p class="work-sans-medium text-carbone ns-text pe-3">En moins de 5 minutes et 15 questions, il vous permet de réfléchir à l’impact éventuel de votre état de santé sur votre activité professionnelle et d’identifier des ressources adaptées à vos besoins. Ce test est anonyme et confidentiel : aucune donnée ne sera collectée ou communiquée à votre employeur. </p>
<div class="row">
<small class="col-12 text-smoke work-sans-medium ns-text mb-4 mt-3">15 questions (5min)</small>
{% for question in clientProduct.product.diagQuestions %}
{% if question.position == 1 %}
<div class="col-12 position-relative">
<a href="{{path('app_auto_diagnostic_quizz', {'clientSlug': client.slug, 'id': question.id})}}" target="_blank" class="btn-notice text-decoration-none arrow-link">
<span class="text-white work-sans-medium ml-text">Faire le test</span>
<span class="fa-sharp fa-solid fa-arrow-right"></span>
</a>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% if clientProduct.product.slug == 'test-auditif' and userProduct == null and clientProduct.isActive is same as true and clientProduct.startAt|date("Y-m-d") <= "now"|date("Y-m-d") %}
<!-- Test Auditif -->
<div class="bg-white p-4 b-radius-5 d-flex align-items-start ms-4 position-relative mt-3">
<span class="fa-sharp fa-regular fa-ear-listen text-{{client.slug}} avisea-homepage-hear-icon"></span>
<div class="ms-3">
<h2 class="h4 work-sans-bold text-graphite m-text">Test auditif</h2>
<p class="work-sans-medium text-carbone ns-text">Vous vous posez des questions quant à votre niveau d'audition ? Réalisez notre test auditif et faisons le point ensemble !</p>
<div class="d-flex align-items-center mt-5 mb-3">
<small class="text-smoke work-sans-medium ns-text">6 questions (5min)</small>
<a href="{{path('app_audition_test_age', {'clientSlug': client.slug, 'id': clientProduct.id})}}" target="_blank" class="btn-notice text-decoration-none arrow-link">
<span class="text-white work-sans-medium ml-text">Faire le test</span>
<span class="fa-sharp fa-solid fa-arrow-right"></span>
</a>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
<!-- Carousel Flash Workshops à venir -->
{% if flashWorkshops != null %}
{% if is_mobile() %}
<div class="d-flex justify-content-between mt-4 mb-3">
<div class="d-flex">
<div class="p-2 col">
<h2 class="fs-6 work-sans-bold"><span lang="en">Event & Flash Learning</span> à venir</h2>
</div>
<div class="p-2 col">
<div class="slick-container text-end">
<div class="custom-controls">
<button type="button" class="btn-notice carousel-prev text-decoration-none p-2 me-1">
<span aria-hidden="true" class="fa-sharp fa-solid fa-arrow-left text-center"></span>
<span class="visually-hidden">Défiler à gauche</span>
</button>
<button type="button" class="btn-notice carousel-next text-decoration-none p-2">
<span aria-hidden="true" class="fa-sharp fa-solid fa-arrow-right text-center"></span>
<span class="visually-hidden">Défiler à droite</span>
</button>
</div>
</div>
</div>
</div>
</div>
{% else %}
<div id="incoming_flashworkshops" class="container bg-white b-radius-5 pb-3 mt-4">
<div class="p-3">
<div class="d-flex justify-content-between mt-2 mb-3">
<h2 class="h4 work-sans-bold"><span lang="en">Event & Flash Learning</span> à venir</h2>
<div class="slick-container me-3">
<div class="custom-controls">
<button type="button" class="btn-notice carousel-prev text-decoration-none me-1 p-2">
<span aria-hidden="true" class="fa-sharp fa-solid fa-arrow-left text-center"></span>
<span class="visually-hidden">Défiler à gauche</span>
</button>
<button type="button" class="btn-notice carousel-next text-decoration-none ms-1 p-2">
<span aria-hidden="true" class="fa-sharp fa-solid fa-arrow-right text-center"></span>
<span class="visually-hidden">Défiler à droite</span>
</button>
</div>
</div>
</div>
</div>
{% endif %}
<div class="homepage-flashworkshops">
{% set i = 0 %}
{% set j = 0 %}
{% for flashWorkshop in flashWorkshops %}
{% set i = i + 1 %}
{% if flashWorkshop.flashWorkshopEntity.isOutdated != true %}
<div class="align-content-center card ms-3 mb-5" style="width: 18.5rem;">
<div class="align-self-end card h-100 border-0" >
<div class="position-relative">
{% if flashWorkshop.flashWorkshopEntity.logoProfile is defined and flashWorkshop.flashWorkshopEntity.logoProfile is not null %}
<div class="badge-triangle-slider">
{% if 'src' in flashWorkshop.flashWorkshopEntity.logoProfile %}
<div class="froalaLogoProfile">
{{flashWorkshop.flashWorkshopEntity.logoProfile|raw}}
</div>
{% else %}
<img alt="" class="rounded" src="{{asset("img/logo/flash-workshop/logo-profile/" ~ flashWorkshop.flashWorkshopEntity.id ~ "/" ~ flashWorkshop.flashWorkshopEntity.logoProfile)}}" style="width:75px!important;">
{% endif %}
</div>
{% endif %}
<div class="card-img-top-mobile">{{flashWorkshop.flashWorkshopEntity.imgProfile|raw}}</div>
<small class="flash-workshop-card-category text-white bg-carbone b-radius-5 px-2 py-1">{{flashWorkshop.flashWorkshopEntity.flashWorkshopType.name}}</small>
</div>
<div class="card-body">
<h3 class="h5 card-title text-graphite work-sans-bold ns-text">{{ flashWorkshop.flashWorkshopEntity.title|length > 23 ? flashWorkshop.flashWorkshopEntity.title|slice(0, 23) ~ '…' : flashWorkshop.flashWorkshopEntity.title }}</h3>
{% if flashWorkshop.flashWorkshopEntity.description is not null %}
<p class="card-text work-sans-medium text-carbone ns-l">
{% if flashWorkshop.flashWorkshopEntity.description|striptags|length|raw > 160 %}
{{flashWorkshop.flashWorkshopEntity.description|striptags|slice(0, 160)|raw}} ...
{% else %}
{{flashWorkshop.flashWorkshopEntity.description|raw}}
{% endif %}
</p>
{% endif %}
<ul>
<li class="text-smoke d-flex align-items-center mb-3">
<span class="fa-sharp fa-solid fa-microphone text-smoke"></span>
<small class="text-smoke ms-2 work-sans-medium sm-text">{{flashWorkshop.flashWorkshopEntity.speaker}}</small>
</li>
<li class="text-smoke d-flex align-items-center mb-3">
<span class="fa-sharp fa-solid fa-location-dot text-smoke"></span>
{% if flashWorkshop.flashWorkshopEntity.onSite == true %}
<small class="text-smoke ms-2 work-sans-medium sm-text">Dans votre agence ({{flashWorkshop.flashWorkshopEntity.duration}})</small>
{% else %}
<small class="text-smoke ms-2 work-sans-medium sm-text">En ligne ({{flashWorkshop.flashWorkshopEntity.duration}})</small>
{% endif %}
</li>
<li class="text-smoke d-flex align-items-center">
{% if flashWorkshop.flashWorkshopEntity.timeslotDate is not null %}
<span class="fa-sharp fa-solid fa-calendar-days text-smoke"></span>
<small class="text-smoke ms-2 work-sans-medium sm-text"> {{flashWorkshop.flashWorkshopEntity.timeslotDate|raw}}
</small>
{% endif %}
</li>
</ul>
</div>
</div>
<div class="card-footer">
{% if is_granted('ROLE_USER') %}
{% if flashWorkshop.flashWorkshopEntity in flashWorkshopsReservedForUser %}
{% for flashUserWorkshop in flashWorkshop.flashWorkshopEntity.flashUserWorkshops %}
{% if flashUserWorkshop.user == app.user %}
<form method="post" action="{{ path('app_flash_user_workshop_delete', {'userSalt': app.user.salt, 'id': flashUserWorkshop.id}) }}" onsubmit="return confirm('Etes-vous certain de vouloir supprimer cet élément ?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ flashUserWorkshop.id) }}">
<button class="btn-notice-outline mt-auto w-100">
{% if flashWorkshop.flashWorkshopEntity.isFull == true and flashUserWorkshop.inQueue == true %}
Retirer de la liste d'attente
{% else %}
Retirer de mon agenda
<span class="fa-sharp fa-solid fa-calendar-circle-minus text-notice ms-2"></span>
{% endif %}
</button>
</form>
{% endif %}
{% endfor %}
{% else %}
{% if flashWorkshop.flashWorkshopEntity.isEmpty == true or flashWorkshop.flashWorkshopEntity.flashTimeslots|length == 0 %}
{% elseif flashWorkshop.flashWorkshopEntity.isOutdated == true %}
<a class="d-block btn-error text-center text-decoration-none mt-auto w-100">Plus de disponibilité</a>
{% elseif flashWorkshop.flashWorkshopEntity.isFull == true %}
<a href="{{path('app_flash_user_workshop_new_in_queue', {'flashWorkshopId': flashWorkshop.flashWorkshopEntity.id})}}" class="d-block btn-notice text-center text-decoration-none mt-auto w-100">Ajouter sur liste d'attente</a>
{% else %}
<button type="button" class="btn-notice mt-auto w-100" data-bs-toggle="modal" data-bs-target="#modal-choose-timeslot-{{i}}"> <span>Choisir mon créneau</span>
<span class="fa-sharp fa-solid fa-calendar-clock ms-2"></span>
</button>
{% endif %}
{% endif %}
{% endif %}
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% set k = 0 %}
{% set l = 0 %}
{% if is_granted('ROLE_USER') %}
{% for flashWorkshop in flashWorkshops %}
{% set k = k + 1 %}
<!-- Modal Desktop -->
<div class="modal fade border-none" id="modal-choose-timeslot-{{k}}" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel{{k}}" aria-hidden="true">
<div class="modal-dialog modal-lg b-radius-5">
<div class="modal-content bg-white b-radius-5 px-3 timeslot-modal">
<div class="d-flex justify-content-between align-items-center">
<div class="mt-3">
<h1 class="h4 modal-title work-sans-bold" id="staticBackdropLabel{{k}}">Choisissez votre créneau</h1>
<p class="text-graphite">Sélectionnez une date et une heure pour ajouter la session à votre agenda.</p>
</div>
<button type="button" class="btn" data-bs-dismiss="modal" aria-label="Fermer">
<span class="fa-sharp fa-solid fa-circle-xmark modal-mark"></span>
<span class="sr-only">Fermer la modale</span>
</button>
</div>
<form method="post" action="{{path('app_flash_user_workshop_new')}}">
<div class="">
{% for date, timeslot in flashWorkshop.timeslots %}
{% set m = 0 %}
{% for t in timeslot %}
{% if t.isFull == true %}
{% set m = m + 1 %}
{% endif %}
{% endfor %}
{% if date|date('Y-m-d') >= "now"|date('Y-m-d') and m != timeslot|length %}
<h6 class="text-smoke text-capitalize">{{date|format_datetime(locale='fr', pattern="EEEE dd MMMM YYYY")}}</h6>
{% endif %}
{% for t in timeslot %}
{% set l = l + 1 %}
{% if t.isFull != true and t.isOutdated != true %}
<div class="timeslot-radio-btn">
<input data-label="{{t.startHour|replace({':': 'h'})}} - {{t.endHour|replace({':': 'h'})}}" type="radio" id="{{t.id}}_{{l}}" name="{{flashWorkshop.flashWorkshopEntity.id}}" value="{{t.id}}">
</div>
{% endif %}
{% endfor %}
{% endfor %}
</div>
<div class="text-center">
<button type="submit" class="d-inline-block modal-center-btn text-decoration-none mb-3">Ajouter à mon agenda</button>
</div>
</form>
</div>
</div>
</div>
{% endfor %}
{% endif %}
</div>
{% endif %}
<div class="d-flex justify-content-between mt-4">
{% for clientProduct in client.clientProducts %}
{% if clientProduct.product.name == 'Defi-inclusion' and app.user != null and userProduct != null %}
{% elseif clientProduct.product.name == 'Autodiagnostic-handicap' and userProduct == null and clientProduct.isActive is same as true and clientProduct.startAt|date("Y-m-d") <= "now"|date("Y-m-d")%}
<!-- Auto Diagnostic Handicap -->
<div class="bg-white p-4 b-radius-5 d-flex align-items-start position-relative wp-50-mx">
<span class="fa-sharp fa-solid fa-stethoscope text-{{client.slug}} avisea-homepage-stetoscop-icon"></span>
<div class="ms-3">
<h2 class="h4 work-sans-bold text-graphite m-text">Autodiagnostic Handicap</h2>
<p class="work-sans-medium text-carbone ns-text">En moins de deux minutes et 8 questions, il vous permet de faire le point sur votre situation et d'identifier les acteurs pour vous accompagner.</p>
<div class="d-flex align-items-center mt-5 mb-3">
<small class="text-smoke work-sans-medium ns-text">8 questions (2min)</small>
<a href="https://auto-diagnostic-handicap.avisea.fr" target="_blank" class="btn-notice text-decoration-none arrow-link">
<span class="text-white work-sans-medium ml-text">Faire le test</span>
<span class="fa-sharp fa-solid fa-arrow-right"></span>
</a>
</div>
</div>
</div>
{% elseif clientProduct.product.name == 'autodiagnostic-handicap-2' and userProduct == null and clientProduct.isActive is same as true and clientProduct.startAt|date("Y-m-d") <= "now"|date("Y-m-d")%}
<!-- Auto Diagnostic Handicap -->
<div class="bg-white p-4 b-radius-5 d-flex align-items-start position-relative wp-50-mx">
<span class="fa-sharp fa-solid fa-stethoscope text-{{client.slug}} avisea-homepage-stetoscop-icon"></span>
<div class="ms-3">
<h2 class="h4 work-sans-bold text-graphite m-text">Autodiagnostic : faites le point sur votre</h2>
<h2 class="h4 work-sans-bold text-graphite m-text">situation de santé au travail</h2>
<p class="work-sans-medium text-carbone ns-text">En moins de 5 minutes et 15 questions, il vous permet de réfléchir à l’impact éventuel de votre état de santé sur votre activité professionnelle et d’identifier des ressources adaptées à vos besoins. Ce test est anonyme et confidentiel : aucune donnée ne sera collectée ou communiquée à votre employeur. </p>
<div class="d-flex align-items-center mt-5 mb-3">
<small class="text-smoke work-sans-medium ns-text">15 questions (5min)</small>
<a href="https://auto-diagnostic-handicap.avisea.fr" target="_blank" class="btn-notice text-decoration-none arrow-link">
<span class="text-white work-sans-medium ml-text">Faire le test</span>
<span class="fa-sharp fa-solid fa-arrow-right"></span>
</a>
</div>
</div>
</div>
{% elseif clientProduct.product.name == 'Test-auditif' and userProduct == null and clientProduct.isActive is same as true and clientProduct.startAt|date("Y-m-d") <= "now"|date("Y-m-d") %}
<!-- Test Auditif -->
<div class="bg-white p-4 b-radius-5 d-flex align-items-start position-relative wp-50-mx">
<span class="fa-sharp fa-regular fa-ear-listen text-{{client.slug}} avisea-homepage-hear-icon"></span>
<div class="ms-3">
<h2 class="h4 work-sans-bold text-graphite m-text">Test auditif</h2>
<p class="work-sans-medium text-carbone ns-text">Vous vous posez des questions quant à votre niveau d'audition ? Réalisez notre test auditif et faisons le point ensemble !</p>
<div class="d-flex align-items-center mt-5 mb-3">
<small class="text-smoke work-sans-medium ns-text">6 questions (5min)</small>
<a href="https://plateforme-auditive.avisea.fr" target="_blank" class="btn-notice text-decoration-none arrow-link">
<span class="text-white work-sans-medium ml-text">Faire le test</span>
<span class="fa-sharp fa-solid fa-arrow-right"></span>
</a>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</main>
<!---->
{% endblock %}
{% block javascripts %}
<script>
$(document).ready(function () {
$('.homepage-flashworkshops').slick({
infinite: true,
variableWidth: true,
nextArrow: '.carousel-next',
prevArrow: '.carousel-prev',
slidesToShow: 4,
slidesToScroll: 4,
responsive: [
{
breakpoint: 768,
settings: {
arrows: false,
centerMode: true,
centerPadding: '40px',
slidesToShow: 3,
slidesToScroll: 3,
}
},
{
breakpoint: 480,
settings: {
arrows: false,
centerMode: true,
centerPadding: '40px',
slidesToShow: 1,
slidesToScroll: 1,
}
}
]
});
});
</script>
{% endblock %}