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

@@ -2442,7 +2442,7 @@
_eq: X-Hasura-User-Id
columns:
- address
- buisness_name
- business_name
- date_accepted
- eulaid
- first_name
@@ -2454,7 +2454,7 @@
permission:
columns:
- address
- buisness_name
- business_name
- first_name
- last_name
- phone_number
@@ -4164,11 +4164,16 @@
- name: job_status_transition
definition:
enable_manual: true
insert:
columns: '*'
update:
columns:
- status
retry_conf:
interval_sec: 10
num_retries: 0
timeout_sec: 60
webhook_from_env: HASURA_API_URL
webhook: https://worktest.home.irony.online
headers:
- name: event-secret
value_from_env: EVENT_SECRET

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,