From bfebcd21b00aa5e6ec0b881f981f3776bbff1653 Mon Sep 17 00:00:00 2001 From: Arnaud Ambroselli <31724752+arnaudambro@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:37:29 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20ne=20montre=20pas=20'Non'=20quand=20une?= =?UTF-8?q?=20case=20=C3=A0=20cocher=20n'est=20pas=20coch=C3=A9e=20(#1848)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/CustomFieldDisplay.js | 2 +- dashboard/src/components/CustomFieldInput.js | 35 ++++++++++++------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/dashboard/src/components/CustomFieldDisplay.js b/dashboard/src/components/CustomFieldDisplay.js index e41e2c4ef..2fe533bbf 100644 --- a/dashboard/src/components/CustomFieldDisplay.js +++ b/dashboard/src/components/CustomFieldDisplay.js @@ -4,7 +4,7 @@ import { formatDateTimeWithNameOfDay, formatDateWithNameOfDay } from '../service const showBoolean = (value) => { if (value === null) return ''; if (value === undefined) return ''; - if (!value) return 'Non'; + if (!value) return ''; return 'Oui'; }; diff --git a/dashboard/src/components/CustomFieldInput.js b/dashboard/src/components/CustomFieldInput.js index 688f6172d..9c171347e 100644 --- a/dashboard/src/components/CustomFieldInput.js +++ b/dashboard/src/components/CustomFieldInput.js @@ -31,7 +31,7 @@ const CustomFieldInput = ({ field, values, handleChange, model, colWidth = null, {!hideLabel && ( )} {!!['text', 'number'].includes(field.type) && ( @@ -88,18 +88,27 @@ const CustomFieldInput = ({ field, values, handleChange, model, colWidth = null, )} {!!['boolean'].includes(field.type) && ( - - - handleChange({ target: { value: !values[field.name], name: field.name } })} - disabled={disabled} - /> - + /* + display: flex; + flex-direction: column; + margin-left: 20px; + width: 80%; + */ +
+ +
)} {!!['yes-no'].includes(field.type) && (