{% extends 'admin/base.html.twig' %}{% block title %}Liste des Membres{% endblock %}{% block body %}<section class="mb-3 mb-lg-5"><div class="row"> <div class="col-md-6 mb-4"> <div class="card h-100"> <div class="card-body"> <div class="row gx-2 gx-lg-4 gy-5"> <div class="col-sm-5"> <div class="h2">625</div> <p class="subtitle">Nouveau client</p> <div class="progress"> <div class="progress-bar bg-success" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width:60%"></div> </div> </div> <div class="col-sm-7"> <div class="row"> <div class="col-6 text-center"> <div class="h3">254</div> <p cl ass="text-muted fw-normal">Centre maroc</p> <hr> <p class="text-muted mb-0">+125</p> </div> <div class="col-6 text-center"> <div class="h3">328</div> <p class="text-muted">Lorem ipsum</p> <hr> <p class="text-muted mb-0">+144 </p> </div> </div> </div> </div> </div> </div> </div> </div> <div class="card card-table mb-4"> <div class="card-header"> <div class="card-heading"> <span>Gestion des membres </span> <a href="{{ path('app_member_new') }}"> <span class="badge rounded-pill me-2 p-2 bg-primary" style="float:right"> Ajouter un membre</span> </a> </div> </div> <table class="table table-hover mb-0" id="datatable2"> <thead> <tr> <th>Id</th> <th>Prénom</th> <th>Nom</th> <th>Date de naissance</th> <th>Sexe</th> <th>Bilans</th> <th> Details</th> <th> Modifier</th> </tr> </thead> <tbody> {% for member in members %} <tr> <td>{{ member.id }}</td> <td>{{ member.firstName }}</td> <td>{{ member.lastName }}</td> <td>{{ member.birthDate ? member.birthDate|date('Y-m-d H:i:s') : '' }}</td> <td>{{ member.sexe }}</td> <td> <!-- Button trigger modal --> <button type="button" class="btn" data-bs-toggle="modal" data-bs-target="#bilansModal"> <svg class="svg-icon svg-icon-md me-3"> <svg class="theme-line-0"><use xlink:href="{{asset('icons/orion-svg-sprite.svg#add-1')}}"></use></svg> </svg> </button> <!-- Modal Bialn --> <div class="modal fade" id="bilansModal" tabindex="-1" aria-labelledby="bilansModalLabel" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered modal-xl"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="bilansModalLabel">Bilans </h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <div class="row"> <div class="col-md-4"> <div class="card mb-4 bg-success text-white"> <div class="card-header card-header-transparent card-heading">5 Kilos perdu la semaine derniére</div> <div class="card-body text-center"> <h5 class="card-title">Poids Initial : 120 kg</h5> <h5 class="card-title">Poids Actuelle : 95 kg</h5> <h5 class="card-title">Total Perdu : 25 kg</h5> </div> </div> </div> <div class="col-md-4"> <div class="card mb-4"> <div class="card-header"> <h4 class="card-heading">Evolution du poids</h4> </div> <div class="card-body"> <canvas id="lineChartCustom2"></canvas> </div> </div> </div> <div class="col-md-4"> <div class="card mb-4"> <div class="card-header"> <h4 class="card-heading">Evolution du muscle</h4> </div> <div class="card-body"> <canvas id="lineChartCustom3"></canvas> </div> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="card mb-4"> <div class="card-header"> <h4 class="card-heading">{{member.firstName}} {{member.lastName}}</h4> <a href="{{ path('app_bilan_new') }}"> <span class="badge rounded-pill me-2 p-2 bg-primary" style="float:right"> Ajouter un Bilan</span> </a> </div> <div class="card-body"> <table class="table table-striped card-text"> <thead> <tr> <th>#</th> <th>Date</th> <th>Taille</th> <th>Poids Initial</th> <th>Détails</th> <th> Mesures </th> </tr> </thead> <tbody> {% for bilan in member.bilans %} <tr> <th scope="row">{{ bilan.id}}</th> <td>{{ bilan.createdAt|date('d/m/Y') }}</td> <td>{{ bilan.size }}</td> <td>{{ bilan.weight }}</td> <td> <a href="{{ path('app_bilan_show', {'id': bilan.id}) }}" title="Afficher plus de détails"> <svg class="svg-icon svg-icon-md me-3"> <svg class="theme-line-0"><use xlink:href="{{asset('icons/orion-svg-sprite.svg#find-1')}}"></use></svg> </svg> </a> </td> <td> <a href="{{ path('app_bilan_show', {'id': bilan.id}) }}" title="Afficher plus de détails"> <svg class="svg-icon svg-icon-md me-3"> <svg class="theme-line-2"><use xlink:href="{{asset('icons/orion-svg-sprite.svg#sorting-1')}}"></use></svg> </svg> </a> </td> </tr> {% endfor %} </tbody> </table> </div> </div> </div> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-warning" data-bs-dismiss="modal">Fermer</button> </div> </div> </div> </div> </td> <td> <a href="{{ path('app_member_show', {'id': member.id}) }}" title="afficher"> <svg class="svg-icon svg-icon-md me-3"> <svg class="theme-line-0"><use xlink:href="{{asset('icons/orion-svg-sprite.svg#zoom-in-1')}}"></use></svg> </svg> </a> </td> <td> <a href="{{ path('app_member_edit', {'id': member.id}) }}" title="modifier"> <svg class="svg-icon svg-icon-md me-3"> <svg class="theme-line-0"><use xlink:href="{{asset('icons/orion-svg-sprite.svg#pencil-1')}}"></use></svg> </svg> </a> </td> </tr> {% else %} <tr> <td colspan="11">Aucun Membre trouvé</td> </tr> {% endfor %} </tbody> </table> </div></section> {% block javascripts %} <script src="{{asset('js/charts-custom.js')}}"></script> <script src="{{asset('vendor/chart.js/Chart.min.js')}}"></script> <script src="{{asset('js/charts-defaults.js')}}"></script> <script type="text/javascript"> document.addEventListener("DOMContentLoaded", function () { const lineChartCustom2 = new Chart(document.getElementById("lineChartCustom2"), { type: "line", options: { tooltips: { mode: "index", intersect: false, }, scales: { xAxes: [ { display: false, }, ], yAxes: [ { ticks: { max: 200, min: 50, }, gridLines: { display: true, drawBorder: false, }, }, ], }, legend: { display: false, }, }, data: { labels: ["Semaine1", "Semaine2", "Semaine3", "Semaine4", "Semaine5", "Semaine6", "Semaine7"], datasets: [ { label: "poids", fill: true, backgroundColor: window.gradients.primaryWhite, borderColor: window.colors.primary, pointBorderColor: window.colors.primary, pointHoverBackgroundColor: window.colors.primary, borderCapStyle: "butt", borderDash: [], borderJoinStyle: "miter", borderWidth: 2, pointBackgroundColor: window.colors.primary, pointBorderWidth: 5, pointHoverRadius: 5, pointHoverBorderColor: window.colors.primary, pointHoverBorderWidth: 1, pointRadius: 0, pointHitRadius: 2, data: [125, 120, 117, 100, 105, 99, 95], spanGaps: false, }, ], }, }); const lineChartCustom3 = new Chart(document.getElementById("lineChartCustom3"), { type: "line", options: { tooltips: { mode: "index", intersect: false, }, scales: { xAxes: [ { display: false, }, ], yAxes: [ { ticks: { max: 100, min: 0, }, gridLines: { display: true, drawBorder: false, }, }, ], }, legend: { display: false, }, }, data: { labels: ["Semaine1", "Semaine2", "Semaine3", "Semaine4", "Semaine5", "Semaine6", "Semaine7"], datasets: [ { label: "pourcentage", fill: true, backgroundColor: window.gradients.primaryWhite, borderColor: window.colors.primary, pointBorderColor: window.colors.primary, pointHoverBackgroundColor: window.colors.primary, borderCapStyle: "butt", borderDash: [], borderJoinStyle: "miter", borderWidth: 2, pointBackgroundColor: window.colors.primary, pointBorderWidth: 5, pointHoverRadius: 5, pointHoverBorderColor: window.colors.primary, pointHoverBorderWidth: 1, pointRadius: 0, pointHitRadius: 2, data: [14, 15, 16, 17, 18, 19, 20], spanGaps: false, }, ], }, }); }) </script>{% endblock %}{% endblock %}