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 ( +
+