diff --git a/config.yaml b/config.yaml index e0e307d..9897eb3 100644 --- a/config.yaml +++ b/config.yaml @@ -191,6 +191,7 @@ views: display_diag: files: - web/layouts/diags/display-diag.html + - web/layouts/diags/_partials/diags-files.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 e80c560..4ed0fa2 100644 --- a/web/layouts/beneficiaries/_partials/beneficiary-diags.html +++ b/web/layouts/beneficiaries/_partials/beneficiary-diags.html @@ -29,8 +29,12 @@
{{.Name}}
- +
+

{{(timeFrom .Diagdate).Format "02/01/2006"}}

+
+ + + {{end}} {{if eq .Deleted true}} @@ -38,6 +42,9 @@

{{.Name}}

+
+

{{(timeFrom .Diagdate).Format "02/01/2006"}}

+

Ce diagnostic a été retiré

diff --git a/web/layouts/beneficiaries/create-diag.html b/web/layouts/beneficiaries/create-diag.html index 175968a..d91e96e 100644 --- a/web/layouts/beneficiaries/create-diag.html +++ b/web/layouts/beneficiaries/create-diag.html @@ -9,21 +9,15 @@ fields: { name: null, namespace: 'parcoursmob_beneficiaries', - json_schema: null, - ui_schema: null, }, rules: { - name: ['required'] - namespace: ['required'] - json_schema: ['required'] - ui_schema: ['required'] + name: ['required'], + namespace: ['required'], }, formValidation: { valid: false, fields: { name: {valid: null}, - json_schema: {valid: null}, - ui_schema: {valid: null}, } }, isFormValid: true, @@ -54,7 +48,7 @@
- @@ -64,7 +58,7 @@
-
+

Certains champs de sont pas valides.

diff --git a/web/layouts/diags/_partials/diags-files.html b/web/layouts/diags/_partials/diags-files.html new file mode 100644 index 0000000..f3f2e5e --- /dev/null +++ b/web/layouts/diags/_partials/diags-files.html @@ -0,0 +1,132 @@ +{{define "diags_files"}} +
+ {{if eq (len .ViewState.documents) 0}} +

Aucun document

+ {{end}} + + {{if gt (len .ViewState.documents) 0}} + +
+ + + + + + + + + + + {{range .ViewState.documents}} + + + + + + + {{end}} + + + + +
Type + Actions +
+
+ {{index $.ViewState.file_types_map .Metadata.Type}} +
+
{{.Metadata.Name}}{{.LastModified.Format "02/01/2006"}} + + + +
+
+ + {{end}} +

Ajouter un document

+
+
+
+ + +
+
+ + +
+
+ +
+
+ {{.IconSet.Icon "hero:outline/folder-plus" "mx-auto h-12 w-12 text-gray-400"}} +
+ + + + +
+

Jusqu'à 10MB

+

+
+
+
+
+ +
+
+{{end}} diff --git a/web/layouts/diags/display-diag.html b/web/layouts/diags/display-diag.html index 2725362..cfc5718 100644 --- a/web/layouts/diags/display-diag.html +++ b/web/layouts/diags/display-diag.html @@ -27,6 +27,10 @@
+
+
Date du diagnostic
+
{{(timeFrom .ViewState.diag.Diagdate).Format "02/01/2006"}}
+
{{if eq .ViewState.diag.Namespace "parcoursmob_beneficiaries"}}
Type
@@ -45,7 +49,7 @@
Diagnostic véhicule réservé
{{end}} - {{if .ViewState.diag.Json_schema}} +
+
+
+
+
+

Documents

+
+
{{template "diags_files" .}}
+
+
+
+
+
{{ end }} \ No newline at end of file diff --git a/web/layouts/diags/home.html b/web/layouts/diags/home.html index 31611ba..ae7a699 100644 --- a/web/layouts/diags/home.html +++ b/web/layouts/diags/home.html @@ -6,7 +6,7 @@

