diff --git a/client/src/app/site/cinema/components/cinema/cinema.component.ts b/client/src/app/site/cinema/components/cinema/cinema.component.ts index 7c292f101..91e1b6712 100644 --- a/client/src/app/site/cinema/components/cinema/cinema.component.ts +++ b/client/src/app/site/cinema/components/cinema/cinema.component.ts @@ -10,7 +10,6 @@ import { ListOfSpeakersRepositoryService } from 'app/core/repositories/agenda/li import { ProjectorRepositoryService } from 'app/core/repositories/projector/projector-repository.service'; import { DetailNavigable, isDetailNavigable } from 'app/shared/models/base/detail-navigable'; import { ProjectorElement } from 'app/shared/models/core/projector'; -import { ListOfSpeakersComponent } from 'app/site/agenda/components/list-of-speakers/list-of-speakers.component'; import { ViewListOfSpeakers } from 'app/site/agenda/models/view-list-of-speakers'; import { BaseProjectableViewModel } from 'app/site/base/base-projectable-view-model'; import { BaseViewComponentDirective } from 'app/site/base/base-view'; @@ -20,7 +19,8 @@ import { CurrentListOfSpeakersService } from 'app/site/projector/services/curren @Component({ selector: 'os-cinema', templateUrl: './cinema.component.html', - styleUrls: ['./cinema.component.scss'] + styleUrls: ['./cinema.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush }) export class CinemaComponent extends BaseViewComponentDirective implements OnInit { public listOfSpeakers: ViewListOfSpeakers; @@ -109,9 +109,11 @@ export class CinemaComponent extends BaseViewComponentDirective implements OnIni } else { this.projectedViewModel = null; } + this.cd.markForCheck(); }), this.closService.currentListOfSpeakersObservable.subscribe(clos => { this.listOfSpeakers = clos; + this.cd.markForCheck(); }) ); } diff --git a/client/src/app/site/cinema/components/poll-collection/poll-collection.component.html b/client/src/app/site/cinema/components/poll-collection/poll-collection.component.html index 8af22c666..b9ca73d3d 100644 --- a/client/src/app/site/cinema/components/poll-collection/poll-collection.component.html +++ b/client/src/app/site/cinema/components/poll-collection/poll-collection.component.html @@ -12,8 +12,12 @@ -

- {{ getPollVoteTitle(poll) }} +

+ + {{ getPollVoteTitle(poll) }} + +
+ {{ 'finished (unpublished)' | translate }}

diff --git a/client/src/app/site/cinema/components/poll-collection/poll-collection.component.ts b/client/src/app/site/cinema/components/poll-collection/poll-collection.component.ts index 0b6a866da..e325cc3f2 100644 --- a/client/src/app/site/cinema/components/poll-collection/poll-collection.component.ts +++ b/client/src/app/site/cinema/components/poll-collection/poll-collection.component.ts @@ -112,6 +112,19 @@ export class PollCollectionComponent extends BaseViewComponentDirective implemen } } + /** + * TODO: Some non abstract base poll service was required + * @param poll + */ + public canManagePoll(poll: ViewBasePoll): boolean { + if (poll.pollClassType === PollClassType.Motion) { + return this.operator.hasPerms(this.permission.motionsCanManagePolls); + } else if (poll.pollClassType === PollClassType.Assignment) { + return this.operator.hasPerms(this.permission.assignmentsCanManage); + } + return false; + } + /** * Helper function to detect new latest published polls and set them. */ diff --git a/client/src/app/site/polls/components/poll-progress/poll-progress.component.ts b/client/src/app/site/polls/components/poll-progress/poll-progress.component.ts index 2df1678ba..0b8e10886 100644 --- a/client/src/app/site/polls/components/poll-progress/poll-progress.component.ts +++ b/client/src/app/site/polls/components/poll-progress/poll-progress.component.ts @@ -33,6 +33,9 @@ export class PollProgressComponent extends BaseViewComponentDirective implements return this.operator.hasPerms(this.permission.agendaCanManageListOfSpeakers); } + /** + * TODO: some non apstract poll function service is required. + */ private get canManagePoll(): boolean { if (this.poll.pollClassType === PollClassType.Motion) { return this.operator.hasPerms(this.permission.motionsCanManagePolls);