-
+
Créditer le compte
@@ -25,15 +25,33 @@
+
+ {{if .ViewState.beneficiary.Data.wallet_history}}
+
+
Historique des opérations
+
+
+
+ Date |
+ Crédit |
+ Débit |
+ Moyen de paiement |
+ Description |
+
+
+
+
+
+
+ Solde initial
+ |
+
+ {{if .ViewState.beneficiary.Data.wallet}}{{ printf "%.2f" .ViewState.beneficiary.Data.wallet }} €{{else}}0.00 €{{end}}
+ |
+
+ -
+ |
+
+ -
+ |
+
+ -
+ |
+
+ {{range $index, $operation := .ViewState.beneficiary.Data.wallet_history}}
+
+
+ {{if $operation.timestamp}}{{timeFormat $operation.timestamp "02/01/2006 15:04"}}{{end}}
+ |
+
+ {{if $operation.amount}}
+ {{if or (eq $operation.operation_type "credit") (not $operation.operation_type)}}
+ {{ printf "%.2f" $operation.amount }} €
+ {{end}}
+ {{end}}
+ |
+
+ {{if eq $operation.operation_type "debit"}}
+ {{ printf "%.2f" $operation.amount }} €
+ {{end}}
+ |
+
+ {{$operation.payment_method}}
+ |
+
+ {{$operation.description}}
+ |
+
+ {{end}}
+
+
+
+ {{else}}
+
+
Aucune opération enregistrée
+
+ {{end}}
+
{{end}}
diff --git a/web/layouts/solidarity_transport/_partials/driver_wallet.html b/web/layouts/solidarity_transport/_partials/driver_wallet.html
index 5b7251f..5f44dcf 100644
--- a/web/layouts/solidarity_transport/_partials/driver_wallet.html
+++ b/web/layouts/solidarity_transport/_partials/driver_wallet.html
@@ -1,10 +1,10 @@
{{define "driver_wallet"}}
-
-
-
Solde : {{if .ViewState.driver.Data.wallet}}{{ printf "%.2f" .ViewState.driver.Data.wallet }}{{else}}0{{end}} €
+
+
Solde : {{ printf "%.2f" .ViewState.wallet_balance }} €
+
+ {{if .ViewState.driver.Data.wallet_history}}
+
+
Historique des opérations
+
+
+
+ Date |
+ Crédit |
+ Débit |
+ Moyen de paiement |
+ Description |
+
+
+
+
+
+
+ Solde initial
+ |
+
+ {{if .ViewState.driver.Data.wallet}}{{ printf "%.2f" .ViewState.driver.Data.wallet }} €{{else}}0.00 €{{end}}
+ |
+
+ -
+ |
+
+ -
+ |
+
+ -
+ |
+
+ {{range $index, $operation := .ViewState.driver.Data.wallet_history}}
+
+
+ {{if $operation.timestamp}}{{timeFormat $operation.timestamp "02/01/2006 15:04"}}{{end}}
+ |
+
+ {{if $operation.amount}}
+ {{if or (eq $operation.operation_type "credit") (not $operation.operation_type)}}
+ {{ printf "%.2f" $operation.amount }} €
+ {{end}}
+ {{end}}
+ |
+
+ {{if eq $operation.operation_type "debit"}}
+ {{ printf "%.2f" $operation.amount }} €
+ {{end}}
+ |
+
+ {{$operation.payment_method}}
+ |
+
+ {{$operation.description}}
+ |
+
+ {{end}}
+
+
+
+ {{else}}
+
+
Aucune opération enregistrée
+
+ {{end}}
+
{{end}}
\ No newline at end of file
diff --git a/web/layouts/solidarity_transport/_partials/journey_preview.html b/web/layouts/solidarity_transport/_partials/journey_preview.html
index 69d0833..fae5e3b 100644
--- a/web/layouts/solidarity_transport/_partials/journey_preview.html
+++ b/web/layouts/solidarity_transport/_partials/journey_preview.html
@@ -249,7 +249,7 @@
{{end}}
Compte mobilié (solde)
- {{if .passenger.Data.wallet}}{{ printf "%.2f" .passenger.Data.wallet }}{{else}}0{{end}} EUR
+ {{ printf "%.2f" .passenger_wallet_balance }} EUR
diff --git a/web/layouts/solidarity_transport/booking_display.html b/web/layouts/solidarity_transport/booking_display.html
index 5541154..cb64024 100644
--- a/web/layouts/solidarity_transport/booking_display.html
+++ b/web/layouts/solidarity_transport/booking_display.html
@@ -120,7 +120,7 @@