From 11e377ddb3ff955609d895117e7292e30630d0aa Mon Sep 17 00:00:00 2001 From: soukainna Date: Fri, 5 May 2023 09:13:04 +0200 Subject: [PATCH 1/9] fix config file --- config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/config.yaml b/config.yaml index 29a1472..9011053 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 4c05d570f7bb9d662924e48e9a0b799c153e8ec7 Mon Sep 17 00:00:00 2001 From: soukainna Date: Fri, 5 May 2023 09:15:32 +0200 Subject: [PATCH 2/9] 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 226f9b1..530048a 100644 --- a/web/layouts/vehicles_management/fleet-display.html +++ b/web/layouts/vehicles_management/fleet-display.html @@ -14,10 +14,10 @@
+ -
From 5617646bdb90020a6e88da4d5a149de9c270803d Mon Sep 17 00:00:00 2001 From: soukainna Date: Fri, 5 May 2023 09:18:28 +0200 Subject: [PATCH 3/9] 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 b480747b862b9a73f2565952e949f42944293335 Mon Sep 17 00:00:00 2001 From: soukainna Date: Fri, 5 May 2023 09:18:57 +0200 Subject: [PATCH 4/9] 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 4789c5a49e85823ebec9341925dfe793f03dc01c Mon Sep 17 00:00:00 2001 From: soukainna Date: Fri, 5 May 2023 10:22:08 +0200 Subject: [PATCH 5/9] 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 530048a..9714416 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 560af60f32f1fc819ee70a692db8d3efdf0851bf Mon Sep 17 00:00:00 2001 From: soukainna Date: Fri, 5 May 2023 10:22:42 +0200 Subject: [PATCH 6/9] 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 3aba9e0071fe49218a15c01538058a03cbd27f35 Mon Sep 17 00:00:00 2001 From: soukainna Date: Fri, 5 May 2023 10:42:55 +0200 Subject: [PATCH 7/9] fix the group settings --- config.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config.yaml b/config.yaml index 9011053..8ad23e5 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 8778f88fbd5adcf00d2f2bab8d165386f6941998 Mon Sep 17 00:00:00 2001 From: soukainna Date: Wed, 10 May 2023 12:16:52 +0200 Subject: [PATCH 8/9] fix the type of vehicle --- .../vehicles_management/fleet-update.html | 52 +++++++++++++++---- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/web/layouts/vehicles_management/fleet-update.html b/web/layouts/vehicles_management/fleet-update.html index e4fc82a..0b0c2a2 100644 --- a/web/layouts/vehicles_management/fleet-update.html +++ b/web/layouts/vehicles_management/fleet-update.html @@ -3,23 +3,26 @@ {{ if eq (index .ViewState.vehicle.Administrators 0) .Group.ID }}
-

Modifier un véhicule

+

Modifier le véhicule

@@ -48,19 +55,44 @@
- +
- {{template "vehicle_type_select" .}} + + +
+ Automatique +
+
+ {{if .ViewState.vehicle.Data.automatic}} + + {{else}} + + {{end}} +
+
+ +

Ce véhicule a une boite automatique.

+
+
+
+
+ class="block text-sm font-medium text-gray-700">Numéro (Immat, Bicycode, ...) - +
+ class="shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-2xl">{{ if .ViewState.vehicle.Data.informations}}{{.ViewState.vehicle.Data.informations}}{{end}}
@@ -108,7 +141,6 @@
- {{else}}
@@ -125,9 +157,7 @@
- Annuler -
From bd71a36cd38f4d4abdfa73dffbef5100ae1170fb Mon Sep 17 00:00:00 2001 From: soukainna Date: Fri, 19 May 2023 11:23:18 +0200 Subject: [PATCH 9/9] fix duplicate group --- config.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config.yaml b/config.yaml index 8ad23e5..7e2c97d 100644 --- a/config.yaml +++ b/config.yaml @@ -212,12 +212,6 @@ views: ko: files: - web/layouts/auth/onboarding-ko.html - group: - settings: - files: - - web/layouts/administration/_partials/groups_admins.html - - web/layouts/administration/_partials/group_members.html - - web/layouts/group/settings.html icons: svg: coopgo:parcoursmob/monogram: