From b472a3851b214939968a80c4e7b3251a265468b0 Mon Sep 17 00:00:00 2001 From: Sean Engelhardt Date: Thu, 21 Mar 2019 11:31:02 +0100 Subject: [PATCH] Add motion to motion change observation Also fixes an some navigation for motion and amendments --- .../motions/motion-repository.service.ts | 3 ++- .../app/site/motions/models/view-motion.ts | 5 ++++- .../motion-detail.component.html | 2 +- .../motion-detail/motion-detail.component.ts | 21 ++++++++++++------- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/client/src/app/core/repositories/motions/motion-repository.service.ts b/client/src/app/core/repositories/motions/motion-repository.service.ts index 37419e0e9..dd537d68a 100644 --- a/client/src/app/core/repositories/motions/motion-repository.service.ts +++ b/client/src/app/core/repositories/motions/motion-repository.service.ts @@ -101,7 +101,8 @@ export class MotionRepositoryService extends BaseAgendaContentObjectRepository('motions_motions_sorting').subscribe(conf => { this.sortProperty = conf; diff --git a/client/src/app/site/motions/models/view-motion.ts b/client/src/app/site/motions/models/view-motion.ts index 868bfc4f1..50fe69337 100644 --- a/client/src/app/site/motions/models/view-motion.ts +++ b/client/src/app/site/motions/models/view-motion.ts @@ -628,7 +628,10 @@ export class ViewMotion extends BaseAgendaViewModel implements Searchable { public getSlide(configService: ConfigService): ProjectorElementBuildDeskriptor { const slideOptions = []; - if ((this.changeRecommendations && this.changeRecommendations.length) || this.amendments) { + if ( + (this.changeRecommendations && this.changeRecommendations.length) || + (this.amendments && this.amendments.length) + ) { slideOptions.push({ key: 'mode', displayName: _('Which version?'), diff --git a/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.html b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.html index 0125bbe08..687a9c822 100644 --- a/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.html +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.html @@ -1,7 +1,7 @@