IO-3509 Duplicate Job Open Estimate Date
Signed-off-by: Allan Carr <allan@imexsystems.ca>
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
|
||||
@@ -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" });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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" });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user