Added parts returning as a part of BOD-19

This commit is contained in:
Patrick Fic
2020-05-14 15:46:48 -07:00
parent cc47fd698a
commit 87146fa08d
34 changed files with 816 additions and 184 deletions

View File

@@ -0,0 +1,5 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."parts_orders" DROP COLUMN "return";
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."parts_orders" ADD COLUMN "return" boolean NOT NULL
DEFAULT false;
type: run_sql

View File

@@ -0,0 +1,38 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_insert_permission
- args:
permission:
check:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- deliver_by
- order_date
- order_number
- status
- user_email
- created_at
- updated_at
- id
- jobid
- vendorid
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: parts_orders
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,39 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_insert_permission
- args:
permission:
check:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- created_at
- deliver_by
- id
- jobid
- order_date
- order_number
- return
- status
- updated_at
- user_email
- vendorid
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: parts_orders
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,36 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- deliver_by
- order_date
- order_number
- status
- user_email
- created_at
- updated_at
- id
- jobid
- vendorid
computed_fields: []
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: parts_orders
schema: public
type: create_select_permission

View File

@@ -0,0 +1,37 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- created_at
- deliver_by
- id
- jobid
- order_date
- order_number
- return
- status
- updated_at
- user_email
- vendorid
computed_fields: []
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: parts_orders
schema: public
type: create_select_permission

View File

@@ -0,0 +1,5 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."parts_orders" DROP COLUMN "returnfrominvoice";
type: run_sql

View File

@@ -0,0 +1,5 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."parts_orders" ADD COLUMN "returnfrominvoice" uuid NULL;
type: run_sql

View File

@@ -0,0 +1,5 @@
- args:
cascade: false
read_only: false
sql: alter table "public"."parts_orders" drop constraint "parts_orders_returnfrominvoice_fkey";
type: run_sql

View File

@@ -0,0 +1,10 @@
- args:
cascade: false
read_only: false
sql: |-
alter table "public"."parts_orders"
add constraint "parts_orders_returnfrominvoice_fkey"
foreign key ("returnfrominvoice")
references "public"."invoices"
("id") on update restrict on delete restrict;
type: run_sql

View File

@@ -0,0 +1,12 @@
- args:
relationship: parts_orders
table:
name: invoices
schema: public
type: drop_relationship
- args:
relationship: invoice
table:
name: parts_orders
schema: public
type: drop_relationship

View File

@@ -0,0 +1,20 @@
- args:
name: parts_orders
table:
name: invoices
schema: public
using:
foreign_key_constraint_on:
column: returnfrominvoice
table:
name: parts_orders
schema: public
type: create_array_relationship
- args:
name: invoice
table:
name: parts_orders
schema: public
using:
foreign_key_constraint_on: returnfrominvoice
type: create_object_relationship

View File

@@ -0,0 +1,39 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_insert_permission
- args:
permission:
check:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- created_at
- deliver_by
- id
- jobid
- order_date
- order_number
- return
- status
- updated_at
- user_email
- vendorid
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: parts_orders
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,40 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_insert_permission
- args:
permission:
check:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- created_at
- deliver_by
- id
- jobid
- order_date
- order_number
- return
- returnfrominvoice
- status
- updated_at
- user_email
- vendorid
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: parts_orders
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,37 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- created_at
- deliver_by
- id
- jobid
- order_date
- order_number
- return
- status
- updated_at
- user_email
- vendorid
computed_fields: []
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: parts_orders
schema: public
type: create_select_permission

View File

@@ -0,0 +1,38 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- created_at
- deliver_by
- id
- jobid
- order_date
- order_number
- return
- returnfrominvoice
- status
- updated_at
- user_email
- vendorid
computed_fields: []
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: parts_orders
schema: public
type: create_select_permission

View File

@@ -0,0 +1,38 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_update_permission
- args:
permission:
columns:
- deliver_by
- order_date
- order_number
- status
- user_email
- created_at
- updated_at
- id
- jobid
- vendorid
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: parts_orders
schema: public
type: create_update_permission

View File

@@ -0,0 +1,39 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_update_permission
- args:
permission:
columns:
- created_at
- deliver_by
- id
- jobid
- order_date
- order_number
- returnfrominvoice
- status
- updated_at
- user_email
- vendorid
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: parts_orders
schema: public
type: create_update_permission

View File

@@ -1188,6 +1188,13 @@ tables:
table:
schema: public
name: invoicelines
- name: parts_orders
using:
foreign_key_constraint_on:
column: returnfrominvoice
table:
schema: public
name: parts_orders
insert_permissions:
- role: user
permission:
@@ -2837,6 +2844,9 @@ tables:
schema: public
name: parts_orders
object_relationships:
- name: invoice
using:
foreign_key_constraint_on: returnfrominvoice
- name: job
using:
foreign_key_constraint_on: jobid
@@ -2868,29 +2878,33 @@ tables:
- active:
_eq: true
columns:
- deliver_by
- order_date
- order_number
- status
- user_email
- created_at
- updated_at
- deliver_by
- id
- jobid
- order_date
- order_number
- return
- returnfrominvoice
- status
- updated_at
- user_email
- vendorid
select_permissions:
- role: user
permission:
columns:
- deliver_by
- order_date
- order_number
- status
- user_email
- created_at
- updated_at
- deliver_by
- id
- jobid
- order_date
- order_number
- return
- returnfrominvoice
- status
- updated_at
- user_email
- vendorid
filter:
job:
@@ -2906,15 +2920,16 @@ tables:
- role: user
permission:
columns:
- deliver_by
- order_date
- order_number
- status
- user_email
- created_at
- updated_at
- deliver_by
- id
- jobid
- order_date
- order_number
- returnfrominvoice
- status
- updated_at
- user_email
- vendorid
filter:
job: