diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel
index 83e01d686..637c240c2 100644
--- a/bodyshop_translations.babel
+++ b/bodyshop_translations.babel
@@ -65429,6 +65429,27 @@
+
+ tags
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
taxid
false
diff --git a/client/src/components/vendor-search-select/vendor-search-select.component.jsx b/client/src/components/vendor-search-select/vendor-search-select.component.jsx
index 6236c8ad4..35b042b73 100644
--- a/client/src/components/vendor-search-select/vendor-search-select.component.jsx
+++ b/client/src/components/vendor-search-select/vendor-search-select.component.jsx
@@ -52,6 +52,7 @@ const VendorSearchSelect = ({ value, onChange, options, onSelect, disabled, pref
>
{label}
+
{discount && discount !== 0 ? {`${discount * 100}%`} : null}
);
@@ -116,6 +117,11 @@ const VendorSearchSelect = ({ value, onChange, options, onSelect, disabled, pref
{o.name}
+ {o.tags?.map((tag, idx) => (
+
+ {tag}
+
+ ))}
{o.phone && showPhone && {o.phone}}
{o.discount && o.discount !== 0 ? {`${o.discount * 100}%`} : null}
diff --git a/client/src/components/vendors-form/vendors-form.component.jsx b/client/src/components/vendors-form/vendors-form.component.jsx
index 11fdbb8b5..3d0853cfa 100644
--- a/client/src/components/vendors-form/vendors-form.component.jsx
+++ b/client/src/components/vendors-form/vendors-form.component.jsx
@@ -1,7 +1,7 @@
import { DeleteFilled } from "@ant-design/icons";
import { useApolloClient } from "@apollo/client";
import { useSplitTreatments } from "@splitsoftware/splitio-react";
-import { Button, Divider, Form, Input, InputNumber, Space, Switch } from "antd";
+import { Button, Divider, Form, Input, InputNumber, Select, Space, Switch } from "antd";
import { PageHeader } from "@ant-design/pro-layout";
import React from "react";
import { useTranslation } from "react-i18next";
@@ -179,6 +179,18 @@ export function VendorsFormComponent({
}
+
+
+
{DmsAp.treatment === "on" && (
diff --git a/client/src/components/vendors-list/vendors-list.component.jsx b/client/src/components/vendors-list/vendors-list.component.jsx
index 7495da7e6..cda137e58 100644
--- a/client/src/components/vendors-list/vendors-list.component.jsx
+++ b/client/src/components/vendors-list/vendors-list.component.jsx
@@ -1,5 +1,5 @@
import { SyncOutlined } from "@ant-design/icons";
-import { Button, Card, Input, Space, Table } from "antd";
+import { Button, Card, Input, Space, Table, Tag } from "antd";
import queryString from "query-string";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
@@ -38,6 +38,18 @@ export default function VendorsListComponent({ handleNewVendor, loading, handleO
title: t("vendors.fields.city"),
dataIndex: "city",
key: "city"
+ },
+ {
+ title: t("vendors.fields.tags"),
+ dataIndex: "tags",
+ key: "tags",
+ render: (text, record) => (
+
+ {record?.tags?.map((tag, idx) => (
+ {tag}
+ ))}
+
+ )
}
];
diff --git a/client/src/graphql/vendors.queries.js b/client/src/graphql/vendors.queries.js
index ce7c08507..e3fcc507e 100644
--- a/client/src/graphql/vendors.queries.js
+++ b/client/src/graphql/vendors.queries.js
@@ -19,6 +19,7 @@ export const QUERY_VENDOR_BY_ID = gql`
active
phone
dmsid
+ tags
}
}
`;
@@ -54,6 +55,7 @@ export const QUERY_ALL_VENDORS = gql`
city
phone
active
+ tags
}
}
`;
@@ -89,6 +91,7 @@ export const QUERY_ALL_VENDORS_FOR_ORDER = gql`
email
active
phone
+ tags
}
jobs(where: { id: { _eq: $jobId } }) {
v_make_desc
@@ -105,6 +108,7 @@ export const SEARCH_VENDOR_AUTOCOMPLETE = gql`
cost_center
active
favorite
+ tags
}
}
`;
@@ -124,6 +128,7 @@ export const SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR = gql`
email
state
active
+ tags
}
}
`;
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index 1346b0454..735b3d5de 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -3890,6 +3890,7 @@
"state": "Provincia del estado",
"street1": "calle",
"street2": "Dirección 2",
+ "tags": "",
"taxid": "Identificación del impuesto",
"terms": "Términos de pago",
"zip": "código postal"
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 36dba4dfd..e73462a13 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -3890,6 +3890,7 @@
"state": "Etat / Province",
"street1": "rue",
"street2": "Adresse 2 ",
+ "tags": "",
"taxid": "Identifiant de taxe",
"terms": "Modalités de paiement",
"zip": "Zip / code postal"
diff --git a/client/src/utils/RenderTemplate.js b/client/src/utils/RenderTemplate.js
index a4b86c4cf..f25b207ea 100644
--- a/client/src/utils/RenderTemplate.js
+++ b/client/src/utils/RenderTemplate.js
@@ -48,24 +48,24 @@ export default async function RenderTemplate(
...(renderAsHtml
? {}
: {
- recipe: "chrome-pdf",
- ...(!ignoreCustomMargins && {
- chrome: {
- marginTop:
- bodyshop.logo_img_path &&
+ recipe: "chrome-pdf",
+ ...(!ignoreCustomMargins && {
+ chrome: {
+ marginTop:
+ bodyshop.logo_img_path &&
bodyshop.logo_img_path.headerMargin &&
bodyshop.logo_img_path.headerMargin > 36
- ? bodyshop.logo_img_path.headerMargin
- : "36px",
- marginBottom:
- bodyshop.logo_img_path &&
+ ? bodyshop.logo_img_path.headerMargin
+ : "36px",
+ marginBottom:
+ bodyshop.logo_img_path &&
bodyshop.logo_img_path.footerMargin &&
bodyshop.logo_img_path.footerMargin > 50
- ? bodyshop.logo_img_path.footerMargin
- : "50px"
- }
- })
- }),
+ ? bodyshop.logo_img_path.footerMargin
+ : "50px"
+ }
+ })
+ }),
...(renderAsExcel ? { recipe: "html-to-xlsx" } : {}),
...(renderAsText ? { recipe: "text" } : {})
},
@@ -100,14 +100,14 @@ export default async function RenderTemplate(
chrome: {
marginTop:
bodyshop.logo_img_path &&
- bodyshop.logo_img_path.headerMargin &&
- bodyshop.logo_img_path.headerMargin > 36
+ bodyshop.logo_img_path.headerMargin &&
+ bodyshop.logo_img_path.headerMargin > 36
? bodyshop.logo_img_path.headerMargin
: "36px",
marginBottom:
bodyshop.logo_img_path &&
- bodyshop.logo_img_path.footerMargin &&
- bodyshop.logo_img_path.footerMargin > 50
+ bodyshop.logo_img_path.footerMargin &&
+ bodyshop.logo_img_path.footerMargin > 50
? bodyshop.logo_img_path.footerMargin
: "50px"
}
@@ -182,22 +182,22 @@ export async function RenderTemplates(templateObjects, bodyshop, renderAsHtml =
...(renderAsHtml
? {}
: {
- recipe: "chrome-pdf",
- chrome: {
- marginTop:
- bodyshop.logo_img_path &&
+ recipe: "chrome-pdf",
+ chrome: {
+ marginTop:
+ bodyshop.logo_img_path &&
bodyshop.logo_img_path.headerMargin &&
bodyshop.logo_img_path.headerMargin > 36
- ? bodyshop.logo_img_path.headerMargin
- : "36px",
- marginBottom:
- bodyshop.logo_img_path &&
+ ? bodyshop.logo_img_path.headerMargin
+ : "36px",
+ marginBottom:
+ bodyshop.logo_img_path &&
bodyshop.logo_img_path.footerMargin &&
bodyshop.logo_img_path.footerMargin > 50
- ? bodyshop.logo_img_path.footerMargin
- : "50px"
- }
- }),
+ ? bodyshop.logo_img_path.footerMargin
+ : "50px"
+ }
+ }),
pdfOperations: [
{
template: {
@@ -213,14 +213,14 @@ export async function RenderTemplates(templateObjects, bodyshop, renderAsHtml =
chrome: {
marginTop:
bodyshop.logo_img_path &&
- bodyshop.logo_img_path.headerMargin &&
- bodyshop.logo_img_path.headerMargin > 36
+ bodyshop.logo_img_path.headerMargin &&
+ bodyshop.logo_img_path.headerMargin > 36
? bodyshop.logo_img_path.headerMargin
: "36px",
marginBottom:
bodyshop.logo_img_path &&
- bodyshop.logo_img_path.footerMargin &&
- bodyshop.logo_img_path.footerMargin > 50
+ bodyshop.logo_img_path.footerMargin &&
+ bodyshop.logo_img_path.footerMargin > 50
? bodyshop.logo_img_path.footerMargin
: "50px"
},
@@ -302,7 +302,6 @@ export const fetchFilterData = async ({ name }) => {
const jsReportFilters = await cleanAxios.get(`${server}/odata/assets?$filter=name eq '${name}.filters'`, {
headers: { Authorization: jsrAuth }
});
- console.log("🚀 ~ fetchFilterData ~ jsReportFilters:", jsReportFilters);
let parsedFilterData;
let useShopSpecificTemplate = false;
diff --git a/hasura/metadata/tables.yaml b/hasura/metadata/tables.yaml
index 190163203..952bc7c25 100644
--- a/hasura/metadata/tables.yaml
+++ b/hasura/metadata/tables.yaml
@@ -7123,6 +7123,7 @@
- state
- street1
- street2
+ - tags
- updated_at
- zip
select_permissions:
@@ -7146,6 +7147,7 @@
- state
- street1
- street2
+ - tags
- updated_at
- zip
filter:
@@ -7179,6 +7181,7 @@
- state
- street1
- street2
+ - tags
- updated_at
- zip
filter:
diff --git a/hasura/migrations/1753201013074_alter_table_public_vendors_add_column_tags/down.sql b/hasura/migrations/1753201013074_alter_table_public_vendors_add_column_tags/down.sql
new file mode 100644
index 000000000..2a706b95d
--- /dev/null
+++ b/hasura/migrations/1753201013074_alter_table_public_vendors_add_column_tags/down.sql
@@ -0,0 +1,4 @@
+-- Could not auto-generate a down migration.
+-- Please write an appropriate down migration for the SQL below:
+-- alter table "public"."vendors" add column "tags" jsonb
+-- not null default jsonb_build_array();
diff --git a/hasura/migrations/1753201013074_alter_table_public_vendors_add_column_tags/up.sql b/hasura/migrations/1753201013074_alter_table_public_vendors_add_column_tags/up.sql
new file mode 100644
index 000000000..9a4e4b597
--- /dev/null
+++ b/hasura/migrations/1753201013074_alter_table_public_vendors_add_column_tags/up.sql
@@ -0,0 +1,2 @@
+alter table "public"."vendors" add column "tags" jsonb
+ not null default jsonb_build_array();