IO-794 Add vendor active field

This commit is contained in:
Patrick Fic
2021-03-22 17:48:24 -07:00
parent 43a266c463
commit aced67f835
15 changed files with 309 additions and 4 deletions

View File

@@ -16,6 +16,7 @@ export const QUERY_VENDOR_BY_ID = gql`
cost_center
city
street1
active
phone
}
}
@@ -39,6 +40,7 @@ export const QUERY_ALL_VENDORS = gql`
cost_center
city
phone
active
}
}
`;
@@ -65,13 +67,14 @@ export const DELETE_VENDOR = gql`
export const QUERY_ALL_VENDORS_FOR_ORDER = gql`
query QUERY_ALL_VENDORS_FOR_ORDER($jobId: uuid) {
vendors(order_by: { name: asc }) {
vendors(order_by: { name: asc }, where: { active: { _eq: true } }) {
name
cost_center
id
favorite
discount
email
active
}
jobs(where: { id: { _eq: $jobId } }) {
v_make_desc
@@ -81,18 +84,19 @@ export const QUERY_ALL_VENDORS_FOR_ORDER = gql`
export const SEARCH_VENDOR_AUTOCOMPLETE = gql`
query SEARCH_VENDOR_AUTOCOMPLETE {
vendors(order_by: { name: asc }) {
vendors(order_by: { name: asc }, where: { active: { _eq: true } }) {
name
discount
id
cost_center
active
}
}
`;
export const SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR = gql`
query SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR {
vendors(order_by: { name: asc }) {
vendors(order_by: { name: asc }, where: { active: { _eq: true } }) {
name
discount
id
@@ -104,6 +108,7 @@ export const SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR = gql`
city
email
state
active
}
}
`;