IO-2687 Delay template load to wait for translations.

This commit is contained in:
Patrick Fic
2024-03-19 08:52:30 -07:00
parent a6497bb14e
commit 1b16d75dc7
3 changed files with 37 additions and 22 deletions

View File

@@ -14,7 +14,12 @@ const server = import.meta.env.VITE_APP_REPORTS_SERVER_URL;
jsreport.serverUrl = server;
const Templates = TemplateList();
let Templates;
export function GenerateTemplates(){
//Required as a part of the transition to Vite.
//Previous method had the template hash generating before translations loaded, resulting in empty files.
Templates = TemplateList()
}
export default async function RenderTemplate(
templateObject,