This commit is contained in:
Patrick Fic
2022-03-02 15:26:18 -08:00
parent c0220f0ca2
commit b98bfe566a
2 changed files with 14 additions and 7 deletions

View File

@@ -196,6 +196,11 @@ export function PartsOrderModalContainer({
(item) => item.id === values.vendorid (item) => item.id === values.vendorid
)[0]; )[0];
let vendorEmails =
matchingVendor &&
matchingVendor.email &&
matchingVendor.email.split(RegExp("[;,]"));
GenerateDocument( GenerateDocument(
{ {
name: isReturn name: isReturn
@@ -206,7 +211,7 @@ export function PartsOrderModalContainer({
}, },
}, },
{ {
to: matchingVendor ? [matchingVendor.email] : null, to: matchingVendor ? vendorEmails : null,
replyTo: bodyshop.email, replyTo: bodyshop.email,
subject: isReturn subject: isReturn
? Templates.parts_return_slip.subject ? Templates.parts_return_slip.subject

View File

@@ -109,12 +109,14 @@ export default function VendorsFormComponent({
<Form.Item <Form.Item
label={t("vendors.fields.email")} label={t("vendors.fields.email")}
rules={[ rules={
{ [
type: "email", // {
message: t("general.validation.invalidemail"), // type: "email",
}, // message: t("general.validation.invalidemail"),
]} // },
]
}
name="email" name="email"
> >
<FormItemEmail email={getFieldValue("email")} /> <FormItemEmail email={getFieldValue("email")} />