whatapp-go-pvnet/frontend/templates/dashboard.pages.tmpl

71 lines
2.0 KiB
Cheetah
Raw Permalink Normal View History

2025-05-09 08:14:22 +00:00
{{ define "dashboard.pages.tmpl" }}
2025-05-09 13:42:53 +00:00
{{ template "head" . }}
2025-05-09 14:57:13 +00:00
<div class="columns">
<!-- Sidebar -->
{{ template "sidebar" . }}
2025-05-09 08:14:22 +00:00
<!-- Main content -->
<div class="column is-10">
<h1 class="title">Tableau de bord</h1>
<div class="columns is-multiline">
<div class="column is-4">
<div class="box has-background-light">
2025-05-11 18:58:27 +00:00
<p class="is-5">👥 Total utilisateurs</p>
2025-05-09 08:14:22 +00:00
<p class="subtitle is-4">{{ .Stats.TotalUsers }}</p>
</div>
</div>
<div class="column is-4">
<div class="box has-background-light">
2025-05-11 18:58:27 +00:00
<p class="is-5">📈 Crédits consommés</p>
2025-05-09 08:14:22 +00:00
<p class="subtitle is-4">{{ .Stats.TotalCreditsUsed }}</p>
</div>
</div>
2025-05-16 22:38:56 +00:00
2025-05-16 22:37:33 +00:00
2025-05-09 08:14:22 +00:00
<div class="column is-4">
<div class="box has-background-light">
2025-05-11 18:58:27 +00:00
<p class="is-5">💬 Conversations</p>
2025-05-09 08:14:22 +00:00
<p class="subtitle is-4">{{ .Stats.TotalConversations }}</p>
</div>
</div>
</div>
<h2 class="title is-5">Dernières conversations</h2>
<div class="field is-grouped is-grouped-multiline">
<div class="control">
<a class="button is-link is-light" href="/dashboard?filter=today">📅 Aujourd'hui</a>
</div>
<div class="control">
<a class="button is-link is-light" href="/dashboard?filter=week">📆 Cette semaine</a>
</div>
<div class="control">
<a class="button is-link is-light" href="/dashboard">🔁 Tout</a>
</div>
</div>
<table class="table is-fullwidth is-striped">
<thead>
<tr>
<th>Date</th>
<th>De</th>
<th>À</th>
<th>Type</th>
<th>Contenu</th>
</tr>
</thead>
<tbody>
{{ range .Conversations }}
<tr>
<td>{{ .CreatedAt.Format "02/01/2006 15:04" }}</td>
<td>{{ .From }}</td>
<td>{{ .To }}</td>
<td>{{ .Type }}</td>
<td>{{ .Content }}</td>
</tr>
{{ end }}
</tbody>
</table>
</div>
</div>
{{ end }}