Jobs list page updates & note adding modal.

This commit is contained in:
Patrick Fic
2020-01-13 22:08:06 -08:00
parent f7aa89496a
commit bee4f630c4
41 changed files with 2281 additions and 260 deletions

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" DROP COLUMN "clm_total";
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" ADD COLUMN "clm_total" numeric NULL;
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" DROP COLUMN "owner_owing";
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" ADD COLUMN "owner_owing" numeric NULL;
type: run_sql

View File

@@ -0,0 +1,120 @@
- 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:
- ded_status
- inproduction
- asgn_date
- invoice_date
- claim_total
- ded_amt
- deductible
- federal_tax_rate
- local_tax_rate
- 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
- asgn_no
- asgn_type
- clm_no
- clm_ofc_id
- est_addr1
- est_addr2
- est_city
- est_co_nm
- est_ct_fn
- est_ct_ln
- est_ctry
- est_ea
- est_number
- 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
- 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
- pit_owner_email
- pit_owner_first_name
- pit_owner_last_name
- pit_owner_phone
- pit_vehicle_plate_no
- policy_no
- regie_number
- ro_number
- actual_completion
- actual_delivery
- actual_in
- scheduled_completion
- scheduled_delivery
- scheduled_in
- created_at
- updated_at
- id
- ownerid
- shopid
- statusid
- vehicleid
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: jobs
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,128 @@
- 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
- est_number
- 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
- pit_owner_first_name
- pit_owner_last_name
- pit_owner_phone
- pit_owner_email
- pit_vehicle_plate_no
- 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
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: jobs
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,118 @@
- args:
role: user
table:
name: jobs
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- ded_status
- inproduction
- asgn_date
- invoice_date
- claim_total
- ded_amt
- deductible
- federal_tax_rate
- local_tax_rate
- 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
- asgn_no
- asgn_type
- clm_no
- clm_ofc_id
- est_addr1
- est_addr2
- est_city
- est_co_nm
- est_ct_fn
- est_ct_ln
- est_ctry
- est_ea
- est_number
- 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
- 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
- pit_owner_email
- pit_owner_first_name
- pit_owner_last_name
- pit_owner_phone
- pit_vehicle_plate_no
- policy_no
- regie_number
- ro_number
- actual_completion
- actual_delivery
- actual_in
- scheduled_completion
- scheduled_delivery
- scheduled_in
- created_at
- 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

View File

@@ -0,0 +1,126 @@
- args:
role: user
table:
name: jobs
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- ded_status
- inproduction
- asgn_date
- invoice_date
- claim_total
- clm_total
- ded_amt
- deductible
- federal_tax_rate
- local_tax_rate
- owner_owing
- 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
- asgn_no
- asgn_type
- clm_no
- clm_ofc_id
- est_addr1
- est_addr2
- est_city
- est_co_nm
- est_ct_fn
- est_ct_ln
- est_ctry
- est_ea
- est_number
- 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
- 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
- pit_owner_email
- pit_owner_first_name
- pit_owner_last_name
- pit_owner_phone
- pit_vehicle_plate_no
- policy_no
- regie_number
- ro_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

View File

@@ -0,0 +1,120 @@
- args:
role: user
table:
name: jobs
schema: public
type: drop_update_permission
- args:
permission:
columns:
- ded_status
- inproduction
- asgn_date
- invoice_date
- claim_total
- ded_amt
- deductible
- federal_tax_rate
- local_tax_rate
- 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
- asgn_no
- asgn_type
- clm_no
- clm_ofc_id
- est_addr1
- est_addr2
- est_city
- est_co_nm
- est_ct_fn
- est_ct_ln
- est_ctry
- est_ea
- est_number
- 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
- 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
- pit_owner_email
- pit_owner_first_name
- pit_owner_last_name
- pit_owner_phone
- pit_vehicle_plate_no
- policy_no
- regie_number
- ro_number
- actual_completion
- actual_delivery
- actual_in
- scheduled_completion
- scheduled_delivery
- scheduled_in
- created_at
- 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

View File

@@ -0,0 +1,128 @@
- args:
role: user
table:
name: jobs
schema: public
type: drop_update_permission
- args:
permission:
columns:
- ded_status
- inproduction
- asgn_date
- invoice_date
- claim_total
- clm_total
- ded_amt
- deductible
- federal_tax_rate
- local_tax_rate
- owner_owing
- 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
- asgn_no
- asgn_type
- clm_no
- clm_ofc_id
- est_addr1
- est_addr2
- est_city
- est_co_nm
- est_ct_fn
- est_ct_ln
- est_ctry
- est_ea
- est_number
- 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
- 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
- pit_owner_email
- pit_owner_first_name
- pit_owner_last_name
- pit_owner_phone
- pit_vehicle_plate_no
- policy_no
- regie_number
- ro_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

