Remove unneeded vendor fields IO-641

This commit is contained in:
Patrick Fic
2021-02-16 10:38:26 -08:00
parent 8c69be8923
commit 1201d78d99
15 changed files with 308 additions and 24 deletions

View File

@@ -99,21 +99,9 @@ export default function VendorsFormComponent({
<Form.Item label={t("vendors.fields.discount")} name="discount">
<InputNumber min={0} max={1} precision={2} />
</Form.Item>
<Form.Item label={t("vendors.fields.terms")} name="terms">
<Input />
</Form.Item>
<Form.Item label={t("vendors.fields.due_date")} name="due_date">
<InputNumber />
</Form.Item>
<Form.Item label={t("vendors.fields.taxid")} name="taxid">
<Input />
</Form.Item>
<Form.Item
label={t("vendors.fields.prompt_discount")}
name="prompt_discount"
>
<InputNumber max={1} precision={2} />
</Form.Item>
<Form.Item
label={t("vendors.fields.cost_center")}
rules={[

View File

@@ -4,11 +4,8 @@ export const QUERY_VENDOR_BY_ID = gql`
query QUERY_VENDOR_BY_ID($id: uuid!) {
vendors_by_pk(id: $id) {
zip
terms
taxid
street2
state
prompt_discount
name
id
favorite

View File

@@ -0,0 +1,44 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_insert_permission
- args:
permission:
check:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- bodyshopid
- city
- cost_center
- country
- created_at
- discount
- due_date
- email
- favorite
- id
- name
- phone
- prompt_discount
- state
- street1
- street2
- taxid
- terms
- updated_at
- zip
set: {}
role: user
table:
name: vendors
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,41 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_insert_permission
- args:
permission:
check:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- bodyshopid
- city
- cost_center
- country
- created_at
- discount
- due_date
- email
- favorite
- id
- name
- phone
- state
- street1
- street2
- updated_at
- zip
set: {}
role: user
table:
name: vendors
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,45 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- bodyshopid
- city
- cost_center
- country
- created_at
- discount
- due_date
- email
- favorite
- id
- name
- phone
- prompt_discount
- state
- street1
- street2
- taxid
- terms
- updated_at
- zip
computed_fields: []
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: vendors
schema: public
type: create_select_permission

View File

@@ -0,0 +1,42 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- bodyshopid
- city
- cost_center
- country
- created_at
- discount
- due_date
- email
- favorite
- id
- name
- phone
- state
- street1
- street2
- updated_at
- zip
computed_fields: []
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: vendors
schema: public
type: create_select_permission

View File

@@ -0,0 +1,44 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_update_permission
- args:
permission:
columns:
- bodyshopid
- city
- cost_center
- country
- created_at
- discount
- due_date
- email
- favorite
- id
- name
- phone
- prompt_discount
- state
- street1
- street2
- taxid
- terms
- updated_at
- zip
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
set: {}
role: user
table:
name: vendors
schema: public
type: create_update_permission

View File

@@ -0,0 +1,41 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_update_permission
- args:
permission:
columns:
- bodyshopid
- city
- cost_center
- country
- created_at
- discount
- due_date
- email
- favorite
- id
- name
- phone
- state
- street1
- street2
- updated_at
- zip
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
set: {}
role: user
table:
name: vendors
schema: public
type: create_update_permission

View File

@@ -0,0 +1,10 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."vendors" ADD COLUMN "terms" text;
type: run_sql
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."vendors" ALTER COLUMN "terms" DROP NOT NULL;
type: run_sql

View File

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

View File

@@ -0,0 +1,16 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."vendors" ADD COLUMN "prompt_discount" numeric;
type: run_sql
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."vendors" ALTER COLUMN "prompt_discount" DROP NOT NULL;
type: run_sql
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."vendors" ALTER COLUMN "prompt_discount" SET DEFAULT
0;
type: run_sql

View File

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

View File

@@ -0,0 +1,10 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."vendors" ADD COLUMN "taxid" text;
type: run_sql
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."vendors" ALTER COLUMN "taxid" DROP NOT NULL;
type: run_sql

View File

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

View File

@@ -4081,12 +4081,9 @@ tables:
- id
- name
- phone
- prompt_discount
- state
- street1
- street2
- taxid
- terms
- updated_at
- zip
select_permissions:
@@ -4105,12 +4102,9 @@ tables:
- id
- name
- phone
- prompt_discount
- state
- street1
- street2
- taxid
- terms
- updated_at
- zip
filter:
@@ -4138,12 +4132,9 @@ tables:
- id
- name
- phone
- prompt_discount
- state
- street1
- street2
- taxid
- terms
- updated_at
- zip
filter: