From bc948e0141661006a292141ef56c78e90c4051dd Mon Sep 17 00:00:00 2001 From: Nicolas CARON <106981664+Nickos0695@users.noreply.github.com> Date: Mon, 2 Dec 2024 08:58:53 +0100 Subject: [PATCH 1/9] Add diags --- config.yaml | 4 + .../_partials/beneficiary-diags.html | 37 ++++ web/layouts/beneficiaries/create-diag.html | 183 ++++++++++++++++++ web/layouts/beneficiaries/display.html | 3 + 4 files changed, 227 insertions(+) create mode 100644 web/layouts/beneficiaries/_partials/beneficiary-diags.html create mode 100644 web/layouts/beneficiaries/create-diag.html diff --git a/config.yaml b/config.yaml index 0b95e1c..8ba402a 100644 --- a/config.yaml +++ b/config.yaml @@ -29,7 +29,11 @@ views: - web/layouts/beneficiaries/_partials/beneficiary-events.html - web/layouts/beneficiaries/_partials/beneficiary-files.html - web/layouts/beneficiaries/_partials/beneficiary-organizations.html + - web/layouts/beneficiaries/_partials/beneficiary-diags.html - web/layouts/beneficiaries/display.html + create_diag: + files: + - web/layouts/beneficiaries/create-diag.html update: files: - web/layouts/_partials/address_autocomplete.html diff --git a/web/layouts/beneficiaries/_partials/beneficiary-diags.html b/web/layouts/beneficiaries/_partials/beneficiary-diags.html new file mode 100644 index 0000000..56b765f --- /dev/null +++ b/web/layouts/beneficiaries/_partials/beneficiary-diags.html @@ -0,0 +1,37 @@ +{{define "beneficiary_diags"}} +{{ $calendarIcon := .IconSet.Icon "hero:outline/calendar" "h-6 w-6" }} +{{ $carIcon := .IconSet.Icon "tabler-icons:car" "h-6 w-6"}} +
+
+

Dignostiques réalisées

+
+ + + +
+ {{ $diagCount := len .ViewState.diag }} + +
+
+{{end}} \ No newline at end of file diff --git a/web/layouts/beneficiaries/create-diag.html b/web/layouts/beneficiaries/create-diag.html new file mode 100644 index 0000000..562cac4 --- /dev/null +++ b/web/layouts/beneficiaries/create-diag.html @@ -0,0 +1,183 @@ +{{define "content"}} + +
+

Ajouter un diagnostique

+
+ +
+
+
+
+
+

Informations obligatoires

+

Informations personnelles sur le bénéficiaire obligatoires + pour créer son profil dans PARCOURSMOB

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

Informations optionnelles

+

Autres informations de profil optionnelles

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

Paramètres

+

Paramètres liés au bénéficiaire, utiles pour exploiter les fonctionnalités de PARCOURSMOB

+
+
+ + {{ $fieldName := "address" }} + {{ template "address_autocomplete" dict "FieldName" $fieldName }} + + + +
+
+
+ +
+

Certains champs de sont pas valides.

