IO-2243 Capture successful CDK posting details.

This commit is contained in:
Patrick Fic
2023-04-12 13:02:45 -07:00
parent 9fa995f002
commit bd4aa4027a
4 changed files with 198 additions and 11 deletions

View File

@@ -761,6 +761,13 @@
table: table:
name: email_audit_trail name: email_audit_trail
schema: public schema: public
- name: employee_teams
using:
foreign_key_constraint_on:
column: bodyshopid
table:
name: employee_teams
schema: public
- name: employees - name: employees
using: using:
foreign_key_constraint_on: foreign_key_constraint_on:
@@ -1945,6 +1952,165 @@
- active: - active:
_eq: true _eq: true
check: null check: null
- table:
name: employee_team_members
schema: public
object_relationships:
- name: employee
using:
foreign_key_constraint_on: employeeid
- name: employee_team
using:
foreign_key_constraint_on: teamid
insert_permissions:
- role: user
permission:
check:
employee_team:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- labor_rates
- percentage
- created_at
- updated_at
- employeeid
- id
- teamid
select_permissions:
- role: user
permission:
columns:
- labor_rates
- percentage
- created_at
- updated_at
- employeeid
- id
- teamid
filter:
employee_team:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
update_permissions:
- role: user
permission:
columns:
- labor_rates
- percentage
- created_at
- updated_at
- employeeid
- id
- teamid
filter:
employee_team:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
check: null
delete_permissions:
- role: user
permission:
backend_only: false
filter:
employee_team:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
- table:
name: employee_teams
schema: public
object_relationships:
- name: bodyshop
using:
foreign_key_constraint_on: bodyshopid
array_relationships:
- name: employee_team_members
using:
foreign_key_constraint_on:
column: teamid
table:
name: employee_team_members
schema: public
insert_permissions:
- role: user
permission:
check:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- active
- name
- created_at
- updated_at
- bodyshopid
- id
select_permissions:
- role: user
permission:
columns:
- active
- name
- created_at
- updated_at
- bodyshopid
- id
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
update_permissions:
- role: user
permission:
columns:
- active
- bodyshopid
- name
- updated_at
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
check: null
- table: - table:
name: employee_vacation name: employee_vacation
schema: public schema: public
@@ -2045,6 +2211,13 @@
table: table:
name: allocations name: allocations
schema: public schema: public
- name: employee_team_members
using:
foreign_key_constraint_on:
column: employeeid
table:
name: employee_team_members
schema: public
- name: employee_vacations - name: employee_vacations
using: using:
foreign_key_constraint_on: foreign_key_constraint_on:
@@ -2218,30 +2391,32 @@
- active: - active:
_eq: true _eq: true
columns: columns:
- id
- created_at
- updated_at
- jobid
- billid - billid
- bodyshopid
- created_at
- id
- jobid
- message
- metadata
- paymentid - paymentid
- successful - successful
- message - updated_at
- bodyshopid
- useremail - useremail
select_permissions: select_permissions:
- role: user - role: user
permission: permission:
columns: columns:
- successful
- message
- useremail
- created_at
- updated_at
- billid - billid
- bodyshopid - bodyshopid
- created_at
- id - id
- jobid - jobid
- message
- metadata
- paymentid - paymentid
- successful
- updated_at
- useremail
filter: filter:
bodyshop: bodyshop:
associations: associations:
@@ -2493,6 +2668,7 @@
_eq: true _eq: true
columns: columns:
- act_price - act_price
- act_price_before_ppc
- ah_detail_line - ah_detail_line
- alt_co_id - alt_co_id
- alt_overrd - alt_overrd
@@ -2559,6 +2735,7 @@
permission: permission:
columns: columns:
- act_price - act_price
- act_price_before_ppc
- ah_detail_line - ah_detail_line
- alt_co_id - alt_co_id
- alt_overrd - alt_overrd
@@ -2637,6 +2814,7 @@
permission: permission:
columns: columns:
- act_price - act_price
- act_price_before_ppc
- ah_detail_line - ah_detail_line
- alt_co_id - alt_co_id
- alt_overrd - alt_overrd

View File

@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."exportlog" add column "metadata" jsonb
-- null;

View File

@@ -0,0 +1,2 @@
alter table "public"."exportlog" add column "metadata" jsonb
null;

View File

@@ -224,6 +224,7 @@ async function CdkSelectedCustomer(socket, selectedCustomerId) {
} finally { } finally {
//Ensure we always insert logEvents //Ensure we always insert logEvents
//GQL to insert logevents. //GQL to insert logevents.
CdkBase.createLogEvent( CdkBase.createLogEvent(
socket, socket,
"DEBUG", "DEBUG",
@@ -1213,6 +1214,7 @@ async function GenerateTransWips(socket) {
wips.push(item); wips.push(item);
}); });
socket.transWips = wips;
return wips; return wips;
} }
@@ -1388,6 +1390,7 @@ async function MarkJobExported(socket, jobid) {
jobid: jobid, jobid: jobid,
successful: true, successful: true,
useremail: socket.user.email, useremail: socket.user.email,
metadata: socket.transWips,
}, },
bill: { bill: {
exported: true, exported: true,