allow 2 decimals wallets credit
This commit is contained in:
parent
3734beeb62
commit
af0d632a78
|
@ -4,7 +4,7 @@
|
||||||
walletdialog: false
|
walletdialog: false
|
||||||
}">
|
}">
|
||||||
<div class="px-4 py-5 sm:px-6">
|
<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"
|
<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">
|
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
|
Créditer le compte
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
</div>
|
</div>
|
||||||
<form method="POST" action="/app/wallets/{{.ViewState.beneficiary.ID}}/credit" class="my-4">
|
<form method="POST" action="/app/wallets/{{.ViewState.beneficiary.ID}}/credit" class="my-4">
|
||||||
<div class="my-8">
|
<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">
|
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>
|
||||||
<div class="mt-5 sm:mt-6">
|
<div class="mt-5 sm:mt-6">
|
||||||
|
|
|
@ -40,11 +40,11 @@
|
||||||
{{ $driver := (index $.ViewState.solidarity_drivers .DriverId)}}
|
{{ $driver := (index $.ViewState.solidarity_drivers .DriverId)}}
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{ $driver.Data.first_name }} {{ $driver.Data.last_name }}</td>
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{ $driver.Data.first_name }} {{ $driver.Data.last_name }}</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .DriverDistance }} km</td>
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .DriverDistance }} km</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .PassengerDistance }} km</td>
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .PassengerDistance }} km</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{if $driver.Data.other_properties}}{{ $driver.Data.other_properties.comment }}{{end}}</td>
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{if $driver.Data.other_properties}}{{ $driver.Data.other_properties.comment }}{{end}}</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
{{if solidarityDriverValidatedProfile $driver (solidarityDocuments $driver.ID) }}
|
{{if solidarityDriverValidatedProfile $driver (solidarityDocuments $driver.ID) }}
|
||||||
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
|
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
@ -30,6 +30,10 @@
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
Statut
|
Statut
|
||||||
</th>
|
</th>
|
||||||
|
<th scope="col"
|
||||||
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
|
Prix
|
||||||
|
</th>
|
||||||
<th scope="col"
|
<th scope="col"
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
|
|
||||||
|
@ -69,6 +73,9 @@
|
||||||
<span class="p-1 text-xs bg-co-red text-white rounded-xl">Annulé</span>
|
<span class="p-1 text-xs bg-co-red text-white rounded-xl">Annulé</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</td>
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{ .Journey.Price.Amount }} {{ .Journey.Price.Currency }}
|
||||||
|
</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<a class="text-co-blue" href="/app/solidarity-transport/bookings/{{.Id}}">
|
<a class="text-co-blue" href="/app/solidarity-transport/bookings/{{.Id}}">
|
||||||
Voir
|
Voir
|
||||||
|
|
|
@ -249,7 +249,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="text-sm font-medium text-gray-500">Compte mobilié (solde)</dt>
|
<dt class="text-sm font-medium text-gray-500">Compte mobilié (solde)</dt>
|
||||||
<dd class="mt-1 text-sm text-gray-900">{{if .passenger.Data.wallet}}{{ .passenger.Data.wallet }}{{else}}0{{end}} EUR</dd>
|
<dd class="mt-1 text-sm text-gray-900">{{if .passenger.Data.wallet}}{{ printf "%.2f" .passenger.Data.wallet }}{{else}}0{{end}} EUR</dd>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue