execute Bulk from ScheduleList
This commit is contained in:
parent
bb972283a3
commit
6ded6da0e2
@ -36,7 +36,7 @@
|
||||
<div class="timestampTitle">
|
||||
Nächste Ausführung:
|
||||
</div>
|
||||
<div class="timestampBulk" [class.timestampBulkEmpty]="!schedule.next?.bulk" *ngIf="schedule.next?.bulk">
|
||||
<div class="timestampBulk" [class.timestampBulkEmpty]="!schedule.next?.bulk" *ngIf="schedule.next?.bulk" (click)="execute(schedule.next?.bulk)">
|
||||
{{ schedule.next?.bulk?.name }}
|
||||
</div>
|
||||
</div>
|
||||
@ -49,7 +49,7 @@
|
||||
<ng-container *ngIf="schedule.last">{{ schedule.last?.lastFuzzyTimestamp.dayName }}: {{ schedule.last?.lastFuzzyTimestamp.timeString }}</ng-container>
|
||||
<ng-container *ngIf="!schedule.last">- - -</ng-container>
|
||||
</div>
|
||||
<div class="timestampBulk" [class.timestampBulkEmpty]="!schedule.last?.bulk" *ngIf="schedule.last?.bulk">
|
||||
<div class="timestampBulk" [class.timestampBulkEmpty]="!schedule.last?.bulk" *ngIf="schedule.last?.bulk" (click)="execute(schedule.last?.bulk)">
|
||||
{{ schedule.last?.bulk?.name }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -6,6 +6,8 @@ import {NO_OP} from "../../../api/api.service";
|
||||
import {Update} from "../../../api/Update";
|
||||
import {ScheduleEntryService} from "../../../api/schedule/entry/schedule-entry.service";
|
||||
import {ScheduleEntry} from "../../../api/schedule/entry/ScheduleEntry";
|
||||
import {Bulk} from "../../../api/bulk/Bulk";
|
||||
import {BulkService} from "../../../api/bulk/BulkService";
|
||||
|
||||
@Component({
|
||||
selector: 'app-schedule-list',
|
||||
@ -27,6 +29,7 @@ export class ScheduleListComponent implements OnInit {
|
||||
constructor(
|
||||
readonly scheduleService: ScheduleService,
|
||||
readonly entryService: ScheduleEntryService,
|
||||
readonly bulkService: BulkService,
|
||||
) {
|
||||
// nothing
|
||||
}
|
||||
@ -74,4 +77,10 @@ export class ScheduleListComponent implements OnInit {
|
||||
this.entryService.set(entry, 'skip', skip);
|
||||
}
|
||||
|
||||
execute(bulk: Bulk | undefined) {
|
||||
if (bulk && confirm("Stapel Ausführen?\n\n" + bulk.name)) {
|
||||
this.bulkService.run(bulk);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user