From 967be9e750221ab2ab783f95df79bb26d290a45e Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Mon, 15 Sep 2025 01:07:58 +0200 Subject: add: added projects --- .../src/routes/dashboard/analyses/+page.svelte | 409 +++++++++++++++++++++ 1 file changed, 409 insertions(+) create mode 100644 ping/frontend/src/routes/dashboard/analyses/+page.svelte (limited to 'ping/frontend/src/routes/dashboard/analyses') diff --git a/ping/frontend/src/routes/dashboard/analyses/+page.svelte b/ping/frontend/src/routes/dashboard/analyses/+page.svelte new file mode 100644 index 0000000..1a8ed47 --- /dev/null +++ b/ping/frontend/src/routes/dashboard/analyses/+page.svelte @@ -0,0 +1,409 @@ + + +
+
+

Analyses des Transactions

+
+ + +
+
+ + + + {#if analysisData.thresholdAlerts} +
+ {#if analysisData.thresholdAlerts.dailySpending} +
+ ⚠️ Dépenses quotidiennes élevées ({(Math.abs(analysisData.totalAmount) / selectedPeriod).toFixed(0)}€/jour) +
+ {/if} + {#if analysisData.thresholdAlerts.co2Impact} +
+ 🌍 Impact CO2 élevé ({analysisData.totalCO2}g) +
+ {/if} + {#if analysisData.thresholdAlerts.profitTarget} +
+ 🎯 Objectif de profit atteint ({analysisData.totalAmount.toFixed(0)}€) +
+ {/if} +
+ {/if} + +
+
+

Transactions dans le temps

+ {#if analysisData.chartData?.length > 0} + + {:else} +

Aucune donnée

+ {/if} +
+ +
+

Top destinataires

+
+ {#each (analysisData.recipientChartData || []).slice(0, 5) as recipient} +
+ {recipient.x} +
+ {#if analysisData.recipientChartData?.length > 0} + {@const maxValue = Math.max(...analysisData.recipientChartData.map(r => r.y))} +
+ {:else} +
+ {/if} + {recipient.y.toFixed(0)}€ +
+
+ {/each} +
+
+ +
+

Répartition des transactions

+
+
+ Achats: + + {(analysisData.filteredTransactions || []).filter((t: Transaction) => t.type === 'buy').length} + +
+
+ Ventes: + + {(analysisData.filteredTransactions || []).filter((t: Transaction) => t.type === 'sell').length} + +
+
+ Volume total: + + {Math.abs(analysisData.totalAmount || 0).toFixed(0)}€ + +
+
+
+ +
+

Métriques CO2

+
+
+ Impact total: + + {analysisData.totalCO2 || 0}g CO2 + +
+
+ Par transaction: + + {(analysisData.filteredTransactions?.length ? analysisData.totalCO2 / analysisData.filteredTransactions.length : 0).toFixed(1)}g + +
+
+
+
+
+ + -- cgit v1.2.3