Temporary Demo Fixes
This commit is contained in:
@@ -36,6 +36,7 @@ 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 defaultEmailFrom = {
|
const defaultEmailFrom = {
|
||||||
from: {
|
from: {
|
||||||
name: bodyshop.shopname || EmailSettings.fromNameDefault,
|
name: bodyshop.shopname || EmailSettings.fromNameDefault,
|
||||||
@@ -65,7 +66,11 @@ export function EmailOverlayContainer({
|
|||||||
|
|
||||||
setSending(true);
|
setSending(true);
|
||||||
try {
|
try {
|
||||||
await axios.post("/sendemail", { ...messageOptions, attachments });
|
await axios.post("/sendemail", {
|
||||||
|
...messageOptions,
|
||||||
|
html: rawHtml,
|
||||||
|
attachments,
|
||||||
|
});
|
||||||
notification["success"]({ message: t("emails.successes.sent") });
|
notification["success"]({ message: t("emails.successes.sent") });
|
||||||
toggleEmailOverlayVisible();
|
toggleEmailOverlayVisible();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -115,6 +120,7 @@ export function EmailOverlayContainer({
|
|||||||
html: html,
|
html: html,
|
||||||
url: `${window.location.protocol}://${window.location.host}/`,
|
url: `${window.location.protocol}://${window.location.host}/`,
|
||||||
});
|
});
|
||||||
|
setRawHtml(response.data);
|
||||||
|
|
||||||
console.log("response", response);
|
console.log("response", response);
|
||||||
setMessageOptions({
|
setMessageOptions({
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export default function LaborAllocationsAdjustmentEdit({
|
|||||||
onFinish={handleFinish}
|
onFinish={handleFinish}
|
||||||
initialValues={{
|
initialValues={{
|
||||||
mod_lbr_ty: mod_lbr_ty,
|
mod_lbr_ty: mod_lbr_ty,
|
||||||
hours: adjustments[mod_lbr_ty],
|
hours: adjustments && adjustments[mod_lbr_ty],
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
|||||||
@@ -91,7 +91,9 @@ export default function ProductionSubletsManageComponent({ subletJobLines }) {
|
|||||||
placement="bottom"
|
placement="bottom"
|
||||||
title={t("production.labels.sublets")}
|
title={t("production.labels.sublets")}
|
||||||
>
|
>
|
||||||
<span>{`${subletCount.outstanding} / ${subletCount.total} rem.`}</span>
|
<span
|
||||||
|
style={{ color: subletCount.outstanding > 0 ? "tomato" : "" }}
|
||||||
|
>{`${subletCount.outstanding} / ${subletCount.total} rem.`}</span>
|
||||||
</Popover>
|
</Popover>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ export const TemplateList = (type, object) => {
|
|||||||
description: "Parts Order",
|
description: "Parts Order",
|
||||||
drivingId: "job",
|
drivingId: "job",
|
||||||
key: "parts_order_confirmation",
|
key: "parts_order_confirmation",
|
||||||
|
subject: "Parts Order",
|
||||||
},
|
},
|
||||||
parts_return_confirmation: {
|
parts_return_confirmation: {
|
||||||
title: i18n.t("printcenter.jobs.parts_return_confirmation"),
|
title: i18n.t("printcenter.jobs.parts_return_confirmation"),
|
||||||
|
|||||||
@@ -235,7 +235,8 @@ function CalculateTaxesTotals(job, otherTotals) {
|
|||||||
Dinero({ amount: Math.round((val.act_price || 0) * 100) })
|
Dinero({ amount: Math.round((val.act_price || 0) * 100) })
|
||||||
.multiply(val.part_qty || 1)
|
.multiply(val.part_qty || 1)
|
||||||
.percentage(
|
.percentage(
|
||||||
(job.parts_tax_rates["PAN"] &&
|
(job.parts_tax_rate &&
|
||||||
|
job.parts_tax_rates["PAN"] &&
|
||||||
job.parts_tax_rates["PAN"].prt_tax_rt) * 100
|
job.parts_tax_rates["PAN"].prt_tax_rt) * 100
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -244,7 +245,8 @@ function CalculateTaxesTotals(job, otherTotals) {
|
|||||||
Dinero({ amount: Math.round((val.act_price || 0) * 100) })
|
Dinero({ amount: Math.round((val.act_price || 0) * 100) })
|
||||||
.multiply(val.part_qty || 1)
|
.multiply(val.part_qty || 1)
|
||||||
.percentage(
|
.percentage(
|
||||||
(job.parts_tax_rates[val.part_type] &&
|
(job.parts_tax_rate &&
|
||||||
|
job.parts_tax_rates[val.part_type] &&
|
||||||
job.parts_tax_rates[val.part_type].prt_tax_rt) * 100
|
job.parts_tax_rates[val.part_type].prt_tax_rt) * 100
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user