+ + + + +
+
+
+{{end}} \ No newline at end of file diff --git a/web/layouts/beneficiaries/display.html b/web/layouts/beneficiaries/display.html index 3be8ddf..d6d55c6 100644 --- a/web/layouts/beneficiaries/display.html +++ b/web/layouts/beneficiaries/display.html @@ -152,6 +152,9 @@
{{template "beneficiary_events" .}} +
+ {{template "beneficiary_diags" .}} +
From 395160db6ee027ef03322539936693882fce04a0 Mon Sep 17 00:00:00 2001 From: Nicolas CARON Date: Wed, 4 Dec 2024 14:12:51 +0100 Subject: [PATCH 2/9] Edit beneficiary-diags and create-diag template on beneficiaries --- .../_partials/beneficiary-diags.html | 18 +-- web/layouts/beneficiaries/create-diag.html | 149 +++++------------- 2 files changed, 50 insertions(+), 117 deletions(-) diff --git a/web/layouts/beneficiaries/_partials/beneficiary-diags.html b/web/layouts/beneficiaries/_partials/beneficiary-diags.html index 56b765f..b636c39 100644 --- a/web/layouts/beneficiaries/_partials/beneficiary-diags.html +++ b/web/layouts/beneficiaries/_partials/beneficiary-diags.html @@ -4,23 +4,23 @@
- - -
- {{ $diagCount := len .ViewState.diag }} + {{ $diagCount := len .ViewState.diags }}
    {{if eq $diagCount 0}}
  • Aucun diagnostique effectué pour le moment.

  • {{else}} - {{range .ViewState.diag}} + {{range .ViewState.diags}} {{if eq .Deleted false}}
  • diff --git a/web/layouts/beneficiaries/create-diag.html b/web/layouts/beneficiaries/create-diag.html index 562cac4..90d5c2e 100644 --- a/web/layouts/beneficiaries/create-diag.html +++ b/web/layouts/beneficiaries/create-diag.html @@ -8,29 +8,22 @@ x-data="{ fields: { name: null, - last_name: null, - email: null, - phone_number: null, - birthdate: null, - file_number: null + namespace: 'parcoursmob_beneficiaries', + json_schema: null, + ui_schema: null, }, rules: { - first_name: ['required'], - last_name: ['required'], - email: ['required', 'email'], - phone_number: ['required', 'regexMatch:^((\\+)33|0)[1-9](\\d{2}){4}$'], - birthdate: ['required'], - file_number: ['required'], + name: ['required'] + namespace: ['required'] + json_schema: ['required'] + ui_schema: ['required'] }, formValidation: { valid: false, fields: { - first_name: {valid: null}, - last_name: {valid: null}, - email: {valid: null}, - phone_number: {valid: null}, - birthdate: {valid: null}, - file_number: {valid: null}, + name: {valid: null}, + json_schema: {valid: null}, + ui_schema: {valid: null}, } }, isFormValid: true, @@ -54,129 +47,69 @@

    Informations obligatoires

    -

    Informations personnelles sur le bénéficiaire obligatoires - pour créer son profil dans PARCOURSMOB

    +

    Informations obligatoires + pour créer un diagnostique dans PARCOURSMOB

    - - Nom + -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    -
    - - + x-model="fields.name" @blur="validateField('name')" + :class="formValidation.fields.name.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
    - -
    + +
    -

    Informations optionnelles

    -

    Autres informations de profil optionnelles

    +

    Schéma JSON

    +

    Schéma JSON pour le diagnostique

    -
    +
    -
    - -
    - -
    + +
    - - - -
    -
    +
    -

    Paramètres

    -

    Paramètres liés au bénéficiaire, utiles pour exploiter les fonctionnalités de PARCOURSMOB

    +

    Schéma UI

    +

    Schéma UI pour le diagnostique

    -
    - - {{ $fieldName := "address" }} - {{ template "address_autocomplete" dict "FieldName" $fieldName }} - - - +
    +
    +
    + + +
    +
    -

    Certains champs de sont pas valides.

    - + + class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-2xl text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Créer le diagnostique
    From 676eea12381b253e9a91836fca4b9a6a77795801 Mon Sep 17 00:00:00 2001 From: Nicolas CARON Date: Wed, 4 Dec 2024 17:29:10 +0100 Subject: [PATCH 3/9] Add module diags in menu & home page for diags --- config.yaml | 7 ++ .../_partials/beneficiary-diags.html | 4 +- web/layouts/diags/delete-diag.html | 39 ++++++++++ web/layouts/diags/home.html | 71 +++++++++++++++++++ 4 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 web/layouts/diags/delete-diag.html create mode 100644 web/layouts/diags/home.html diff --git a/config.yaml b/config.yaml index 8ba402a..ab209bc 100644 --- a/config.yaml +++ b/config.yaml @@ -172,6 +172,13 @@ views: display_group: files: - web/layouts/group_module/display_group.html + diags: + list: + files: + - web/layouts/diags/home.html + delete: + files: + - web/layouts/diags/delete-diag.html administration: home: diff --git a/web/layouts/beneficiaries/_partials/beneficiary-diags.html b/web/layouts/beneficiaries/_partials/beneficiary-diags.html index b636c39..d7e5139 100644 --- a/web/layouts/beneficiaries/_partials/beneficiary-diags.html +++ b/web/layouts/beneficiaries/_partials/beneficiary-diags.html @@ -21,12 +21,14 @@
  • {{else}} {{range .ViewState.diags}} + {{ $diags := .ID }} {{if eq .Deleted false}}
  • {{.Name}}

    - +
  • {{end}} {{end}} diff --git a/web/layouts/diags/delete-diag.html b/web/layouts/diags/delete-diag.html new file mode 100644 index 0000000..b7c4ad7 --- /dev/null +++ b/web/layouts/diags/delete-diag.html @@ -0,0 +1,39 @@ +{{define "content"}} +
    +
    + +
    + +
    +
    + +
    +
    +
    + {{.IconSet.Icon "hero:outline/information-circle" "h-6 w-6"}} +
    +
    + +
    +

    Voulez-vous vraiment retirer ce dignostique ?

    +
    +
    + +
    + +
    +
    +
    +
    +
    + Annuler + +
    +
    +
    +
    +
    + +
    +{{end}} \ No newline at end of file diff --git a/web/layouts/diags/home.html b/web/layouts/diags/home.html new file mode 100644 index 0000000..f6a34f5 --- /dev/null +++ b/web/layouts/diags/home.html @@ -0,0 +1,71 @@ +{{define "content"}} + + +
    +
    +
    +
    +
    + + + + + + + + + {{range .ViewState.diags}} + {{if eq .Deleted false}} + + + + + + + + {{end}} + {{end}} + + +
    + Nom du diagnostique + + Type + + Actions +
    + +
    {{.Name}}
    +
    + {{if eq .Namespace "parcoursmob_beneficiaries"}} +
    Diagnostique personnelle
    + {{end}} + {{if eq .Namespace "parcoursmob_vehicle"}} +
    Diagnostique automobile
    + {{end}} +
    + Voir +
    +
    +
    +
    +
    +
    +{{end}} \ No newline at end of file From ea6ed41608b151a863fdebbcd7ccaf3f7df4d150 Mon Sep 17 00:00:00 2001 From: Nicolas CARON Date: Wed, 4 Dec 2024 18:20:56 +0100 Subject: [PATCH 4/9] Add display-diag.html --- config.yaml | 3 + .../_partials/beneficiary-diags.html | 12 +++- web/layouts/diags/delete-diag.html | 9 +-- web/layouts/diags/display-diag.html | 57 +++++++++++++++++++ 4 files changed, 72 insertions(+), 9 deletions(-) create mode 100644 web/layouts/diags/display-diag.html diff --git a/config.yaml b/config.yaml index ab209bc..ac66219 100644 --- a/config.yaml +++ b/config.yaml @@ -176,6 +176,9 @@ views: list: files: - web/layouts/diags/home.html + display_diag: + files: + - web/layouts/diags/display-diag.html delete: files: - web/layouts/diags/delete-diag.html diff --git a/web/layouts/beneficiaries/_partials/beneficiary-diags.html b/web/layouts/beneficiaries/_partials/beneficiary-diags.html index d7e5139..6c10e53 100644 --- a/web/layouts/beneficiaries/_partials/beneficiary-diags.html +++ b/web/layouts/beneficiaries/_partials/beneficiary-diags.html @@ -3,7 +3,7 @@ {{ $carIcon := .IconSet.Icon "tabler-icons:car" "h-6 w-6"}}
    -

    Dignostiques réalisées

    +

    Diagnostiques réalisés

    {{end}} + {{if eq .Deleted true}} +
  • +
    +

    {{.Name}}

    +
    +
    +

    Ce diagnostique a été retiré

    +
    +
  • + {{end}} {{end}} {{end}}
