<div className="container {{ job.lastRun.status }} {{ job.type }}">
    <div
        [matBadge]="job.type == 'longrun' ? 'lr' : job.lastRun.status[0]"
        [title]="job.lastRun.status"
        matBadgeOverlap="true"
        matBadgePosition="before"
    >
        <div class='main'>
            <div class='name' [title]='job.id'>{{ job.name }}</div>
        </div>
        <div class='type'>Type: {{ job.type }} ({{ job.schedParams }})</div>
        <div class='lastRun'
            *ngIf='job.lastRun.status != "undef"'
        >
            <div [className]='job.lastRun.status'>
                Last run at {{ job.lastRun.time | date : 'medium' }}: {{ job.lastRun.msg }}
            </div>
        </div>
        <div>
            Next run at {{ job.nextRunTime | date : 'medium' }}
        </div>
    </div>
    <mat-expansion-panel *ngIf='job.features.length > 0'>
        <mat-expansion-panel-header>
            <mat-panel-title>
                Features ({{ job.features.length }})
            </mat-panel-title>
        </mat-expansion-panel-header>
        <div class='features'>
            <div *ngFor='let feature of job.features'>
                <gisaf-admin-scheduler-feature [feature]=feature>
                </gisaf-admin-scheduler-feature>
            </div>
        </div>
    </mat-expansion-panel>
</div>