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