diff --git a/mon-entreprise/package.json b/mon-entreprise/package.json
index 86fc06463..8397d7820 100644
--- a/mon-entreprise/package.json
+++ b/mon-entreprise/package.json
@@ -52,6 +52,7 @@
"react-redux": "^7.0.3",
"react-router-dom": "^5.1.1",
"react-router-hash-link": "^1.2.2",
+ "react-signature-pad-wrapper": "^1.2.11",
"react-spring": "=8.0.27",
"react-syntax-highlighter": "^10.1.1",
"react-transition-group": "^2.2.1",
diff --git a/mon-entreprise/source/components/conversation/DateInput.tsx b/mon-entreprise/source/components/conversation/DateInput.tsx
index 8e74874c8..0ee20b6f2 100644
--- a/mon-entreprise/source/components/conversation/DateInput.tsx
+++ b/mon-entreprise/source/components/conversation/DateInput.tsx
@@ -32,6 +32,9 @@ export default function DateInput({
if (+year < 1700) {
return
}
+ if (year.length > 4) {
+ return
+ }
if ([day, month, year].some(x => Number.isNaN(+x))) {
return
}
diff --git a/mon-entreprise/source/components/conversation/ParagrapheInput.tsx b/mon-entreprise/source/components/conversation/ParagrapheInput.tsx
new file mode 100644
index 000000000..63309e10e
--- /dev/null
+++ b/mon-entreprise/source/components/conversation/ParagrapheInput.tsx
@@ -0,0 +1,33 @@
+import React, { useCallback } from 'react'
+import { debounce } from '../../utils'
+
+export default function ParagrapheInput({
+ onChange,
+ dottedName,
+ value,
+ defaultValue,
+ autoFocus
+}) {
+ const debouncedOnChange = useCallback(debounce(1000, onChange), [])
+
+ return (
+
+
+ )
+}
diff --git a/mon-entreprise/source/components/conversation/RuleInput.tsx b/mon-entreprise/source/components/conversation/RuleInput.tsx
index cc4d7d7a1..bfbbb289c 100644
--- a/mon-entreprise/source/components/conversation/RuleInput.tsx
+++ b/mon-entreprise/source/components/conversation/RuleInput.tsx
@@ -12,6 +12,8 @@ import { useTranslation } from 'react-i18next'
import { DottedName } from 'Rules'
import DateInput from './DateInput'
import TextInput from './TextInput'
+import SelectEuropeCountry from './select/SelectEuropeCountry'
+import ParagrapheInput from './ParagrapheInput'
type Value = string | number | object | boolean | null
export type RuleInputProps = {
@@ -68,6 +70,8 @@ export default function RuleInput({
}
if (rule.API && rule.API === 'commune')
return
+ if (rule.API && rule.API === 'pays européen')
+ return
if (rule.API) throw new Error("Les seules API implémentées sont 'commune'")
if (rule.dottedName == 'contrat salarié . ATMP . taux collectif ATMP')
@@ -130,6 +134,9 @@ export default function RuleInput({
if (rule.type === 'texte') {
return
}
+ if (rule.type === 'paragraphe') {
+ return
+ }
return
}
diff --git a/mon-entreprise/source/components/conversation/select/SelectEuropeCountry.tsx b/mon-entreprise/source/components/conversation/select/SelectEuropeCountry.tsx
new file mode 100644
index 000000000..8bd966c1b
--- /dev/null
+++ b/mon-entreprise/source/components/conversation/select/SelectEuropeCountry.tsx
@@ -0,0 +1,53 @@
+import React from 'react'
+const STATES = [
+ 'Allemagne',
+ 'Autriche',
+ 'Belgique',
+ 'Bulgarie',
+ 'Chypre',
+ 'Croatie',
+ 'Danemark',
+ 'Espagne',
+ 'Estonie',
+ 'Finlande',
+ 'Grèce',
+ 'Hongrie',
+ 'Irlande',
+ 'Islande',
+ 'Italie',
+ 'Lettonie',
+ 'Liechtenstein',
+ 'Lituanie',
+ 'Luxembourg',
+ 'Malte',
+ 'Norvège',
+ 'Pays-Bas',
+ 'Pologne',
+ 'Portugal',
+ 'République Tchèque',
+ 'Roumanie',
+ 'Royaume-Uni',
+ 'Slovaquie',
+ 'Slovénie',
+ 'Suède',
+ 'Suisse'
+]
+
+export default function SelectEuropeCountry({ value, onChange, onSubmit }) {
+ return (
+
+
+
+ )
+}
diff --git a/mon-entreprise/source/components/ui/Checkbox/index.css b/mon-entreprise/source/components/ui/Checkbox/index.css
index e4d8d4457..ab176d31a 100644
--- a/mon-entreprise/source/components/ui/Checkbox/index.css
+++ b/mon-entreprise/source/components/ui/Checkbox/index.css
@@ -49,14 +49,14 @@
.ui__.checkbox:hover svg {
stroke: var(--color);
}
-.ui__.checkbox-input:checked + .ui__.checkbox svg {
+.ui__.checkbox-input:checked + label .ui__.checkbox svg {
stroke: var(--color);
}
-.ui__.checkbox-input:checked + .ui__.checkbox svg path {
+.ui__.checkbox-input:checked + label .ui__.checkbox svg path {
stroke-dashoffset: 60;
transition: all 0.15s linear;
}
-.ui__.checkbox-input:checked + .ui__.checkbox svg polyline {
+.ui__.checkbox-input:checked + label .ui__.checkbox svg polyline {
stroke-dashoffset: 42;
transition: all 0.1s linear;
transition-delay: 0.075s;
diff --git a/mon-entreprise/source/components/ui/Checkbox/index.tsx b/mon-entreprise/source/components/ui/Checkbox/index.tsx
index 372bcae57..58335b039 100644
--- a/mon-entreprise/source/components/ui/Checkbox/index.tsx
+++ b/mon-entreprise/source/components/ui/Checkbox/index.tsx
@@ -1,7 +1,9 @@
import React from 'react'
import './index.css'
-export default function Checkbox(props: React.ComponentProps<'input'>) {
+export default function Checkbox(
+ props: React.ComponentProps<'input'> & { label?: string }
+) {
return (
<>
) {
style={{ display: 'none' }}
{...props}
/>
-