IO-794 Add vendor active field
This commit is contained in:
@@ -31769,6 +31769,27 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>fields</name>
|
<name>fields</name>
|
||||||
<children>
|
<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>
|
<concept_node>
|
||||||
<name>am</name>
|
<name>am</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import {
|
|||||||
InputNumber,
|
InputNumber,
|
||||||
Select,
|
Select,
|
||||||
Space,
|
Space,
|
||||||
|
Switch,
|
||||||
Typography,
|
Typography,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
@@ -49,6 +50,14 @@ export default function VendorsFormComponent({
|
|||||||
>
|
>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("vendors.fields.active")}
|
||||||
|
name="active"
|
||||||
|
initialValue={true}
|
||||||
|
valuePropName="checked"
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("vendors.fields.email")}
|
label={t("vendors.fields.email")}
|
||||||
rules={[
|
rules={[
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export const QUERY_VENDOR_BY_ID = gql`
|
|||||||
cost_center
|
cost_center
|
||||||
city
|
city
|
||||||
street1
|
street1
|
||||||
|
active
|
||||||
phone
|
phone
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -39,6 +40,7 @@ export const QUERY_ALL_VENDORS = gql`
|
|||||||
cost_center
|
cost_center
|
||||||
city
|
city
|
||||||
phone
|
phone
|
||||||
|
active
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@@ -65,13 +67,14 @@ export const DELETE_VENDOR = gql`
|
|||||||
|
|
||||||
export const QUERY_ALL_VENDORS_FOR_ORDER = gql`
|
export const QUERY_ALL_VENDORS_FOR_ORDER = gql`
|
||||||
query QUERY_ALL_VENDORS_FOR_ORDER($jobId: uuid) {
|
query QUERY_ALL_VENDORS_FOR_ORDER($jobId: uuid) {
|
||||||
vendors(order_by: { name: asc }) {
|
vendors(order_by: { name: asc }, where: { active: { _eq: true } }) {
|
||||||
name
|
name
|
||||||
cost_center
|
cost_center
|
||||||
id
|
id
|
||||||
favorite
|
favorite
|
||||||
discount
|
discount
|
||||||
email
|
email
|
||||||
|
active
|
||||||
}
|
}
|
||||||
jobs(where: { id: { _eq: $jobId } }) {
|
jobs(where: { id: { _eq: $jobId } }) {
|
||||||
v_make_desc
|
v_make_desc
|
||||||
@@ -81,18 +84,19 @@ export const QUERY_ALL_VENDORS_FOR_ORDER = gql`
|
|||||||
|
|
||||||
export const SEARCH_VENDOR_AUTOCOMPLETE = gql`
|
export const SEARCH_VENDOR_AUTOCOMPLETE = gql`
|
||||||
query SEARCH_VENDOR_AUTOCOMPLETE {
|
query SEARCH_VENDOR_AUTOCOMPLETE {
|
||||||
vendors(order_by: { name: asc }) {
|
vendors(order_by: { name: asc }, where: { active: { _eq: true } }) {
|
||||||
name
|
name
|
||||||
discount
|
discount
|
||||||
id
|
id
|
||||||
cost_center
|
cost_center
|
||||||
|
active
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR = gql`
|
export const SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR = gql`
|
||||||
query SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR {
|
query SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR {
|
||||||
vendors(order_by: { name: asc }) {
|
vendors(order_by: { name: asc }, where: { active: { _eq: true } }) {
|
||||||
name
|
name
|
||||||
discount
|
discount
|
||||||
id
|
id
|
||||||
@@ -104,6 +108,7 @@ export const SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR = gql`
|
|||||||
city
|
city
|
||||||
email
|
email
|
||||||
state
|
state
|
||||||
|
active
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -1933,6 +1933,7 @@
|
|||||||
"saving": "Error encountered while saving vendor. "
|
"saving": "Error encountered while saving vendor. "
|
||||||
},
|
},
|
||||||
"fields": {
|
"fields": {
|
||||||
|
"active": "Active",
|
||||||
"am": "Aftermarket",
|
"am": "Aftermarket",
|
||||||
"city": "City",
|
"city": "City",
|
||||||
"cost_center": "Cost Center",
|
"cost_center": "Cost Center",
|
||||||
|
|||||||
@@ -1933,6 +1933,7 @@
|
|||||||
"saving": "Se encontró un error al guardar el proveedor."
|
"saving": "Se encontró un error al guardar el proveedor."
|
||||||
},
|
},
|
||||||
"fields": {
|
"fields": {
|
||||||
|
"active": "",
|
||||||
"am": "",
|
"am": "",
|
||||||
"city": "ciudad",
|
"city": "ciudad",
|
||||||
"cost_center": "Centro de costos",
|
"cost_center": "Centro de costos",
|
||||||
|
|||||||
@@ -1933,6 +1933,7 @@
|
|||||||
"saving": "Erreur rencontrée lors de l'enregistrement du fournisseur."
|
"saving": "Erreur rencontrée lors de l'enregistrement du fournisseur."
|
||||||
},
|
},
|
||||||
"fields": {
|
"fields": {
|
||||||
|
"active": "",
|
||||||
"am": "",
|
"am": "",
|
||||||
"city": "Ville",
|
"city": "Ville",
|
||||||
"cost_center": "Centre de coûts",
|
"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:
|
- active:
|
||||||
_eq: true
|
_eq: true
|
||||||
columns:
|
columns:
|
||||||
- jobid
|
|
||||||
- conversationid
|
- conversationid
|
||||||
|
- id
|
||||||
|
- jobid
|
||||||
select_permissions:
|
select_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- conversationid
|
- conversationid
|
||||||
|
- id
|
||||||
- jobid
|
- jobid
|
||||||
filter:
|
filter:
|
||||||
conversation:
|
conversation:
|
||||||
@@ -4114,6 +4116,7 @@ tables:
|
|||||||
- active:
|
- active:
|
||||||
_eq: true
|
_eq: true
|
||||||
columns:
|
columns:
|
||||||
|
- active
|
||||||
- bodyshopid
|
- bodyshopid
|
||||||
- city
|
- city
|
||||||
- cost_center
|
- cost_center
|
||||||
@@ -4135,6 +4138,7 @@ tables:
|
|||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
columns:
|
columns:
|
||||||
|
- active
|
||||||
- bodyshopid
|
- bodyshopid
|
||||||
- city
|
- city
|
||||||
- cost_center
|
- cost_center
|
||||||
@@ -4165,6 +4169,7 @@ tables:
|
|||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
columns:
|
columns:
|
||||||
|
- active
|
||||||
- bodyshopid
|
- bodyshopid
|
||||||
- city
|
- city
|
||||||
- cost_center
|
- cost_center
|
||||||
|
|||||||
Reference in New Issue
Block a user