From ea6ed41608b151a863fdebbcd7ccaf3f7df4d150 Mon Sep 17 00:00:00 2001 From: Nicolas CARON Date: Wed, 4 Dec 2024 18:20:56 +0100 Subject: [PATCH] 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