diff --git a/config.yaml b/config.yaml index 81a3dae..bae16d7 100644 --- a/config.yaml +++ b/config.yaml @@ -184,6 +184,10 @@ views: vehicles_list: files: - web/layouts/administration/vehicles_stats.html + bookings_list: + files: + - web/layouts/administration/_partials/bookings_list.html + - web/layouts/administration/bookings_stats.html settings: files: - web/layouts/administration/_partials/groups_admins.html diff --git a/web/layouts/administration/_partials/bookings_list.html b/web/layouts/administration/_partials/bookings_list.html new file mode 100644 index 0000000..9c5fd5e --- /dev/null +++ b/web/layouts/administration/_partials/bookings_list.html @@ -0,0 +1,115 @@ +{{define "bookings_list"}} +
+ Statut + | ++ Type + | ++ Numéro + | ++ Gestionnaire véhicule + | ++ Prescripteur + | ++ Beneficiaire + | ++ Dates + | ++ Commentaire + | ++ Actions + | +
---|---|---|---|---|---|---|---|---|
+ {{if .Data.administrator_unavailability}} + + Retiré + + {{else}} + {{if eq .Status 1 }} + + A venir + + {{end}} + {{if eq .Status 0 }} + + En cours + + {{end}} + {{if eq .Status -1 }} + + Terminé + + {{end}} + {{end}} + | +
+ {{ (index $.ViewState.vehicles_map .Vehicleid).Type }}
+ |
+
+ {{ (index $.ViewState.vehicles_map .Vehicleid).Data.licence_plate }}
+ |
+
+ {{ (index $.ViewState.admingroups (index (index $.ViewState.vehicles_map .Vehicleid).Administrators 0)).Data.name }}
+ |
+
+ {{ .Data.booked_by.group.name }}
+ ({{ .Data.booked_by.user.display_name }}) |
+
+ {{if .Data.administrator_unavailability}}
+
+ {{else}}
+
+
+ {{$b := (index $.ViewState.beneficiaries_map .Driver)}}
+ {{$b.Data.first_name}} {{$b.Data.last_name}}
+ {{end}}
+ + {{$b.Data.file_number}} + |
+
+ {{if .Data.administrator_unavailability}}
+ Retiré du {{(timeFrom .Unavailablefrom).Format "02/01/2006"}}
+ {{else}}
+ + au {{(timeFrom .Unavailableto).Format "02/01/2006"}} Du {{(timeFrom .Startdate).Format "02/01/2006"}}
+ {{end}}
+ + au {{(timeFrom .Enddate).Format "02/01/2006"}} |
+
+ {{ .Data.comment }}
+ |
+ + Voir + | +