From 14ef3052f8b1b91a090b9d104edbba09d2a30a2b Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Wed, 7 Oct 2020 12:00:11 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=A9=20Ux=20:=20recherche=20du=20code?= =?UTF-8?q?=20postal=20se=20fait=20uniquement=20sur=20les=20premiers=20chi?= =?UTF-8?q?ffres?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mon-entreprise/source/components/SimulateurWarning.tsx | 8 ++++++++ .../components/conversation/select/SelectCommune.tsx | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mon-entreprise/source/components/SimulateurWarning.tsx b/mon-entreprise/source/components/SimulateurWarning.tsx index 8f9de37c7..dacfd3524 100644 --- a/mon-entreprise/source/components/SimulateurWarning.tsx +++ b/mon-entreprise/source/components/SimulateurWarning.tsx @@ -93,6 +93,14 @@ export default function SimulateurWarning({ )} + {['indépendant', 'profession-libérale'].includes(simulateur) && ( +
  • + + Le montant des cotisations est calculé pour un revenu sur l'année + 2020 + +
  • + )} ) diff --git a/mon-entreprise/source/components/conversation/select/SelectCommune.tsx b/mon-entreprise/source/components/conversation/select/SelectCommune.tsx index 34db843ba..9a50e5326 100644 --- a/mon-entreprise/source/components/conversation/select/SelectCommune.tsx +++ b/mon-entreprise/source/components/conversation/select/SelectCommune.tsx @@ -41,7 +41,7 @@ async function searchCommunes(input: string): Promise | null> { codesPostaux .sort() .map(codePostal => ({ ...commune, codePostal })) - .filter(({ codePostal }) => codePostal.includes(number)) + .filter(({ codePostal }) => codePostal.startsWith(number)) ) .slice(0, 10) } @@ -159,7 +159,7 @@ export default function Select({ onChange, value, id }) { className="ui__" onKeyDown={handleKeyDown} aria-controls="liste-commune" - placeholder={t('commune')} + placeholder={t('Commune ou code postal')} value={name} onChange={handleChange} />