-
+
@@ -32,8 +32,8 @@ Type - - Actions + + Date Actions @@ -44,7 +44,6 @@
-
{{.Name}}
@@ -58,13 +57,18 @@
Diagnostic véhicule réservé
{{end}} + +
{{(timeFrom .Diagdate).Format "02/01/2006"}}
+ {{if eq .Deleted true}}
Diagnostic retiré
{{end}} -
Voir + + + diff --git a/web/layouts/diags/update-diag.html b/web/layouts/diags/update-diag.html index 7c02b72..1c53e9e 100644 --- a/web/layouts/diags/update-diag.html +++ b/web/layouts/diags/update-diag.html @@ -8,14 +8,14 @@ x-data="{ fields: { name: '{{.ViewState.diag.Name}}', - namespace: 'parcoursmob_beneficiaries', + namespace: '{{.ViewState.diag.Namespace}}', json_schema: '{{.ViewState.diag.Json_schema}}', ui_schema: '{{.ViewState.diag.Ui_schema}}', }, rules: { - name: ['required'] - namespace: ['required'] - json_schema: ['required'] + name: ['required'], + namespace: ['required'], + json_schema: ['required'], ui_schema: ['required'] }, formValidation: { @@ -64,7 +64,7 @@ - +
diff --git a/web/layouts/vehicles/create-booking-diag.html b/web/layouts/vehicles/create-booking-diag.html index bbe3220..8fd6d26 100644 --- a/web/layouts/vehicles/create-booking-diag.html +++ b/web/layouts/vehicles/create-booking-diag.html @@ -9,21 +9,15 @@ fields: { name: null, namespace: 'parcoursmob_bookings', - json_schema: null, - ui_schema: null, }, rules: { - name: ['required'] - namespace: ['required'] - json_schema: ['required'] - ui_schema: ['required'] + name: ['required'], + namespace: ['required'], }, formValidation: { valid: false, fields: { name: {valid: null}, - json_schema: {valid: null}, - ui_schema: {valid: null}, } }, isFormValid: true, @@ -64,7 +58,7 @@
-
+

Certains champs de sont pas valides.

diff --git a/web/layouts/vehicles_management/_partials/booking-diags.html b/web/layouts/vehicles_management/_partials/booking-diags.html index 28c50c8..d330481 100644 --- a/web/layouts/vehicles_management/_partials/booking-diags.html +++ b/web/layouts/vehicles_management/_partials/booking-diags.html @@ -27,8 +27,12 @@ - +
+

{{(timeFrom .Diagdate).Format "02/01/2006"}}

+
+ + + {{end}} {{if eq .Deleted true}} @@ -36,6 +40,9 @@

{{.Name}}

+
+

{{(timeFrom .Diagdate).Format "02/01/2006"}}

+

Ce diagnostique a été retiré

diff --git a/web/layouts/vehicles_management/_partials/vehicle-diags.html b/web/layouts/vehicles_management/_partials/vehicle-diags.html index 0b3b42d..12beeaf 100644 --- a/web/layouts/vehicles_management/_partials/vehicle-diags.html +++ b/web/layouts/vehicles_management/_partials/vehicle-diags.html @@ -26,9 +26,13 @@
  • {{.Name}} +
    +

    {{(timeFrom .Diagdate).Format "02/01/2006"}}

    +
    - + + +
  • {{end}} {{if eq .Deleted true}} @@ -36,6 +40,9 @@

    {{.Name}}

    +
    +

    {{(timeFrom .Diagdate).Format "02/01/2006"}}

    +

    Ce diagnostique a été retiré

    diff --git a/web/layouts/vehicles_management/create-vehicle-diag.html b/web/layouts/vehicles_management/create-vehicle-diag.html index 0f335c1..dc234af 100644 --- a/web/layouts/vehicles_management/create-vehicle-diag.html +++ b/web/layouts/vehicles_management/create-vehicle-diag.html @@ -9,21 +9,15 @@ fields: { name: null, namespace: 'parcoursmob_vehicles', - json_schema: null, - ui_schema: null, }, rules: { - name: ['required'] - namespace: ['required'] - json_schema: ['required'] - ui_schema: ['required'] + name: ['required'], + namespace: ['required'], }, formValidation: { valid: false, fields: { name: {valid: null}, - json_schema: {valid: null}, - ui_schema: {valid: null}, } }, isFormValid: true, @@ -64,7 +58,7 @@
    -
    +

    Certains champs de sont pas valides.