Add solde footers + per-année small multiples to /dashboard/compte
1. "Entrées sur-versées" and "Versements sans entrée liée" tables get a solde footer, same convention as "Reste à verser" above them -- reuses the totalSurVerse/totalNonLies computeds already backing the summary cards, no new computation. 2. "Répartition de l'activité par type" and "Top clients" keep their all-time chart, now followed by a small-multiples grid of the same chart per année. The type breakdown reuses total_par_type_par_compte_par_annee, a new field on DashboardStatsController::stats() built from the same répartition- level rows already fetched for total_par_type_par_compte (no extra query, just one more level of grouping in the PHP aggregation). Top clients per année is computed client-side from the same entreesDuCompte already used for the all-time version, capped to top 5 (not 10) to keep the grid readable. HBarChart gains a `compact` prop (narrower fixed columns, smaller text) for use inside the small-multiples cards -- the all-time charts above keep the full-width layout unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+18
@@ -85,6 +85,9 @@
|
||||
<td class="is-negative">{{ formatEur(-r.residual) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan="5">Total</td><td class="is-negative">{{ formatEurRound(totalSurVerse) }}</td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
@@ -103,6 +106,9 @@
|
||||
<td class="is-negative">{{ formatEur(r.parCompte[selectedCompte]) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan="3">Total</td><td class="is-negative">{{ formatEurRound(-totalNonLies) }}</td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
@@ -148,12 +154,24 @@
|
||||
<h2>Répartition de l'activité par type</h2>
|
||||
<p class="figli-note">Montant total (HT, valeur absolue) par type de ligne pour {{ selectedCompte }}, hors ouvertures -- contrairement aux tableaux ci-dessus, tous les types comptent ici (pas seulement entrée/versement).</p>
|
||||
<h-bar-chart :items="typeItems" :format-value="formatEurRound" :color-for="typeColor"></h-bar-chart>
|
||||
<div class="figli-year-hbar-grid">
|
||||
<div class="figli-year-hbar-card" v-for="y in typeItemsParAnnee" :key="y.annee">
|
||||
<div class="figli-year-hbar-title">{{ y.annee }}</div>
|
||||
<h-bar-chart :items="y.items" :format-value="formatEurRound" :color-for="typeColor" compact></h-bar-chart>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="figli-chart-section" v-if="topClientsItems.length">
|
||||
<h2>Top clients</h2>
|
||||
<p class="figli-note">Clients ayant généré le plus d'entrées attribuées à {{ selectedCompte }}, toutes années confondues.</p>
|
||||
<h-bar-chart :items="topClientsItems" :format-value="formatEurRound"></h-bar-chart>
|
||||
<div class="figli-year-hbar-grid">
|
||||
<div class="figli-year-hbar-card" v-for="y in topClientsParAnnee" :key="y.annee">
|
||||
<div class="figli-year-hbar-title">{{ y.annee }}</div>
|
||||
<h-bar-chart :items="y.items" :format-value="formatEurRound" compact></h-bar-chart>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user