diff --git a/hasura/metadata/cron_triggers.yaml b/hasura/metadata/cron_triggers.yaml index 2c8c4c91d..845cb60f6 100644 --- a/hasura/metadata/cron_triggers.yaml +++ b/hasura/metadata/cron_triggers.yaml @@ -24,6 +24,15 @@ - name: x-imex-auth value_from_env: DATAPUMP_AUTH comment: Project Mexico +- name: Chatter API Data Pump + webhook: '{{HASURA_API_URL}}/data/chatter-api' + schedule: 45 4 * * * + include_in_metadata: true + payload: {} + headers: + - name: x-imex-auth + value_from_env: DATAPUMP_AUTH + comment: "" - name: Chatter Data Pump webhook: '{{HASURA_API_URL}}/data/chatter' schedule: 45 5 * * * diff --git a/hasura/metadata/tables.yaml b/hasura/metadata/tables.yaml index 5d3d3eb85..d6f3f1c25 100644 --- a/hasura/metadata/tables.yaml +++ b/hasura/metadata/tables.yaml @@ -2156,10 +2156,12 @@ - active: _eq: true columns: + - commission_rates - created_at - employeeid - id - labor_rates + - payout_method - percentage - teamid - updated_at @@ -2167,10 +2169,12 @@ - role: user permission: columns: + - commission_rates - created_at - employeeid - id - labor_rates + - payout_method - percentage - teamid - updated_at @@ -2188,10 +2192,12 @@ - role: user permission: columns: + - commission_rates - created_at - employeeid - id - labor_rates + - payout_method - percentage - teamid - updated_at @@ -2560,6 +2566,101 @@ _eq: X-Hasura-User-Id - active: _eq: true +- table: + name: esignature_documents + schema: public + object_relationships: + - name: document + using: + foreign_key_constraint_on: documentid + - name: job + using: + foreign_key_constraint_on: jobid + insert_permissions: + - role: user + permission: + check: + job: + bodyshop: + associations: + _and: + - active: + _eq: true + - user: + authid: + _eq: X-Hasura-User-Id + columns: + - completed + - documentid + - external_document_id + - jobid + - message + - opened + - recipients + - rejected + - status + - subject + - title + comment: "" + select_permissions: + - role: user + permission: + columns: + - completed + - completed_at + - created_at + - documentid + - external_document_id + - id + - jobid + - message + - opened + - recipients + - rejected + - status + - subject + - title + - updated_at + filter: + job: + bodyshop: + associations: + _and: + - active: + _eq: true + - user: + authid: + _eq: X-Hasura-User-Id + comment: "" + update_permissions: + - role: user + permission: + columns: + - completed + - completed_at + - created_at + - documentid + - external_document_id + - message + - opened + - recipients + - rejected + - status + - subject + - title + - updated_at + filter: + job: + bodyshop: + associations: + _and: + - active: + _eq: true + - user: + authid: + _eq: X-Hasura-User-Id + check: null + comment: "" - table: name: eula_acceptances schema: public @@ -3458,6 +3559,13 @@ table: name: email_audit_trail schema: public + - name: esignature_documents + using: + foreign_key_constraint_on: + column: jobid + table: + name: esignature_documents + schema: public - name: exportlogs using: foreign_key_constraint_on: @@ -6506,6 +6614,7 @@ - id - jobid - memo + - payout_context - productivehrs - rate - task_name @@ -6531,6 +6640,7 @@ - id - jobid - memo + - payout_context - productivehrs - rate - task_name @@ -6565,6 +6675,7 @@ - id - jobid - memo + - payout_context - productivehrs - rate - task_name @@ -6748,6 +6859,7 @@ - id - jobid - memo + - payout_context - productivehrs - rate - updated_at @@ -6768,6 +6880,7 @@ - id - jobid - memo + - payout_context - productivehrs - rate - updated_at @@ -6798,6 +6911,7 @@ - id - jobid - memo + - payout_context - productivehrs - rate - updated_at diff --git a/localstack/init/10-bootstrap.sh b/localstack/init/10-bootstrap.sh index ee8183d1e..72a18528a 100755 --- a/localstack/init/10-bootstrap.sh +++ b/localstack/init/10-bootstrap.sh @@ -51,7 +51,8 @@ awslocal ses verify-email-identity --email-address noreply@imex.online --region # Secrets ensure_secret_file "CHATTER_PRIVATE_KEY" "/tmp/certs/io-ftp-test.key" -ensure_secret_string "CHATTER_COMPANY_KEY_6713" "${CHATTER_COMPANY_KEY_6713:-REPLACE_ME}" +ensure_secret_string "CHATTER_COMPANY_KEY_6713" "${CHATTER_COMPANY_KEY_6713}" +ensure_secret_string "CHATTER_COMPANY_KEY_6746" "${CHATTER_COMPANY_KEY_6746}" # Logs ensure_log_group "development" diff --git a/server/chatter/createLocation.js b/server/chatter/createLocation.js index 46766dcf8..18c51305f 100644 --- a/server/chatter/createLocation.js +++ b/server/chatter/createLocation.js @@ -67,7 +67,7 @@ const createLocation = async (req, res) => { const chatterApi = await createChatterClient(DEFAULT_COMPANY_ID); - const locationIdentifier = `${DEFAULT_COMPANY_ID}-${bodyshop.id}`; + const locationIdentifier = bodyshop?.imexshopid ?? `${DEFAULT_COMPANY_ID}-${bodyshop.id}`; const locationPayload = { name: bodyshop.shopname,