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

View File

@@ -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,