FIX: Schedule-list does not really show NEXT execution but any other
This commit is contained in:
parent
9bc0111c01
commit
113614f1e7
@ -11,7 +11,7 @@ export class Schedule {
|
|||||||
readonly title: string,
|
readonly title: string,
|
||||||
readonly entries: ScheduleEntry[],
|
readonly entries: ScheduleEntry[],
|
||||||
) {
|
) {
|
||||||
this.next = entries.filter(e => e.nextFuzzyTimestamp)[0];
|
this.next = entries.filter(e => e.nextFuzzyTimestamp).sort((a, b) => a.nextFuzzyTimestamp.date.getTime() - b.nextFuzzyTimestamp.date.getTime())[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
static fromJson(json: any): Schedule {
|
static fromJson(json: any): Schedule {
|
||||||
|
|||||||
@ -18,9 +18,9 @@
|
|||||||
{{schedule.title}}
|
{{schedule.title}}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="number first" [class.empty]="!schedule.next?.nextClearTimestamp">{{schedule.next?.nextClearTimestamp.dayName}}</td>
|
<td class="number first" [class.empty]="!schedule.next?.nextFuzzyTimestamp">{{schedule.next?.nextFuzzyTimestamp.dayName}}</td>
|
||||||
<td class="number middle" [class.empty]="!schedule.next?.nextClearTimestamp">: </td>
|
<td class="number middle" [class.empty]="!schedule.next?.nextFuzzyTimestamp">: </td>
|
||||||
<td class="number last" [class.empty]="!schedule.next?.nextClearTimestamp">{{schedule.next?.nextClearTimestamp.timeString}}</td>
|
<td class="number last" [class.empty]="!schedule.next?.nextFuzzyTimestamp">{{schedule.next?.nextFuzzyTimestamp.timeString}}</td>
|
||||||
|
|
||||||
<td class="number first" [class.empty]="!schedule.next?.property">{{schedule.next?.property?.title}}</td>
|
<td class="number first" [class.empty]="!schedule.next?.property">{{schedule.next?.property?.title}}</td>
|
||||||
<td class="number middle" [class.empty]="!schedule.next?.property"> = </td>
|
<td class="number middle" [class.empty]="!schedule.next?.property"> = </td>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user