fix: dashboard next unit structural directive causing animation issues

This commit is contained in:
2022-10-21 16:03:49 +02:00
committed by Rainer Killinger
parent acdd93eb99
commit c8f6a27c57

View File

@@ -25,26 +25,28 @@
<ion-icon size="40" weight="300" name="grid_view"></ion-icon>
<ion-label>{{ 'schedule.recurring' | translate }}</ion-label>
</a>
<!-- Avoid structural directives here, they might interfere with the collapse animation -->
<a
*ngIf="nextEvent && nextEvent.event"
[routerLink]="['/data-detail', nextEvent.event.uid]"
[routerLink]="
nextEvent?.event
? ['/data-detail', nextEvent!.event.uid]
: ['/schedule/recurring']
"
class="schedule-item-button"
>
<ion-label>{{ 'dashboard.schedule.title' | translate }}</ion-label>
<ion-label>
{{ nextEvent.dates | nextDateInList | amDateFormat: 'll, HH:mm' }}
{{ 'timeSuffix' | translate }}
{{
nextEvent?.event
? (nextEvent!.dates | nextDateInList | amDateFormat: 'll, HH:mm')
: ('dashboard.schedule.noEvent' | translate)
}}
</ion-label>
<ion-label>{{ nextEvent.event.name }}</ion-label>
</a>
<a
*ngIf="!nextEvent || !nextEvent.event"
[routerLink]="['/schedule/recurring']"
class="schedule-item-button"
>
<ion-label>{{ 'dashboard.schedule.title' | translate }}</ion-label>
<ion-label>{{ 'dashboard.schedule.noEvent' | translate }}</ion-label>
<ion-label>{{ 'dashboard.schedule.noEventLink' | translate }}</ion-label>
<ion-label>{{
nextEvent?.event
? nextEvent!.event.name
: ('dashboard.schedule.noEventLink' | translate)
}}</ion-label>
</a>
</div>