@@ -43,11 +43,11 @@ export class PdfCreator {
|
||||
* @param runner The runner you want to generate the contracts for.
|
||||
* @param locale The locale used for the contracts (default:en)
|
||||
*/
|
||||
public async generateSponsoringContract(runner: Runner, locale: string = "en"): Promise<any> {
|
||||
public async generateSponsoringContract(runners: Runner[], locale: string = "en"): Promise<any> {
|
||||
i18next.changeLanguage(locale);
|
||||
const template_source = fs.readFileSync(`${this.templateDir}/sponsoring_contract.html`, 'utf8');
|
||||
const template = Handlebars.compile(template_source);
|
||||
const result = template({ runner: runner })
|
||||
const result = template({ runners })
|
||||
return await this.renderPdf(result, { format: "A5", landscape: true });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user