Added image upload to email and multiple recipients BOD-103

This commit is contained in:
Patrick Fic
2020-07-23 11:27:09 -07:00
parent 3eb2c0d787
commit 8a4f0dda44
12 changed files with 556 additions and 76 deletions

View File

@@ -148,7 +148,7 @@ export function PartsOrderModalContainer({
if (sendType === "e") {
setEmailOptions({
messageOptions: {
to: data.vendors.filter((item) => item.id === values.id)[0] || null,
to: [data.vendors.filter((item) => item.id === values.id)[0]] || null,
replyTo: bodyshop.email,
},
template: {
@@ -216,17 +216,19 @@ export function PartsOrderModalContainer({
: t("parts_orders.labels.newpartsorder")
}
onCancel={() => toggleModalVisible()}
width='90%'
width="90%"
onOk={() => form.submit()}
destroyOnClose
forceRender>
{error ? <AlertComponent message={error.message} type='error' /> : null}
forceRender
>
{error ? <AlertComponent message={error.message} type="error" /> : null}
<LoadingSpinner loading={loading}>
<Form
form={form}
autoComplete='no'
autoComplete="no"
onFinish={handleFinish}
initialValues={initialValues}>
initialValues={initialValues}
>
<PartsOrderModalComponent
vendorList={(data && data.vendors) || []}
sendTypeState={sendTypeState}