Included subject on document generation
This commit is contained in:
@@ -48,7 +48,7 @@ export function Jobd3RdPartyModal({ bodyshop, jobId }) {
|
|||||||
variables: { id: jobId },
|
variables: { id: jobId },
|
||||||
context: restVals,
|
context: restVals,
|
||||||
},
|
},
|
||||||
{},
|
{ subject: TemplateList("job_special").thirdpartypayer.subject },
|
||||||
sendtype
|
sendtype
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ export function PartsOrderModalContainer({
|
|||||||
|
|
||||||
if (refetch) refetch();
|
if (refetch) refetch();
|
||||||
toggleModalVisible();
|
toggleModalVisible();
|
||||||
|
const Templates = TemplateList("partsorder");
|
||||||
|
|
||||||
if (sendType === "e") {
|
if (sendType === "e") {
|
||||||
const matchingVendor = data.vendors.filter(
|
const matchingVendor = data.vendors.filter(
|
||||||
@@ -165,8 +166,8 @@ export function PartsOrderModalContainer({
|
|||||||
GenerateDocument(
|
GenerateDocument(
|
||||||
{
|
{
|
||||||
name: isReturn
|
name: isReturn
|
||||||
? TemplateList("partsorder").parts_return_slip.key
|
? Templates.parts_return_slip.key
|
||||||
: TemplateList("partsorder").parts_order.key,
|
: Templates.parts_order.key,
|
||||||
variables: {
|
variables: {
|
||||||
id: insertResult.data.insert_parts_orders.returning[0].id,
|
id: insertResult.data.insert_parts_orders.returning[0].id,
|
||||||
},
|
},
|
||||||
@@ -174,7 +175,9 @@ export function PartsOrderModalContainer({
|
|||||||
{
|
{
|
||||||
to: matchingVendor ? [matchingVendor.email] : null,
|
to: matchingVendor ? [matchingVendor.email] : null,
|
||||||
replyTo: bodyshop.email,
|
replyTo: bodyshop.email,
|
||||||
subject: TemplateList("partsorder", {}).parts_order.subject,
|
subject: isReturn
|
||||||
|
? Templates.parts_return_slip.subject
|
||||||
|
: Templates.parts_order.subject,
|
||||||
},
|
},
|
||||||
"e"
|
"e"
|
||||||
);
|
);
|
||||||
@@ -182,8 +185,8 @@ export function PartsOrderModalContainer({
|
|||||||
GenerateDocument(
|
GenerateDocument(
|
||||||
{
|
{
|
||||||
name: isReturn
|
name: isReturn
|
||||||
? TemplateList("partsorder").parts_return_slip.key
|
? Templates.parts_return_slip.key
|
||||||
: TemplateList("partsorder").parts_order.key,
|
: Templates.parts_order.key,
|
||||||
variables: {
|
variables: {
|
||||||
id: insertResult.data.insert_parts_orders.returning[0].id,
|
id: insertResult.data.insert_parts_orders.returning[0].id,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -118,10 +118,10 @@ function BillEnterModalContainer({
|
|||||||
} else {
|
} else {
|
||||||
notification["error"]({ message: t("payments.errors.payment") });
|
notification["error"]({ message: t("payments.errors.payment") });
|
||||||
}
|
}
|
||||||
|
const Templates = TemplateList("payment");
|
||||||
GenerateDocument(
|
GenerateDocument(
|
||||||
{
|
{
|
||||||
name: TemplateList("payment").payment_receipt.key,
|
name: Templates.payment_receipt.key,
|
||||||
variables: {
|
variables: {
|
||||||
id: newPayment.data.insert_payments.returning[0].id,
|
id: newPayment.data.insert_payments.returning[0].id,
|
||||||
},
|
},
|
||||||
@@ -129,6 +129,7 @@ function BillEnterModalContainer({
|
|||||||
{
|
{
|
||||||
// to: [appData.email],
|
// to: [appData.email],
|
||||||
replyTo: bodyshop.email,
|
replyTo: bodyshop.email,
|
||||||
|
subject: Templates.payment_receipt.subject,
|
||||||
},
|
},
|
||||||
sendby === "email" ? "e" : "p"
|
sendby === "email" ? "e" : "p"
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export function PaymentsListPaginated({
|
|||||||
sortedInfo: {},
|
sortedInfo: {},
|
||||||
filteredInfo: { text: "" },
|
filteredInfo: { text: "" },
|
||||||
});
|
});
|
||||||
|
const Templates = TemplateList("payment");
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
@@ -156,9 +156,10 @@ export function PaymentsListPaginated({
|
|||||||
</Button>
|
</Button>
|
||||||
<PrintWrapperComponent
|
<PrintWrapperComponent
|
||||||
templateObject={{
|
templateObject={{
|
||||||
name: TemplateList("payment").payment_receipt.key,
|
name: Templates.payment_receipt.key,
|
||||||
variables: { id: record.id },
|
variables: { id: record.id },
|
||||||
}}
|
}}
|
||||||
|
messageObject={{ subject: Templates.payment_receipt.subject }}
|
||||||
/>
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export function PrintCenterItemComponent({
|
|||||||
name: item.key,
|
name: item.key,
|
||||||
variables: { id: id },
|
variables: { id: id },
|
||||||
},
|
},
|
||||||
{ to: context.job && context.job.ownr_ea },
|
{ to: context.job && context.job.ownr_ea, subject: item.subject },
|
||||||
"e"
|
"e"
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -201,14 +201,7 @@ export const TemplateList = (type, context) => {
|
|||||||
description: "Parts Order",
|
description: "Parts Order",
|
||||||
key: "parts_order",
|
key: "parts_order",
|
||||||
subject: `${bodyshop && bodyshop.shopname} Parts Order ${
|
subject: `${bodyshop && bodyshop.shopname} Parts Order ${
|
||||||
(context &&
|
(context && context.job && context.job.ro_number) || ""
|
||||||
context &&
|
|
||||||
context.job &&
|
|
||||||
context.job &&
|
|
||||||
context &&
|
|
||||||
context.job &&
|
|
||||||
context.job.ro_number) ||
|
|
||||||
""
|
|
||||||
}`,
|
}`,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user