diff --git a/web/layouts/organized_carpool/_partials/booking_filters.html b/web/layouts/organized_carpool/_partials/booking_filters.html index c9e7c29..450c629 100644 --- a/web/layouts/organized_carpool/_partials/booking_filters.html +++ b/web/layouts/organized_carpool/_partials/booking_filters.html @@ -22,11 +22,9 @@
Aucun trajet dans le passé
{{else}} +
1) this.currentPage--; + }, + goToPage(page) { + this.currentPage = page; + }, + getStatusBadge(status) { + if (status === 'WAITING_DRIVER_CONFIRMATION') return { class: 'p-1 text-xs bg-gray-300 rounded-xl', text: 'Attente confirmation' }; + if (status === 'CONFIRMED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Confirmé' }; + if (status === 'VALIDATED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Validé' }; + if (status === 'CANCELLED') return { class: 'p-1 text-xs bg-co-red text-white rounded-xl', text: 'Annulé' }; + return { class: '', text: '' }; + } +}"> + @@ -42,55 +88,86 @@ - {{range .ViewState.bookings_history}} - - - - - - - - - - - {{ end }} +
- - {{ (index $.ViewState.drivers_map .Driver.Id).Data.first_name }} - {{ (index $.ViewState.drivers_map .Driver.Id).Data.last_name }} - - - - {{ (index $.ViewState.passengers_map .Passenger.Id).Data.first_name }} - {{ (index $.ViewState.passengers_map .Passenger.Id).Data.last_name }} - - - {{ .PassengerPickupAddress }} - - {{ .PassengerDropAddress }} - - {{ timeFormat .PassengerPickupDate.AsTime "02/01/2006 15:04" }} - - {{ if eq .Status.String "WAITING_DRIVER_CONFIRMATION"}} - Attente confirmation - {{ else if eq .Status.String "CONFIRMED"}} - Confirmé - {{ else if eq .Status.String "VALIDATED"}} - Validé - {{ else if eq .Status.String "CANCELLED"}} - Annulé - {{ end }} - - {{ if .Price }} - {{ printf "%.2f" (round2 .Price.Amount) }} {{ .Price.Currency }} - {{ else }} - N/A - {{ end }} - - - Voir - -
+ + +
+
+ + +
+ +
+ +
{{end}} {{end}} diff --git a/web/layouts/organized_carpool/_partials/bookings_list.html b/web/layouts/organized_carpool/_partials/bookings_list.html index f8e51b1..2f66cbf 100644 --- a/web/layouts/organized_carpool/_partials/bookings_list.html +++ b/web/layouts/organized_carpool/_partials/bookings_list.html @@ -4,6 +4,53 @@ {{if eq (len .ViewState.bookings) 0}}
Aucun trajet déclaré
{{else}} +
1) this.currentPage--; + }, + goToPage(page) { + this.currentPage = page; + }, + getStatusBadge(status) { + if (status === 'WAITING_DRIVER_CONFIRMATION') return { class: 'p-1 text-xs bg-gray-300 rounded-xl', text: 'Attente confirmation' }; + if (status === 'WAITING_PASSENGER_CONFIRMATION') return { class: 'p-1 text-xs bg-gray-300 rounded-xl', text: 'Attente confirmation passager' }; + if (status === 'CONFIRMED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Confirmé' }; + if (status === 'VALIDATED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Validé' }; + if (status === 'CANCELLED') return { class: 'p-1 text-xs bg-co-red text-white rounded-xl', text: 'Annulé' }; + return { class: '', text: '' }; + } +}"> + @@ -42,57 +89,86 @@ - {{range .ViewState.bookings}} - - - - - - - - - - - {{ end }} +
- - {{ (index $.ViewState.drivers_map .Driver.Id).Data.first_name }} - {{ (index $.ViewState.drivers_map .Driver.Id).Data.last_name }} - - - - {{ (index $.ViewState.passengers_map .Passenger.Id).Data.first_name }} - {{ (index $.ViewState.passengers_map .Passenger.Id).Data.last_name }} - - - {{ .PassengerPickupAddress }} - - {{ .PassengerDropAddress }} - - {{ timeFormat .PassengerPickupDate.AsTime "02/01/2006 15:04" }} - - {{ if eq .Status.String "WAITING_DRIVER_CONFIRMATION"}} - Attente confirmation - {{ else if eq .Status.String "WAITING_PASSENGER_CONFIRMATION"}} - Attente confirmation passager - {{ else if eq .Status.String "CONFIRMED"}} - Confirmé - {{ else if eq .Status.String "VALIDATED"}} - Validé - {{ else if eq .Status.String "CANCELLED"}} - Annulé - {{ end }} - - {{ if .Price }} - {{ printf "%.2f" (round2 .Price.Amount) }} {{ .Price.Currency }} - {{ else }} - N/A - {{ end }} - - - Voir - -
+ + +
+
+ + +
+ +
+ +
{{end}} {{end}} diff --git a/web/layouts/organized_carpool/_partials/drivers_list.html b/web/layouts/organized_carpool/_partials/drivers_list.html index 772285f..b20d207 100644 --- a/web/layouts/organized_carpool/_partials/drivers_list.html +++ b/web/layouts/organized_carpool/_partials/drivers_list.html @@ -28,6 +28,39 @@
+
+ @@ -58,27 +91,76 @@ - {{ range .ViewState.drivers }} - - - - - - - - - {{ end }} +
{{ .Data.first_name }} {{ .Data.last_name }}{{if .Data.address}}{{.Data.address.properties.label}}{{end}}{{if .Data.address_destination}}{{.Data.address_destination.properties.label}}{{end}}{{ .Data.phone_number }} - {{if carpoolDriverValidatedProfile . (carpoolDocuments .ID) }} - Oui - {{else}} - Non - {{end}} - - - Voir - -
+ + +
+
+ + +
+ +
+ +
{{ end }} diff --git a/web/layouts/solidarity_transport/_partials/bookings_history.html b/web/layouts/solidarity_transport/_partials/bookings_history.html index ccbc372..255e3db 100644 --- a/web/layouts/solidarity_transport/_partials/bookings_history.html +++ b/web/layouts/solidarity_transport/_partials/bookings_history.html @@ -4,87 +4,145 @@ {{if eq (len .ViewState.bookings_history) 0}}
Aucun trajet dans le passé
{{else}} +
1) this.currentPage--; + }, + goToPage(page) { + this.currentPage = page; + }, + getStatusBadge(status) { + if (status === 'WAITING_CONFIRMATION') return { class: 'p-1 text-xs bg-gray-300 rounded-xl', text: 'Attente confirmation' }; + if (status === 'VALIDATED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Validé' }; + if (status === 'CANCELLED') return { class: 'p-1 text-xs bg-co-red text-white rounded-xl', text: 'Annulé' }; + return { class: '', text: '' }; + } +}"> + - - - - - - - - + + + + + + + + - {{range .ViewState.bookings_history}} - - - - - - - - - - - {{ end }} +
- Conducteur - - Passager - - Départ - - Destination - - Date - - Statut - - Prix - -   - ConducteurPassagerDépartDestinationDateStatutPrix 
- - {{ (index $.ViewState.drivers_map .DriverId).Data.first_name }} - {{ (index $.ViewState.drivers_map .DriverId).Data.last_name }} - - - - {{ (index $.ViewState.passengers_map .PassengerId).Data.first_name }} - {{ (index $.ViewState.passengers_map .PassengerId).Data.last_name }} - - - {{ .Journey.PassengerPickup.Properties.label }} - - {{ .Journey.PassengerDrop.Properties.label }} - - {{ .Journey.PassengerPickupDate.Format "02/01/2006 15:04" }} - - {{ if eq .Status "WAITING_CONFIRMATION"}} - Attente confirmation - {{ else if eq .Status "VALIDATED"}} - Validé - {{ else if eq .Status "CANCELLED"}} - Annulé - {{ end }} - - {{ printf "%.2f" (round2 .Journey.Price.Amount) }} {{ .Journey.Price.Currency }} - - - Voir - -
+ + +
+
+ + +
+ +
+ +
{{end}} {{end}} diff --git a/web/layouts/solidarity_transport/_partials/bookings_list.html b/web/layouts/solidarity_transport/_partials/bookings_list.html index 8787c0d..f595f9e 100644 --- a/web/layouts/solidarity_transport/_partials/bookings_list.html +++ b/web/layouts/solidarity_transport/_partials/bookings_list.html @@ -5,81 +5,148 @@ {{if eq (len .ViewState.bookings) 0}}
Aucun trajet déclaré
{{else}} +
1) this.currentPage--; + }, + goToPage(page) { + this.currentPage = page; + }, + getStatusBadge(status) { + if (status === 'WAITING_CONFIRMATION') return { class: 'p-1 text-xs bg-gray-300 rounded-xl', text: 'Attente confirmation' }; + if (status === 'VALIDATED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Validé' }; + if (status === 'CANCELLED') return { class: 'p-1 text-xs bg-co-red text-white rounded-xl', text: 'Annulé' }; + return { class: '', text: '' }; + }, + isGuaranteedTrip(motivation) { + return motivation === 'Santé' || motivation === 'Insertion' || motivation === 'Administratif'; + } +}"> + - - - - - - - + + + + + + + - {{range .ViewState.bookings}} - - - - - - - - - - {{ end }} +
- Conducteur - - Passager - - Départ - - Destination - - Date - - Statut - -   - ConducteurPassagerDépartDestinationDateStatut 
- - {{ (index $.ViewState.drivers_map .DriverId).Data.first_name }} - {{ (index $.ViewState.drivers_map .DriverId).Data.last_name }} - - - - {{ (index $.ViewState.passengers_map .PassengerId).Data.first_name }} - {{ (index $.ViewState.passengers_map .PassengerId).Data.last_name }} - - - {{ .Journey.PassengerPickup.Properties.label }} - - {{ .Journey.PassengerDrop.Properties.label }} - - {{ timeFormat .Journey.PassengerPickupDate "02/01/2006 15:04" }} - - {{ if eq .Status "WAITING_CONFIRMATION"}} - Attente confirmation - {{ else if eq .Status "VALIDATED"}} - Validé - {{ else if eq .Status "CANCELLED"}} - Annulé - {{ end }} - {{if and .Data.motivation (or (or (eq .Data.motivation "Santé") (eq .Data.motivation "Insertion")) (eq .Data.motivation "Administratif"))}}
Trajet garanti : {{.Data.motivation}}
{{end}} -
- - Voir - -
+ + +
+
+ + +
+ +
+ +
{{end}} {{end}} diff --git a/web/layouts/solidarity_transport/_partials/drivers_list.html b/web/layouts/solidarity_transport/_partials/drivers_list.html index 79b360f..17d0d77 100644 --- a/web/layouts/solidarity_transport/_partials/drivers_list.html +++ b/web/layouts/solidarity_transport/_partials/drivers_list.html @@ -27,6 +27,38 @@ +
+ @@ -53,26 +85,75 @@ - {{ range .ViewState.drivers }} - - - - - - - - {{ end }} +
{{ .Data.first_name }} {{ .Data.last_name }}{{if .Data.address}}{{.Data.address.properties.label}}{{end}}{{ .Data.phone_number }} - {{if solidarityDriverValidatedProfile . (solidarityDocuments .ID) }} - Oui - {{else}} - Non - {{end}} - - - Voir - -
+ + +
+
+ + +
+ +
+ +
{{ end }} diff --git a/web/layouts/vehicles_management/fleet-add.html b/web/layouts/vehicles_management/fleet-add.html index fe64262..021e91d 100644 --- a/web/layouts/vehicles_management/fleet-add.html +++ b/web/layouts/vehicles_management/fleet-add.html @@ -138,6 +138,48 @@ + {{if .ViewState.vehicle_optional_fields}} +
+
+
+

