Solidarity transport implementation
This commit is contained in:
46
web/layouts/beneficiaries/_partials/beneficiary-wallet.html
Normal file
46
web/layouts/beneficiaries/_partials/beneficiary-wallet.html
Normal file
@@ -0,0 +1,46 @@
|
||||
{{define "beneficiary_wallet"}}
|
||||
<div class="px-4 py-6 sm:px-6 text-center"
|
||||
x-data="{
|
||||
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>
|
||||
<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
|
||||
</button>
|
||||
<div class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true"
|
||||
x-show="walletdialog">
|
||||
<div class="fixed inset-0 bg-gray-900 opacity-30 transition-opacity"></div>
|
||||
|
||||
<div class="fixed inset-0 z-10 overflow-y-auto">
|
||||
<div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
|
||||
<div class="relative transform overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-sm sm:p-6">
|
||||
<div>
|
||||
<div class="mt-3 text-center sm:mt-5">
|
||||
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Créditer le compte</h3>
|
||||
<div class="mt-2">
|
||||
<p class="text-sm text-gray-500">Créditer le compte mobilité de l'utilisateur</p>
|
||||
</div>
|
||||
</div>
|
||||
</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"
|
||||
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">
|
||||
<button type="submit" class="inline-flex w-full justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:text-sm">Ajouter</button>
|
||||
</div>
|
||||
<div class="mt-5 sm:mt-6">
|
||||
<button @click="walletdialog=false" type="button" class="inline-flex w-full justify-center max-w-xs bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Annuler</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -133,6 +133,11 @@
|
||||
:class="tab == 'documents' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
Documents </a>
|
||||
|
||||
<a href="#" @click="tab = 'wallet'"
|
||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||
:class="tab == 'wallet' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
Compte mobilité </a>
|
||||
|
||||
<a href="#" @click="tab = 'organizations'"
|
||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||
:class="tab == 'organizations' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
@@ -149,6 +154,7 @@
|
||||
|
||||
<div x-show="tab == 'documents'">{{template "beneficiary_files" .}}</div>
|
||||
<div x-show="tab == 'notes'">{{template "beneficiary_notes" .}}</div>
|
||||
<div x-show="tab == 'wallet'">{{template "beneficiary_wallet" .}}</div>
|
||||
<div x-show="tab == 'organizations'">{{template "beneficiary_organizations" .}}</div>
|
||||
<!--<div x-show="tab == 'diags'">{{template "beneficiary_diags" .}}</div>-->
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user