Skip to content

Commit

Permalink
Show vote count in dialog before sending votes. (#1053)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrenkert authored May 9, 2022
1 parent 7b2dcb0 commit b7866b0
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,13 @@ export class AssignmentPollVoteComponent extends BasePollVoteComponent<ViewAssig
return;
}
const title = this.translate.instant(`Submit selection now?`);
const content = this.translate.instant(`Your decision cannot be changed afterwards.`);
let content = this.translate.instant(`Your decision cannot be changed afterwards.`);
if (this.poll.max_votes_amount > 1 && !this.isGlobalOptionSelected()) {
content =
this.translate.instant(`Your votes`) +
`: ${this.getVotesCount()}/${this.poll.max_votes_amount}<br>` +
content;
}
const confirmed = await this.promptService.open(title, content);
if (confirmed) {
this.deliveringVote[user.id] = true;
Expand Down

0 comments on commit b7866b0

Please sign in to comment.