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" .}} +