From 220d239ab08dc2584e16757a74ea987881f8570c Mon Sep 17 00:00:00 2001 From: anbebe Date: Mon, 16 Dec 2024 10:47:32 +0100 Subject: [PATCH] Add notice about running votes for public access users --- .../assignment-poll/assignment-poll.component.html | 8 ++++++-- .../assignment-poll/assignment-poll.component.ts | 4 ++++ .../poll-collection/poll-collection.component.html | 7 ++++++- .../components/motion-poll/motion-poll.component.html | 6 +++++- .../components/motion-poll/motion-poll.component.ts | 4 ++++ 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.html b/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.html index 9ebf5b3de4..6b9663300c 100644 --- a/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.html +++ b/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.html @@ -28,8 +28,12 @@ } ·  - - {{ poll.stateVerbose | translate }} + + @if (isAnonymous && poll.canBeVotedFor()) { + {{ 'Voting in progress' | translate }} + } @else { + {{ poll.stateVerbose | translate }} + } diff --git a/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.ts b/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.ts index 66fa2ec5a4..441118e662 100644 --- a/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.ts +++ b/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.ts @@ -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, diff --git a/client/src/app/site/pages/meetings/pages/autopilot/components/poll-collection/poll-collection.component.html b/client/src/app/site/pages/meetings/pages/autopilot/components/poll-collection/poll-collection.component.html index 9fd0b4d834..192befadf2 100644 --- a/client/src/app/site/pages/meetings/pages/autopilot/components/poll-collection/poll-collection.component.html +++ b/client/src/app/site/pages/meetings/pages/autopilot/components/poll-collection/poll-collection.component.html @@ -29,7 +29,12 @@

@if (poll.canBeVotedFor()) { - +
+ + + {{ 'Voting in progress' | translate }} + +
} @if (poll.isMotionPoll) {
diff --git a/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/components/motion-poll/motion-poll.component.html b/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/components/motion-poll/motion-poll.component.html index 9601a1b0cb..7ed96988d1 100644 --- a/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/components/motion-poll/motion-poll.component.html +++ b/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/components/motion-poll/motion-poll.component.html @@ -41,7 +41,11 @@ - {{ poll.stateVerbose | translate }} + @if (isAnonymous && poll.canBeVotedFor()) { + {{ 'Voting in progress' | translate }} + } @else { + {{ poll.stateVerbose | translate }} + }
diff --git a/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/components/motion-poll/motion-poll.component.ts b/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/components/motion-poll/motion-poll.component.ts index ac07c0e55a..e0c5047e4d 100644 --- a/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/components/motion-poll/motion-poll.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/components/motion-poll/motion-poll.component.ts @@ -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 (