From ef66fa987620484b3655af4875355cab702a842b Mon Sep 17 00:00:00 2001 From: Nicolas CARON Date: Mon, 16 Dec 2024 12:38:28 +0100 Subject: [PATCH] Add BookingsCreateDiag --- config.yaml | 8 +- .../_partials/beneficiary-diags.html | 20 +-- web/layouts/beneficiaries/create-diag.html | 8 +- web/layouts/beneficiaries/display.html | 9 +- web/layouts/diags/display-diag.html | 12 +- web/layouts/diags/home.html | 11 +- .../_partials/booking-diags.html | 49 ++++++++ .../_partials/vehicle-diags.html | 6 +- .../vehicles_management/booking-display.html | 3 + .../create-booking-diag.html | 116 ++++++++++++++++++ ...ate-diag.html => create-vehicle-diag.html} | 8 +- 11 files changed, 218 insertions(+), 32 deletions(-) create mode 100644 web/layouts/vehicles_management/_partials/booking-diags.html create mode 100644 web/layouts/vehicles_management/create-booking-diag.html rename web/layouts/vehicles_management/{create-diag.html => create-vehicle-diag.html} (97%) diff --git a/config.yaml b/config.yaml index ebbd5d7..1e1083a 100644 --- a/config.yaml +++ b/config.yaml @@ -95,12 +95,16 @@ views: booking_display: files: - web/layouts/vehicles_management/booking-display.html + - web/layouts/vehicles_management/_partials/booking-diags.html delete_booking: files: - web/layouts/vehicles_management/delete-booking.html - create_diag: + create_vehicle_diag: files: - - web/layouts/vehicles_management/create-diag.html + - web/layouts/vehicles_management/create-vehicle-diag.html + create_booking_diag: + files: + - web/layouts/vehicles_management/create-booking-diag.html agenda: list: files: diff --git a/web/layouts/beneficiaries/_partials/beneficiary-diags.html b/web/layouts/beneficiaries/_partials/beneficiary-diags.html index 13cf9d7..e80c560 100644 --- a/web/layouts/beneficiaries/_partials/beneficiary-diags.html +++ b/web/layouts/beneficiaries/_partials/beneficiary-diags.html @@ -3,14 +3,16 @@ {{ $carIcon := .IconSet.Icon "tabler-icons:car" "h-6 w-6"}}
{{ $diagCount := len .ViewState.diags }} @@ -37,7 +39,7 @@

{{.Name}}

-

Ce diagnostique a été retiré

+

Ce diagnostic a été retiré

{{end}} diff --git a/web/layouts/beneficiaries/create-diag.html b/web/layouts/beneficiaries/create-diag.html index 90d5c2e..175968a 100644 --- a/web/layouts/beneficiaries/create-diag.html +++ b/web/layouts/beneficiaries/create-diag.html @@ -1,7 +1,7 @@ {{define "content"}}
-

Ajouter un diagnostique

+

Ajouter un diagnostic

Informations obligatoires

Informations obligatoires - pour créer un diagnostique dans PARCOURSMOB

+ pour créer un diagnostic dans PARCOURSMOB

@@ -68,7 +68,7 @@

Schéma JSON

-

Schéma JSON pour le diagnostique

+

Schéma JSON pour le diagnostic

@@ -87,7 +87,7 @@

Schéma UI

-

Schéma UI pour le diagnostique

+

Schéma UI pour le diagnostic

diff --git a/web/layouts/beneficiaries/display.html b/web/layouts/beneficiaries/display.html index d6d55c6..141e8a4 100644 --- a/web/layouts/beneficiaries/display.html +++ b/web/layouts/beneficiaries/display.html @@ -137,6 +137,11 @@ class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm" :class="tab == 'organizations' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"> Gestionnaires + + + Diagnostics
@@ -145,6 +150,7 @@
{{template "beneficiary_files" .}}
{{template "beneficiary_notes" .}}
{{template "beneficiary_organizations" .}}
+
{{template "beneficiary_diags" .}}
@@ -152,9 +158,6 @@
{{template "beneficiary_events" .}} -
- {{template "beneficiary_diags" .}} -
diff --git a/web/layouts/diags/display-diag.html b/web/layouts/diags/display-diag.html index 52ccf15..39bf8cf 100644 --- a/web/layouts/diags/display-diag.html +++ b/web/layouts/diags/display-diag.html @@ -22,20 +22,26 @@

Informations

-

Informations sur le diagnostique.

+

Informations sur le diagnostic.

{{if eq .ViewState.diag.Namespace "parcoursmob_beneficiaries"}}
Type
-
Diagnostique personnelle
+
Diagnostic personnelle
{{end}} {{if eq .ViewState.diag.Namespace "parcoursmob_vehicles"}}
Type
-
Diagnostique automobile
+
Diagnostic automobile
+
+ {{end}} + {{if eq .ViewState.diag.Namespace "parcoursmob_bookings"}} +
+
Type
+
Diagnostic véhicule réservé
{{end}} {{if .ViewState.diag.Json_schema}} diff --git a/web/layouts/diags/home.html b/web/layouts/diags/home.html index 57213fb..451c096 100644 --- a/web/layouts/diags/home.html +++ b/web/layouts/diags/home.html @@ -1,6 +1,6 @@ {{define "content"}}
-

