This commit is contained in:
@@ -409,7 +409,7 @@ namespace AyaNova.Biz
|
||||
#endif
|
||||
//compile and run handlebars template
|
||||
|
||||
var compileScript = $"Handlebars.compile(`{report.Template}`)({{ ayReportData:ayPreRender({ReportData}), ayClientMetaData:{clientMeta}, ayApiUrl:`{apiUrl}` }});";
|
||||
var compileScript = $"Handlebars.compile(`{report.Template}`)({{ ayReportData:ayPreRender({ReportData}), ayClientMetaData:{clientMeta}, ayServerMetaData:{{ayApiUrl:`{apiUrl}`}} }});";
|
||||
var resultHTML = await page.EvaluateExpressionAsync<string>(compileScript);
|
||||
|
||||
//render report as HTML
|
||||
|
||||
@@ -19,7 +19,7 @@ function ayRegisterHelpers() {
|
||||
});
|
||||
|
||||
Handlebars.registerHelper("ayLogo", function (size) {
|
||||
var url = `${Handlebars.escapeExpression(this.ayApiUrl)}logo/${size}`;
|
||||
var url = `${Handlebars.escapeExpression(this.ayServerMetaData.ayApiUrl)}logo/${size}`;
|
||||
return new Handlebars.SafeString("<img src='" + url + "'/>");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user