From 5779ebbd3049b069d34365af1e5be7e39c042ff4 Mon Sep 17 00:00:00 2001 From: Tristan Gueguen Date: Tue, 7 Jan 2025 11:10:16 +0100 Subject: [PATCH] fix(nbWorkers): invert logic disable button --- web/signup/company/SelectSiretsStep.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/signup/company/SelectSiretsStep.js b/web/signup/company/SelectSiretsStep.js index 2d2837fd..3de2cb70 100644 --- a/web/signup/company/SelectSiretsStep.js +++ b/web/signup/company/SelectSiretsStep.js @@ -58,9 +58,9 @@ export function SelectSiretsStep({ facilities, setFacilities, ...props }) { } if ( - !selectedSirets + selectedSirets .map(f => f.nbWorkers) - .every(nb => nb < MAX_NB_WORKERS && nb > MIN_NB_WORKERS) + .some(nb => nb < MIN_NB_WORKERS || nb > MAX_NB_WORKERS) ) { return false; }