Consider updated Date Selection in Schedule History #103

Merged
sebastian merged 1 commits from issue-94 into master 2024-03-14 15:03:37 +01:00
2 changed files with 9 additions and 1 deletions

View File

@ -3,7 +3,7 @@
<mat-form-field class="long-form">
<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-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker></mat-datepicker>

View File

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