From 9d1164496dfed239e1c022a1c4e1ac6baf92f284 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Thu, 6 May 2021 15:29:50 -0700 Subject: [PATCH] IO-995 Update CSR to be a relationship. --- bodyshop_translations.babel | 42 +-- .../job-employee-assignments.component.jsx | 26 ++ .../job-employee-assignments.container.jsx | 3 + .../jobs-create-jobs-info.component.jsx | 3 - .../jobs-detail-general.component.jsx | 4 - ...production-board-kanban-card.component.jsx | 5 + .../production-list-columns.data.js | 20 +- ...n-list-columns.empassignment.component.jsx | 3 +- client/src/graphql/jobs.queries.js | 19 +- client/src/translations/en_us/common.json | 2 +- client/src/translations/es/common.json | 2 +- client/src/translations/fr/common.json | 2 +- .../down.yaml | 5 + .../up.yaml | 5 + .../down.yaml | 5 + .../up.yaml | 10 + .../down.yaml | 12 + .../up.yaml | 20 ++ .../down.yaml | 7 + .../up.yaml | 7 + .../down.yaml | 7 + .../up.yaml | 7 + .../down.yaml | 267 +++++++++++++++++ .../up.yaml | 267 +++++++++++++++++ .../down.yaml | 268 ++++++++++++++++++ .../up.yaml | 268 ++++++++++++++++++ .../down.yaml | 267 +++++++++++++++++ .../up.yaml | 267 +++++++++++++++++ .../down.yaml | 10 + .../up.yaml | 5 + hasura/migrations/metadata.yaml | 18 +- .../data/estimate_detail.query/content.query | 2 +- server/graphql-client/queries.js | 1 - 33 files changed, 1808 insertions(+), 48 deletions(-) create mode 100644 hasura/migrations/1620339418293_alter_table_public_jobs_add_column_employee_csr/down.yaml create mode 100644 hasura/migrations/1620339418293_alter_table_public_jobs_add_column_employee_csr/up.yaml create mode 100644 hasura/migrations/1620339439683_set_fk_public_jobs_employee_csr/down.yaml create mode 100644 hasura/migrations/1620339439683_set_fk_public_jobs_employee_csr/up.yaml create mode 100644 hasura/migrations/1620339458298_track_all_relationships/down.yaml create mode 100644 hasura/migrations/1620339458298_track_all_relationships/up.yaml create mode 100644 hasura/migrations/1620339475544_rename_relationship_employee_to_employee_csr_rel_schema_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1620339475544_rename_relationship_employee_to_employee_csr_rel_schema_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1620339507878_rename_relationship_jobs_to_jobsByEmployeeBody_schema_public_table_employees/down.yaml create mode 100644 hasura/migrations/1620339507878_rename_relationship_jobs_to_jobsByEmployeeBody_schema_public_table_employees/up.yaml create mode 100644 hasura/migrations/1620339722083_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1620339722083_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1620339734806_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1620339734806_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1620339746168_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1620339746168_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1620339757814_alter_table_public_jobs_drop_column_csr/down.yaml create mode 100644 hasura/migrations/1620339757814_alter_table_public_jobs_drop_column_csr/up.yaml diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index ee1956453..dedd14f92 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -16837,27 +16837,6 @@ - - csr - false - - - - - - en-US - false - - - es-MX - false - - - fr-CA - false - - - customerowing false @@ -17089,6 +17068,27 @@ + + employee_csr + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + employee_prep false diff --git a/client/src/components/job-employee-assignments/job-employee-assignments.component.jsx b/client/src/components/job-employee-assignments/job-employee-assignments.component.jsx index 40ee4dc45..966437a13 100644 --- a/client/src/components/job-employee-assignments/job-employee-assignments.component.jsx +++ b/client/src/components/job-employee-assignments/job-employee-assignments.component.jsx @@ -23,7 +23,9 @@ export function JobEmployeeAssignments({ jobRO, body, refinish, + prep, + csr, handleAdd, handleRemove, loading, @@ -155,6 +157,30 @@ export function JobEmployeeAssignments({ /> )} + + {csr ? ( + + {`${csr.first_name || ""} ${csr.last_name || ""}`} + !jobRO && handleRemove("csr")} + /> + + ) : ( + { + if (!jobRO) { + setAssignment({ operation: "csr" }); + setVisibility(true); + } + }} + /> + )} + ); diff --git a/client/src/components/job-employee-assignments/job-employee-assignments.container.jsx b/client/src/components/job-employee-assignments/job-employee-assignments.container.jsx index 510bb77c9..f841ed331 100644 --- a/client/src/components/job-employee-assignments/job-employee-assignments.container.jsx +++ b/client/src/components/job-employee-assignments/job-employee-assignments.container.jsx @@ -61,6 +61,7 @@ export default function JobEmployeeAssignmentsContainer({ job, refetch }) { body={job.employee_body_rel} refinish={job.employee_refinish_rel} prep={job.employee_prep_rel} + csr={job.employee_csr_rel} handleAdd={handleAdd} handleRemove={handleRemove} loading={loading} @@ -75,6 +76,8 @@ const determineFieldName = (operation) => { return "employee_body"; case "prep": return "employee_prep"; + case "csr": + return "employee_csr"; case "refinish": return "employee_refinish"; diff --git a/client/src/components/jobs-create-jobs-info/jobs-create-jobs-info.component.jsx b/client/src/components/jobs-create-jobs-info/jobs-create-jobs-info.component.jsx index 3e0771499..23202d3cd 100644 --- a/client/src/components/jobs-create-jobs-info/jobs-create-jobs-info.component.jsx +++ b/client/src/components/jobs-create-jobs-info/jobs-create-jobs-info.component.jsx @@ -146,9 +146,6 @@ export function JobsCreateJobsInfo({ bodyshop, form, selected }) { - - - diff --git a/client/src/components/jobs-detail-general/jobs-detail-general.component.jsx b/client/src/components/jobs-detail-general/jobs-detail-general.component.jsx index 6631381ab..8f209fd0d 100644 --- a/client/src/components/jobs-detail-general/jobs-detail-general.component.jsx +++ b/client/src/components/jobs-detail-general/jobs-detail-general.component.jsx @@ -207,10 +207,6 @@ export function JobsDetailGeneral({ bodyshop, jobRO, job, form }) { - - - - {bodyshop.md_categories.map((s) => ( diff --git a/client/src/components/production-board-kanban-card/production-board-kanban-card.component.jsx b/client/src/components/production-board-kanban-card/production-board-kanban-card.component.jsx index cedfb4d38..470cd3e26 100644 --- a/client/src/components/production-board-kanban-card/production-board-kanban-card.component.jsx +++ b/client/src/components/production-board-kanban-card/production-board-kanban-card.component.jsx @@ -67,6 +67,11 @@ export default function ProductionBoardCard(technician, card) { ? `${card.employee_refinish_rel.first_name} ${card.employee_refinish_rel.last_name}` : "" }`} + {`P: ${ + card.employee_csr_rel + ? `${card.employee_csr_rel.first_name} ${card.employee_csr_rel.last_name}` + : "" + }`} diff --git a/client/src/components/production-list-columns/production-list-columns.data.js b/client/src/components/production-list-columns/production-list-columns.data.js index 01d595a85..e5fa10398 100644 --- a/client/src/components/production-list-columns/production-list-columns.data.js +++ b/client/src/components/production-list-columns/production-list-columns.data.js @@ -167,14 +167,7 @@ const r = ({ technician, state }) => { key: "special_coverage_policy", ellipsis: true, }, - { - title: i18n.t("jobs.fields.csr"), - dataIndex: "csr", - key: "csr", - ellipsis: true, - sorter: (a, b) => alphaSort(a.csr, b.csr), - sortOrder: state.sortedInfo.columnKey === "csr" && state.sortedInfo.order, - }, + { title: i18n.t("jobs.fields.alt_transport"), dataIndex: "alt_transport", @@ -317,6 +310,17 @@ const r = ({ technician, state }) => { /> ), }, + { + title: i18n.t("jobs.fields.employee_csr"), + dataIndex: "employee_csr", + key: "employee_csr", + render: (text, record) => ( + + ), + }, { title: i18n.t("jobs.fields.employee_refinish"), dataIndex: "employee_refinish", diff --git a/client/src/components/production-list-columns/production-list-columns.empassignment.component.jsx b/client/src/components/production-list-columns/production-list-columns.empassignment.component.jsx index c7d47b14e..0b99973bc 100644 --- a/client/src/components/production-list-columns/production-list-columns.empassignment.component.jsx +++ b/client/src/components/production-list-columns/production-list-columns.empassignment.component.jsx @@ -158,7 +158,8 @@ const determineFieldName = (operation) => { return "employee_prep"; case "employee_refinish_rel": return "employee_refinish"; - + case "employee_csr_rel": + return "employee_csr"; default: return null; } diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js index c8fc0b778..66b902562 100644 --- a/client/src/graphql/jobs.queries.js +++ b/client/src/graphql/jobs.queries.js @@ -157,6 +157,11 @@ export const SUBSCRIPTION_JOBS_IN_PRODUCTION = gql` first_name last_name } + employee_csr_rel { + id + first_name + last_name + } partcount: joblines_aggregate(where: { removed: { _eq: false } }) { nodes { status @@ -344,9 +349,14 @@ export const GET_JOB_BY_PK = gql` first_name last_name } + employee_csr_rel { + id + first_name + last_name + } alt_transport intakechecklist - csr + loss_desc kmin kmout @@ -727,6 +737,11 @@ export const QUERY_JOB_CARD_DETAILS = gql` first_name last_name } + employee_csr_rel { + id + first_name + last_name + } notes { id text @@ -1054,7 +1069,7 @@ export const QUERY_ALL_JOB_FIELDS = gql` clm_title clm_total clm_zip - csr + cust_pr ded_amt ded_status diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index b25d5634c..59bc458cf 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1044,7 +1044,6 @@ "class": "Class", "clm_no": "Claim #", "clm_total": "Claim Total", - "csr": "Customer Service Rep.", "customerowing": "Customer Owing", "date_estimated": "Date Estimated", "date_exported": "Exported", @@ -1056,6 +1055,7 @@ "depreciation_taxes": "Depreciation/Taxes", "driveable": "Driveable", "employee_body": "Body", + "employee_csr": "Customer Service Rep.", "employee_prep": "Prep", "employee_refinish": "Refinish", "est_addr1": "Estimator Address", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 61f6f573e..c6901acae 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -1044,7 +1044,6 @@ "class": "", "clm_no": "Reclamación #", "clm_total": "Reclamar total", - "csr": "Representante de servicio al cliente.", "customerowing": "Cliente debido", "date_estimated": "Fecha estimada", "date_exported": "Exportado", @@ -1056,6 +1055,7 @@ "depreciation_taxes": "Depreciación / Impuestos", "driveable": "", "employee_body": "", + "employee_csr": "Representante de servicio al cliente.", "employee_prep": "", "employee_refinish": "", "est_addr1": "Dirección del tasador", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 8628dfc9c..2edb7ab0b 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -1044,7 +1044,6 @@ "class": "", "clm_no": "Prétendre #", "clm_total": "Total réclamation", - "csr": "représentant du service à la clientèle", "customerowing": "Client propriétaire", "date_estimated": "Date estimée", "date_exported": "Exportés", @@ -1056,6 +1055,7 @@ "depreciation_taxes": "Amortissement / taxes", "driveable": "", "employee_body": "", + "employee_csr": "représentant du service à la clientèle", "employee_prep": "", "employee_refinish": "", "est_addr1": "Adresse de l'évaluateur", diff --git a/hasura/migrations/1620339418293_alter_table_public_jobs_add_column_employee_csr/down.yaml b/hasura/migrations/1620339418293_alter_table_public_jobs_add_column_employee_csr/down.yaml new file mode 100644 index 000000000..bf81838a6 --- /dev/null +++ b/hasura/migrations/1620339418293_alter_table_public_jobs_add_column_employee_csr/down.yaml @@ -0,0 +1,5 @@ +- args: + cascade: false + read_only: false + sql: ALTER TABLE "public"."jobs" DROP COLUMN "employee_csr"; + type: run_sql diff --git a/hasura/migrations/1620339418293_alter_table_public_jobs_add_column_employee_csr/up.yaml b/hasura/migrations/1620339418293_alter_table_public_jobs_add_column_employee_csr/up.yaml new file mode 100644 index 000000000..56b5f03d5 --- /dev/null +++ b/hasura/migrations/1620339418293_alter_table_public_jobs_add_column_employee_csr/up.yaml @@ -0,0 +1,5 @@ +- args: + cascade: false + read_only: false + sql: ALTER TABLE "public"."jobs" ADD COLUMN "employee_csr" uuid NULL; + type: run_sql diff --git a/hasura/migrations/1620339439683_set_fk_public_jobs_employee_csr/down.yaml b/hasura/migrations/1620339439683_set_fk_public_jobs_employee_csr/down.yaml new file mode 100644 index 000000000..0bfbf1ab3 --- /dev/null +++ b/hasura/migrations/1620339439683_set_fk_public_jobs_employee_csr/down.yaml @@ -0,0 +1,5 @@ +- args: + cascade: false + read_only: false + sql: alter table "public"."jobs" drop constraint "jobs_employee_csr_fkey"; + type: run_sql diff --git a/hasura/migrations/1620339439683_set_fk_public_jobs_employee_csr/up.yaml b/hasura/migrations/1620339439683_set_fk_public_jobs_employee_csr/up.yaml new file mode 100644 index 000000000..0629c9977 --- /dev/null +++ b/hasura/migrations/1620339439683_set_fk_public_jobs_employee_csr/up.yaml @@ -0,0 +1,10 @@ +- args: + cascade: false + read_only: false + sql: |- + alter table "public"."jobs" + add constraint "jobs_employee_csr_fkey" + foreign key ("employee_csr") + references "public"."employees" + ("id") on update restrict on delete restrict; + type: run_sql diff --git a/hasura/migrations/1620339458298_track_all_relationships/down.yaml b/hasura/migrations/1620339458298_track_all_relationships/down.yaml new file mode 100644 index 000000000..c14530894 --- /dev/null +++ b/hasura/migrations/1620339458298_track_all_relationships/down.yaml @@ -0,0 +1,12 @@ +- args: + relationship: employee + table: + name: jobs + schema: public + type: drop_relationship +- args: + relationship: jobsByEmployeeCsr + table: + name: employees + schema: public + type: drop_relationship diff --git a/hasura/migrations/1620339458298_track_all_relationships/up.yaml b/hasura/migrations/1620339458298_track_all_relationships/up.yaml new file mode 100644 index 000000000..f83554491 --- /dev/null +++ b/hasura/migrations/1620339458298_track_all_relationships/up.yaml @@ -0,0 +1,20 @@ +- args: + name: employee + table: + name: jobs + schema: public + using: + foreign_key_constraint_on: employee_csr + type: create_object_relationship +- args: + name: jobsByEmployeeCsr + table: + name: employees + schema: public + using: + foreign_key_constraint_on: + column: employee_csr + table: + name: jobs + schema: public + type: create_array_relationship diff --git a/hasura/migrations/1620339475544_rename_relationship_employee_to_employee_csr_rel_schema_public_table_jobs/down.yaml b/hasura/migrations/1620339475544_rename_relationship_employee_to_employee_csr_rel_schema_public_table_jobs/down.yaml new file mode 100644 index 000000000..a201ccfd8 --- /dev/null +++ b/hasura/migrations/1620339475544_rename_relationship_employee_to_employee_csr_rel_schema_public_table_jobs/down.yaml @@ -0,0 +1,7 @@ +- args: + name: employee_csr_rel + new_name: employee + table: + name: jobs + schema: public + type: rename_relationship diff --git a/hasura/migrations/1620339475544_rename_relationship_employee_to_employee_csr_rel_schema_public_table_jobs/up.yaml b/hasura/migrations/1620339475544_rename_relationship_employee_to_employee_csr_rel_schema_public_table_jobs/up.yaml new file mode 100644 index 000000000..2c694c033 --- /dev/null +++ b/hasura/migrations/1620339475544_rename_relationship_employee_to_employee_csr_rel_schema_public_table_jobs/up.yaml @@ -0,0 +1,7 @@ +- args: + name: employee + new_name: employee_csr_rel + table: + name: jobs + schema: public + type: rename_relationship diff --git a/hasura/migrations/1620339507878_rename_relationship_jobs_to_jobsByEmployeeBody_schema_public_table_employees/down.yaml b/hasura/migrations/1620339507878_rename_relationship_jobs_to_jobsByEmployeeBody_schema_public_table_employees/down.yaml new file mode 100644 index 000000000..57f49ec3e --- /dev/null +++ b/hasura/migrations/1620339507878_rename_relationship_jobs_to_jobsByEmployeeBody_schema_public_table_employees/down.yaml @@ -0,0 +1,7 @@ +- args: + name: jobsByEmployeeBody + new_name: jobs + table: + name: employees + schema: public + type: rename_relationship diff --git a/hasura/migrations/1620339507878_rename_relationship_jobs_to_jobsByEmployeeBody_schema_public_table_employees/up.yaml b/hasura/migrations/1620339507878_rename_relationship_jobs_to_jobsByEmployeeBody_schema_public_table_employees/up.yaml new file mode 100644 index 000000000..b51b73d94 --- /dev/null +++ b/hasura/migrations/1620339507878_rename_relationship_jobs_to_jobsByEmployeeBody_schema_public_table_employees/up.yaml @@ -0,0 +1,7 @@ +- args: + name: jobs + new_name: jobsByEmployeeBody + table: + name: employees + schema: public + type: rename_relationship diff --git a/hasura/migrations/1620339722083_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1620339722083_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..1710da406 --- /dev/null +++ b/hasura/migrations/1620339722083_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,267 @@ +- 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: + - actual_completion + - actual_delivery + - actual_in + - adj_g_disc + - adj_strdis + - adj_towdis + - adjustment_bottom_line + - 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 + - alt_transport + - area_of_damage + - asgn_date + - asgn_no + - asgn_type + - ca_bc_pvrt + - ca_customer_gst + - ca_gst_registrant + - cat_no + - category + - cieca_stl + - cieca_ttl + - ciecaid + - class + - 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_total + - clm_zip + - converted + - created_at + - csr + - cust_pr + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - ded_amt + - ded_status + - deliverchecklist + - depreciation_taxes + - driveable + - employee_body + - employee_prep + - employee_refinish + - 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 + - federal_tax_rate + - g_bett_amt + - id + - inproduction + - 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 + - ins_ea + - ins_fax + - ins_faxx + - ins_memo + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_st + - ins_title + - ins_zip + - 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 + - intakechecklist + - invoice_allocation + - invoice_date + - job_totals + - kanbanparent + - kmin + - kmout + - labor_rate_desc + - labor_rate_id + - lbr_adjustments + - local_tax_rate + - loss_cat + - loss_date + - loss_desc + - loss_type + - other_amount_payable + - owner_owing + - ownerid + - 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 + - parts_tax_rates + - pay_amt + - pay_chknm + - pay_date + - pay_type + - payee_nms + - plate_no + - plate_st + - po_number + - policy_no + - production_vars + - queued_for_parts + - rate_la1 + - rate_la2 + - rate_la3 + - rate_la4 + - rate_laa + - 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 + - referral_source + - regie_number + - ro_number + - scheduled_completion + - scheduled_delivery + - scheduled_in + - selling_dealer + - selling_dealer_contact + - servicing_dealer + - servicing_dealer_contact + - shopid + - special_coverage_policy + - state_tax_rate + - status + - storage_payable + - tax_lbr_rt + - tax_levies_rt + - tax_paint_mat_rt + - tax_predis + - tax_prethr + - tax_pstthr + - tax_registration_number + - tax_shop_mat_rt + - tax_str_rt + - tax_sub_rt + - tax_thramt + - tax_tow_rt + - theft_ind + - tlos_ind + - towin + - towing_payable + - unit_number + - updated_at + - v_color + - v_make_desc + - v_model_desc + - v_model_yr + - v_vin + - vehicleid + - voided + set: {} + role: user + table: + name: jobs + schema: public + type: create_insert_permission diff --git a/hasura/migrations/1620339722083_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1620339722083_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..aa120c299 --- /dev/null +++ b/hasura/migrations/1620339722083_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,267 @@ +- 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: + - actual_completion + - actual_delivery + - actual_in + - adj_g_disc + - adj_strdis + - adj_towdis + - adjustment_bottom_line + - 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 + - alt_transport + - area_of_damage + - asgn_date + - asgn_no + - asgn_type + - ca_bc_pvrt + - ca_customer_gst + - ca_gst_registrant + - cat_no + - category + - cieca_stl + - cieca_ttl + - ciecaid + - class + - 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_total + - clm_zip + - converted + - created_at + - cust_pr + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - ded_amt + - ded_status + - deliverchecklist + - depreciation_taxes + - driveable + - employee_body + - employee_csr + - employee_prep + - employee_refinish + - 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 + - federal_tax_rate + - g_bett_amt + - id + - inproduction + - 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 + - ins_ea + - ins_fax + - ins_faxx + - ins_memo + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_st + - ins_title + - ins_zip + - 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 + - intakechecklist + - invoice_allocation + - invoice_date + - job_totals + - kanbanparent + - kmin + - kmout + - labor_rate_desc + - labor_rate_id + - lbr_adjustments + - local_tax_rate + - loss_cat + - loss_date + - loss_desc + - loss_type + - other_amount_payable + - owner_owing + - ownerid + - 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 + - parts_tax_rates + - pay_amt + - pay_chknm + - pay_date + - pay_type + - payee_nms + - plate_no + - plate_st + - po_number + - policy_no + - production_vars + - queued_for_parts + - rate_la1 + - rate_la2 + - rate_la3 + - rate_la4 + - rate_laa + - 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 + - referral_source + - regie_number + - ro_number + - scheduled_completion + - scheduled_delivery + - scheduled_in + - selling_dealer + - selling_dealer_contact + - servicing_dealer + - servicing_dealer_contact + - shopid + - special_coverage_policy + - state_tax_rate + - status + - storage_payable + - tax_lbr_rt + - tax_levies_rt + - tax_paint_mat_rt + - tax_predis + - tax_prethr + - tax_pstthr + - tax_registration_number + - tax_shop_mat_rt + - tax_str_rt + - tax_sub_rt + - tax_thramt + - tax_tow_rt + - theft_ind + - tlos_ind + - towin + - towing_payable + - unit_number + - updated_at + - v_color + - v_make_desc + - v_model_desc + - v_model_yr + - v_vin + - vehicleid + - voided + set: {} + role: user + table: + name: jobs + schema: public + type: create_insert_permission diff --git a/hasura/migrations/1620339734806_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1620339734806_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..211f64230 --- /dev/null +++ b/hasura/migrations/1620339734806_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,268 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: true + columns: + - actual_completion + - actual_delivery + - actual_in + - adj_g_disc + - adj_strdis + - adj_towdis + - adjustment_bottom_line + - 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 + - alt_transport + - area_of_damage + - asgn_date + - asgn_no + - asgn_type + - ca_bc_pvrt + - ca_customer_gst + - ca_gst_registrant + - cat_no + - category + - cieca_stl + - cieca_ttl + - ciecaid + - class + - 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_total + - clm_zip + - converted + - created_at + - csr + - cust_pr + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - ded_amt + - ded_status + - deliverchecklist + - depreciation_taxes + - driveable + - employee_body + - employee_prep + - employee_refinish + - 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 + - federal_tax_rate + - g_bett_amt + - id + - inproduction + - 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 + - ins_ea + - ins_fax + - ins_faxx + - ins_memo + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_st + - ins_title + - ins_zip + - 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 + - intakechecklist + - invoice_allocation + - invoice_date + - job_totals + - kanbanparent + - kmin + - kmout + - labor_rate_desc + - labor_rate_id + - lbr_adjustments + - local_tax_rate + - loss_cat + - loss_date + - loss_desc + - loss_type + - other_amount_payable + - owner_owing + - ownerid + - 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 + - parts_tax_rates + - pay_amt + - pay_chknm + - pay_date + - pay_type + - payee_nms + - plate_no + - plate_st + - po_number + - policy_no + - production_vars + - queued_for_parts + - rate_la1 + - rate_la2 + - rate_la3 + - rate_la4 + - rate_laa + - 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 + - referral_source + - regie_number + - ro_number + - scheduled_completion + - scheduled_delivery + - scheduled_in + - selling_dealer + - selling_dealer_contact + - servicing_dealer + - servicing_dealer_contact + - shopid + - special_coverage_policy + - state_tax_rate + - status + - storage_payable + - tax_lbr_rt + - tax_levies_rt + - tax_paint_mat_rt + - tax_predis + - tax_prethr + - tax_pstthr + - tax_registration_number + - tax_shop_mat_rt + - tax_str_rt + - tax_sub_rt + - tax_thramt + - tax_tow_rt + - theft_ind + - tlos_ind + - towin + - towing_payable + - unit_number + - updated_at + - v_color + - v_make_desc + - v_model_desc + - v_model_yr + - v_vin + - vehicleid + - voided + 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/1620339734806_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1620339734806_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..2358b2b3c --- /dev/null +++ b/hasura/migrations/1620339734806_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,268 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: true + columns: + - actual_completion + - actual_delivery + - actual_in + - adj_g_disc + - adj_strdis + - adj_towdis + - adjustment_bottom_line + - 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 + - alt_transport + - area_of_damage + - asgn_date + - asgn_no + - asgn_type + - ca_bc_pvrt + - ca_customer_gst + - ca_gst_registrant + - cat_no + - category + - cieca_stl + - cieca_ttl + - ciecaid + - class + - 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_total + - clm_zip + - converted + - created_at + - cust_pr + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - ded_amt + - ded_status + - deliverchecklist + - depreciation_taxes + - driveable + - employee_body + - employee_csr + - employee_prep + - employee_refinish + - 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 + - federal_tax_rate + - g_bett_amt + - id + - inproduction + - 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 + - ins_ea + - ins_fax + - ins_faxx + - ins_memo + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_st + - ins_title + - ins_zip + - 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 + - intakechecklist + - invoice_allocation + - invoice_date + - job_totals + - kanbanparent + - kmin + - kmout + - labor_rate_desc + - labor_rate_id + - lbr_adjustments + - local_tax_rate + - loss_cat + - loss_date + - loss_desc + - loss_type + - other_amount_payable + - owner_owing + - ownerid + - 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 + - parts_tax_rates + - pay_amt + - pay_chknm + - pay_date + - pay_type + - payee_nms + - plate_no + - plate_st + - po_number + - policy_no + - production_vars + - queued_for_parts + - rate_la1 + - rate_la2 + - rate_la3 + - rate_la4 + - rate_laa + - 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 + - referral_source + - regie_number + - ro_number + - scheduled_completion + - scheduled_delivery + - scheduled_in + - selling_dealer + - selling_dealer_contact + - servicing_dealer + - servicing_dealer_contact + - shopid + - special_coverage_policy + - state_tax_rate + - status + - storage_payable + - tax_lbr_rt + - tax_levies_rt + - tax_paint_mat_rt + - tax_predis + - tax_prethr + - tax_pstthr + - tax_registration_number + - tax_shop_mat_rt + - tax_str_rt + - tax_sub_rt + - tax_thramt + - tax_tow_rt + - theft_ind + - tlos_ind + - towin + - towing_payable + - unit_number + - updated_at + - v_color + - v_make_desc + - v_model_desc + - v_model_yr + - v_vin + - vehicleid + - voided + 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/1620339746168_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1620339746168_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..feed2e0f9 --- /dev/null +++ b/hasura/migrations/1620339746168_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,267 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_update_permission +- args: + permission: + columns: + - actual_completion + - actual_delivery + - actual_in + - adj_g_disc + - adj_strdis + - adj_towdis + - adjustment_bottom_line + - 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 + - alt_transport + - area_of_damage + - asgn_date + - asgn_no + - asgn_type + - ca_bc_pvrt + - ca_customer_gst + - ca_gst_registrant + - cat_no + - category + - cieca_stl + - cieca_ttl + - ciecaid + - class + - 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_total + - clm_zip + - converted + - created_at + - csr + - cust_pr + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - ded_amt + - ded_status + - deliverchecklist + - depreciation_taxes + - driveable + - employee_body + - employee_prep + - employee_refinish + - 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 + - federal_tax_rate + - g_bett_amt + - id + - inproduction + - 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 + - ins_ea + - ins_fax + - ins_faxx + - ins_memo + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_st + - ins_title + - ins_zip + - 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 + - intakechecklist + - invoice_allocation + - invoice_date + - job_totals + - kanbanparent + - kmin + - kmout + - labor_rate_desc + - labor_rate_id + - lbr_adjustments + - local_tax_rate + - loss_cat + - loss_date + - loss_desc + - loss_type + - other_amount_payable + - owner_owing + - ownerid + - 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 + - parts_tax_rates + - pay_amt + - pay_chknm + - pay_date + - pay_type + - payee_nms + - plate_no + - plate_st + - po_number + - policy_no + - production_vars + - queued_for_parts + - rate_la1 + - rate_la2 + - rate_la3 + - rate_la4 + - rate_laa + - 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 + - referral_source + - regie_number + - ro_number + - scheduled_completion + - scheduled_delivery + - scheduled_in + - selling_dealer + - selling_dealer_contact + - servicing_dealer + - servicing_dealer_contact + - shopid + - special_coverage_policy + - state_tax_rate + - status + - storage_payable + - tax_lbr_rt + - tax_levies_rt + - tax_paint_mat_rt + - tax_predis + - tax_prethr + - tax_pstthr + - tax_registration_number + - tax_shop_mat_rt + - tax_str_rt + - tax_sub_rt + - tax_thramt + - tax_tow_rt + - theft_ind + - tlos_ind + - towin + - towing_payable + - unit_number + - updated_at + - v_color + - v_make_desc + - v_model_desc + - v_model_yr + - v_vin + - vehicleid + - voided + filter: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + set: {} + role: user + table: + name: jobs + schema: public + type: create_update_permission diff --git a/hasura/migrations/1620339746168_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1620339746168_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..e9db7d0e7 --- /dev/null +++ b/hasura/migrations/1620339746168_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,267 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_update_permission +- args: + permission: + columns: + - actual_completion + - actual_delivery + - actual_in + - adj_g_disc + - adj_strdis + - adj_towdis + - adjustment_bottom_line + - 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 + - alt_transport + - area_of_damage + - asgn_date + - asgn_no + - asgn_type + - ca_bc_pvrt + - ca_customer_gst + - ca_gst_registrant + - cat_no + - category + - cieca_stl + - cieca_ttl + - ciecaid + - class + - 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_total + - clm_zip + - converted + - created_at + - cust_pr + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - ded_amt + - ded_status + - deliverchecklist + - depreciation_taxes + - driveable + - employee_body + - employee_csr + - employee_prep + - employee_refinish + - 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 + - federal_tax_rate + - g_bett_amt + - id + - inproduction + - 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 + - ins_ea + - ins_fax + - ins_faxx + - ins_memo + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_st + - ins_title + - ins_zip + - 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 + - intakechecklist + - invoice_allocation + - invoice_date + - job_totals + - kanbanparent + - kmin + - kmout + - labor_rate_desc + - labor_rate_id + - lbr_adjustments + - local_tax_rate + - loss_cat + - loss_date + - loss_desc + - loss_type + - other_amount_payable + - owner_owing + - ownerid + - 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 + - parts_tax_rates + - pay_amt + - pay_chknm + - pay_date + - pay_type + - payee_nms + - plate_no + - plate_st + - po_number + - policy_no + - production_vars + - queued_for_parts + - rate_la1 + - rate_la2 + - rate_la3 + - rate_la4 + - rate_laa + - 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 + - referral_source + - regie_number + - ro_number + - scheduled_completion + - scheduled_delivery + - scheduled_in + - selling_dealer + - selling_dealer_contact + - servicing_dealer + - servicing_dealer_contact + - shopid + - special_coverage_policy + - state_tax_rate + - status + - storage_payable + - tax_lbr_rt + - tax_levies_rt + - tax_paint_mat_rt + - tax_predis + - tax_prethr + - tax_pstthr + - tax_registration_number + - tax_shop_mat_rt + - tax_str_rt + - tax_sub_rt + - tax_thramt + - tax_tow_rt + - theft_ind + - tlos_ind + - towin + - towing_payable + - unit_number + - updated_at + - v_color + - v_make_desc + - v_model_desc + - v_model_yr + - v_vin + - vehicleid + - voided + filter: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + set: {} + role: user + table: + name: jobs + schema: public + type: create_update_permission diff --git a/hasura/migrations/1620339757814_alter_table_public_jobs_drop_column_csr/down.yaml b/hasura/migrations/1620339757814_alter_table_public_jobs_drop_column_csr/down.yaml new file mode 100644 index 000000000..45b7e688e --- /dev/null +++ b/hasura/migrations/1620339757814_alter_table_public_jobs_drop_column_csr/down.yaml @@ -0,0 +1,10 @@ +- args: + cascade: false + read_only: false + sql: ALTER TABLE "public"."jobs" ADD COLUMN "csr" text; + type: run_sql +- args: + cascade: false + read_only: false + sql: ALTER TABLE "public"."jobs" ALTER COLUMN "csr" DROP NOT NULL; + type: run_sql diff --git a/hasura/migrations/1620339757814_alter_table_public_jobs_drop_column_csr/up.yaml b/hasura/migrations/1620339757814_alter_table_public_jobs_drop_column_csr/up.yaml new file mode 100644 index 000000000..b4f196cf1 --- /dev/null +++ b/hasura/migrations/1620339757814_alter_table_public_jobs_drop_column_csr/up.yaml @@ -0,0 +1,5 @@ +- args: + cascade: false + read_only: false + sql: ALTER TABLE "public"."jobs" DROP COLUMN "csr" CASCADE; + type: run_sql diff --git a/hasura/migrations/metadata.yaml b/hasura/migrations/metadata.yaml index b726a8d2a..bc7da1736 100644 --- a/hasura/migrations/metadata.yaml +++ b/hasura/migrations/metadata.yaml @@ -1632,13 +1632,20 @@ tables: table: schema: public name: allocations - - name: jobs + - name: jobsByEmployeeBody using: foreign_key_constraint_on: column: employee_body table: schema: public name: jobs + - name: jobsByEmployeeCsr + using: + foreign_key_constraint_on: + column: employee_csr + table: + schema: public + name: jobs - name: jobsByEmployeePrep using: foreign_key_constraint_on: @@ -2204,6 +2211,9 @@ tables: - name: employee_body_rel using: foreign_key_constraint_on: employee_body + - name: employee_csr_rel + using: + foreign_key_constraint_on: employee_csr - name: employee_prep_rel using: foreign_key_constraint_on: employee_prep @@ -2401,7 +2411,6 @@ tables: - clm_zip - converted - created_at - - csr - cust_pr - date_estimated - date_exported @@ -2414,6 +2423,7 @@ tables: - depreciation_taxes - driveable - employee_body + - employee_csr - employee_prep - employee_refinish - est_addr1 @@ -2648,7 +2658,6 @@ tables: - clm_zip - converted - created_at - - csr - cust_pr - date_estimated - date_exported @@ -2661,6 +2670,7 @@ tables: - depreciation_taxes - driveable - employee_body + - employee_csr - employee_prep - employee_refinish - est_addr1 @@ -2905,7 +2915,6 @@ tables: - clm_zip - converted - created_at - - csr - cust_pr - date_estimated - date_exported @@ -2918,6 +2927,7 @@ tables: - depreciation_taxes - driveable - employee_body + - employee_csr - employee_prep - employee_refinish - est_addr1 diff --git a/jsreport/data/estimate_detail.query/content.query b/jsreport/data/estimate_detail.query/content.query index f0a2d7657..768b4b6c3 100644 --- a/jsreport/data/estimate_detail.query/content.query +++ b/jsreport/data/estimate_detail.query/content.query @@ -1,6 +1,6 @@ query TEMPLATE_ESTIMATE_DETAIL($id: uuid!) { jobs_by_pk(id: $id) { - csr + ded_amt ded_status id diff --git a/server/graphql-client/queries.js b/server/graphql-client/queries.js index 722bd476b..fc0260750 100644 --- a/server/graphql-client/queries.js +++ b/server/graphql-client/queries.js @@ -415,7 +415,6 @@ exports.GET_JOB_BY_PK = ` query GET_JOB_BY_PK($id: uuid!) { updated_at alt_transport intakechecklist - csr loss_desc kmin kmout