Autres propriétés

+

Informations complémentaires sur le véhicule

+
+
+
+ {{range .ViewState.vehicle_optional_fields}} +
+ + {{if eq .type "select"}} +
+ +
+ {{else if eq .type "textarea"}} + + {{else if eq .type "date"}} + + {{else if eq .type "number"}} + + {{else}} + + {{end}} +
+ {{end}} +
+
+
+
+ {{end}} +

Certains champs de sont pas valides.

diff --git a/web/layouts/vehicles_management/fleet-display.html b/web/layouts/vehicles_management/fleet-display.html index b2bc674..156cf85 100644 --- a/web/layouts/vehicles_management/fleet-display.html +++ b/web/layouts/vehicles_management/fleet-display.html @@ -170,26 +170,37 @@
-
-
-

Réservations à venir

- {{if eq (len .ViewState.vehicle.Bookings) 0}} -

Aucune réservation à venir

- {{end}} -
+ {{end}} + +
+ {{end}} diff --git a/web/layouts/vehicles_management/fleet-update.html b/web/layouts/vehicles_management/fleet-update.html index eb8a6a7..64cdbf6 100644 --- a/web/layouts/vehicles_management/fleet-update.html +++ b/web/layouts/vehicles_management/fleet-update.html @@ -9,8 +9,9 @@ fields: { licence_plate: '{{ .ViewState.vehicle.Data.licence_plate }}', name: '{{ .ViewState.vehicle.Data.name }}', + type: '{{ .ViewState.vehicle.Type }}', kilometers: '{{ .ViewState.vehicle.Data.kilometers }}', - informations: '{{ .ViewState.vahicle.Data.informations}}', + informations: '{{ .ViewState.vehicle.Data.informations}}', }, rules: { licence_plate: ['required', 'regexMatch:^[A-Z]{1,2}-[0-9]{1,3}-[A-Z]{1,2}$'], @@ -86,7 +87,7 @@ Automatique
- +
@@ -126,8 +127,8 @@
{{ $fieldName := "address" }} - {{if .ViewState.Data.address}} - {{$default := .ViewState.Data.address}} + {{if .ViewState.vehicle.Data.address}} + {{$default := .ViewState.vehicle.Data.address}} {{ template "address" dict "FieldName" $fieldName "Default" $default}} {{else}} {{ template "address_autocomplete" dict "FieldName" $fieldName}} @@ -144,6 +145,48 @@
+ {{if .ViewState.vehicle_optional_fields}} +
+
+
+

Autres propriétés

+

Informations complémentaires sur le véhicule

+
+
+
+ {{range .ViewState.vehicle_optional_fields}} +
+ + {{if eq .type "select"}} +
+ +
+ {{else if eq .type "textarea"}} + + {{else if eq .type "date"}} + + {{else if eq .type "number"}} + + {{else}} + + {{end}} +
+ {{end}} +
+
+
+
+ {{end}} +

Certains champs de sont pas valides.

diff --git a/web/public/css/main.css b/web/public/css/main.css index 0240514..ea23ac8 100644 --- a/web/public/css/main.css +++ b/web/public/css/main.css @@ -3027,6 +3027,11 @@ } } } + .focus\:z-20 { + &:focus { + z-index: 20; + } + } .focus\:border-blue-500 { &:focus { border-color: var(--color-blue-500); @@ -3119,6 +3124,11 @@ outline-offset: calc(2px * -1); } } + .focus\:outline-offset-0 { + &:focus { + outline-offset: 0px; + } + } .focus\:outline-indigo-600 { &:focus { outline-color: var(--color-indigo-600); @@ -3135,6 +3145,12 @@ --tw-ring-inset: inset; } } + .focus-visible\:outline { + &:focus-visible { + outline-style: var(--tw-outline-style); + outline-width: 1px; + } + } .focus-visible\:outline-2 { &:focus-visible { outline-style: var(--tw-outline-style); @@ -3146,6 +3162,16 @@ outline-offset: calc(2px * -1); } } + .focus-visible\:outline-offset-2 { + &:focus-visible { + outline-offset: 2px; + } + } + .focus-visible\:outline-co-blue { + &:focus-visible { + outline-color: var(--color-co-blue); + } + } .focus-visible\:outline-indigo-600 { &:focus-visible { outline-color: var(--color-indigo-600); @@ -3161,6 +3187,11 @@ opacity: 30%; } } + .disabled\:opacity-50 { + &:disabled { + opacity: 50%; + } + } .sm\:col-span-1 { @media (width >= 40rem) { grid-column: span 1 / span 1;