diff --git a/src/command/membershipCommandHandler.ts b/src/command/membershipCommandHandler.ts index b52a1dd..25af371 100644 --- a/src/command/membershipCommandHandler.ts +++ b/src/command/membershipCommandHandler.ts @@ -33,7 +33,7 @@ export default abstract class MembershipCommandHandler { .createQueryBuilder() .update(membership) .set({ - end: createMembership.start, + end: new Date(createMembership.start).setDate(new Date(createMembership.start).getDate() - 1), terminationReason: "beendet durch neuen Eintrag.", }) .where("end IS NULL") diff --git a/src/helpers/newsletterHelper.ts b/src/helpers/newsletterHelper.ts index 70d71c9..a07bbb2 100644 --- a/src/helpers/newsletterHelper.ts +++ b/src/helpers/newsletterHelper.ts @@ -251,7 +251,10 @@ export abstract class NewsletterHelper { this.formatJobEmit("progress", "pdf", newsletterId, pdfRecipients.length, 0, "starting sending"); - for (const [index, rec] of pdfRecipients.entries()) { + for (const [index, rec] of [ + ...pdfRecipients, + { id: 0, firstname: "Alle Mitglieder", lastname: CLUB_NAME } as member, + ].entries()) { this.formatJobEmit( "progress", "pdf", diff --git a/src/templates/newsletter.body.template.html b/src/templates/newsletter.body.template.html index 941d89e..01433c0 100644 --- a/src/templates/newsletter.body.template.html +++ b/src/templates/newsletter.body.template.html @@ -13,6 +13,7 @@

{{this.formattedStarttime}}: {{this.title}}

{{{this.content}}} +
{{/each}}