solidarity-transport-dev

This commit is contained in:
2025-06-04 07:59:55 +02:00
parent d487f8b387
commit b3f7105ddb
10 changed files with 57 additions and 6 deletions

View File

@@ -59,7 +59,7 @@
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .Data.phone_number }}</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
{{if and .Data.other_properties (and .Data.other_properties.last_subscription_date (gt .Data.other_properties.last_subscription_date "2025"))}}
{{if solidarityDriverValidatedProfile . (solidarityDocuments .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>

View File

@@ -190,6 +190,16 @@
{{ else }}
<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 beneficiaryValidatedProfile .passenger (beneficiaryDocuments .passenger.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 .passenger.Data.email}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Email</dt>

View File

@@ -42,6 +42,16 @@
</div>
<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">
<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 .ViewState.driver .ViewState.documents}}
<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 .ViewState.driver.Data.email}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Email</dt>

View File

@@ -42,6 +42,16 @@
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" />
</div>
{{end}}
<div class="m-auto text-center">
<label for="motivation" class="block text-sm font-medium text-gray-700">Motif du trajet</label>
<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">
<option value="Santé">Santé</option>
<option value="Insertion">Insertion</option>
<option value="Administratif">Administratif</option>
<option selected="selected" value="Autre">Autre&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
</select>
</div>
{{template "submit_with_sms"
dict "IconSet" .IconSet
"Viewstate" .ViewState

View File

@@ -78,6 +78,8 @@
"headerText" "Validez le trajet"
"infoText" "Le message suivant sera envoyé à votre passager. Vous pouvez le personnaliser.")
"SMSState" (dict "name" (.ViewState.config.GetString "service_name")
"driver_first_name" .ViewState.driver.Data.first_name
"driver_last_name" .ViewState.driver.Data.last_name
"address" .ViewState.booking.Journey.PassengerDrop.Properties.label
"date" (.ViewState.booking.Journey.PassengerPickupDate.Format "02/01/2006 15:04")
"phone_number" .ViewState.driver.Data.phone_number)}}