Merge pull request #5160 from tsiegleauq/states-with-no-label

Fix null values in recommencation label
This commit is contained in:
Emanuel Schütze 2019-12-10 14:05:02 +01:00 committed by GitHub
commit cc58f59fa1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -47,7 +47,7 @@ export class ViewMotion extends BaseViewModelWithAgendaItemAndListOfSpeakers<Mot
}
public get possibleRecommendations(): ViewState[] {
return this.workflow ? this.workflow.states.filter(state => state.recommendation_label !== undefined) : null;
return this.workflow ? this.workflow.states.filter(state => state.recommendation_label) : [];
}
public get agenda_type(): number | null {

View File

@ -274,7 +274,14 @@
</div>
<!-- Recommendation -->
<div *ngIf="(perms.isAllowed('change_metadata') || motion.recommendation) && recommender && !editMotion">
<div
*ngIf="
(perms.isAllowed('change_metadata') || motion.recommendation) &&
recommender &&
motion.possibleRecommendations.length &&
!editMotion
"
>
<os-extension-field
title="{{ recommender }}"
[inputValue]="recommendationStateExtension"