From 669d7e4e7bff08334bca5164d3792516be5878dd Mon Sep 17 00:00:00 2001 From: soukainna Date: Fri, 5 May 2023 09:13:04 +0200 Subject: [PATCH 1/8] fix config file --- config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/config.yaml b/config.yaml index aad114f..1b17b2e 100644 --- a/config.yaml +++ b/config.yaml @@ -78,6 +78,7 @@ views: fleet_update: files: - web/layouts/_partials/address_autocomplete.html + - web/layouts/agenda/_partials/address.html - web/layouts/vehicles_management/_partials/vehicle-type-select.html - web/layouts/vehicles_management/fleet-update.html booking_display: From 89af48389afcb0a9e278d76c1ad0e0328439cd12 Mon Sep 17 00:00:00 2001 From: soukainna Date: Fri, 5 May 2023 09:15:32 +0200 Subject: [PATCH 2/8] add modify button --- web/layouts/vehicles_management/fleet-display.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/layouts/vehicles_management/fleet-display.html b/web/layouts/vehicles_management/fleet-display.html index 6373c3e..90918cf 100644 --- a/web/layouts/vehicles_management/fleet-display.html +++ b/web/layouts/vehicles_management/fleet-display.html @@ -14,10 +14,10 @@
+ -
From 6c5c25a9925886716bf86f5666df01c242692c48 Mon Sep 17 00:00:00 2001 From: soukainna Date: Fri, 5 May 2023 09:18:28 +0200 Subject: [PATCH 3/8] add the update file --- .../vehicles_management/fleet-update.html | 106 ------------------ 1 file changed, 106 deletions(-) diff --git a/web/layouts/vehicles_management/fleet-update.html b/web/layouts/vehicles_management/fleet-update.html index 88b6770..e69de29 100644 --- a/web/layouts/vehicles_management/fleet-update.html +++ b/web/layouts/vehicles_management/fleet-update.html @@ -1,106 +0,0 @@ -{{define "content"}} - - -
-

Modifier un véhicule

-
- -
-
-
-
-
-

Identité du véhicule

-

Informations de base sur le véhicule

-
-
-
-
- - -
-
- {{template "vehicle_type_select" .}} -
-
- - -
-
-
-
-
-
-
-
-

Informations pratiques

-

Informations pratiques pour la réservation

-
-
- {{ $fieldName := "address" }} - {{ template "address_autocomplete" (dict "FieldName" $fieldName "Address" .ViewState.vehicle.Data.address) }} - -
- -
- -
-
-
-
-
- -
-

Certains champs de sont pas valides.

- - - - -
-
-
-{{end}} \ No newline at end of file From e5fc2bcfb58fbba46e789459af5bb229f8bd4ecc Mon Sep 17 00:00:00 2001 From: soukainna Date: Fri, 5 May 2023 09:18:57 +0200 Subject: [PATCH 4/8] add the update file --- .../vehicles_management/fleet-update.html | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/web/layouts/vehicles_management/fleet-update.html b/web/layouts/vehicles_management/fleet-update.html index e69de29..418cf9a 100644 --- a/web/layouts/vehicles_management/fleet-update.html +++ b/web/layouts/vehicles_management/fleet-update.html @@ -0,0 +1,110 @@ +{{define "content"}} + + +
+

Modifier un véhicule

+
+ +
+
+
+
+
+

Identité du véhicule

+

Informations de base sur le véhicule

+
+
+
+
+ + +
+
+ {{template "vehicle_type_select" .}} +
+
+ + +
+
+
+
+
+
+
+
+

Informations pratiques

+

Informations pratiques pour la réservation

