@@ -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>
|
||||
|
||||
|
||||
@@ -344,15 +344,16 @@ export function ScoreboardTimeTicketsStats({ bodyshop }) {
|
||||
|
||||
const jobData = {};
|
||||
|
||||
data.jobs.forEach((job) => {
|
||||
job.tthrs = job.joblines.reduce((acc, val) => acc + val.mod_lb_hrs, 0);
|
||||
});
|
||||
const dataJobs = data.jobs.map((job) => ({
|
||||
...job,
|
||||
tthrs: job.joblines.reduce((acc, val) => acc + val.mod_lb_hrs, 0)
|
||||
}));
|
||||
|
||||
jobData.tthrs = data.jobs
|
||||
jobData.tthrs = dataJobs
|
||||
.reduce((acc, val) => acc + val.tthrs, 0)
|
||||
.toFixed(1);
|
||||
|
||||
jobData.count = data.jobs.length.toFixed(0);
|
||||
jobData.count = dataJobs.length.toFixed(0);
|
||||
|
||||
return {
|
||||
fixed: ret,
|
||||
|
||||
Reference in New Issue
Block a user