allow 2 decimals wallets credit

This commit is contained in:
Arnaud Delcasse
2025-07-04 10:53:15 +02:00
parent 3734beeb62
commit af0d632a78
4 changed files with 15 additions and 8 deletions

View File

@@ -4,7 +4,7 @@
walletdialog: false
}">
<div class="px-4 py-5 sm:px-6">
<p class="text-center text-lg">Solde : {{if .ViewState.beneficiary.Data.wallet}}{{ .ViewState.beneficiary.Data.wallet }}{{else}}0{{end}} €</p>
<p class="text-center text-lg">Solde : {{if .ViewState.beneficiary.Data.wallet}}{{ printf "%.2f" .ViewState.beneficiary.Data.wallet }}{{else}}0{{end}} €</p>
<button @click="walletdialog = !walletdialog"
class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 my-4 mt-8 w-full text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
Créditer le compte
@@ -26,7 +26,7 @@
</div>
<form method="POST" action="/app/wallets/{{.ViewState.beneficiary.ID}}/credit" class="my-4">
<div class="my-8">
<input type="number" id="amount" name="amount" value="0"
<input type="number" step="0.01" id="amount" name="amount" value="0"
class="w-full shadow-sm focus:ring-co-blue focus:border-co-blue px-2 p-1 sm:text-sm border-gray-300 rounded-2xl">
</div>
<div class="mt-5 sm:mt-6">