+
+
+ {{ $fieldName := "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}} + {{end}} +
+ +
+ +
+
+
+
+
+ +
+

Certains champs de sont pas valides.

+ + + + +
+
+
+{{end}} \ No newline at end of file From e5dae2d18f2a572b554f057199bb63dc00c01443 Mon Sep 17 00:00:00 2001 From: soukainna Date: Fri, 5 May 2023 10:22:08 +0200 Subject: [PATCH 5/8] allow modify option just for owners --- web/layouts/vehicles_management/fleet-display.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/layouts/vehicles_management/fleet-display.html b/web/layouts/vehicles_management/fleet-display.html index 90918cf..df57749 100644 --- a/web/layouts/vehicles_management/fleet-display.html +++ b/web/layouts/vehicles_management/fleet-display.html @@ -1,4 +1,5 @@ {{define "content"}} +
@@ -13,9 +14,10 @@

{{.ViewState.vehicle.Data.name}}

+ {{ if eq (index .ViewState.vehicle.Administrators 0) .Group.ID }}
+ class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Modifier {{end}}
From 5950599bdbf7b9a75f647df1f9480b2ab5cbc7e7 Mon Sep 17 00:00:00 2001 From: soukainna Date: Fri, 5 May 2023 10:22:42 +0200 Subject: [PATCH 6/8] allow modification for owners --- .../vehicles_management/fleet-update.html | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/web/layouts/vehicles_management/fleet-update.html b/web/layouts/vehicles_management/fleet-update.html index 418cf9a..e4fc82a 100644 --- a/web/layouts/vehicles_management/fleet-update.html +++ b/web/layouts/vehicles_management/fleet-update.html @@ -1,5 +1,6 @@ {{define "content"}} +{{ if eq (index .ViewState.vehicle.Administrators 0) .Group.ID }}

Modifier un véhicule

@@ -107,4 +108,29 @@
+ +{{else}} +
+ +
+
+ +
+
+
+ {{.IconSet.Icon "hero:outline/information-circle" "h-6 w-6"}} +
+
+ +
+
+
+ + Annuler + +
+
+
+
+{{end}} {{end}} \ No newline at end of file From 83ae4665f0f5e84ae8ee1b83ccb1f088f3ef36d6 Mon Sep 17 00:00:00 2001 From: soukainna Date: Fri, 5 May 2023 10:42:55 +0200 Subject: [PATCH 7/8] fix the group settings --- config.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config.yaml b/config.yaml index 1b17b2e..a144890 100644 --- a/config.yaml +++ b/config.yaml @@ -43,6 +43,12 @@ views: list: files: - web/layouts/members/membersList.html + group: + settings: + files: + - web/layouts/administration/_partials/groups_admins.html + - web/layouts/administration/_partials/group_members.html + - web/layouts/group/settings.html vehicles: search: files: From eec5afdf39357d48968657129d3e6afe480ac50b Mon Sep 17 00:00:00 2001 From: soukainna Date: Tue, 9 May 2023 12:13:14 +0200 Subject: [PATCH 8/8] fix the modify address --- config.yaml | 1 + web/layouts/beneficiaries/update.html | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/config.yaml b/config.yaml index a144890..cddab5e 100644 --- a/config.yaml +++ b/config.yaml @@ -32,6 +32,7 @@ views: update: files: - web/layouts/_partials/address_autocomplete.html + - web/layouts/agenda/_partials/address.html - web/layouts/beneficiaries/update.html members: display: diff --git a/web/layouts/beneficiaries/update.html b/web/layouts/beneficiaries/update.html index da1b4c9..eacda1c 100644 --- a/web/layouts/beneficiaries/update.html +++ b/web/layouts/beneficiaries/update.html @@ -162,9 +162,13 @@
- {{ $fieldName := "address" }} - {{ template "address_autocomplete" (dict "FieldName" $fieldName "Address" .ViewState.Data.address) }} - + {{ $fieldName := "address" }} + {{if .ViewState.Data.address}} + {{$default := .ViewState.Data.address}} + {{ template "address" dict "FieldName" $fieldName "Default" $default}} + {{else}} + {{ template "address_autocomplete" dict "FieldName" $fieldName}} + {{end}}