solidarity pricing
This commit is contained in:
parent
b69dfc99e4
commit
ba68e11785
|
@ -73,6 +73,7 @@ views:
|
||||||
- web/layouts/beneficiaries/_partials/beneficiary-organizations.html
|
- web/layouts/beneficiaries/_partials/beneficiary-organizations.html
|
||||||
- web/layouts/beneficiaries/_partials/beneficiary-diags.html
|
- web/layouts/beneficiaries/_partials/beneficiary-diags.html
|
||||||
- web/layouts/beneficiaries/_partials/beneficiary-wallet.html
|
- web/layouts/beneficiaries/_partials/beneficiary-wallet.html
|
||||||
|
- web/layouts/beneficiaries/_partials/beneficiary-solidarity-transport.html
|
||||||
- web/layouts/beneficiaries/display.html
|
- web/layouts/beneficiaries/display.html
|
||||||
create_diag:
|
create_diag:
|
||||||
files:
|
files:
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
{{ define "sms_template" }}[{{ .name }}] Nouvelle demande de trajet solidaire{{ .datetime }}.
|
{{ define "sms_template" }}[{{ .name }}] Nouvelle demande de trajet solidaire le {{ .datetime }}.
|
||||||
Acceptez ou refusez sur {{ .baseUrl }}/ext/st/bp/{booking_id}{{ end }}
|
Acceptez ou refusez sur {{ .baseUrl }}/ext/st/bp/{booking_id}{{ end }}
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
{{ $cancelText := (or .ComponentState.cancelText "Annuler" )}}
|
{{ $cancelText := (or .ComponentState.cancelText "Annuler" )}}
|
||||||
{{ $validateText := (or .ComponentState.validateText "Envoyer" )}}
|
{{ $validateText := (or .ComponentState.validateText "Envoyer" )}}
|
||||||
{{ $infoText := (or .ComponentState.infoText "Le message suivant sera envoyé. Vous pouvez le personnaliser." )}}
|
{{ $infoText := (or .ComponentState.infoText "Le message suivant sera envoyé. Vous pouvez le personnaliser." )}}
|
||||||
|
{{ $doNotSendText := (or .ComponentState.doNotSendText "Ne pas envoyer le message par SMS." )}}
|
||||||
|
{{ $doNotSendOption := eq .ComponentState.doNotSendOption true }}
|
||||||
<div x-data="{ {{ $dialog }}: false}" class="text-center">
|
<div x-data="{ {{ $dialog }}: false}" class="text-center">
|
||||||
<button @click="{{ $dialog }} = !{{ $dialog }}" type="button" class="bg-co-blue border-gray-300 border px-4 py-2 text-white items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
<button @click="{{ $dialog }} = !{{ $dialog }}" type="button" class="bg-co-blue border-gray-300 border px-4 py-2 text-white items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
{{ .ComponentState.submitText }}
|
{{ .ComponentState.submitText }}
|
||||||
|
@ -32,7 +34,15 @@
|
||||||
<textarea rows="4" name="message" id="message" class="block w-full rounded-2xl border-gray-300 shadow-sm focus:border-co-blue focus:ring-co-blue sm:text-sm">{{template "sms_template" .SMSState }}</textarea>
|
<textarea rows="4" name="message" id="message" class="block w-full rounded-2xl border-gray-300 shadow-sm focus:border-co-blue focus:ring-co-blue sm:text-sm">{{template "sms_template" .SMSState }}</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{ if $doNotSendOption}}
|
||||||
|
<div>
|
||||||
|
<div class="mt-1 flex flex-row justify-items-center items-center">
|
||||||
|
<div class="flex-none m-4"><input type="checkbox" name="do_not_send" id="do_not_send" class="block w-full rounded-2xl border-gray-300 shadow-sm focus:border-co-blue focus:ring-co-blue sm:text-sm" /></div>
|
||||||
|
<label for="do_not_send" class="flex text-sm text-gray-700 align-middle">{{$doNotSendText}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{end}}
|
||||||
<div class="mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense sm:grid-cols-2">
|
<div class="mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense sm:grid-cols-2">
|
||||||
<button @click="{{$dialog}} = !{{$dialog}}" type="button" class="mt-3 inline-flex w-full justify-center rounded-l-2xl border border-gray-300 bg-white px-4 py-2 text-base font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:col-start-1 sm:mt-0 sm:text-sm">{{ $cancelText }}</button>
|
<button @click="{{$dialog}} = !{{$dialog}}" type="button" class="mt-3 inline-flex w-full justify-center rounded-l-2xl border border-gray-300 bg-white px-4 py-2 text-base font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:col-start-1 sm:mt-0 sm:text-sm">{{ $cancelText }}</button>
|
||||||
<button type="submit" class="inline-flex w-full justify-center rounded-r-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:col-start-2 sm:text-sm">{{ $validateText }}</button>
|
<button type="submit" class="inline-flex w-full justify-center rounded-r-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:col-start-2 sm:text-sm">{{ $validateText }}</button>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
{{define "beneficiary_solidarity_transport"}}
|
||||||
|
<div class="px-4 py-6 sm:px-6 text-center">
|
||||||
|
<p class="text-center text-lg">Trajets réalisés : {{ .ViewState.solidarity_transport_stats.count }}</p>
|
||||||
|
<p class="text-center text-lg">Kilomètres réalisés : {{ .ViewState.solidarity_transport_stats.km}} km</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{{end}}
|
|
@ -179,6 +179,12 @@
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
x-model="other_properties.last_subscription_date">
|
x-model="other_properties.last_subscription_date">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="previous_solidarity_transport" class="block text-sm font-medium text-gray-700">Nombre de transports solidaires précédents</label>
|
||||||
|
<input type="number" name="previous solidarity_transport" id="previous_solidarity_transport" placeholder="0"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
|
x-model="other_properties.previous_solidarity_transport">
|
||||||
|
</div>
|
||||||
<div class="col-span-6 sm:col-span-3">
|
<div class="col-span-6 sm:col-span-3">
|
||||||
<label for="comment" class="block text-sm font-medium text-gray-700">Commentaire</label>
|
<label for="comment" class="block text-sm font-medium text-gray-700">Commentaire</label>
|
||||||
<textarea name="comment" id="comment"
|
<textarea name="comment" id="comment"
|
||||||
|
|
|
@ -179,6 +179,13 @@
|
||||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
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'">
|
: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>
|
Compte mobilité </a>
|
||||||
|
|
||||||
|
{{if moduleAvailable "solidarity_transport"}}<a href="#" @click="tab = 'solidarity_transport'"
|
||||||
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
|
:class="tab == 'solidarity_transport' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
|
Transport solidaire </a>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
|
||||||
<a href="#" @click="tab = 'organizations'"
|
<a href="#" @click="tab = 'organizations'"
|
||||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
|
@ -197,6 +204,7 @@
|
||||||
<div x-show="tab == 'documents'">{{template "beneficiary_files" .}}</div>
|
<div x-show="tab == 'documents'">{{template "beneficiary_files" .}}</div>
|
||||||
<div x-show="tab == 'notes'">{{template "beneficiary_notes" .}}</div>
|
<div x-show="tab == 'notes'">{{template "beneficiary_notes" .}}</div>
|
||||||
<div x-show="tab == 'wallet'">{{template "beneficiary_wallet" .}}</div>
|
<div x-show="tab == 'wallet'">{{template "beneficiary_wallet" .}}</div>
|
||||||
|
{{if moduleAvailable "solidarity_transport"}}<div x-show="tab == 'solidarity_transport'">{{template "beneficiary_solidarity_transport" .}}</div>{{end}}
|
||||||
<div x-show="tab == 'organizations'">{{template "beneficiary_organizations" .}}</div>
|
<div x-show="tab == 'organizations'">{{template "beneficiary_organizations" .}}</div>
|
||||||
<!--<div x-show="tab == 'diags'">{{template "beneficiary_diags" .}}</div>-->
|
<!--<div x-show="tab == 'diags'">{{template "beneficiary_diags" .}}</div>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -181,6 +181,12 @@
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
x-model="other_properties.last_subscription_date">
|
x-model="other_properties.last_subscription_date">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="previous_solidarity_transport" class="block text-sm font-medium text-gray-700">Nombre de transports solidaires précédents</label>
|
||||||
|
<input type="text" name="previous solidarity_transport" id="previous_solidarity_transport" placeholder="0"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
|
x-model="other_properties.previous_solidarity_transport">
|
||||||
|
</div>
|
||||||
<div class="col-span-6 sm:col-span-3">
|
<div class="col-span-6 sm:col-span-3">
|
||||||
<label for="comment" class="block text-sm font-medium text-gray-700">Commentaire</label>
|
<label for="comment" class="block text-sm font-medium text-gray-700">Commentaire</label>
|
||||||
<textarea name="comment" id="comment"
|
<textarea name="comment" id="comment"
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
{{ .Journey.PassengerDrop.Properties.label }}
|
{{ .Journey.PassengerDrop.Properties.label }}
|
||||||
</td>
|
</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">
|
||||||
{{ .Journey.PassengerPickupDate.Format "02/01/2006 15:04" }}
|
{{ timeFormat .Journey.PassengerPickupDate "02/01/2006 15:04" }}
|
||||||
</td>
|
</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">
|
||||||
{{ if eq .Status "WAITING_CONFIRMATION"}}
|
{{ if eq .Status "WAITING_CONFIRMATION"}}
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
{{ else if eq .Status "CANCELLED"}}
|
{{ else if eq .Status "CANCELLED"}}
|
||||||
<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 }}
|
||||||
{{if and .Data.motivation (ne .Data.motivation "")}}<div class="mt-4"><span class="text-xs p-2 bg-co-green text-white rounded-2xl">Trajet garanti : {{.Data.motivation}}</span></div>{{end}}
|
{{if and .Data.motivation (or (or (eq .Data.motivation "Santé") (eq .Data.motivation "Insertion")) (eq .Data.motivation "Administratif"))}}<div class="mt-4"><span class="text-xs p-2 bg-co-green text-white rounded-2xl">Trajet garanti : {{.Data.motivation}}</span></div>{{end}}
|
||||||
</td>
|
</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}}">
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="text-sm font-medium text-gray-500">Horaire rendez vous passager</dt>
|
<dt class="text-sm font-medium text-gray-500">Horaire rendez vous passager</dt>
|
||||||
<dd class="mt-1 text-sm text-gray-900">{{ .driver_journey.PassengerPickupDate.Format "02/01/2006 15:04"}}</dd>
|
<dd class="mt-1 text-sm text-gray-900">{{ timeFormat .driver_journey.PassengerPickupDate "02/01/2006 15:04"}}</dd>
|
||||||
</div>
|
</div>
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="text-sm font-medium text-gray-500">Temps de trajet (passager)</dt>
|
<dt class="text-sm font-medium text-gray-500">Temps de trajet (passager)</dt>
|
||||||
|
@ -70,6 +70,16 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
||||||
<dl class="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
|
<dl class="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
|
||||||
|
<div class="sm:col-span-1">
|
||||||
|
<dt class="text-sm font-medium text-gray-500">Profil validé</dt>
|
||||||
|
<dd class="mt-1 text-sm text-gray-900">
|
||||||
|
{{if solidarityDriverValidatedProfile .driver (solidarityDocuments .driver.ID)}}
|
||||||
|
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
|
||||||
|
{{else}}
|
||||||
|
<span class="p-1 px-2 text-xs bg-co-red text-white rounded-2xl">Non</span>
|
||||||
|
{{end}}
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
{{if .driver.Data.email}}
|
{{if .driver.Data.email}}
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="text-sm font-medium text-gray-500">Email</dt>
|
<dt class="text-sm font-medium text-gray-500">Email</dt>
|
||||||
|
|
|
@ -9,10 +9,51 @@
|
||||||
{{ else if eq .ViewState.booking.Status "VALIDATED"}}
|
{{ else if eq .ViewState.booking.Status "VALIDATED"}}
|
||||||
<div class="mt-4"><span class="p-1 text-sm bg-co-green rounded-2xl px-4">Validé</span></div>
|
<div class="mt-4"><span class="p-1 text-sm bg-co-green rounded-2xl px-4">Validé</span></div>
|
||||||
{{ else if eq .ViewState.booking.Status "CANCELLED"}}
|
{{ else if eq .ViewState.booking.Status "CANCELLED"}}
|
||||||
<div class="mt-4"><span class="p-1 text-sm bg-co-red text-white rounded-2xl px-4">Annulé</span></div>
|
<div class="mt-4"><span class="p-1 text-sm bg-co-red text-white rounded-2xl px-4">Annulé : {{.ViewState.booking.Data.reason}}</span></div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div
|
<div
|
||||||
class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
|
class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
|
||||||
|
|
||||||
|
|
||||||
|
{{$dialog := "modif"}}
|
||||||
|
<div x-data="{ {{ $dialog }}: false}">
|
||||||
|
<button @click="{{ $dialog }} = !{{ $dialog }}" type="button" class="bg-white 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">
|
||||||
|
Modifier
|
||||||
|
</button>
|
||||||
|
<div x-show="{{$dialog}}" class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
||||||
|
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 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 max-w-lg sm:p-6">
|
||||||
|
<form method="POST">
|
||||||
|
<div class="mx-auto flex h-12 w-12 items-center justify-center rounded-co bg-co-blue text-white">
|
||||||
|
{{$.IconSet.Icon "hero:outline/information-circle" "h-6 w-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">Modifier</h3>
|
||||||
|
<div class="mt-2">
|
||||||
|
<p class="text-sm text-gray-500"></p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label for="driver_distance" class="block text-sm font-medium text-gray-700">Kilomètres conducteur</label>
|
||||||
|
<div class="mt-1">
|
||||||
|
<input type="text" name="driver_distance" id="driver_distance" class="block w-full rounded-2xl border-gray-300 shadow-sm focus:border-co-blue focus:ring-co-blue sm:text-sm" value="{{.ViewState.booking.Journey.DriverDistance}}" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense sm:grid-cols-2">
|
||||||
|
<button @click="{{$dialog}} = !{{$dialog}}" type="button" class="mt-3 inline-flex w-full justify-center rounded-l-2xl border border-gray-300 bg-white px-4 py-2 text-base font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:col-start-1 sm:mt-0 sm:text-sm">Annuler</button>
|
||||||
|
<button type="submit" class="inline-flex w-full justify-center rounded-r-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:col-start-2 sm:text-sm">Valider</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- <button type="button"
|
<!-- <button type="button"
|
||||||
class="inline-flex items-center justify-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-2xl text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Supprimer</button> -->
|
class="inline-flex items-center justify-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-2xl text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Supprimer</button> -->
|
||||||
{{if eq .ViewState.booking.Status "CANCELLED" }}
|
{{if eq .ViewState.booking.Status "CANCELLED" }}
|
||||||
|
@ -28,8 +69,51 @@
|
||||||
class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Remettre en attente</button></a>
|
class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Remettre en attente</button></a>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if ne .ViewState.booking.Status "CANCELLED" }}
|
{{if ne .ViewState.booking.Status "CANCELLED" }}
|
||||||
<a href="/app/solidarity-transport/bookings/{{.ViewState.booking.Id}}/cancel" class="inline-flex"><button type="button"
|
<!--<a href="/app/solidarity-transport/bookings/{{.ViewState.booking.Id}}/cancel" class="inline-flex"><button type="button"
|
||||||
class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-red hover:bg-co-red focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Annuler</button></a>
|
class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-red hover:bg-co-red focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Annuler</button></a>-->
|
||||||
|
{{$dialog := "cancel"}}
|
||||||
|
<div x-data="{ {{ $dialog }}: false}">
|
||||||
|
<button @click="{{ $dialog }} = !{{ $dialog }}" type="button" class="bg-co-red border-gray-300 border px-4 py-2 text-white items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
|
Annuler
|
||||||
|
</button>
|
||||||
|
<div x-show="{{$dialog}}" class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
||||||
|
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 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 max-w-lg sm:p-6">
|
||||||
|
<form method="POST" action="/app/solidarity-transport/bookings/{{.ViewState.booking.Id}}/cancel">
|
||||||
|
<div class="mx-auto flex h-12 w-12 items-center justify-center rounded-co bg-co-blue text-white">
|
||||||
|
{{$.IconSet.Icon "hero:outline/information-circle" "h-6 w-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">Annuler</h3>
|
||||||
|
<div class="mt-2">
|
||||||
|
<p class="text-sm text-gray-500"></p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label for="reason" class="block text-sm font-medium text-gray-700">Raison de l'annulation</label>
|
||||||
|
<div class="mt-1">
|
||||||
|
<select name="reason" id="reason" class="block w-full rounded-2xl border-gray-300 shadow-sm focus:border-co-blue focus:ring-co-blue sm:text-sm">
|
||||||
|
<option value="Trajet annulé par le passager">Trajet annulé par le passager</option>
|
||||||
|
<option value="Trajet non réalisé">Trajet non réalisé</option>
|
||||||
|
<option value="Refusé par le bénévole">Refusé par le bénévole</option>
|
||||||
|
<option value="Autre" selected="selected">Autre</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense sm:grid-cols-2">
|
||||||
|
<button @click="{{$dialog}} = !{{$dialog}}" type="button" class="mt-3 inline-flex w-full justify-center rounded-l-2xl border border-gray-300 bg-white px-4 py-2 text-base font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:col-start-1 sm:mt-0 sm:text-sm">Annuler</button>
|
||||||
|
<button type="submit" class="inline-flex w-full justify-center rounded-r-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:col-start-2 sm:text-sm">Valider</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -46,18 +46,23 @@
|
||||||
<label for="motivation" class="block text-sm font-medium text-gray-700">Motif du trajet</label>
|
<label for="motivation" class="block text-sm font-medium text-gray-700">Motif du trajet</label>
|
||||||
<select name="motivation" id="motivation"
|
<select name="motivation" id="motivation"
|
||||||
class="p-2 mt-1 mb-4 focus:ring-co-blue focus:border-co-blue block shadow-sm sm:text-sm rounded-2xl bg-white m-auto">
|
class="p-2 mt-1 mb-4 focus:ring-co-blue focus:border-co-blue block shadow-sm sm:text-sm rounded-2xl bg-white m-auto">
|
||||||
<option value="Santé">Santé</option>
|
<option value="Administratif">Administratif (trajet garanti)</option>
|
||||||
<option value="Insertion">Insertion</option>
|
<option value="Commerce">Commerce</option>
|
||||||
<option value="Administratif">Administratif</option>
|
<option value="Courses">Courses</option>
|
||||||
|
<option value="Insertion">Insertion (trajet garanti)</option>
|
||||||
|
<option value="Loisirs">Loisirs</option>
|
||||||
|
<option value="Visite à un proche">Visite à un proche</option>
|
||||||
|
<option value="Santé">Santé (trajet garanti)</option>
|
||||||
<option selected="selected" value="">Autre </option>
|
<option selected="selected" value="">Autre </option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{{template "submit_with_sms"
|
{{template "submit_with_sms"
|
||||||
dict "IconSet" .IconSet
|
dict "IconSet" .IconSet
|
||||||
"Viewstate" .ViewState
|
"Viewstate" .ViewState
|
||||||
"ComponentState" (dict "submitText"
|
"ComponentState" (dict "submitText" "Envoyer la mise en relation"
|
||||||
"Envoyer la mise en relation")
|
"doNotSendOption" true)
|
||||||
"SMSState" (dict "name" (.ViewState.config.GetString "service_name")
|
"SMSState" (dict "name" (.ViewState.config.GetString "service_name")
|
||||||
|
"datetime" (timeFormat .ViewState.driver_journey.PassengerPickupDate "02/01/2006 15:04")
|
||||||
"baseUrl" (.ViewState.config.GetString "base_url") )}}
|
"baseUrl" (.ViewState.config.GetString "base_url") )}}
|
||||||
</form>
|
</form>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="font-medium text-gray-500">Date et heure du rendez-vous</dt>
|
<dt class="font-medium text-gray-500">Date et heure du rendez-vous</dt>
|
||||||
<dd class="mt-1 text-gray-900">{{ .ViewState.booking.Journey.PassengerPickupDate.Format "02/01/2006 15:04"}}</dd>
|
<dd class="mt-1 text-gray-900">{{ timeFormat .ViewState.booking.Journey.PassengerPickupDate "02/01/2006 15:04"}}</dd>
|
||||||
</div>
|
</div>
|
||||||
{{if eq .ViewState.booking.Status "VALIDATED"}}
|
{{if eq .ViewState.booking.Status "VALIDATED"}}
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
|
|
Loading…
Reference in New Issue