Add margin to templates generation.
This commit is contained in:
@@ -30,7 +30,21 @@ export default async function RenderTemplate(
|
||||
name: useShopSpecificTemplate
|
||||
? `/${bodyshop.imexshopid}/${templateObject.name}`
|
||||
: `/${templateObject.name}`,
|
||||
...(renderAsHtml ? {} : { recipe: "chrome-pdf" }),
|
||||
...(renderAsHtml
|
||||
? {}
|
||||
: {
|
||||
recipe: "chrome-pdf",
|
||||
chrome: {
|
||||
marginTop:
|
||||
(bodyshop.logo_img_path &&
|
||||
bodyshop.logo_img_path.headerMargin) ||
|
||||
"36px",
|
||||
marginBottom:
|
||||
(bodyshop.logo_img_path &&
|
||||
bodyshop.logo_img_path.footerMargin) ||
|
||||
"36px",
|
||||
},
|
||||
}),
|
||||
...(renderAsExcel ? { recipe: "html-to-xlsx" } : {}),
|
||||
},
|
||||
data: {
|
||||
@@ -151,7 +165,7 @@ export async function RenderTemplates(
|
||||
};
|
||||
|
||||
try {
|
||||
const render = await jsreport.renderAsync(reportRequest);
|
||||
const render = await jsreport.renderAsync({ reportRequest });
|
||||
if (!renderAsHtml) {
|
||||
render.download("Speed Print");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user