improve guaranteed trips
This commit is contained in:
parent
80c40759bb
commit
49aff4318b
|
@ -47,8 +47,9 @@
|
|||
if (status === 'CANCELLED') return { class: 'p-1 text-xs bg-co-red text-white rounded-xl', text: 'Annulé' };
|
||||
return { class: '', text: '' };
|
||||
},
|
||||
guaranteedMotivations: {{ json .ViewState.guaranteed_trip_motivations }},
|
||||
isGuaranteedTrip(motivation) {
|
||||
return motivation === 'Santé' || motivation === 'Insertion' || motivation === 'Administratif';
|
||||
return this.guaranteedMotivations.includes(motivation);
|
||||
}
|
||||
}">
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Transport solidaire
|
||||
</h1>
|
||||
|
||||
{{if and .ViewState.booking.Data.motivation (or (or (eq .ViewState.booking.Data.motivation "Santé") (eq .ViewState.booking.Data.motivation "Insertion")) (eq .ViewState.booking.Data.motivation "Administratif"))}}
|
||||
{{if and .ViewState.booking.Data.motivation (isGuaranteedTripMotivation .ViewState.booking.Data.motivation)}}
|
||||
<div class="mt-4"><span class="text-sm p-2 bg-co-green text-white rounded-2xl">Trajet garanti : {{.ViewState.booking.Data.motivation}}</span></div>
|
||||
{{end}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue