progressUpdate

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-01-22 14:25:21 -05:00
parent 9274742520
commit 166efdc877
2 changed files with 16 additions and 5 deletions

View File

@@ -20,13 +20,19 @@ async function StatusTransition(req, res) {
res.status(401).send("Unauthorized");
return;
}
res.sendStatus(200);
return;
// return res.sendStatus(200);
const {
id: jobid,
status: value,
shopid: bodyshopid,
} = req.body.event.data.new;
// Create record OPEN on new item, enter state
// If change to SCHEDULE, update the last record and create a new record (update status and end time on old record, create a new record saying we came from previous status going to previous status
// (Timeline)
// Final status is exported, there is no end date as there is no further transition (has no end date)
try {
const { update_transitions } = await client.request(
queries.UPDATE_OLD_TRANSITION,