diff --git a/client/src/app/shared/components/motion-poll-detail-content/motion-poll-detail-content.component.scss b/client/src/app/shared/components/motion-poll-detail-content/motion-poll-detail-content.component.scss
index 5f6eda914..01b374641 100644
--- a/client/src/app/shared/components/motion-poll-detail-content/motion-poll-detail-content.component.scss
+++ b/client/src/app/shared/components/motion-poll-detail-content/motion-poll-detail-content.component.scss
@@ -1,4 +1,4 @@
-@import '~assets/styles/poll-colors.scss';
+@import '~assets/styles/poll-styles-common.scss';
.result-wrapper {
display: grid;
@@ -21,18 +21,6 @@
text-align: right;
}
}
-
- .yes {
- color: $votes-yes-color;
- }
-
- .no {
- color: $votes-no-color;
- }
-
- .abstain {
- color: $votes-abstain-color;
- }
}
.doughnut-chart {
diff --git a/client/src/app/shared/models/poll/base-poll.ts b/client/src/app/shared/models/poll/base-poll.ts
index c998fce03..f4d178beb 100644
--- a/client/src/app/shared/models/poll/base-poll.ts
+++ b/client/src/app/shared/models/poll/base-poll.ts
@@ -77,6 +77,22 @@ export abstract class BasePoll<
return this.onehundred_percent_base === PercentBase.Cast;
}
+ public get isAnalog(): boolean {
+ return this.type === PollType.Analog;
+ }
+
+ public get isNamed(): boolean {
+ return this.type === PollType.Named;
+ }
+
+ public get isAnon(): boolean {
+ return this.type === PollType.Pseudoanonymous;
+ }
+
+ public get isEVoting(): boolean {
+ return this.isNamed || this.isAnon;
+ }
+
/**
* Determine if the state is finished or published
*/
diff --git a/client/src/app/shared/pipes/poll-percent-base.pipe.ts b/client/src/app/shared/pipes/poll-percent-base.pipe.ts
index da48a9c6d..cfec9d13c 100644
--- a/client/src/app/shared/pipes/poll-percent-base.pipe.ts
+++ b/client/src/app/shared/pipes/poll-percent-base.pipe.ts
@@ -36,12 +36,10 @@ export class PollPercentBasePipe implements PipeTransform {
totalByBase = this.motionPollService.getPercentBase(poll);
}
- if (totalByBase) {
+ if (totalByBase && totalByBase > 0) {
const percentNumber = (value / totalByBase) * 100;
- if (percentNumber > 0) {
- const result = percentNumber % 1 === 0 ? percentNumber : percentNumber.toFixed(this.decimalPlaces);
- return `(${result} %)`;
- }
+ const result = percentNumber % 1 === 0 ? percentNumber : percentNumber.toFixed(this.decimalPlaces);
+ return `(${result} %)`;
}
return null;
}
diff --git a/client/src/app/site/assignments/components/assignment-detail/assignment-detail.component.html b/client/src/app/site/assignments/components/assignment-detail/assignment-detail.component.html
index da6b6a668..0c4e7aecc 100644
--- a/client/src/app/site/assignments/components/assignment-detail/assignment-detail.component.html
+++ b/client/src/app/site/assignments/components/assignment-detail/assignment-detail.component.html
@@ -263,7 +263,7 @@
+ {{ pollHint }} +