Consider updated Date Selection in Schedule History
All checks were successful
Java CI with Maven / build-and-push-frontend (push) Successful in 9s
Java CI with Maven / build-and-push-backend (push) Successful in 7s

This commit is contained in:
Sebastian Böckelmann 2024-03-14 15:02:50 +01:00
parent 574c86af7e
commit d68794236e
2 changed files with 9 additions and 1 deletions

View File

@ -3,7 +3,7 @@
<mat-form-field class="long-form"> <mat-form-field class="long-form">
<mat-label>Choose a date</mat-label> <mat-label>Choose a date</mat-label>
<input matInput [matDatepicker]="picker" [(ngModel)]="selectedDate"> <input matInput [matDatepicker]="picker" [(ngModel)]="selectedDate" (ngModelChange)="onUpdateSelectedDate()">
<mat-hint>MM/DD/YYYY</mat-hint> <mat-hint>MM/DD/YYYY</mat-hint>
<mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle> <mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker></mat-datepicker> <mat-datepicker #picker></mat-datepicker>

View File

@ -59,4 +59,12 @@ export class ScheduleHistoryComponent implements OnInit{
return duration.asMinutes() + " Minutes"; return duration.asMinutes() + " Minutes";
} }
onUpdateSelectedDate() {
this.historyService.historySchedulesDateGet(moment(this.selectedDate).format("YYYY-MM-DD")).subscribe({
next: resp => {
this.schedules = resp;
}
})
}
} }