diff --git a/client/src/app/site/pages/meetings/pages/agenda/modules/topics/services/topic-pdf.service/topic-pdf.service.ts b/client/src/app/site/pages/meetings/pages/agenda/modules/topics/services/topic-pdf.service/topic-pdf.service.ts index 06911f1300..062ea6bb6b 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/modules/topics/services/topic-pdf.service/topic-pdf.service.ts +++ b/client/src/app/site/pages/meetings/pages/agenda/modules/topics/services/topic-pdf.service/topic-pdf.service.ts @@ -172,10 +172,11 @@ export class TopicPdfService { } }) .map((singleResult: VotingResult) => { - const votingKey = this.translate.instant(this.pollKeyVerbose.transform(singleResult.vote!)); + const pollKey = this.pollKeyVerbose.transform(singleResult.vote!); + const votingKey = pollKey ? `${this.translate.instant(pollKey)}: ` : ``; const resultValue = this.parsePollNumber.transform(singleResult.amount!); const resultInPercent = this.pollPercentBase.transform(singleResult.amount!, poll, votingResult); - return `${votingKey}${!!votingKey ? `: ` : ``}${resultValue} ${ + return `${votingKey}${resultValue} ${ singleResult.showPercent && resultInPercent ? resultInPercent : `` }`; }); diff --git a/client/src/app/site/pages/meetings/pages/assignments/services/assignment-pdf.service.ts b/client/src/app/site/pages/meetings/pages/assignments/services/assignment-pdf.service.ts index e448cec099..3de27e716e 100644 --- a/client/src/app/site/pages/meetings/pages/assignments/services/assignment-pdf.service.ts +++ b/client/src/app/site/pages/meetings/pages/assignments/services/assignment-pdf.service.ts @@ -262,10 +262,11 @@ export class AssignmentPdfService { } }) .map((singleResult: VotingResult) => { - const votingKey = this.translate.instant(this.pollKeyVerbose.transform(singleResult.vote!)); + const pollKey = this.pollKeyVerbose.transform(singleResult.vote!); + const votingKey = pollKey ? `${this.translate.instant(pollKey)}: ` : ``; const resultValue = this.parsePollNumber.transform(singleResult.amount!); const resultInPercent = this.pollPercentBase.transform(singleResult.amount!, poll, votingResult); - return `${votingKey}${!!votingKey ? `: ` : ``}${resultValue} ${ + return `${votingKey}${resultValue} ${ singleResult.showPercent && resultInPercent ? resultInPercent : `` }`; });