Diagnostiques effectués

+

Diagnostics effectués

@@ -27,7 +27,7 @@ - Nom du diagnostique + Nom du diagnostic Type @@ -47,10 +47,13 @@ {{if eq .Namespace "parcoursmob_beneficiaries"}} -
Diagnostique personnelle
+
Diagnostic personnelle
{{end}} {{if eq .Namespace "parcoursmob_vehicles"}} -
Diagnostique automobile
+
Diagnostic automobile
+ {{end}} + {{if eq .Namespace "parcoursmob_bookings"}} +
Diagnostic véhicule réservé
{{end}} diff --git a/web/layouts/vehicles_management/_partials/booking-diags.html b/web/layouts/vehicles_management/_partials/booking-diags.html new file mode 100644 index 0000000..2e1ad05 --- /dev/null +++ b/web/layouts/vehicles_management/_partials/booking-diags.html @@ -0,0 +1,49 @@ +{{define "booking_diags"}} +{{ $calendarIcon := .IconSet.Icon "hero:outline/calendar" "h-6 w-6" }} +{{ $carIcon := .IconSet.Icon "tabler-icons:car" "h-6 w-6"}} +
+ +
+ {{ $diagCount := len .ViewState.diags }} +
    + {{if eq $diagCount 0}} +
  • +

    Aucun diagnostique effectué pour le moment.

    +
  • + {{else}} + {{range .ViewState.diags}} + {{ $diags := .ID }} + {{if eq .Deleted false}} +
  • +
    + {{.Name}} +
    + +
  • + {{end}} + {{if eq .Deleted true}} +
  • +
    +

    {{.Name}}

    +
    +
    +

    Ce diagnostique a été retiré

    +
    +
  • + {{end}} + {{end}} + {{end}} +
+
+
+{{end}} \ No newline at end of file diff --git a/web/layouts/vehicles_management/_partials/vehicle-diags.html b/web/layouts/vehicles_management/_partials/vehicle-diags.html index 69d4d3a..0b3b42d 100644 --- a/web/layouts/vehicles_management/_partials/vehicle-diags.html +++ b/web/layouts/vehicles_management/_partials/vehicle-diags.html @@ -2,13 +2,13 @@ {{ $calendarIcon := .IconSet.Icon "hero:outline/calendar" "h-6 w-6" }} {{ $carIcon := .IconSet.Icon "tabler-icons:car" "h-6 w-6"}}
-
-

Diagnostiques réalisés

+ diff --git a/web/layouts/vehicles_management/booking-display.html b/web/layouts/vehicles_management/booking-display.html index 027a940..d0cdd0f 100644 --- a/web/layouts/vehicles_management/booking-display.html +++ b/web/layouts/vehicles_management/booking-display.html @@ -103,6 +103,9 @@
+
+ {{template "booking_diags" .}} +
diff --git a/web/layouts/vehicles_management/create-booking-diag.html b/web/layouts/vehicles_management/create-booking-diag.html new file mode 100644 index 0000000..8285297 --- /dev/null +++ b/web/layouts/vehicles_management/create-booking-diag.html @@ -0,0 +1,116 @@ +{{define "content"}} + +
+

Ajouter un diagnostic

+
+ +
+
+
+
+
+

Informations obligatoires

+

Informations obligatoires + pour créer un diagnostic dans PARCOURSMOB

+
+
+
+
+ + +
+
+
+
+
+ +
+
+
+

Schéma JSON

+

Schéma JSON pour le diagnostic

+
+
+
+
+ + +
+
+
+
+
+
+
+
+

Schéma UI

+

Schéma UI pour le diagnostic

+
+
+
+
+ + +
+
+
+
+
+
+

Certains champs de sont pas valides.

+ + + + +
+
+
+{{end}} \ No newline at end of file diff --git a/web/layouts/vehicles_management/create-diag.html b/web/layouts/vehicles_management/create-vehicle-diag.html similarity index 97% rename from web/layouts/vehicles_management/create-diag.html rename to web/layouts/vehicles_management/create-vehicle-diag.html index bb347ea..0f335c1 100644 --- a/web/layouts/vehicles_management/create-diag.html +++ b/web/layouts/vehicles_management/create-vehicle-diag.html @@ -1,7 +1,7 @@ {{define "content"}}
-

Ajouter un diagnostique

+

Ajouter un diagnostic

Informations obligatoires

Informations obligatoires - pour créer un diagnostique dans PARCOURSMOB

+ pour créer un diagnostic dans PARCOURSMOB

@@ -68,7 +68,7 @@

Schéma JSON

-

Schéma JSON pour le diagnostique

+

Schéma JSON pour le diagnostic

@@ -87,7 +87,7 @@

Schéma UI

-

Schéma UI pour le diagnostique

+

Schéma UI pour le diagnostic