<!DOCTYPE html><html lang="fr"><head><meta charset="UTF-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><link rel="apple-touch-icon" sizes="76x76" href="{{ asset('assets/imgs/favicon/apple-touch-icon.png') }}"><link rel="icon" type="image/png" sizes="32x32" href="{{ asset('assets/imgs/favicon/favicon-32x32.png') }}"><link rel="icon" type="image/png" sizes="16x16" href="{{ asset('assets/imgs/favicon/favicon-16x16.png') }}"><link rel="manifest" href="{{ asset('assets/imgs/favicon/site.webmanifest') }}"><link rel="stylesheet" href="https://pro.fontawesome.com/releases/v6.0.0-beta2/css/all.css"><link rel="mask-icon" href="{{ asset('assets/imgs/favicon/safari-pinned-tab.svg') }}" color="#5bbad5"><meta name="msapplication-TileColor" content="#00aba9"><meta name="theme-color" content="#ffffff">{% block meta %}{% endblock %}<title>{% block title %}Nibuco{% endblock %}</title>{% block canonical %}{% endblock %}<link rel="apple-touch-icon" sizes="76x76" href="{{ asset('assets/imgs/favicon/apple-touch-icon.png') }}"><link rel="icon" type="image/x-icon" href="{{ asset('assets/imgs/nibuco/favicon.ico') }}"><link rel="icon" type="image/png" sizes="32x32" href="{{ asset('assets/imgs/favicon/favicon-32x32.png') }}"><link rel="icon" type="image/png" sizes="16x16" href="{{ asset('assets/imgs/favicon/favicon-16x16.png') }}"><link rel="manifest" href="{{ asset('assets/imgs/favicon/site.webmanifest') }}"><link rel="stylesheet" href="https://pro.fontawesome.com/releases/v6.0.0-beta2/css/all.css"><link rel="mask-icon" href="{{ asset('assets/imgs/favicon/safari-pinned-tab.svg') }}" color="#5bbad5">{# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}{% block stylesheets %}{{ encore_entry_link_tags('app') }}{% endblock %}{% block javascripts %}{{ encore_entry_script_tags('app') }}<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script><script src="https://code.jquery.com/jquery-3.7.0.js"></script>{% endblock %}</head><body class="document-body" id="document-body">{% set route = app.request.attributes.get('_route') %}<!-- Begin Header -->{% include('_header.html.twig') %}<!-- End Header -->{% block body %}{% endblock %}<!-- Begin Footer -->{% include('_footer.html.twig') %}<!-- End Footer -->{% block javascript %}{% endblock %}{% block mercure %}{% if app.user %}<script type="application/javascript">const eventSource = new EventSource("{{ mercure(['http://nibuco/deliveryman/' ~app.user.id,'http://nibuco/recipient/' ~app.user.id,'http://nibuco/sender/' ~app.user.id,])| escape('js') }}");$(document).ready(function () {eventSource.onmessage = event => {// Will be called every time an update is published by the servervar data = JSON.parse(event.data);if (data.to == 'deliveryman') {switch (data.type) {case 'delivery man scanned':showElementJs('#course-header #barcode', true);break;case 'delivery man rated':showElementJs('#status #buttons #Enlevé', true);break;default://TODO notif count$('.icon-delivery').addClass("notification");}// if (data.type == 'delivery man scanned') {// showElementJs('#course-header #barcode', true);// } else {// //TODO notif count// $('.icon-delivery').addClass("notification");// }}if (data.to == 'sender') {if (typeof data.nextPost !== 'undefined') {axios.post(data.nextPost).then(function (response) {$('#course').html(response.data);}).catch(function (error) {console.warn(error);})} else if (typeof data.nextGet !== 'undefined') {window.location.replace(data.nextGet);} else if (data.type !== 'undefined' && data.type == 'course status changed') {updateStatus(data.message.status);} else {console.log('update status' + data.message);}}if (data.to == 'recipient') {//TODO recipient action}}});</script>{% endif %}{% endblock %}</body></html>