diff --git a/web/layouts/diags/delete-diag.html b/web/layouts/diags/delete-diag.html index b7c4ad7..494fee8 100644 --- a/web/layouts/diags/delete-diag.html +++ b/web/layouts/diags/delete-diag.html @@ -17,17 +17,10 @@

Voulez-vous vraiment retirer ce dignostique ?

-
- -
- -
-
- Annuler + Annuler
diff --git a/web/layouts/diags/display-diag.html b/web/layouts/diags/display-diag.html new file mode 100644 index 0000000..4b85d29 --- /dev/null +++ b/web/layouts/diags/display-diag.html @@ -0,0 +1,57 @@ +{{ define "content" }} +
+
+
+
+

{{.ViewState.diag.Name}}

+
+ {{$diag := .ViewState.diag.ID}} +
+
+ + + +
+
+
+
+
+
+
+

Informations

+

Informations sur le diagnostique.

+
+
+
+ {{if eq .ViewState.diag.Namespace "parcoursmob_beneficiaries"}} +
+
Type
+
Diagnostique personnelle
+
+ {{end}} + {{if eq .ViewState.diag.Namespace "parcoursmob_vehicle"}} +
+
Type
+
Diagnostique automobile
+
+ {{end}} + {{if .ViewState.diag.Json_schema}} +
+
JSON_schema
+
{{.ViewState.diag.Json_schema}}
+
+ {{end}} + {{if .ViewState.diag.Ui_schema}} +
+
UI_schema
+
{{.ViewState.diag.Ui_schema}}
+
+ {{end}} +
+
+
+
+{{ end }} \ No newline at end of file From b9692a09f22df7a9735c98b709ab22d09ecced1d Mon Sep 17 00:00:00 2001 From: Nicolas CARON Date: Mon, 9 Dec 2024 13:26:29 +0100 Subject: [PATCH 5/9] Add update-diag.html --- config.yaml | 3 + web/layouts/diags/update-diag.html | 117 +++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 web/layouts/diags/update-diag.html diff --git a/config.yaml b/config.yaml index ac66219..fb7f1a1 100644 --- a/config.yaml +++ b/config.yaml @@ -182,6 +182,9 @@ views: delete: files: - web/layouts/diags/delete-diag.html + update: + files: + - web/layouts/diags/update-diag.html administration: home: diff --git a/web/layouts/diags/update-diag.html b/web/layouts/diags/update-diag.html new file mode 100644 index 0000000..7c02b72 --- /dev/null +++ b/web/layouts/diags/update-diag.html @@ -0,0 +1,117 @@ +{{define "content"}} + +
+

