Allow motion of non existing change recos

Allows to project any version of the motions, event if they do not yet
exist.
Gives the user more control about the content they want to project.
Currently, if a motion has no logical changed version, they would
always project the original version which does not automatically
update if a changed version exists. This behaviour would require the
user to update their current projection
This commit is contained in:
Sean 2020-08-20 13:22:47 +02:00
parent 2e8e32454e
commit 2b55388870

View File

@ -9,6 +9,7 @@ import { TitleInformationWithAgendaItem } from 'app/site/base/base-view-model-wi
import { BaseViewModelWithAgendaItemAndListOfSpeakers } from 'app/site/base/base-view-model-with-agenda-item-and-list-of-speakers'; import { BaseViewModelWithAgendaItemAndListOfSpeakers } from 'app/site/base/base-view-model-with-agenda-item-and-list-of-speakers';
import { ProjectorElementBuildDeskriptor } from 'app/site/base/projectable'; import { ProjectorElementBuildDeskriptor } from 'app/site/base/projectable';
import { Searchable } from 'app/site/base/searchable'; import { Searchable } from 'app/site/base/searchable';
import { SlideOptions } from 'app/site/base/slide-options';
import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile'; import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile';
import { ViewTag } from 'app/site/tags/models/view-tag'; import { ViewTag } from 'app/site/tags/models/view-tag';
import { ViewUser } from 'app/site/users/models/view-user'; import { ViewUser } from 'app/site/users/models/view-user';
@ -315,12 +316,8 @@ export class ViewMotion extends BaseViewModelWithAgendaItemAndListOfSpeakers<Mot
} }
public getSlide(configService: ConfigService): ProjectorElementBuildDeskriptor { public getSlide(configService: ConfigService): ProjectorElementBuildDeskriptor {
const slideOptions = []; const slideOptions: SlideOptions = [
if ( {
(this.changeRecommendations && this.changeRecommendations.length) ||
(this.amendments && this.amendments.length)
) {
slideOptions.push({
key: 'mode', key: 'mode',
displayName: _('Which version?'), displayName: _('Which version?'),
default: configService.instant('motions_recommendation_text_mode'), default: configService.instant('motions_recommendation_text_mode'),
@ -330,8 +327,8 @@ export class ViewMotion extends BaseViewModelWithAgendaItemAndListOfSpeakers<Mot
{ value: 'diff', displayName: 'Diff version' }, { value: 'diff', displayName: 'Diff version' },
{ value: 'agreed', displayName: 'Final version' } { value: 'agreed', displayName: 'Final version' }
] ]
});
} }
];
return { return {
getBasicProjectorElement: options => ({ getBasicProjectorElement: options => ({