Fix null values in recommencation label

Fixes an issue that was showing empty values when setting
a recommendation
This commit is contained in:
Sean Engelhardt 2019-12-10 10:56:21 +01:00
parent 77bf24fe3a
commit af9a62abbb
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"