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/create-diag.html b/web/layouts/beneficiaries/create-diag.html index 6ebbf34..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'] }, 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/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 4f081eb..cfc5718 100644 --- a/web/layouts/diags/display-diag.html +++ b/web/layouts/diags/display-diag.html @@ -49,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/vehicles/create-booking-diag.html b/web/layouts/vehicles/create-booking-diag.html index 15382f7..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'] }, 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/create-vehicle-diag.html b/web/layouts/vehicles_management/create-vehicle-diag.html index a11cca3..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'] }, 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.