Merge pull request #6130 from jsangmeister/fix-analog-poll-diagramm
Remove chart for analog polls with a majority & fix random TypeError
This commit is contained in:
commit
416b2cc26f
@ -43,7 +43,7 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- Chart -->
|
<!-- Chart -->
|
||||||
<div class="doughnut-chart">
|
<div *ngIf="!poll.hasSpecialVoteValues" class="doughnut-chart">
|
||||||
<os-charts type="doughnut" [data]="chartData"></os-charts>
|
<os-charts type="doughnut" [data]="chartData"></os-charts>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -213,6 +213,9 @@ export abstract class BasePollDetailComponentDirective<V extends ViewBasePoll, S
|
|||||||
if (this.entitledUsersSubscription) {
|
if (this.entitledUsersSubscription) {
|
||||||
this.entitledUsersSubscription.unsubscribe();
|
this.entitledUsersSubscription.unsubscribe();
|
||||||
}
|
}
|
||||||
|
if (this.poll.isAnalog) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const userIds = new Set<number>();
|
const userIds = new Set<number>();
|
||||||
for (const entry of this.poll.entitled_users_at_stop) {
|
for (const entry of this.poll.entitled_users_at_stop) {
|
||||||
userIds.add(entry.user_id);
|
userIds.add(entry.user_id);
|
||||||
|
@ -112,6 +112,10 @@ export abstract class ViewBasePoll<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get hasSpecialVoteValues(): boolean {
|
||||||
|
return this.poll.isAnalog && this.options.some(option => option.votes.some(vote => vote.weight < 0));
|
||||||
|
}
|
||||||
|
|
||||||
public abstract get pollmethodVerbose(): string;
|
public abstract get pollmethodVerbose(): string;
|
||||||
|
|
||||||
public abstract get percentBaseVerbose(): string;
|
public abstract get percentBaseVerbose(): string;
|
||||||
|
Loading…
Reference in New Issue
Block a user