View File

@@ -0,0 +1,3 @@
- args:
sql: DROP TABLE "public"."notes"
type: run_sql

View File

@@ -0,0 +1,21 @@
- args:
sql: CREATE EXTENSION IF NOT EXISTS pgcrypto;
type: run_sql
- args:
sql: "CREATE TABLE \"public\".\"notes\"(\"id\" uuid NOT NULL DEFAULT gen_random_uuid(),
\"created_at\" timestamptz NOT NULL DEFAULT now(), \"updated_at\" timestamptz
NOT NULL DEFAULT now(), \"jobid\" uuid NOT NULL, \"text\" text, \"created_by\"
text NOT NULL, \"critical\" boolean NOT NULL DEFAULT false, \"private\" boolean
NOT NULL DEFAULT false, PRIMARY KEY (\"id\") , FOREIGN KEY (\"jobid\") REFERENCES
\"public\".\"jobs\"(\"id\") ON UPDATE cascade ON DELETE cascade);\nCREATE OR
REPLACE FUNCTION \"public\".\"set_current_timestamp_updated_at\"()\nRETURNS
TRIGGER AS $$\nDECLARE\n _new record;\nBEGIN\n _new := NEW;\n _new.\"updated_at\"
= NOW();\n RETURN _new;\nEND;\n$$ LANGUAGE plpgsql;\nCREATE TRIGGER \"set_public_notes_updated_at\"\nBEFORE
UPDATE ON \"public\".\"notes\"\nFOR EACH ROW\nEXECUTE PROCEDURE \"public\".\"set_current_timestamp_updated_at\"();\nCOMMENT
ON TRIGGER \"set_public_notes_updated_at\" ON \"public\".\"notes\" \nIS 'trigger
to set value of column \"updated_at\" to current timestamp on row update';\n"
type: run_sql
- args:
name: notes
schema: public
type: add_existing_table_or_view

View File

@@ -0,0 +1,12 @@
- args:
relationship: notes
table:
name: jobs
schema: public
type: drop_relationship
- args:
relationship: job
table:
name: notes
schema: public
type: drop_relationship

View File

@@ -0,0 +1,20 @@
- args:
name: notes
table:
name: jobs
schema: public
using:
foreign_key_constraint_on:
column: jobid
table:
name: notes
schema: public
type: create_array_relationship
- args:
name: job
table:
name: notes
schema: public
using:
foreign_key_constraint_on: jobid
type: create_object_relationship

View File

@@ -0,0 +1,6 @@
- args:
role: user
table:
name: notes
schema: public
type: drop_insert_permission

View File

@@ -0,0 +1,31 @@
- args:
permission:
allow_upsert: true
check:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- id
- created_at
- updated_at
- jobid
- text
- created_by
- critical
- private
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: notes
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,6 @@
- args:
role: user
table:
name: notes
schema: public
type: drop_select_permission

View File

@@ -0,0 +1,28 @@
- args:
permission:
allow_aggregations: false
columns:
- critical
- private
- created_by
- text
- created_at
- updated_at
- id
- jobid
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
limit: null
role: user
table:
name: notes
schema: public
type: create_select_permission

View File

@@ -0,0 +1,6 @@
- args:
role: user
table:
name: notes
schema: public
type: drop_update_permission

View File

@@ -0,0 +1,30 @@
- args:
permission:
columns:
- critical
- private
- created_by
- text
- created_at
- updated_at
- id
- jobid
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: notes
schema: public
type: create_update_permission

View File

@@ -0,0 +1,6 @@
- args:
role: user
table:
name: notes
schema: public
type: drop_delete_permission

View File

@@ -0,0 +1,17 @@
- args:
permission:
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: notes
schema: public
type: create_delete_permission

View File

@@ -0,0 +1,4 @@
- args:
sql: "\n alter table \"public\".\"notes\" drop constraint \"notes_created_by_fkey\"\n
\ "
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
sql: "\n alter table \"public\".\"notes\"\n add constraint
\"notes_created_by_fkey\"\n foreign key (\"created_by\")\n references
\"public\".\"users\"\n (\"email\") on update cascade on delete cascade;\n
\ "
type: run_sql