Skip to content

Commit

Permalink
Add notice about running votes for public access users
Browse files Browse the repository at this point in the history
  • Loading branch information
anbebe committed Dec 16, 2024
1 parent 420dde9 commit 220d239
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@
}
· 
</span>
<span>
{{ poll.stateVerbose | translate }}
<span class="break-word">
@if (isAnonymous && poll.canBeVotedFor()) {
{{ 'Voting in progress' | translate }}
} @else {
{{ poll.stateVerbose | translate }}
}
</span>
</div>
<!-- Menu -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ export class AssignmentPollComponent extends BasePollComponent implements OnInit
return (!this.poll.stateHasVotes && !this.votingService.canVote(this.poll)) || this.poll.isListPoll;
}

public get isAnonymous(): boolean {
return this.operator.isAnonymousLoggedIn;
}

public constructor(
protected override translate: TranslateService,
private formBuilder: UntypedFormBuilder,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@
</p>

@if (poll.canBeVotedFor()) {
<os-poll-progress [poll]="poll"></os-poll-progress>
<div class="type-and-state italic spacer-bottom-20 break-word">
<!-- State -->
<i>
{{ 'Voting in progress' | translate }}
</i>
</div>
}
@if (poll.isMotionPoll) {
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
</span>
<!-- State -->
<span class="break-word">
{{ poll.stateVerbose | translate }}
@if (isAnonymous && poll.canBeVotedFor()) {
{{ 'Voting in progress' | translate }}
} @else {
{{ poll.stateVerbose | translate }}
}
</span>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ export class MotionPollComponent extends BasePollComponent {
return false;
}

public get isAnonymous(): boolean {
return this.operator.isAnonymousLoggedIn;
}

public get canSeeVotes(): boolean {
const option = this.poll.options[0];
return (
Expand Down

0 comments on commit 220d239

Please sign in to comment.