Detect if the parent motion was deleted

Fixes an error where the motion detail page would not open if the parent
motion to an amendment was deleted.
Show a warning if the parent motion to an amendment is missing
This commit is contained in:
Sean 2020-07-17 16:06:05 +02:00
parent 6e2e1ebe7a
commit e268903536
1 changed files with 3 additions and 2 deletions

View File

@ -878,9 +878,10 @@
<!-- If the array exists, we do not have an error -->
<div *ngIf="motion.diffLines">
<div class="alert alert-info" *ngIf="motion.diffLines.length === 0">
<span>{{ 'No changes at the text.' | translate }}</span>
<i *ngIf="motion.parent">{{ 'No changes at the text.' | translate }}</i>
<i *ngIf="!motion.parent">{{ 'The parent motion was deleted' | translate }}</i>
</div>
<ng-container *ngIf="!isRecoMode(ChangeRecoMode.Diff) && !isFinalEdit">
<ng-container *ngIf="motion.parent && !isRecoMode(ChangeRecoMode.Diff) && !isFinalEdit">
<div
*ngFor="let paragraph of getAmendmentParagraphs()"
class="motion-text motion-text-diff amendment-view"