diff --git a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.duplicate.util.js b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.duplicate.util.js index 8e0705e79..8edbe1199 100644 --- a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.duplicate.util.js +++ b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.duplicate.util.js @@ -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 }; diff --git a/server/job/job-totals-USA.js b/server/job/job-totals-USA.js index 27fced83e..a8bd632cc 100644 --- a/server/job/job-totals-USA.js +++ b/server/job/job-totals-USA.js @@ -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" }); } }; diff --git a/server/job/job-totals.js b/server/job/job-totals.js index c11d8d7de..35cc4e6c1 100644 --- a/server/job/job-totals.js +++ b/server/job/job-totals.js @@ -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" }); } };