From e90440c02db380e60fe244b1c28876af24559772 Mon Sep 17 00:00:00 2001 From: Arnaud AMBROSELLI Date: Mon, 28 Aug 2023 17:07:54 +0200 Subject: [PATCH] =?UTF-8?q?fix(dashboard):=20masquer=20les=20sections=20de?= =?UTF-8?q?=20champs=20custo=20dans=20la=20fen=C3=AAtre=20d'=C3=A9cition?= =?UTF-8?q?=20lorsqu'il=20n'y=20a=20aucun=20champ=20custo=20disponible=20p?= =?UTF-8?q?our=20l'=C3=A9quipe=20courante?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/src/scenes/person/components/EditModal.js | 1 + 1 file changed, 1 insertion(+) diff --git a/dashboard/src/scenes/person/components/EditModal.js b/dashboard/src/scenes/person/components/EditModal.js index 3d87f0a8c..4a35f090a 100644 --- a/dashboard/src/scenes/person/components/EditModal.js +++ b/dashboard/src/scenes/person/components/EditModal.js @@ -239,6 +239,7 @@ export default function EditModal({ person, selectedPanel, onClose, isMedicalFil {!isMedicalFile && !['restricted-access'].includes(user.role) && customFieldsPersons.map(({ name, fields }, index) => { + if (!fields.filter((f) => f.enabled || f.enabledTeams?.includes(team._id)).length) return null; return (