From f72308f91539747ac0b6b60ae4ce440be9a22fdf Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 29 Jan 2020 16:57:19 -0800 Subject: [PATCH] Added new fields for EMS file upload + renamed fields for coherenace. Another attempt at fixing invalid token forwarding. Fixed date time formatting. --- .../job-detail-cards.insurance.component.jsx | 1 - client/src/graphql/apollo-error-handling.js | 16 +- .../jobs-available.page.component.jsx | 2 +- client/src/utils/DateFormatter.jsx | 2 +- .../1580338993317_run_sql_migration/down.yaml | 1 + .../1580338993317_run_sql_migration/up.yaml | 6 + .../1580339054130_run_sql_migration/down.yaml | 1 + .../1580339054130_run_sql_migration/up.yaml | 6 + .../down.yaml | 3 + .../up.yaml | 3 + .../down.yaml | 6 + .../up.yaml | 6 + .../down.yaml | 3 + .../up.yaml | 3 + .../down.yaml | 3 + .../up.yaml | 3 + .../down.yaml | 3 + .../up.yaml | 3 + .../down.yaml | 3 + .../up.yaml | 3 + .../down.yaml | 3 + .../up.yaml | 3 + .../down.yaml | 3 + .../up.yaml | 3 + .../down.yaml | 3 + .../up.yaml | 3 + .../down.yaml | 230 +++++++++++++++++ .../up.yaml | 233 ++++++++++++++++++ .../down.yaml | 228 +++++++++++++++++ .../up.yaml | 231 +++++++++++++++++ .../down.yaml | 230 +++++++++++++++++ .../up.yaml | 233 ++++++++++++++++++ 32 files changed, 1474 insertions(+), 6 deletions(-) create mode 100644 hasura/migrations/1580338993317_run_sql_migration/down.yaml create mode 100644 hasura/migrations/1580338993317_run_sql_migration/up.yaml create mode 100644 hasura/migrations/1580339054130_run_sql_migration/down.yaml create mode 100644 hasura/migrations/1580339054130_run_sql_migration/up.yaml create mode 100644 hasura/migrations/1580342466510_alter_table_public_jobs_add_column_parts_tax_rate/down.yaml create mode 100644 hasura/migrations/1580342466510_alter_table_public_jobs_add_column_parts_tax_rate/up.yaml create mode 100644 hasura/migrations/1580342506429_alter_table_public_jobs_alter_column_parts_tax_rate/down.yaml create mode 100644 hasura/migrations/1580342506429_alter_table_public_jobs_alter_column_parts_tax_rate/up.yaml create mode 100644 hasura/migrations/1580342523444_alter_table_public_jobs_alter_column_tax_pstthr/down.yaml create mode 100644 hasura/migrations/1580342523444_alter_table_public_jobs_alter_column_tax_pstthr/up.yaml create mode 100644 hasura/migrations/1580342644474_alter_table_public_jobs_add_column_tax_tow_rt/down.yaml create mode 100644 hasura/migrations/1580342644474_alter_table_public_jobs_add_column_tax_tow_rt/up.yaml create mode 100644 hasura/migrations/1580342652067_alter_table_public_jobs_alter_column_tax_tow_rt/down.yaml create mode 100644 hasura/migrations/1580342652067_alter_table_public_jobs_alter_column_tax_tow_rt/up.yaml create mode 100644 hasura/migrations/1580342697226_alter_table_public_jobs_add_column_tax_sub_rt/down.yaml create mode 100644 hasura/migrations/1580342697226_alter_table_public_jobs_add_column_tax_sub_rt/up.yaml create mode 100644 hasura/migrations/1580342709854_alter_table_public_jobs_alter_column_tax_sub_rt/down.yaml create mode 100644 hasura/migrations/1580342709854_alter_table_public_jobs_alter_column_tax_sub_rt/up.yaml create mode 100644 hasura/migrations/1580342722401_alter_table_public_jobs_alter_column_tax_pstthr/down.yaml create mode 100644 hasura/migrations/1580342722401_alter_table_public_jobs_alter_column_tax_pstthr/up.yaml create mode 100644 hasura/migrations/1580342734703_alter_table_public_jobs_alter_column_tax_tow_rt/down.yaml create mode 100644 hasura/migrations/1580342734703_alter_table_public_jobs_alter_column_tax_tow_rt/up.yaml create mode 100644 hasura/migrations/1580343246214_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1580343246214_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1580343251291_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1580343251291_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1580343257730_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1580343257730_update_permission_user_public_table_jobs/up.yaml diff --git a/client/src/components/job-detail-cards/job-detail-cards.insurance.component.jsx b/client/src/components/job-detail-cards/job-detail-cards.insurance.component.jsx index 54602f2d8..0e4cf4935 100644 --- a/client/src/components/job-detail-cards/job-detail-cards.insurance.component.jsx +++ b/client/src/components/job-detail-cards/job-detail-cards.insurance.component.jsx @@ -27,7 +27,6 @@ export default function JobDetailCardsInsuranceComponent({ loading, data }) {
- TODO: {t("jobs.labels.cards.appraiser")} {data?.est_ea ? ( diff --git a/client/src/graphql/apollo-error-handling.js b/client/src/graphql/apollo-error-handling.js index 4c232958a..c38c13d78 100644 --- a/client/src/graphql/apollo-error-handling.js +++ b/client/src/graphql/apollo-error-handling.js @@ -1,7 +1,8 @@ import { onError } from "apollo-link-error"; -//import { Observable } from "apollo-link"; +import { Observable } from "apollo-link"; import { auth } from "../firebase/firebase.utils"; //https://stackoverflow.com/questions/57163454/refreshing-a-token-with-apollo-client-firebase-auth + const errorLink = onError( ({ graphQLErrors, networkError, operation, forward }) => { // console.log("graphQLErrors", graphQLErrors); @@ -37,8 +38,17 @@ const errorLink = onError( authorization: token ? `Bearer ${token}` : "" } })); - console.log("Forwarding operation", operation); - return forward(operation); + + return new Observable(observer => { + const subscriber = { + next: observer.next.bind(observer), + error: observer.error.bind(observer), + complete: observer.complete.bind(observer) + }; + console.log("About to resend the request."); + // Retry last failed request + forward(operation).subscribe(subscriber); + }); } }); diff --git a/client/src/pages/jobs-available/jobs-available.page.component.jsx b/client/src/pages/jobs-available/jobs-available.page.component.jsx index e52fedf55..b239bd1d3 100644 --- a/client/src/pages/jobs-available/jobs-available.page.component.jsx +++ b/client/src/pages/jobs-available/jobs-available.page.component.jsx @@ -13,7 +13,7 @@ export default function JobsAvailablePageComponent({ deleteJob={deleteJob} estDataLazyLoad={estDataLazyLoad} /> - Available Supplements + Available Supplements (//TODO: LOGIC HAS NOT YET BEEN COPIED FROM OTHER COMPONENT) {props.children || ""}; + return {props.children || ""}; } diff --git a/hasura/migrations/1580338993317_run_sql_migration/down.yaml b/hasura/migrations/1580338993317_run_sql_migration/down.yaml new file mode 100644 index 000000000..fe51488c7 --- /dev/null +++ b/hasura/migrations/1580338993317_run_sql_migration/down.yaml @@ -0,0 +1 @@ +[] diff --git a/hasura/migrations/1580338993317_run_sql_migration/up.yaml b/hasura/migrations/1580338993317_run_sql_migration/up.yaml new file mode 100644 index 000000000..50d9e6d4d --- /dev/null +++ b/hasura/migrations/1580338993317_run_sql_migration/up.yaml @@ -0,0 +1,6 @@ +- args: + cascade: true + sql: "ALTER TABLE jobs ALTER COLUMN theft_ind DROP DEFAULT;\r\nALTER TABLE jobs + ALTER theft_ind TYPE bool USING CASE WHEN true THEN FALSE ELSE TRUE END;\r\nALTER + TABLE jobs ALTER COLUMN theft_ind SET DEFAULT FALSE;" + type: run_sql diff --git a/hasura/migrations/1580339054130_run_sql_migration/down.yaml b/hasura/migrations/1580339054130_run_sql_migration/down.yaml new file mode 100644 index 000000000..fe51488c7 --- /dev/null +++ b/hasura/migrations/1580339054130_run_sql_migration/down.yaml @@ -0,0 +1 @@ +[] diff --git a/hasura/migrations/1580339054130_run_sql_migration/up.yaml b/hasura/migrations/1580339054130_run_sql_migration/up.yaml new file mode 100644 index 000000000..377757ec8 --- /dev/null +++ b/hasura/migrations/1580339054130_run_sql_migration/up.yaml @@ -0,0 +1,6 @@ +- args: + cascade: true + sql: "ALTER TABLE jobs ALTER COLUMN tlos_ind DROP DEFAULT;\r\nALTER TABLE jobs + ALTER tlos_ind TYPE bool USING CASE WHEN true THEN FALSE ELSE TRUE END;\r\nALTER + TABLE jobs ALTER COLUMN tlos_ind SET DEFAULT FALSE;" + type: run_sql diff --git a/hasura/migrations/1580342466510_alter_table_public_jobs_add_column_parts_tax_rate/down.yaml b/hasura/migrations/1580342466510_alter_table_public_jobs_add_column_parts_tax_rate/down.yaml new file mode 100644 index 000000000..d5601bc2c --- /dev/null +++ b/hasura/migrations/1580342466510_alter_table_public_jobs_add_column_parts_tax_rate/down.yaml @@ -0,0 +1,3 @@ +- args: + sql: ALTER TABLE "public"."jobs" DROP COLUMN "parts_tax_rate"; + type: run_sql diff --git a/hasura/migrations/1580342466510_alter_table_public_jobs_add_column_parts_tax_rate/up.yaml b/hasura/migrations/1580342466510_alter_table_public_jobs_add_column_parts_tax_rate/up.yaml new file mode 100644 index 000000000..24910de15 --- /dev/null +++ b/hasura/migrations/1580342466510_alter_table_public_jobs_add_column_parts_tax_rate/up.yaml @@ -0,0 +1,3 @@ +- args: + sql: ALTER TABLE "public"."jobs" ADD COLUMN "parts_tax_rate" numeric NULL; + type: run_sql diff --git a/hasura/migrations/1580342506429_alter_table_public_jobs_alter_column_parts_tax_rate/down.yaml b/hasura/migrations/1580342506429_alter_table_public_jobs_alter_column_parts_tax_rate/down.yaml new file mode 100644 index 000000000..48652bba7 --- /dev/null +++ b/hasura/migrations/1580342506429_alter_table_public_jobs_alter_column_parts_tax_rate/down.yaml @@ -0,0 +1,6 @@ +- args: + sql: COMMENT ON COLUMN "public"."jobs"."parts_tax_rate" IS E'null' + type: run_sql +- args: + sql: alter table "public"."jobs" rename column "tax_pstthr" to "parts_tax_rate"; + type: run_sql diff --git a/hasura/migrations/1580342506429_alter_table_public_jobs_alter_column_parts_tax_rate/up.yaml b/hasura/migrations/1580342506429_alter_table_public_jobs_alter_column_parts_tax_rate/up.yaml new file mode 100644 index 000000000..3a0211519 --- /dev/null +++ b/hasura/migrations/1580342506429_alter_table_public_jobs_alter_column_parts_tax_rate/up.yaml @@ -0,0 +1,6 @@ +- args: + sql: COMMENT ON COLUMN "public"."jobs"."parts_tax_rate" IS E'' + type: run_sql +- args: + sql: alter table "public"."jobs" rename column "parts_tax_rate" to "tax_pstthr"; + type: run_sql diff --git a/hasura/migrations/1580342523444_alter_table_public_jobs_alter_column_tax_pstthr/down.yaml b/hasura/migrations/1580342523444_alter_table_public_jobs_alter_column_tax_pstthr/down.yaml new file mode 100644 index 000000000..c27db234f --- /dev/null +++ b/hasura/migrations/1580342523444_alter_table_public_jobs_alter_column_tax_pstthr/down.yaml @@ -0,0 +1,3 @@ +- args: + sql: COMMENT ON COLUMN "public"."jobs"."tax_pstthr" IS E'null' + type: run_sql diff --git a/hasura/migrations/1580342523444_alter_table_public_jobs_alter_column_tax_pstthr/up.yaml b/hasura/migrations/1580342523444_alter_table_public_jobs_alter_column_tax_pstthr/up.yaml new file mode 100644 index 000000000..94dea43fb --- /dev/null +++ b/hasura/migrations/1580342523444_alter_table_public_jobs_alter_column_tax_pstthr/up.yaml @@ -0,0 +1,3 @@ +- args: + sql: COMMENT ON COLUMN "public"."jobs"."tax_pstthr" IS E'PST for Parts' + type: run_sql diff --git a/hasura/migrations/1580342644474_alter_table_public_jobs_add_column_tax_tow_rt/down.yaml b/hasura/migrations/1580342644474_alter_table_public_jobs_add_column_tax_tow_rt/down.yaml new file mode 100644 index 000000000..1fcc511d5 --- /dev/null +++ b/hasura/migrations/1580342644474_alter_table_public_jobs_add_column_tax_tow_rt/down.yaml @@ -0,0 +1,3 @@ +- args: + sql: ALTER TABLE "public"."jobs" DROP COLUMN "tax_tow_rt"; + type: run_sql diff --git a/hasura/migrations/1580342644474_alter_table_public_jobs_add_column_tax_tow_rt/up.yaml b/hasura/migrations/1580342644474_alter_table_public_jobs_add_column_tax_tow_rt/up.yaml new file mode 100644 index 000000000..865d7bbfb --- /dev/null +++ b/hasura/migrations/1580342644474_alter_table_public_jobs_add_column_tax_tow_rt/up.yaml @@ -0,0 +1,3 @@ +- args: + sql: ALTER TABLE "public"."jobs" ADD COLUMN "tax_tow_rt" numeric NULL; + type: run_sql diff --git a/hasura/migrations/1580342652067_alter_table_public_jobs_alter_column_tax_tow_rt/down.yaml b/hasura/migrations/1580342652067_alter_table_public_jobs_alter_column_tax_tow_rt/down.yaml new file mode 100644 index 000000000..c748246fa --- /dev/null +++ b/hasura/migrations/1580342652067_alter_table_public_jobs_alter_column_tax_tow_rt/down.yaml @@ -0,0 +1,3 @@ +- args: + sql: COMMENT ON COLUMN "public"."jobs"."tax_tow_rt" IS E'null' + type: run_sql diff --git a/hasura/migrations/1580342652067_alter_table_public_jobs_alter_column_tax_tow_rt/up.yaml b/hasura/migrations/1580342652067_alter_table_public_jobs_alter_column_tax_tow_rt/up.yaml new file mode 100644 index 000000000..050699106 --- /dev/null +++ b/hasura/migrations/1580342652067_alter_table_public_jobs_alter_column_tax_tow_rt/up.yaml @@ -0,0 +1,3 @@ +- args: + sql: COMMENT ON COLUMN "public"."jobs"."tax_tow_rt" IS E'Taxing tow Rate' + type: run_sql diff --git a/hasura/migrations/1580342697226_alter_table_public_jobs_add_column_tax_sub_rt/down.yaml b/hasura/migrations/1580342697226_alter_table_public_jobs_add_column_tax_sub_rt/down.yaml new file mode 100644 index 000000000..3c2faedff --- /dev/null +++ b/hasura/migrations/1580342697226_alter_table_public_jobs_add_column_tax_sub_rt/down.yaml @@ -0,0 +1,3 @@ +- args: + sql: ALTER TABLE "public"."jobs" DROP COLUMN "tax_sub_rt"; + type: run_sql diff --git a/hasura/migrations/1580342697226_alter_table_public_jobs_add_column_tax_sub_rt/up.yaml b/hasura/migrations/1580342697226_alter_table_public_jobs_add_column_tax_sub_rt/up.yaml new file mode 100644 index 000000000..b77cd85bd --- /dev/null +++ b/hasura/migrations/1580342697226_alter_table_public_jobs_add_column_tax_sub_rt/up.yaml @@ -0,0 +1,3 @@ +- args: + sql: ALTER TABLE "public"."jobs" ADD COLUMN "tax_sub_rt" numeric NULL; + type: run_sql diff --git a/hasura/migrations/1580342709854_alter_table_public_jobs_alter_column_tax_sub_rt/down.yaml b/hasura/migrations/1580342709854_alter_table_public_jobs_alter_column_tax_sub_rt/down.yaml new file mode 100644 index 000000000..a8957d602 --- /dev/null +++ b/hasura/migrations/1580342709854_alter_table_public_jobs_alter_column_tax_sub_rt/down.yaml @@ -0,0 +1,3 @@ +- args: + sql: COMMENT ON COLUMN "public"."jobs"."tax_sub_rt" IS E'null' + type: run_sql diff --git a/hasura/migrations/1580342709854_alter_table_public_jobs_alter_column_tax_sub_rt/up.yaml b/hasura/migrations/1580342709854_alter_table_public_jobs_alter_column_tax_sub_rt/up.yaml new file mode 100644 index 000000000..3796212ba --- /dev/null +++ b/hasura/migrations/1580342709854_alter_table_public_jobs_alter_column_tax_sub_rt/up.yaml @@ -0,0 +1,3 @@ +- args: + sql: COMMENT ON COLUMN "public"."jobs"."tax_sub_rt" IS E'Sublet Tax Rate' + type: run_sql diff --git a/hasura/migrations/1580342722401_alter_table_public_jobs_alter_column_tax_pstthr/down.yaml b/hasura/migrations/1580342722401_alter_table_public_jobs_alter_column_tax_pstthr/down.yaml new file mode 100644 index 000000000..94dea43fb --- /dev/null +++ b/hasura/migrations/1580342722401_alter_table_public_jobs_alter_column_tax_pstthr/down.yaml @@ -0,0 +1,3 @@ +- args: + sql: COMMENT ON COLUMN "public"."jobs"."tax_pstthr" IS E'PST for Parts' + type: run_sql diff --git a/hasura/migrations/1580342722401_alter_table_public_jobs_alter_column_tax_pstthr/up.yaml b/hasura/migrations/1580342722401_alter_table_public_jobs_alter_column_tax_pstthr/up.yaml new file mode 100644 index 000000000..94caad8e1 --- /dev/null +++ b/hasura/migrations/1580342722401_alter_table_public_jobs_alter_column_tax_pstthr/up.yaml @@ -0,0 +1,3 @@ +- args: + sql: COMMENT ON COLUMN "public"."jobs"."tax_pstthr" IS E'Parts Tax Rate' + type: run_sql diff --git a/hasura/migrations/1580342734703_alter_table_public_jobs_alter_column_tax_tow_rt/down.yaml b/hasura/migrations/1580342734703_alter_table_public_jobs_alter_column_tax_tow_rt/down.yaml new file mode 100644 index 000000000..050699106 --- /dev/null +++ b/hasura/migrations/1580342734703_alter_table_public_jobs_alter_column_tax_tow_rt/down.yaml @@ -0,0 +1,3 @@ +- args: + sql: COMMENT ON COLUMN "public"."jobs"."tax_tow_rt" IS E'Taxing tow Rate' + type: run_sql diff --git a/hasura/migrations/1580342734703_alter_table_public_jobs_alter_column_tax_tow_rt/up.yaml b/hasura/migrations/1580342734703_alter_table_public_jobs_alter_column_tax_tow_rt/up.yaml new file mode 100644 index 000000000..ae024a852 --- /dev/null +++ b/hasura/migrations/1580342734703_alter_table_public_jobs_alter_column_tax_tow_rt/up.yaml @@ -0,0 +1,3 @@ +- args: + sql: COMMENT ON COLUMN "public"."jobs"."tax_tow_rt" IS E'Towing Tax Rate' + type: run_sql diff --git a/hasura/migrations/1580343246214_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1580343246214_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..a0210b669 --- /dev/null +++ b/hasura/migrations/1580343246214_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,230 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_insert_permission +- args: + permission: + check: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + columns: + - id + - created_at + - updated_at + - shopid + - ro_number + - ownerid + - vehicleid + - labor_rate_id + - labor_rate_desc + - rate_lab + - rate_lad + - rate_lae + - rate_lar + - rate_las + - rate_laf + - rate_lam + - rate_lag + - rate_atp + - rate_lau + - rate_la1 + - rate_la2 + - rate_la3 + - rate_la4 + - rate_mapa + - rate_mash + - rate_mahw + - rate_ma2s + - rate_ma3s + - rate_ma2t + - rate_mabl + - rate_macs + - rate_matd + - federal_tax_rate + - state_tax_rate + - local_tax_rate + - est_co_nm + - est_addr1 + - est_addr2 + - est_city + - est_st + - est_zip + - est_ctry + - est_ph1 + - est_ea + - est_ct_ln + - est_ct_fn + - scheduled_in + - actual_in + - scheduled_completion + - actual_completion + - scheduled_delivery + - actual_delivery + - regie_number + - invoice_date + - claim_total + - deductible + - inproduction + - statusid + - ins_co_id + - ins_co_nm + - ins_addr1 + - ins_addr2 + - ins_city + - ins_st + - ins_zip + - ins_ctry + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_fax + - ins_faxx + - ins_ct_ln + - ins_ct_fn + - ins_title + - ins_ct_ph + - ins_ct_phx + - ins_ea + - ins_memo + - policy_no + - ded_amt + - ded_status + - asgn_no + - asgn_date + - asgn_type + - clm_no + - clm_ofc_id + - date_estimated + - date_open + - date_scheduled + - date_invoiced + - date_closed + - date_exported + - clm_total + - owner_owing + - converted + - ciecaid + - loss_date + - clm_ofc_nm + - clm_addr1 + - clm_addr2 + - clm_city + - clm_st + - clm_zip + - clm_ctry + - clm_ph1 + - clm_ph1x + - clm_ph2 + - clm_ph2x + - clm_fax + - clm_faxx + - clm_ct_ln + - clm_ct_fn + - clm_title + - clm_ct_ph + - clm_ct_phx + - clm_ea + - payee_nms + - pay_type + - pay_date + - pay_chknm + - pay_amt + - agt_co_id + - agt_co_nm + - agt_addr1 + - agt_addr2 + - agt_city + - agt_st + - agt_zip + - agt_ctry + - agt_ph1 + - agt_ph1x + - agt_ph2 + - agt_ph2x + - agt_fax + - agt_faxx + - agt_ct_ln + - agt_ct_fn + - agt_ct_ph + - agt_ct_phx + - agt_ea + - agt_lic_no + - loss_type + - loss_desc + - theft_ind + - cat_no + - tlos_ind + - cust_pr + - insd_ln + - insd_fn + - insd_title + - insd_co_nm + - insd_addr1 + - insd_addr2 + - insd_city + - insd_st + - insd_zip + - insd_ctry + - insd_ph1 + - insd_ph1x + - insd_ph2 + - insd_ph2x + - insd_fax + - insd_faxx + - insd_ea + - ownr_ln + - ownr_fn + - ownr_title + - ownr_co_nm + - ownr_addr1 + - ownr_addr2 + - ownr_city + - ownr_st + - ownr_zip + - ownr_ctry + - ownr_ph1 + - ownr_ph1x + - ownr_ph2 + - ownr_ph2x + - ownr_fax + - ownr_faxx + - ownr_ea + - area_of_damage + - loss_cat + - est_number + - service_car + - special_coverage_policy + - csr + - po_number + - unit_number + - kmin + - kmout + - referral_source + - selling_dealer + - servicing_dealer + - servicing_dealer_contact + - selling_dealer_contact + - depreciation_taxes + - federal_tax_payable + - other_amount_payable + - towing_payable + - storage_payable + - adjustment_bottom_line + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: jobs + schema: public + type: create_insert_permission diff --git a/hasura/migrations/1580343246214_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1580343246214_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..5e96a692b --- /dev/null +++ b/hasura/migrations/1580343246214_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,233 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_insert_permission +- args: + permission: + check: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + columns: + - id + - created_at + - updated_at + - shopid + - ro_number + - ownerid + - vehicleid + - labor_rate_id + - labor_rate_desc + - rate_lab + - rate_lad + - rate_lae + - rate_lar + - rate_las + - rate_laf + - rate_lam + - rate_lag + - rate_atp + - rate_lau + - rate_la1 + - rate_la2 + - rate_la3 + - rate_la4 + - rate_mapa + - rate_mash + - rate_mahw + - rate_ma2s + - rate_ma3s + - rate_ma2t + - rate_mabl + - rate_macs + - rate_matd + - federal_tax_rate + - state_tax_rate + - local_tax_rate + - est_co_nm + - est_addr1 + - est_addr2 + - est_city + - est_st + - est_zip + - est_ctry + - est_ph1 + - est_ea + - est_ct_ln + - est_ct_fn + - scheduled_in + - actual_in + - scheduled_completion + - actual_completion + - scheduled_delivery + - actual_delivery + - regie_number + - invoice_date + - claim_total + - deductible + - inproduction + - statusid + - ins_co_id + - ins_co_nm + - ins_addr1 + - ins_addr2 + - ins_city + - ins_st + - ins_zip + - ins_ctry + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_fax + - ins_faxx + - ins_ct_ln + - ins_ct_fn + - ins_title + - ins_ct_ph + - ins_ct_phx + - ins_ea + - ins_memo + - policy_no + - ded_amt + - ded_status + - asgn_no + - asgn_date + - asgn_type + - clm_no + - clm_ofc_id + - date_estimated + - date_open + - date_scheduled + - date_invoiced + - date_closed + - date_exported + - clm_total + - owner_owing + - converted + - ciecaid + - loss_date + - clm_ofc_nm + - clm_addr1 + - clm_addr2 + - clm_city + - clm_st + - clm_zip + - clm_ctry + - clm_ph1 + - clm_ph1x + - clm_ph2 + - clm_ph2x + - clm_fax + - clm_faxx + - clm_ct_ln + - clm_ct_fn + - clm_title + - clm_ct_ph + - clm_ct_phx + - clm_ea + - payee_nms + - pay_type + - pay_date + - pay_chknm + - pay_amt + - agt_co_id + - agt_co_nm + - agt_addr1 + - agt_addr2 + - agt_city + - agt_st + - agt_zip + - agt_ctry + - agt_ph1 + - agt_ph1x + - agt_ph2 + - agt_ph2x + - agt_fax + - agt_faxx + - agt_ct_ln + - agt_ct_fn + - agt_ct_ph + - agt_ct_phx + - agt_ea + - agt_lic_no + - loss_type + - loss_desc + - theft_ind + - cat_no + - tlos_ind + - cust_pr + - insd_ln + - insd_fn + - insd_title + - insd_co_nm + - insd_addr1 + - insd_addr2 + - insd_city + - insd_st + - insd_zip + - insd_ctry + - insd_ph1 + - insd_ph1x + - insd_ph2 + - insd_ph2x + - insd_fax + - insd_faxx + - insd_ea + - ownr_ln + - ownr_fn + - ownr_title + - ownr_co_nm + - ownr_addr1 + - ownr_addr2 + - ownr_city + - ownr_st + - ownr_zip + - ownr_ctry + - ownr_ph1 + - ownr_ph1x + - ownr_ph2 + - ownr_ph2x + - ownr_fax + - ownr_faxx + - ownr_ea + - area_of_damage + - loss_cat + - est_number + - service_car + - special_coverage_policy + - csr + - po_number + - unit_number + - kmin + - kmout + - referral_source + - selling_dealer + - servicing_dealer + - servicing_dealer_contact + - selling_dealer_contact + - depreciation_taxes + - federal_tax_payable + - other_amount_payable + - towing_payable + - storage_payable + - adjustment_bottom_line + - tax_pstthr + - tax_tow_rt + - tax_sub_rt + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: jobs + schema: public + type: create_insert_permission diff --git a/hasura/migrations/1580343251291_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1580343251291_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..e18ccedb9 --- /dev/null +++ b/hasura/migrations/1580343251291_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,228 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + columns: + - converted + - inproduction + - special_coverage_policy + - asgn_date + - invoice_date + - loss_date + - pay_date + - kmin + - kmout + - est_number + - area_of_damage + - adjustment_bottom_line + - claim_total + - clm_total + - ded_amt + - deductible + - depreciation_taxes + - federal_tax_payable + - federal_tax_rate + - local_tax_rate + - other_amount_payable + - owner_owing + - pay_amt + - rate_atp + - rate_la1 + - rate_la2 + - rate_la3 + - rate_la4 + - rate_lab + - rate_lad + - rate_lae + - rate_laf + - rate_lag + - rate_lam + - rate_lar + - rate_las + - rate_lau + - rate_ma2s + - rate_ma2t + - rate_ma3s + - rate_mabl + - rate_macs + - rate_mahw + - rate_mapa + - rate_mash + - rate_matd + - state_tax_rate + - storage_payable + - towing_payable + - agt_addr1 + - agt_addr2 + - agt_city + - agt_co_id + - agt_co_nm + - agt_ct_fn + - agt_ct_ln + - agt_ct_ph + - agt_ct_phx + - agt_ctry + - agt_ea + - agt_fax + - agt_faxx + - agt_lic_no + - agt_ph1 + - agt_ph1x + - agt_ph2 + - agt_ph2x + - agt_st + - agt_zip + - asgn_no + - asgn_type + - cat_no + - ciecaid + - clm_addr1 + - clm_addr2 + - clm_city + - clm_ct_fn + - clm_ct_ln + - clm_ct_ph + - clm_ct_phx + - clm_ctry + - clm_ea + - clm_fax + - clm_faxx + - clm_no + - clm_ofc_id + - clm_ofc_nm + - clm_ph1 + - clm_ph1x + - clm_ph2 + - clm_ph2x + - clm_st + - clm_title + - clm_zip + - csr + - cust_pr + - ded_status + - est_addr1 + - est_addr2 + - est_city + - est_co_nm + - est_ct_fn + - est_ct_ln + - est_ctry + - est_ea + - est_ph1 + - est_st + - est_zip + - ins_addr1 + - ins_addr2 + - ins_city + - ins_co_id + - ins_co_nm + - ins_ct_fn + - ins_ct_ln + - ins_ct_ph + - ins_ct_phx + - ins_ctry + - insd_addr1 + - insd_addr2 + - insd_city + - insd_co_nm + - insd_ctry + - insd_ea + - insd_fax + - insd_faxx + - insd_fn + - insd_ln + - insd_ph1 + - insd_ph1x + - insd_ph2 + - insd_ph2x + - insd_st + - insd_title + - insd_zip + - ins_ea + - ins_fax + - ins_faxx + - ins_memo + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_st + - ins_title + - ins_zip + - labor_rate_desc + - labor_rate_id + - loss_cat + - loss_desc + - loss_type + - ownr_addr1 + - ownr_addr2 + - ownr_city + - ownr_co_nm + - ownr_ctry + - ownr_ea + - ownr_fax + - ownr_faxx + - ownr_fn + - ownr_ln + - ownr_ph1 + - ownr_ph1x + - ownr_ph2 + - ownr_ph2x + - ownr_st + - ownr_title + - ownr_zip + - pay_chknm + - payee_nms + - pay_type + - policy_no + - po_number + - referral_source + - regie_number + - ro_number + - selling_dealer + - selling_dealer_contact + - service_car + - servicing_dealer + - servicing_dealer_contact + - theft_ind + - tlos_ind + - unit_number + - actual_completion + - actual_delivery + - actual_in + - created_at + - date_closed + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - scheduled_completion + - scheduled_delivery + - scheduled_in + - updated_at + - id + - ownerid + - shopid + - statusid + - vehicleid + computed_fields: [] + filter: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + role: user + table: + name: jobs + schema: public + type: create_select_permission diff --git a/hasura/migrations/1580343251291_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1580343251291_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..e7684a905 --- /dev/null +++ b/hasura/migrations/1580343251291_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,231 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + columns: + - converted + - inproduction + - special_coverage_policy + - theft_ind + - tlos_ind + - asgn_date + - invoice_date + - loss_date + - pay_date + - kmin + - kmout + - est_number + - area_of_damage + - adjustment_bottom_line + - claim_total + - clm_total + - ded_amt + - deductible + - depreciation_taxes + - federal_tax_payable + - federal_tax_rate + - local_tax_rate + - other_amount_payable + - owner_owing + - pay_amt + - rate_atp + - rate_la1 + - rate_la2 + - rate_la3 + - rate_la4 + - rate_lab + - rate_lad + - rate_lae + - rate_laf + - rate_lag + - rate_lam + - rate_lar + - rate_las + - rate_lau + - rate_ma2s + - rate_ma2t + - rate_ma3s + - rate_mabl + - rate_macs + - rate_mahw + - rate_mapa + - rate_mash + - rate_matd + - state_tax_rate + - storage_payable + - towing_payable + - agt_addr1 + - agt_addr2 + - agt_city + - agt_co_id + - agt_co_nm + - agt_ct_fn + - agt_ct_ln + - agt_ct_ph + - agt_ct_phx + - agt_ctry + - agt_ea + - agt_fax + - agt_faxx + - agt_lic_no + - agt_ph1 + - agt_ph1x + - agt_ph2 + - agt_ph2x + - agt_st + - agt_zip + - asgn_no + - asgn_type + - cat_no + - ciecaid + - clm_addr1 + - clm_addr2 + - clm_city + - clm_ct_fn + - clm_ct_ln + - clm_ct_ph + - clm_ct_phx + - clm_ctry + - clm_ea + - clm_fax + - clm_faxx + - clm_no + - clm_ofc_id + - clm_ofc_nm + - clm_ph1 + - clm_ph1x + - clm_ph2 + - clm_ph2x + - clm_st + - clm_title + - clm_zip + - csr + - cust_pr + - ded_status + - est_addr1 + - est_addr2 + - est_city + - est_co_nm + - est_ct_fn + - est_ct_ln + - est_ctry + - est_ea + - est_ph1 + - est_st + - est_zip + - ins_addr1 + - ins_addr2 + - ins_city + - ins_co_id + - ins_co_nm + - ins_ct_fn + - ins_ct_ln + - ins_ct_ph + - ins_ct_phx + - ins_ctry + - insd_addr1 + - insd_addr2 + - insd_city + - insd_co_nm + - insd_ctry + - insd_ea + - insd_fax + - insd_faxx + - insd_fn + - insd_ln + - insd_ph1 + - insd_ph1x + - insd_ph2 + - insd_ph2x + - insd_st + - insd_title + - insd_zip + - ins_ea + - ins_fax + - ins_faxx + - ins_memo + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_st + - ins_title + - ins_zip + - labor_rate_desc + - labor_rate_id + - loss_cat + - loss_desc + - loss_type + - ownr_addr1 + - ownr_addr2 + - ownr_city + - ownr_co_nm + - ownr_ctry + - ownr_ea + - ownr_fax + - ownr_faxx + - ownr_fn + - ownr_ln + - ownr_ph1 + - ownr_ph1x + - ownr_ph2 + - ownr_ph2x + - ownr_st + - ownr_title + - ownr_zip + - pay_chknm + - payee_nms + - pay_type + - policy_no + - po_number + - referral_source + - regie_number + - ro_number + - selling_dealer + - selling_dealer_contact + - service_car + - servicing_dealer + - servicing_dealer_contact + - unit_number + - actual_completion + - actual_delivery + - actual_in + - created_at + - date_closed + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - scheduled_completion + - scheduled_delivery + - scheduled_in + - updated_at + - id + - ownerid + - shopid + - statusid + - vehicleid + - tax_pstthr + - tax_sub_rt + - tax_tow_rt + computed_fields: [] + filter: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + role: user + table: + name: jobs + schema: public + type: create_select_permission diff --git a/hasura/migrations/1580343257730_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1580343257730_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..56280c418 --- /dev/null +++ b/hasura/migrations/1580343257730_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,230 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_update_permission +- args: + permission: + columns: + - converted + - inproduction + - special_coverage_policy + - asgn_date + - invoice_date + - loss_date + - pay_date + - kmin + - kmout + - est_number + - area_of_damage + - adjustment_bottom_line + - claim_total + - clm_total + - ded_amt + - deductible + - depreciation_taxes + - federal_tax_payable + - federal_tax_rate + - local_tax_rate + - other_amount_payable + - owner_owing + - pay_amt + - rate_atp + - rate_la1 + - rate_la2 + - rate_la3 + - rate_la4 + - rate_lab + - rate_lad + - rate_lae + - rate_laf + - rate_lag + - rate_lam + - rate_lar + - rate_las + - rate_lau + - rate_ma2s + - rate_ma2t + - rate_ma3s + - rate_mabl + - rate_macs + - rate_mahw + - rate_mapa + - rate_mash + - rate_matd + - state_tax_rate + - storage_payable + - towing_payable + - agt_addr1 + - agt_addr2 + - agt_city + - agt_co_id + - agt_co_nm + - agt_ct_fn + - agt_ct_ln + - agt_ct_ph + - agt_ct_phx + - agt_ctry + - agt_ea + - agt_fax + - agt_faxx + - agt_lic_no + - agt_ph1 + - agt_ph1x + - agt_ph2 + - agt_ph2x + - agt_st + - agt_zip + - asgn_no + - asgn_type + - cat_no + - ciecaid + - clm_addr1 + - clm_addr2 + - clm_city + - clm_ct_fn + - clm_ct_ln + - clm_ct_ph + - clm_ct_phx + - clm_ctry + - clm_ea + - clm_fax + - clm_faxx + - clm_no + - clm_ofc_id + - clm_ofc_nm + - clm_ph1 + - clm_ph1x + - clm_ph2 + - clm_ph2x + - clm_st + - clm_title + - clm_zip + - csr + - cust_pr + - ded_status + - est_addr1 + - est_addr2 + - est_city + - est_co_nm + - est_ct_fn + - est_ct_ln + - est_ctry + - est_ea + - est_ph1 + - est_st + - est_zip + - ins_addr1 + - ins_addr2 + - ins_city + - ins_co_id + - ins_co_nm + - ins_ct_fn + - ins_ct_ln + - ins_ct_ph + - ins_ct_phx + - ins_ctry + - insd_addr1 + - insd_addr2 + - insd_city + - insd_co_nm + - insd_ctry + - insd_ea + - insd_fax + - insd_faxx + - insd_fn + - insd_ln + - insd_ph1 + - insd_ph1x + - insd_ph2 + - insd_ph2x + - insd_st + - insd_title + - insd_zip + - ins_ea + - ins_fax + - ins_faxx + - ins_memo + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_st + - ins_title + - ins_zip + - labor_rate_desc + - labor_rate_id + - loss_cat + - loss_desc + - loss_type + - ownr_addr1 + - ownr_addr2 + - ownr_city + - ownr_co_nm + - ownr_ctry + - ownr_ea + - ownr_fax + - ownr_faxx + - ownr_fn + - ownr_ln + - ownr_ph1 + - ownr_ph1x + - ownr_ph2 + - ownr_ph2x + - ownr_st + - ownr_title + - ownr_zip + - pay_chknm + - payee_nms + - pay_type + - policy_no + - po_number + - referral_source + - regie_number + - ro_number + - selling_dealer + - selling_dealer_contact + - service_car + - servicing_dealer + - servicing_dealer_contact + - theft_ind + - tlos_ind + - unit_number + - actual_completion + - actual_delivery + - actual_in + - created_at + - date_closed + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - scheduled_completion + - scheduled_delivery + - scheduled_in + - updated_at + - id + - ownerid + - shopid + - statusid + - vehicleid + filter: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: jobs + schema: public + type: create_update_permission diff --git a/hasura/migrations/1580343257730_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1580343257730_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..8910ace88 --- /dev/null +++ b/hasura/migrations/1580343257730_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,233 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_update_permission +- args: + permission: + columns: + - converted + - inproduction + - special_coverage_policy + - theft_ind + - tlos_ind + - asgn_date + - invoice_date + - loss_date + - pay_date + - kmin + - kmout + - est_number + - area_of_damage + - adjustment_bottom_line + - claim_total + - clm_total + - ded_amt + - deductible + - depreciation_taxes + - federal_tax_payable + - federal_tax_rate + - local_tax_rate + - other_amount_payable + - owner_owing + - pay_amt + - rate_atp + - rate_la1 + - rate_la2 + - rate_la3 + - rate_la4 + - rate_lab + - rate_lad + - rate_lae + - rate_laf + - rate_lag + - rate_lam + - rate_lar + - rate_las + - rate_lau + - rate_ma2s + - rate_ma2t + - rate_ma3s + - rate_mabl + - rate_macs + - rate_mahw + - rate_mapa + - rate_mash + - rate_matd + - state_tax_rate + - storage_payable + - towing_payable + - agt_addr1 + - agt_addr2 + - agt_city + - agt_co_id + - agt_co_nm + - agt_ct_fn + - agt_ct_ln + - agt_ct_ph + - agt_ct_phx + - agt_ctry + - agt_ea + - agt_fax + - agt_faxx + - agt_lic_no + - agt_ph1 + - agt_ph1x + - agt_ph2 + - agt_ph2x + - agt_st + - agt_zip + - asgn_no + - asgn_type + - cat_no + - ciecaid + - clm_addr1 + - clm_addr2 + - clm_city + - clm_ct_fn + - clm_ct_ln + - clm_ct_ph + - clm_ct_phx + - clm_ctry + - clm_ea + - clm_fax + - clm_faxx + - clm_no + - clm_ofc_id + - clm_ofc_nm + - clm_ph1 + - clm_ph1x + - clm_ph2 + - clm_ph2x + - clm_st + - clm_title + - clm_zip + - csr + - cust_pr + - ded_status + - est_addr1 + - est_addr2 + - est_city + - est_co_nm + - est_ct_fn + - est_ct_ln + - est_ctry + - est_ea + - est_ph1 + - est_st + - est_zip + - ins_addr1 + - ins_addr2 + - ins_city + - ins_co_id + - ins_co_nm + - ins_ct_fn + - ins_ct_ln + - ins_ct_ph + - ins_ct_phx + - ins_ctry + - insd_addr1 + - insd_addr2 + - insd_city + - insd_co_nm + - insd_ctry + - insd_ea + - insd_fax + - insd_faxx + - insd_fn + - insd_ln + - insd_ph1 + - insd_ph1x + - insd_ph2 + - insd_ph2x + - insd_st + - insd_title + - insd_zip + - ins_ea + - ins_fax + - ins_faxx + - ins_memo + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_st + - ins_title + - ins_zip + - labor_rate_desc + - labor_rate_id + - loss_cat + - loss_desc + - loss_type + - ownr_addr1 + - ownr_addr2 + - ownr_city + - ownr_co_nm + - ownr_ctry + - ownr_ea + - ownr_fax + - ownr_faxx + - ownr_fn + - ownr_ln + - ownr_ph1 + - ownr_ph1x + - ownr_ph2 + - ownr_ph2x + - ownr_st + - ownr_title + - ownr_zip + - pay_chknm + - payee_nms + - pay_type + - policy_no + - po_number + - referral_source + - regie_number + - ro_number + - selling_dealer + - selling_dealer_contact + - service_car + - servicing_dealer + - servicing_dealer_contact + - unit_number + - actual_completion + - actual_delivery + - actual_in + - created_at + - date_closed + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - scheduled_completion + - scheduled_delivery + - scheduled_in + - updated_at + - id + - ownerid + - shopid + - statusid + - vehicleid + - tax_pstthr + - tax_sub_rt + - tax_tow_rt + filter: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: jobs + schema: public + type: create_update_permission