- progress update.

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-01-25 15:23:42 -05:00
parent 80483b617b
commit 461bc726aa
2 changed files with 382 additions and 370 deletions

View File

@@ -51,12 +51,23 @@ const Eula = ({currentEula, currentUser, acceptEula}) => {
try {
const {accepted_terms, ...otherFormValues} = formValues;
// Trim the values of the fields before submitting
const trimmedFormValues = {
first_name: otherFormValues.first_name.trim(),
last_name: otherFormValues.last_name.trim(),
business_name: otherFormValues.business_name.trim(),
address: otherFormValues.address.trim(),
phone_number: otherFormValues.phone_number.trim(),
};
await insertEulaAcceptance({
variables: {
eulaAcceptance: {
eulaid: eulaId,
useremail,
...otherFormValues,
...trimmedFormValues,
date_accepted: new Date(),
}
}
@@ -101,7 +112,7 @@ const Eula = ({currentEula, currentUser, acceptEula}) => {
>
<Card type='inner' className='eula-markdown-card' onScroll={handleScroll} ref={markdownCardRef}>
<div id='markdowndiv' className='eula-markdown-div'>
<Markdown children={currentEula?.content?.replace(/\\n/g, '\n')}/>
<Markdown children={currentEula?.content?.replace(/\\n|\\r|\\n\\r|\\r\\n/g, '\n')}/>
</div>
</Card>