osm-commerces/templates/public/dashboard.html.twig

73 lines
2.4 KiB
Twig
Raw Normal View History

2025-05-26 11:32:53 +02:00
{% extends 'base.html.twig' %}
{% block title %}Hello PublicController!{% endblock %}
{% block stylesheets %}
{{ parent() }}
<link href='https://api.mapbox.com/mapbox-gl-js/v2.15.0/mapbox-gl.css' rel='stylesheet' />
<style>
.hidden {
display: none;
}
</style>
{% endblock %}
{% block body %}
<div class="container mt-4">
<div class="row">
<div class="col-12">
<h1>Dashboard</h1>
</div>
<div class="col-12">
<h2>Statistiques : {{ stats|length }} commerces</h2>
<table>
<thead>
<tr>
<th>Zone</th>
<th>Nombre de commerces</th>
<th>Complétude %</th>
</tr>
</thead>
<tbody>
{% for stat in stats %}
<tr>
<td>{{ stat.zone }}</td>
<td>{{ stat.placesCount }}</td>
<td style="background : rgba(0 , 255, 0, {{stat.completionPercent / 100 }} )">{{ stat.completionPercent }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<h2>Lieux</h2>
<table>
<thead>
<tr>
<th>Nom</th>
<th>Email</th>
<th>Date de modification</th>
<th>Date de dernier contact</th>
<th>Date de dernière modification</th>
</tr>
</thead>
<tbody>
{% for place in places %}
<tr>
<td>{{ place.name }}</td>
<td>{{ place.email }}</td>
<td>{{ place.modifiedDate | date('Y-m-d H:i:s') }}</td>
<td>{{ place.lastContactAttemptDate | date('Y-m-d H:i:s') }}</td>
<td>{{ place.modifiedDate | date('Y-m-d H:i:s') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}