IO-3509 Duplicate Job Open Estimate Date

Signed-off-by: Allan Carr <allan@imexsystems.ca>
This commit is contained in:
Allan Carr
2026-01-23 22:51:53 -08:00
parent 6643e92665
commit 2acddcb9ac
3 changed files with 7 additions and 4 deletions

View File

@@ -31,9 +31,12 @@ export default async function DuplicateJob({
delete existingJob.updatedat;
delete existingJob.cieca_stl;
delete existingJob.cieca_ttl;
!keepJobLines && delete existingJob.clm_total;
const newJob = {
...existingJob,
date_open: dayjs(),
date_estimated: dayjs(),
status: defaultOpenStatus
};

View File

@@ -47,14 +47,14 @@ exports.totalsSsu = async function (req, res) {
throw new Error("Failed to update job totals");
}
res.status(200).send();
res.status(200).json({ success: true });
} catch (error) {
logger.log("job-totals-ssu-USA-error", "error", req?.user?.email, id, {
jobid: id,
error: error.message,
stack: error.stack
});
res.status(503).send();
res.status(503).json({ error: "Failed to calculate totals" });
}
};

View File

@@ -47,14 +47,14 @@ exports.totalsSsu = async function (req, res) {
throw new Error("Failed to update job totals");
}
res.status(200).send();
res.status(200).json({ success: true });
} catch (error) {
logger.log("job-totals-ssu-error", "error", req.user.email, id, {
jobid: id,
error: error.message,
stack: error.stack
});
res.status(503).send();
res.status(503).json({ error: "Failed to calculate totals" });
}
};