IO-794 Add vendor active field
This commit is contained in:
@@ -31769,6 +31769,27 @@
|
||||
<folder_node>
|
||||
<name>fields</name>
|
||||
<children>
|
||||
<concept_node>
|
||||
<name>active</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>am</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
InputNumber,
|
||||
Select,
|
||||
Space,
|
||||
Switch,
|
||||
Typography,
|
||||
} from "antd";
|
||||
import React from "react";
|
||||
@@ -49,6 +50,14 @@ export default function VendorsFormComponent({
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("vendors.fields.active")}
|
||||
name="active"
|
||||
initialValue={true}
|
||||
valuePropName="checked"
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("vendors.fields.email")}
|
||||
rules={[
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1933,6 +1933,7 @@
|
||||
"saving": "Error encountered while saving vendor. "
|
||||
},
|
||||
"fields": {
|
||||
"active": "Active",
|
||||
"am": "Aftermarket",
|
||||
"city": "City",
|
||||
"cost_center": "Cost Center",
|
||||
|
||||
@@ -1933,6 +1933,7 @@
|
||||
"saving": "Se encontró un error al guardar el proveedor."
|
||||
},
|
||||
"fields": {
|
||||
"active": "",
|
||||
"am": "",
|
||||
"city": "ciudad",
|
||||
"cost_center": "Centro de costos",
|
||||
|
||||
@@ -1933,6 +1933,7 @@
|
||||
"saving": "Erreur rencontrée lors de l'enregistrement du fournisseur."
|
||||
},
|
||||
"fields": {
|
||||
"active": "",
|
||||
"am": "",
|
||||
"city": "Ville",
|
||||
"cost_center": "Centre de coûts",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."vendors" DROP COLUMN "active";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."vendors" ADD COLUMN "active" boolean NOT NULL DEFAULT
|
||||
true;
|
||||
type: run_sql
|
||||
@@ -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
|
||||
@@ -0,0 +1,42 @@
|
||||
- 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:
|
||||
- active
|
||||
- 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
|
||||
@@ -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
|
||||
@@ -0,0 +1,43 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: vendors
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- active
|
||||
- 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
|
||||
@@ -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
|
||||
@@ -0,0 +1,42 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: vendors
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- active
|
||||
- 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
|
||||
@@ -1743,13 +1743,15 @@ tables:
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- jobid
|
||||
- conversationid
|
||||
- id
|
||||
- jobid
|
||||
select_permissions:
|
||||
- role: user
|
||||
permission:
|
||||
columns:
|
||||
- conversationid
|
||||
- id
|
||||
- jobid
|
||||
filter:
|
||||
conversation:
|
||||
@@ -4114,6 +4116,7 @@ tables:
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- active
|
||||
- bodyshopid
|
||||
- city
|
||||
- cost_center
|
||||
@@ -4135,6 +4138,7 @@ tables:
|
||||
- role: user
|
||||
permission:
|
||||
columns:
|
||||
- active
|
||||
- bodyshopid
|
||||
- city
|
||||
- cost_center
|
||||
@@ -4165,6 +4169,7 @@ tables:
|
||||
- role: user
|
||||
permission:
|
||||
columns:
|
||||
- active
|
||||
- bodyshopid
|
||||
- city
|
||||
- cost_center
|
||||
|
||||
Reference in New Issue
Block a user