Added third party payer support IO-546
This commit is contained in:
@@ -15,7 +15,6 @@ export const axiosAuthInterceptorId = axios.interceptors.request.use(
|
||||
config.headers.Authorization = `Bearer ${token}`;
|
||||
}
|
||||
}
|
||||
console.log("Axios interceptor called.");
|
||||
return config;
|
||||
},
|
||||
(error) => Promise.reject(error)
|
||||
|
||||
@@ -44,11 +44,15 @@ export default async function RenderTemplate(
|
||||
"There are too many queries to choose from. Please ensure there are no conflicting keys."
|
||||
);
|
||||
}
|
||||
const { data: contextData } = await client.query({
|
||||
query: gql(templateQueryToExecute),
|
||||
variables: { ...templateObject.variables },
|
||||
fetchPolicy: "network-only",
|
||||
});
|
||||
let contextData;
|
||||
if (templateQueryToExecute) {
|
||||
const { data } = await client.query({
|
||||
query: gql(templateQueryToExecute),
|
||||
variables: { ...templateObject.variables },
|
||||
fetchPolicy: "network-only",
|
||||
});
|
||||
contextData = data;
|
||||
}
|
||||
|
||||
let reportRequest = {
|
||||
template: {
|
||||
@@ -58,8 +62,9 @@ export default async function RenderTemplate(
|
||||
...(renderAsHtml ? {} : { recipe: "chrome-pdf" }),
|
||||
},
|
||||
data: {
|
||||
...contextData,
|
||||
...(templateQueryToExecute ? contextData : {}),
|
||||
...templateObject.variables,
|
||||
...templateObject.context,
|
||||
headerpath: `/${bodyshop.imexshopid}/header.html`,
|
||||
bodyshop: bodyshop,
|
||||
},
|
||||
|
||||
@@ -77,6 +77,16 @@ export const TemplateList = (type, context) => {
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
...(!type || type === "job_special"
|
||||
? {
|
||||
thirdpartypayer: {
|
||||
title: i18n.t("printcenter.jobs.thirdpartypayer"),
|
||||
description: "CSI invite",
|
||||
key: "special/thirdpartypayer",
|
||||
disabled: false,
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
...(!type || type === "appointment"
|
||||
? {
|
||||
appointment_confirmation: {
|
||||
|
||||
Reference in New Issue
Block a user