From 0f35c8950f134fa56f1215a2079178fe11b1e712 Mon Sep 17 00:00:00 2001 From: Arnaud Delcasse Date: Mon, 5 Dec 2022 17:24:24 +0100 Subject: [PATCH] Improve bookings and agenda --- config.yaml | 2 + web/layouts/administration/home.html | 2 +- .../agenda/_partials/subscribers-table.html | 43 +++++++++++ web/layouts/agenda/display-event.html | 73 +++++++++++------- .../_partials/beneficiary-organizations.html | 10 +++ web/layouts/beneficiaries/display.html | 21 +++--- .../_partials/beneficiaries-widget.html | 4 +- web/layouts/vehicles/bookings-list.html | 42 +++++++++-- .../vehicles_management/booking-display.html | 42 +++++++++-- web/public/css/main.css | 75 +++++-------------- 10 files changed, 209 insertions(+), 105 deletions(-) create mode 100644 web/layouts/agenda/_partials/subscribers-table.html create mode 100644 web/layouts/beneficiaries/_partials/beneficiary-organizations.html diff --git a/config.yaml b/config.yaml index e7449ef..3f4b4e1 100644 --- a/config.yaml +++ b/config.yaml @@ -27,6 +27,7 @@ views: - web/layouts/beneficiaries/_partials/beneficiary-journeys.html - web/layouts/beneficiaries/_partials/beneficiary-events.html - web/layouts/beneficiaries/_partials/beneficiary-files.html + - web/layouts/beneficiaries/_partials/beneficiary-organizations.html - web/layouts/beneficiaries/display.html update: files: @@ -79,6 +80,7 @@ views: - web/layouts/agenda/home.html display_event: files: + - web/layouts/agenda/_partials/subscribers-table.html - web/layouts/agenda/display-event.html create_event: files: diff --git a/web/layouts/administration/home.html b/web/layouts/administration/home.html index 372307d..723af8a 100644 --- a/web/layouts/administration/home.html +++ b/web/layouts/administration/home.html @@ -43,7 +43,7 @@ class="flex-1 flex items-center justify-between border-t border-r border-b border-gray-200 bg-white rounded-r-3xl truncate">
Référents -

1 membres

+

{{len .ViewState.accounts}} membres

diff --git a/web/layouts/agenda/_partials/subscribers-table.html b/web/layouts/agenda/_partials/subscribers-table.html new file mode 100644 index 0000000..9eb12ed --- /dev/null +++ b/web/layouts/agenda/_partials/subscribers-table.html @@ -0,0 +1,43 @@ +{{define "subscribers_table"}} + + + + + + + + + + + {{range .ViewState.event.Subscriptions}} + + + + + + + {{end}} + +
+ Bénéficiaire + + Prescripteur + + Date d'inscription + + Actions +
+ +  {{ (index $.ViewState.subscribers .Subscriber).Data.first_name }} {{ (index $.ViewState.subscribers .Subscriber).Data.last_name }} + + +
 {{.Data.subscribed_by.user.display_name}}
+ {{.Data.subscribed_by.group.name}} +
+ {{(timeFormat .CreatedAt "02/01/2006")}} + + +
+{{end}} \ No newline at end of file diff --git a/web/layouts/agenda/display-event.html b/web/layouts/agenda/display-event.html index fcc31a7..787d596 100644 --- a/web/layouts/agenda/display-event.html +++ b/web/layouts/agenda/display-event.html @@ -65,30 +65,48 @@ + {{ if eq (index .ViewState.event.Owners 0) .Group.ID }} +
+
+
+

Tous les inscrits

+
+ {{template "subscribers_table" .}} +
+ + {{end}}
-
+

Inscrire un bénéficiaire

{{if gt .ViewState.event.RemainingSubscriptions 0}} -
-
+ +
+

Vous devez sélectionner un bénéficiaire

diff --git a/web/layouts/beneficiaries/_partials/beneficiary-organizations.html b/web/layouts/beneficiaries/_partials/beneficiary-organizations.html new file mode 100644 index 0000000..467035c --- /dev/null +++ b/web/layouts/beneficiaries/_partials/beneficiary-organizations.html @@ -0,0 +1,10 @@ +{{define "beneficiary_organizations"}} +
+

Organisations gestionnaires du bénéficiaire

+ +
+{{end}} \ No newline at end of file diff --git a/web/layouts/beneficiaries/display.html b/web/layouts/beneficiaries/display.html index 6829e5a..8b8584f 100644 --- a/web/layouts/beneficiaries/display.html +++ b/web/layouts/beneficiaries/display.html @@ -89,11 +89,11 @@ class="block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md"> - + @@ -107,7 +107,7 @@ :class="tab == 'notes' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"> Notes --> - Déplacements @@ -120,22 +120,25 @@ - Dispositifs + Dispositifs --> + Documents + + - Documents + :class="tab == 'organizations' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"> + Gestionnaires -
{{template "beneficiary_journeys" .}}
-
{{template "beneficiary_vehicles" .}}
-
{{template "beneficiary_events" .}}
{{template "beneficiary_files" .}}
{{template "beneficiary_notes" .}}
+
{{template "beneficiary_organizations" .}}
diff --git a/web/layouts/dashboard/_partials/beneficiaries-widget.html b/web/layouts/dashboard/_partials/beneficiaries-widget.html index dcf45cc..1505693 100644 --- a/web/layouts/dashboard/_partials/beneficiaries-widget.html +++ b/web/layouts/dashboard/_partials/beneficiaries-widget.html @@ -1,5 +1,5 @@ {{define "beneficiaries_widget"}} -
+

Bénéficiaires

@@ -9,7 +9,7 @@
-->
-