IO-794 Add vendor active field
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user