@@ -3014,6 +3014,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>attach_pdf_to_email</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>bill_federal_tax_rate</name>
|
<name>bill_federal_tax_rate</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -43,6 +43,10 @@ export function EmailOverlayContainer({
|
|||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [sending, setSending] = useState(false);
|
const [sending, setSending] = useState(false);
|
||||||
const [rawHtml, setRawHtml] = useState("");
|
const [rawHtml, setRawHtml] = useState("");
|
||||||
|
const [pdfCopytoAttach, setPdfCopytoAttach] = useState({
|
||||||
|
filename: null,
|
||||||
|
pdf: null,
|
||||||
|
});
|
||||||
const [selectedMedia, setSelectedMedia] = useState([]);
|
const [selectedMedia, setSelectedMedia] = useState([]);
|
||||||
|
|
||||||
const defaultEmailFrom = {
|
const defaultEmailFrom = {
|
||||||
@@ -59,17 +63,17 @@ export function EmailOverlayContainer({
|
|||||||
const handleFinish = async (values) => {
|
const handleFinish = async (values) => {
|
||||||
logImEXEvent("email_send_from_modal");
|
logImEXEvent("email_send_from_modal");
|
||||||
|
|
||||||
const attachments = [];
|
//const attachments = [];
|
||||||
|
|
||||||
if (values.fileList)
|
// if (values.fileList)
|
||||||
await asyncForEach(values.fileList, async (f) => {
|
// await asyncForEach(values.fileList, async (f) => {
|
||||||
const t = {
|
// const t = {
|
||||||
ContentType: f.type,
|
// ContentType: f.type,
|
||||||
Filename: f.name,
|
// Filename: f.name,
|
||||||
Base64Content: (await toBase64(f.originFileObj)).split(",")[1],
|
// Base64Content: (await toBase64(f.originFileObj)).split(",")[1],
|
||||||
};
|
// };
|
||||||
attachments.push(t);
|
// attachments.push(t);
|
||||||
});
|
// });
|
||||||
|
|
||||||
setSending(true);
|
setSending(true);
|
||||||
try {
|
try {
|
||||||
@@ -77,11 +81,28 @@ export function EmailOverlayContainer({
|
|||||||
...defaultEmailFrom,
|
...defaultEmailFrom,
|
||||||
...values,
|
...values,
|
||||||
html: rawHtml,
|
html: rawHtml,
|
||||||
attachments:
|
attachments: [
|
||||||
values.fileList &&
|
...(values.fileList
|
||||||
(await Promise.all(
|
? await Promise.all(
|
||||||
values.fileList.map(async (f) => await toBase64(f.originFileObj))
|
values.fileList.map(async (f) => {
|
||||||
)),
|
return {
|
||||||
|
filename: f.name,
|
||||||
|
path: await toBase64(f.originFileObj),
|
||||||
|
};
|
||||||
|
})
|
||||||
|
)
|
||||||
|
: []),
|
||||||
|
...(pdfCopytoAttach.pdf
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
path: pdfCopytoAttach.pdf,
|
||||||
|
filename:
|
||||||
|
pdfCopytoAttach.filename &&
|
||||||
|
`${pdfCopytoAttach.filename}.pdf`,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: []),
|
||||||
|
],
|
||||||
media: selectedMedia.filter((m) => m.isSelected).map((m) => m.src),
|
media: selectedMedia.filter((m) => m.isSelected).map((m) => m.src),
|
||||||
//attachments,
|
//attachments,
|
||||||
});
|
});
|
||||||
@@ -99,13 +120,22 @@ export function EmailOverlayContainer({
|
|||||||
const render = async () => {
|
const render = async () => {
|
||||||
logImEXEvent("email_render_template", { template: emailConfig.template });
|
logImEXEvent("email_render_template", { template: emailConfig.template });
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
let html = await RenderTemplate(emailConfig.template, bodyshop, true);
|
let { html, pdf, filename } = await RenderTemplate(
|
||||||
|
emailConfig.template,
|
||||||
|
bodyshop,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
const response = await axios.post("/render/inlinecss", {
|
const response = await axios.post("/render/inlinecss", {
|
||||||
html: html,
|
html: html,
|
||||||
url: `${window.location.protocol}://${window.location.host}/`,
|
url: `${window.location.protocol}://${window.location.host}/`,
|
||||||
});
|
});
|
||||||
setRawHtml(response.data);
|
setRawHtml(response.data);
|
||||||
|
|
||||||
|
if (pdf) {
|
||||||
|
setPdfCopytoAttach({ pdf, filename });
|
||||||
|
}
|
||||||
|
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
...emailConfig.messageOptions,
|
...emailConfig.messageOptions,
|
||||||
cc:
|
cc:
|
||||||
@@ -166,8 +196,8 @@ const toBase64 = (file) =>
|
|||||||
reader.onerror = (error) => reject(error);
|
reader.onerror = (error) => reject(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
const asyncForEach = async (array, callback) => {
|
// const asyncForEach = async (array, callback) => {
|
||||||
for (let index = 0; index < array.length; index++) {
|
// for (let index = 0; index < array.length; index++) {
|
||||||
await callback(array[index], index, array);
|
// await callback(array[index], index, array);
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
|
|||||||
@@ -436,6 +436,14 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
>
|
>
|
||||||
<CurrencyInput />
|
<CurrencyInput />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
|
<Form.Item
|
||||||
|
name={["attach_pdf_to_email"]}
|
||||||
|
label={t("bodyshop.fields.attach_pdf_to_email")}
|
||||||
|
valuePropName="checked"
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow header={t("bodyshop.labels.messagingpresets")}>
|
<LayoutFormRow grow header={t("bodyshop.labels.messagingpresets")}>
|
||||||
<Form.List name={["md_messaging_presets"]}>
|
<Form.List name={["md_messaging_presets"]}>
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ export const QUERY_BODYSHOP = gql`
|
|||||||
md_jobline_presets
|
md_jobline_presets
|
||||||
cdk_dealerid
|
cdk_dealerid
|
||||||
features
|
features
|
||||||
|
attach_pdf_to_email
|
||||||
employees {
|
employees {
|
||||||
id
|
id
|
||||||
active
|
active
|
||||||
@@ -178,6 +179,7 @@ export const UPDATE_SHOP = gql`
|
|||||||
jc_hourly_rates
|
jc_hourly_rates
|
||||||
md_jobline_presets
|
md_jobline_presets
|
||||||
cdk_dealerid
|
cdk_dealerid
|
||||||
|
attach_pdf_to_email
|
||||||
employees {
|
employees {
|
||||||
id
|
id
|
||||||
first_name
|
first_name
|
||||||
|
|||||||
@@ -689,6 +689,8 @@ export const QUERY_JOB_CARD_DETAILS = gql`
|
|||||||
v_make_desc
|
v_make_desc
|
||||||
v_model_desc
|
v_model_desc
|
||||||
v_color
|
v_color
|
||||||
|
v_vin
|
||||||
|
plate_st
|
||||||
plate_no
|
plate_no
|
||||||
vehicle {
|
vehicle {
|
||||||
id
|
id
|
||||||
|
|||||||
@@ -199,6 +199,7 @@
|
|||||||
"label": "Label"
|
"label": "Label"
|
||||||
},
|
},
|
||||||
"appt_length": "Default Appointment Length",
|
"appt_length": "Default Appointment Length",
|
||||||
|
"attach_pdf_to_email": "Attach PDF copy to sent emails?",
|
||||||
"bill_federal_tax_rate": "Bills - Federal Tax Rate %",
|
"bill_federal_tax_rate": "Bills - Federal Tax Rate %",
|
||||||
"bill_local_tax_rate": "Bill - Provincial/State Tax Rate %",
|
"bill_local_tax_rate": "Bill - Provincial/State Tax Rate %",
|
||||||
"bill_state_tax_rate": "Bill - Provincial/State Tax Rate %",
|
"bill_state_tax_rate": "Bill - Provincial/State Tax Rate %",
|
||||||
|
|||||||
@@ -199,6 +199,7 @@
|
|||||||
"label": ""
|
"label": ""
|
||||||
},
|
},
|
||||||
"appt_length": "",
|
"appt_length": "",
|
||||||
|
"attach_pdf_to_email": "",
|
||||||
"bill_federal_tax_rate": "",
|
"bill_federal_tax_rate": "",
|
||||||
"bill_local_tax_rate": "",
|
"bill_local_tax_rate": "",
|
||||||
"bill_state_tax_rate": "",
|
"bill_state_tax_rate": "",
|
||||||
|
|||||||
@@ -199,6 +199,7 @@
|
|||||||
"label": ""
|
"label": ""
|
||||||
},
|
},
|
||||||
"appt_length": "",
|
"appt_length": "",
|
||||||
|
"attach_pdf_to_email": "",
|
||||||
"bill_federal_tax_rate": "",
|
"bill_federal_tax_rate": "",
|
||||||
"bill_local_tax_rate": "",
|
"bill_local_tax_rate": "",
|
||||||
"bill_state_tax_rate": "",
|
"bill_state_tax_rate": "",
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { setEmailOptions } from "../redux/email/email.actions";
|
|||||||
import { store } from "../redux/store";
|
import { store } from "../redux/store";
|
||||||
import client from "../utils/GraphQLClient";
|
import client from "../utils/GraphQLClient";
|
||||||
import { TemplateList } from "./TemplateConstants";
|
import { TemplateList } from "./TemplateConstants";
|
||||||
|
import _ from "lodash";
|
||||||
const server = process.env.REACT_APP_REPORTS_SERVER_URL;
|
const server = process.env.REACT_APP_REPORTS_SERVER_URL;
|
||||||
jsreport.serverUrl = server;
|
jsreport.serverUrl = server;
|
||||||
|
|
||||||
@@ -39,8 +40,10 @@ export default async function RenderTemplate(
|
|||||||
offset: moment().utcOffset(),
|
offset: moment().utcOffset(),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const render = await jsreport.renderAsync(reportRequest);
|
const render = await jsreport.renderAsync(reportRequest);
|
||||||
|
|
||||||
if (!renderAsHtml) {
|
if (!renderAsHtml) {
|
||||||
render.download(
|
render.download(
|
||||||
(Templates[templateObject.name] &&
|
(Templates[templateObject.name] &&
|
||||||
@@ -48,8 +51,21 @@ export default async function RenderTemplate(
|
|||||||
""
|
""
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
let pdf;
|
||||||
|
if (bodyshop.attach_pdf_to_email) {
|
||||||
|
const pdfRequest = _.cloneDeep(reportRequest);
|
||||||
|
pdfRequest.template.recipe = "chrome-pdf";
|
||||||
|
const pdfRender = await jsreport.renderAsync(pdfRequest);
|
||||||
|
pdf = pdfRender.toDataURI();
|
||||||
|
}
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
resolve(render.toString());
|
resolve({
|
||||||
|
pdf,
|
||||||
|
filename:
|
||||||
|
Templates[templateObject.name] &&
|
||||||
|
Templates[templateObject.name].title,
|
||||||
|
html: render.toString(),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
- args:
|
||||||
|
cascade: false
|
||||||
|
read_only: false
|
||||||
|
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "attach_pdf_to_email";
|
||||||
|
type: run_sql
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
- args:
|
||||||
|
cascade: false
|
||||||
|
read_only: false
|
||||||
|
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "attach_pdf_to_email" boolean
|
||||||
|
NOT NULL DEFAULT False;
|
||||||
|
type: run_sql
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
- args:
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: bodyshops
|
||||||
|
schema: public
|
||||||
|
type: drop_select_permission
|
||||||
|
- args:
|
||||||
|
permission:
|
||||||
|
allow_aggregations: false
|
||||||
|
columns:
|
||||||
|
- accountingconfig
|
||||||
|
- address1
|
||||||
|
- address2
|
||||||
|
- appt_alt_transport
|
||||||
|
- appt_colors
|
||||||
|
- appt_length
|
||||||
|
- bill_tax_rates
|
||||||
|
- cdk_dealerid
|
||||||
|
- city
|
||||||
|
- country
|
||||||
|
- created_at
|
||||||
|
- default_adjustment_rate
|
||||||
|
- deliverchecklist
|
||||||
|
- email
|
||||||
|
- enforce_class
|
||||||
|
- enforce_referral
|
||||||
|
- features
|
||||||
|
- federal_tax_id
|
||||||
|
- id
|
||||||
|
- imexshopid
|
||||||
|
- inhousevendorid
|
||||||
|
- insurance_vendor_id
|
||||||
|
- intakechecklist
|
||||||
|
- jc_hourly_rates
|
||||||
|
- jobsizelimit
|
||||||
|
- logo_img_path
|
||||||
|
- md_categories
|
||||||
|
- md_ccc_rates
|
||||||
|
- md_classes
|
||||||
|
- md_hour_split
|
||||||
|
- md_ins_cos
|
||||||
|
- md_jobline_presets
|
||||||
|
- md_labor_rates
|
||||||
|
- md_messaging_presets
|
||||||
|
- md_notes_presets
|
||||||
|
- md_order_statuses
|
||||||
|
- md_parts_locations
|
||||||
|
- md_payment_types
|
||||||
|
- md_rbac
|
||||||
|
- md_referral_sources
|
||||||
|
- md_responsibility_centers
|
||||||
|
- md_ro_statuses
|
||||||
|
- messagingservicesid
|
||||||
|
- phone
|
||||||
|
- prodtargethrs
|
||||||
|
- production_config
|
||||||
|
- region_config
|
||||||
|
- schedule_end_time
|
||||||
|
- schedule_start_time
|
||||||
|
- scoreboard_target
|
||||||
|
- shopname
|
||||||
|
- shoprates
|
||||||
|
- speedprint
|
||||||
|
- ssbuckets
|
||||||
|
- state
|
||||||
|
- state_tax_id
|
||||||
|
- stripe_acct_id
|
||||||
|
- sub_status
|
||||||
|
- target_touchtime
|
||||||
|
- template_header
|
||||||
|
- textid
|
||||||
|
- updated_at
|
||||||
|
- use_fippa
|
||||||
|
- website
|
||||||
|
- workingdays
|
||||||
|
- zip_post
|
||||||
|
computed_fields: []
|
||||||
|
filter:
|
||||||
|
associations:
|
||||||
|
user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: bodyshops
|
||||||
|
schema: public
|
||||||
|
type: create_select_permission
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
- args:
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: bodyshops
|
||||||
|
schema: public
|
||||||
|
type: drop_select_permission
|
||||||
|
- args:
|
||||||
|
permission:
|
||||||
|
allow_aggregations: false
|
||||||
|
columns:
|
||||||
|
- accountingconfig
|
||||||
|
- address1
|
||||||
|
- address2
|
||||||
|
- appt_alt_transport
|
||||||
|
- appt_colors
|
||||||
|
- appt_length
|
||||||
|
- attach_pdf_to_email
|
||||||
|
- bill_tax_rates
|
||||||
|
- cdk_dealerid
|
||||||
|
- city
|
||||||
|
- country
|
||||||
|
- created_at
|
||||||
|
- default_adjustment_rate
|
||||||
|
- deliverchecklist
|
||||||
|
- email
|
||||||
|
- enforce_class
|
||||||
|
- enforce_referral
|
||||||
|
- features
|
||||||
|
- federal_tax_id
|
||||||
|
- id
|
||||||
|
- imexshopid
|
||||||
|
- inhousevendorid
|
||||||
|
- insurance_vendor_id
|
||||||
|
- intakechecklist
|
||||||
|
- jc_hourly_rates
|
||||||
|
- jobsizelimit
|
||||||
|
- logo_img_path
|
||||||
|
- md_categories
|
||||||
|
- md_ccc_rates
|
||||||
|
- md_classes
|
||||||
|
- md_hour_split
|
||||||
|
- md_ins_cos
|
||||||
|
- md_jobline_presets
|
||||||
|
- md_labor_rates
|
||||||
|
- md_messaging_presets
|
||||||
|
- md_notes_presets
|
||||||
|
- md_order_statuses
|
||||||
|
- md_parts_locations
|
||||||
|
- md_payment_types
|
||||||
|
- md_rbac
|
||||||
|
- md_referral_sources
|
||||||
|
- md_responsibility_centers
|
||||||
|
- md_ro_statuses
|
||||||
|
- messagingservicesid
|
||||||
|
- phone
|
||||||
|
- prodtargethrs
|
||||||
|
- production_config
|
||||||
|
- region_config
|
||||||
|
- schedule_end_time
|
||||||
|
- schedule_start_time
|
||||||
|
- scoreboard_target
|
||||||
|
- shopname
|
||||||
|
- shoprates
|
||||||
|
- speedprint
|
||||||
|
- ssbuckets
|
||||||
|
- state
|
||||||
|
- state_tax_id
|
||||||
|
- stripe_acct_id
|
||||||
|
- sub_status
|
||||||
|
- target_touchtime
|
||||||
|
- template_header
|
||||||
|
- textid
|
||||||
|
- updated_at
|
||||||
|
- use_fippa
|
||||||
|
- website
|
||||||
|
- workingdays
|
||||||
|
- zip_post
|
||||||
|
computed_fields: []
|
||||||
|
filter:
|
||||||
|
associations:
|
||||||
|
user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: bodyshops
|
||||||
|
schema: public
|
||||||
|
type: create_select_permission
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
- args:
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: bodyshops
|
||||||
|
schema: public
|
||||||
|
type: drop_update_permission
|
||||||
|
- args:
|
||||||
|
permission:
|
||||||
|
columns:
|
||||||
|
- accountingconfig
|
||||||
|
- address1
|
||||||
|
- address2
|
||||||
|
- appt_alt_transport
|
||||||
|
- appt_colors
|
||||||
|
- appt_length
|
||||||
|
- bill_tax_rates
|
||||||
|
- city
|
||||||
|
- country
|
||||||
|
- created_at
|
||||||
|
- default_adjustment_rate
|
||||||
|
- deliverchecklist
|
||||||
|
- email
|
||||||
|
- enforce_class
|
||||||
|
- enforce_referral
|
||||||
|
- federal_tax_id
|
||||||
|
- id
|
||||||
|
- inhousevendorid
|
||||||
|
- insurance_vendor_id
|
||||||
|
- intakechecklist
|
||||||
|
- jc_hourly_rates
|
||||||
|
- logo_img_path
|
||||||
|
- md_categories
|
||||||
|
- md_ccc_rates
|
||||||
|
- md_classes
|
||||||
|
- md_hour_split
|
||||||
|
- md_ins_cos
|
||||||
|
- md_jobline_presets
|
||||||
|
- md_labor_rates
|
||||||
|
- md_messaging_presets
|
||||||
|
- md_notes_presets
|
||||||
|
- md_order_statuses
|
||||||
|
- md_parts_locations
|
||||||
|
- md_payment_types
|
||||||
|
- md_rbac
|
||||||
|
- md_referral_sources
|
||||||
|
- md_responsibility_centers
|
||||||
|
- md_ro_statuses
|
||||||
|
- phone
|
||||||
|
- prodtargethrs
|
||||||
|
- production_config
|
||||||
|
- schedule_end_time
|
||||||
|
- schedule_start_time
|
||||||
|
- scoreboard_target
|
||||||
|
- shopname
|
||||||
|
- shoprates
|
||||||
|
- speedprint
|
||||||
|
- ssbuckets
|
||||||
|
- state
|
||||||
|
- state_tax_id
|
||||||
|
- target_touchtime
|
||||||
|
- updated_at
|
||||||
|
- use_fippa
|
||||||
|
- website
|
||||||
|
- workingdays
|
||||||
|
- zip_post
|
||||||
|
filter:
|
||||||
|
associations:
|
||||||
|
_and:
|
||||||
|
- user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
- active:
|
||||||
|
_eq: true
|
||||||
|
set: {}
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: bodyshops
|
||||||
|
schema: public
|
||||||
|
type: create_update_permission
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
- args:
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: bodyshops
|
||||||
|
schema: public
|
||||||
|
type: drop_update_permission
|
||||||
|
- args:
|
||||||
|
permission:
|
||||||
|
columns:
|
||||||
|
- accountingconfig
|
||||||
|
- address1
|
||||||
|
- address2
|
||||||
|
- appt_alt_transport
|
||||||
|
- appt_colors
|
||||||
|
- appt_length
|
||||||
|
- attach_pdf_to_email
|
||||||
|
- bill_tax_rates
|
||||||
|
- city
|
||||||
|
- country
|
||||||
|
- created_at
|
||||||
|
- default_adjustment_rate
|
||||||
|
- deliverchecklist
|
||||||
|
- email
|
||||||
|
- enforce_class
|
||||||
|
- enforce_referral
|
||||||
|
- federal_tax_id
|
||||||
|
- id
|
||||||
|
- inhousevendorid
|
||||||
|
- insurance_vendor_id
|
||||||
|
- intakechecklist
|
||||||
|
- jc_hourly_rates
|
||||||
|
- logo_img_path
|
||||||
|
- md_categories
|
||||||
|
- md_ccc_rates
|
||||||
|
- md_classes
|
||||||
|
- md_hour_split
|
||||||
|
- md_ins_cos
|
||||||
|
- md_jobline_presets
|
||||||
|
- md_labor_rates
|
||||||
|
- md_messaging_presets
|
||||||
|
- md_notes_presets
|
||||||
|
- md_order_statuses
|
||||||
|
- md_parts_locations
|
||||||
|
- md_payment_types
|
||||||
|
- md_rbac
|
||||||
|
- md_referral_sources
|
||||||
|
- md_responsibility_centers
|
||||||
|
- md_ro_statuses
|
||||||
|
- phone
|
||||||
|
- prodtargethrs
|
||||||
|
- production_config
|
||||||
|
- schedule_end_time
|
||||||
|
- schedule_start_time
|
||||||
|
- scoreboard_target
|
||||||
|
- shopname
|
||||||
|
- shoprates
|
||||||
|
- speedprint
|
||||||
|
- ssbuckets
|
||||||
|
- state
|
||||||
|
- state_tax_id
|
||||||
|
- target_touchtime
|
||||||
|
- updated_at
|
||||||
|
- use_fippa
|
||||||
|
- website
|
||||||
|
- workingdays
|
||||||
|
- zip_post
|
||||||
|
filter:
|
||||||
|
associations:
|
||||||
|
_and:
|
||||||
|
- user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
- active:
|
||||||
|
_eq: true
|
||||||
|
set: {}
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: bodyshops
|
||||||
|
schema: public
|
||||||
|
type: create_update_permission
|
||||||
@@ -756,6 +756,7 @@ tables:
|
|||||||
- appt_alt_transport
|
- appt_alt_transport
|
||||||
- appt_colors
|
- appt_colors
|
||||||
- appt_length
|
- appt_length
|
||||||
|
- attach_pdf_to_email
|
||||||
- bill_tax_rates
|
- bill_tax_rates
|
||||||
- cdk_dealerid
|
- cdk_dealerid
|
||||||
- city
|
- city
|
||||||
@@ -831,6 +832,7 @@ tables:
|
|||||||
- appt_alt_transport
|
- appt_alt_transport
|
||||||
- appt_colors
|
- appt_colors
|
||||||
- appt_length
|
- appt_length
|
||||||
|
- attach_pdf_to_email
|
||||||
- bill_tax_rates
|
- bill_tax_rates
|
||||||
- city
|
- city
|
||||||
- country
|
- country
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ exports.sendEmail = async (req, res) => {
|
|||||||
...((req.body.attachments &&
|
...((req.body.attachments &&
|
||||||
req.body.attachments.map((a) => {
|
req.body.attachments.map((a) => {
|
||||||
return {
|
return {
|
||||||
path: a,
|
filename: a.filename,
|
||||||
|
path: a.path,
|
||||||
};
|
};
|
||||||
})) ||
|
})) ||
|
||||||
[]),
|
[]),
|
||||||
|
|||||||
Reference in New Issue
Block a user