From 296ca9808f33eed9adbf61c6f40c33d1335082a6 Mon Sep 17 00:00:00 2001 From: soukainna Date: Tue, 8 Nov 2022 17:17:41 +0100 Subject: [PATCH 1/5] add file groupe --- config.yaml | 12 + web/layouts/group_module/create_group.html | 86 +++++++ web/layouts/group_module/display_group.html | 254 ++++++++++++++++++++ web/layouts/group_module/home.html | 60 +++++ 4 files changed, 412 insertions(+) create mode 100644 web/layouts/group_module/create_group.html create mode 100644 web/layouts/group_module/display_group.html create mode 100644 web/layouts/group_module/home.html diff --git a/config.yaml b/config.yaml index 1a9c750..9d89d12 100644 --- a/config.yaml +++ b/config.yaml @@ -101,6 +101,18 @@ views: request: files: - web/layouts/support/support.html + group_module: + home: + files: + - web/layouts/group_module/home.html + create_group: + files: + - web/layouts/group_module/create_group.html + + display_group: + files: + - web/layouts/group_module/display_group.html + administration: home: files: diff --git a/web/layouts/group_module/create_group.html b/web/layouts/group_module/create_group.html new file mode 100644 index 0000000..4936a2a --- /dev/null +++ b/web/layouts/group_module/create_group.html @@ -0,0 +1,86 @@ +{{define "content"}} + + +
+

Groups > Créer un group

+
+ +
+
+
+
+
+

Nouveau groupe

+

Informations de base sur le groupe à créer

+
+
+
+
+ + +
+
+ + +
+
+
+ +
+ +
+
+ + + + +
+
+ +
+{{end}} \ No newline at end of file diff --git a/web/layouts/group_module/display_group.html b/web/layouts/group_module/display_group.html new file mode 100644 index 0000000..462f844 --- /dev/null +++ b/web/layouts/group_module/display_group.html @@ -0,0 +1,254 @@ +{{define "content"}} +
+

Gestion du groupe

+ +
+
+

+
+
+ +
+
+
+

Info du groupe

+
+
+
+
+
+
Nom
+
+ {{.ViewState.group.Data.name}}
+
+
+
Type
+
+ {{.ViewState.group.Data.type}}
+
+
+
+
+
+
+
+ + + + + +
+
+
+
+
+ + + + + + + + + + + + + +
+ Nom du bénéficiaire + + Téléphone + + Email +
+
+ + +
+
+
+
+
+
+ +
+
+
+
+

Ajouter un bénéficiaire

+
+
+
+ + +
+ + + + +
    + + + + +
+
+
+ + + +
+
+
+ +
+
+
+ +{{end}} \ No newline at end of file diff --git a/web/layouts/group_module/home.html b/web/layouts/group_module/home.html new file mode 100644 index 0000000..6d29350 --- /dev/null +++ b/web/layouts/group_module/home.html @@ -0,0 +1,60 @@ + + {{define "content"}} +
+

Gestion des groupes

+ + + + +
+{{end}} \ No newline at end of file From 8a20ab2502bff7ba5339c1ccbf8416dd2d36a9e0 Mon Sep 17 00:00:00 2001 From: soukainna Date: Tue, 8 Nov 2022 17:26:17 +0100 Subject: [PATCH 2/5] fix config --- config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/config.yaml b/config.yaml index 9d89d12..55815e1 100644 --- a/config.yaml +++ b/config.yaml @@ -159,6 +159,7 @@ icons: coopgo:parcoursmob/monogram: hero:outline/briefcase: hero:outline/support: + hero:outline/group_module: hero:outline/calendar: hero:outline/chevron-right: hero:outline/cog: From 2055ef5e7cdd14514fc9fbf5c5300dd0391e786e Mon Sep 17 00:00:00 2001 From: soukainna Date: Tue, 8 Nov 2022 17:55:21 +0100 Subject: [PATCH 3/5] clean the files --- web/layouts/group_module/display_group.html | 31 +++++---------------- web/layouts/group_module/home.html | 3 -- 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/web/layouts/group_module/display_group.html b/web/layouts/group_module/display_group.html index 462f844..c1edbde 100644 --- a/web/layouts/group_module/display_group.html +++ b/web/layouts/group_module/display_group.html @@ -80,15 +80,10 @@
-
-
@@ -202,47 +197,35 @@
    - + - +
- + - + diff --git a/web/layouts/group_module/home.html b/web/layouts/group_module/home.html index 6d29350..e2781cb 100644 --- a/web/layouts/group_module/home.html +++ b/web/layouts/group_module/home.html @@ -41,9 +41,6 @@
-
From 9aaa51a81f6e225d777dbd8c22d8fe8075ffe29e Mon Sep 17 00:00:00 2001 From: soukainna Date: Thu, 10 Nov 2022 16:44:48 +0100 Subject: [PATCH 4/5] add the description and the address part --- config.yaml | 1 + web/layouts/group_module/create_group.html | 27 +++++++++++++++++++++ web/layouts/group_module/display_group.html | 11 +++++++++ 3 files changed, 39 insertions(+) diff --git a/config.yaml b/config.yaml index 55815e1..e7449ef 100644 --- a/config.yaml +++ b/config.yaml @@ -107,6 +107,7 @@ views: - web/layouts/group_module/home.html create_group: files: + - web/layouts/_partials/address_autocomplete.html - web/layouts/group_module/create_group.html display_group: diff --git a/web/layouts/group_module/create_group.html b/web/layouts/group_module/create_group.html index 4936a2a..58a55a6 100644 --- a/web/layouts/group_module/create_group.html +++ b/web/layouts/group_module/create_group.html @@ -9,6 +9,7 @@ fields: { name: null, type: null, + description: null, }, rules: { name: ['required'], @@ -19,6 +20,7 @@ fields: { name: {valid: null}, type: {valid: null}, + description: {valid: null}, } }, isFormValid: true, @@ -66,12 +68,37 @@ {{end}} +
+ +
+ +
+
+
+
+
+

Paramètres

+

Paramètres liés au groupe, utiles pour exploiter les fonctionnalités de PARCOURSMOB

+
+
+ + {{ $fieldName := "address" }} + {{ template "address_autocomplete" dict "FieldName" $fieldName }} + + + +
+
+
+
+
Adresse
+
+ {{.ViewState.group.Data.address.properties.label}}
+
+
+
Description
+
+ {{.ViewState.group.Data.description}}
+
+ From 0f35c8950f134fa56f1215a2079178fe11b1e712 Mon Sep 17 00:00:00 2001 From: Arnaud Delcasse Date: Mon, 5 Dec 2022 17:24:24 +0100 Subject: [PATCH 5/5] 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

+
    + {{range .ViewState.organizations}} +
  • {{.Data.name}}
  • + {{end}} +
+
+{{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 @@
-->
-