execute Bulk from ScheduleList
This commit is contained in:
parent
bb972283a3
commit
6ded6da0e2
@ -36,7 +36,7 @@
|
|||||||
<div class="timestampTitle">
|
<div class="timestampTitle">
|
||||||
Nächste Ausführung:
|
Nächste Ausführung:
|
||||||
</div>
|
</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 }}
|
{{ schedule.next?.bulk?.name }}
|
||||||
</div>
|
</div>
|
||||||
</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">{{ schedule.last?.lastFuzzyTimestamp.dayName }}: {{ schedule.last?.lastFuzzyTimestamp.timeString }}</ng-container>
|
||||||
<ng-container *ngIf="!schedule.last">- - -</ng-container>
|
<ng-container *ngIf="!schedule.last">- - -</ng-container>
|
||||||
</div>
|
</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 }}
|
{{ schedule.last?.bulk?.name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import {NO_OP} from "../../../api/api.service";
|
|||||||
import {Update} from "../../../api/Update";
|
import {Update} from "../../../api/Update";
|
||||||
import {ScheduleEntryService} from "../../../api/schedule/entry/schedule-entry.service";
|
import {ScheduleEntryService} from "../../../api/schedule/entry/schedule-entry.service";
|
||||||
import {ScheduleEntry} from "../../../api/schedule/entry/ScheduleEntry";
|
import {ScheduleEntry} from "../../../api/schedule/entry/ScheduleEntry";
|
||||||
|
import {Bulk} from "../../../api/bulk/Bulk";
|
||||||
|
import {BulkService} from "../../../api/bulk/BulkService";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-schedule-list',
|
selector: 'app-schedule-list',
|
||||||
@ -27,6 +29,7 @@ export class ScheduleListComponent implements OnInit {
|
|||||||
constructor(
|
constructor(
|
||||||
readonly scheduleService: ScheduleService,
|
readonly scheduleService: ScheduleService,
|
||||||
readonly entryService: ScheduleEntryService,
|
readonly entryService: ScheduleEntryService,
|
||||||
|
readonly bulkService: BulkService,
|
||||||
) {
|
) {
|
||||||
// nothing
|
// nothing
|
||||||
}
|
}
|
||||||
@ -74,4 +77,10 @@ export class ScheduleListComponent implements OnInit {
|
|||||||
this.entryService.set(entry, 'skip', skip);
|
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