Éditer un diagnostique

+
+ +
+
+
+
+
+

Informations obligatoires

+

Informations obligatoires + pour éditer un diagnostique dans PARCOURSMOB

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

Schéma JSON

+

Schéma JSON pour le diagnostique

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

Schéma UI

+

Schéma UI pour le diagnostique

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

Certains champs de sont pas valides.

+ + + + +
+
+
+{{end}} \ No newline at end of file From d9bb47bc98cfebf65a0804e99adc32f0c53a2627 Mon Sep 17 00:00:00 2001 From: Nicolas CARON Date: Mon, 9 Dec 2024 14:17:01 +0100 Subject: [PATCH 6/9] Edit delete-diag.html - Redirect to the diag page --- web/layouts/diags/delete-diag.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/layouts/diags/delete-diag.html b/web/layouts/diags/delete-diag.html index 494fee8..eba96c1 100644 --- a/web/layouts/diags/delete-diag.html +++ b/web/layouts/diags/delete-diag.html @@ -20,7 +20,7 @@
- Annuler + Annuler
From 34faa8c2156ba61377acf0836338481adb9f9fd0 Mon Sep 17 00:00:00 2001 From: Nicolas CARON Date: Tue, 10 Dec 2024 16:10:58 +0100 Subject: [PATCH 7/9] Add vehicles_managment/_partials/vehicle-diag.html & vehicles_management/create-diag.html --- config.yaml | 4 + .../_partials/beneficiary-diags.html | 2 +- web/layouts/diags/display-diag.html | 2 +- web/layouts/diags/home.html | 2 +- .../_partials/vehicle-diags.html | 49 ++++++++ .../vehicles_management/create-diag.html | 116 ++++++++++++++++++ .../vehicles_management/fleet-display.html | 3 + 7 files changed, 175 insertions(+), 3 deletions(-) create mode 100644 web/layouts/vehicles_management/_partials/vehicle-diags.html create mode 100644 web/layouts/vehicles_management/create-diag.html diff --git a/config.yaml b/config.yaml index fb7f1a1..ebbd5d7 100644 --- a/config.yaml +++ b/config.yaml @@ -86,6 +86,7 @@ views: files: - web/layouts/vehicles_management/_partials/calendar.html - web/layouts/vehicles_management/fleet-display.html + - web/layouts/vehicles_management/_partials/vehicle-diags.html fleet_update: files: - web/layouts/_partials/address_autocomplete.html @@ -97,6 +98,9 @@ views: delete_booking: files: - web/layouts/vehicles_management/delete-booking.html + create_diag: + files: + - web/layouts/vehicles_management/create-diag.html agenda: list: files: diff --git a/web/layouts/beneficiaries/_partials/beneficiary-diags.html b/web/layouts/beneficiaries/_partials/beneficiary-diags.html index 6c10e53..13cf9d7 100644 --- a/web/layouts/beneficiaries/_partials/beneficiary-diags.html +++ b/web/layouts/beneficiaries/_partials/beneficiary-diags.html @@ -25,7 +25,7 @@ {{if eq .Deleted false}}
  • -

    {{.Name}}

    + {{.Name}}
    diff --git a/web/layouts/diags/display-diag.html b/web/layouts/diags/display-diag.html index 4b85d29..52ccf15 100644 --- a/web/layouts/diags/display-diag.html +++ b/web/layouts/diags/display-diag.html @@ -32,7 +32,7 @@
    Diagnostique personnelle
    {{end}} - {{if eq .ViewState.diag.Namespace "parcoursmob_vehicle"}} + {{if eq .ViewState.diag.Namespace "parcoursmob_vehicles"}}
    Type
    Diagnostique automobile
    diff --git a/web/layouts/diags/home.html b/web/layouts/diags/home.html index f6a34f5..57213fb 100644 --- a/web/layouts/diags/home.html +++ b/web/layouts/diags/home.html @@ -49,7 +49,7 @@ {{if eq .Namespace "parcoursmob_beneficiaries"}}
    Diagnostique personnelle
    {{end}} - {{if eq .Namespace "parcoursmob_vehicle"}} + {{if eq .Namespace "parcoursmob_vehicles"}}
    Diagnostique automobile
    {{end}} diff --git a/web/layouts/vehicles_management/_partials/vehicle-diags.html b/web/layouts/vehicles_management/_partials/vehicle-diags.html new file mode 100644 index 0000000..69d4d3a --- /dev/null +++ b/web/layouts/vehicles_management/_partials/vehicle-diags.html @@ -0,0 +1,49 @@ +{{define "vehicle_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/create-diag.html b/web/layouts/vehicles_management/create-diag.html new file mode 100644 index 0000000..bb347ea --- /dev/null +++ b/web/layouts/vehicles_management/create-diag.html @@ -0,0 +1,116 @@ +{{define "content"}} + +
    +

    Ajouter un diagnostique

    +
    + +
    +
    +
    +
    +
    +

    Informations obligatoires

    +

    Informations obligatoires + pour créer un diagnostique dans PARCOURSMOB

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

    Schéma JSON

    +

    Schéma JSON pour le diagnostique

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

    Schéma UI

    +

    Schéma UI pour le diagnostique

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

    Certains champs de sont pas valides.

    + + + + +
    +
    +
    +{{end}} \ No newline at end of file diff --git a/web/layouts/vehicles_management/fleet-display.html b/web/layouts/vehicles_management/fleet-display.html index 5c0e227..8c87fdc 100644 --- a/web/layouts/vehicles_management/fleet-display.html +++ b/web/layouts/vehicles_management/fleet-display.html @@ -183,6 +183,9 @@ {{end}}
    +
    + {{template "vehicle_diags" .}} +
  • From ef66fa987620484b3655af4875355cab702a842b Mon Sep 17 00:00:00 2001 From: Nicolas CARON Date: Mon, 16 Dec 2024 12:38:28 +0100 Subject: [PATCH 8/9] 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

    From 153e832649f367622f65b7ad629f48720773a8f9 Mon Sep 17 00:00:00 2001 From: Nicolas CARON Date: Mon, 16 Dec 2024 14:41:52 +0100 Subject: [PATCH 9/9] Add VehicleBookingsCreateDiag - second route to create a diag in reservation --- config.yaml | 4 + web/layouts/vehicles/booking-display.html | 5 + web/layouts/vehicles/create-booking-diag.html | 116 ++++++++++++++++++ 3 files changed, 125 insertions(+) create mode 100644 web/layouts/vehicles/create-booking-diag.html diff --git a/config.yaml b/config.yaml index 1e1083a..7e23f78 100644 --- a/config.yaml +++ b/config.yaml @@ -63,10 +63,14 @@ views: booking_display: files: - web/layouts/vehicles/booking-display.html + - web/layouts/vehicles_management/_partials/booking-diags.html bookings_list: files: - web/layouts/vehicles_management/_partials/bookings-list.html - web/layouts/vehicles/bookings-list.html + create_booking_diag: + files: + - web/layouts/vehicles/create-booking-diag.html vehicles_management: overview: files: diff --git a/web/layouts/vehicles/booking-display.html b/web/layouts/vehicles/booking-display.html index 21d19c3..64f45dc 100644 --- a/web/layouts/vehicles/booking-display.html +++ b/web/layouts/vehicles/booking-display.html @@ -66,6 +66,11 @@
    +
    +
    + {{template "booking_diags" .}} +
    +
    diff --git a/web/layouts/vehicles/create-booking-diag.html b/web/layouts/vehicles/create-booking-diag.html new file mode 100644 index 0000000..bbe3220 --- /dev/null +++ b/web/layouts/vehicles/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