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