Merge pull request 'Consider updated Date Selection in Schedule History' (#103) from issue-94 into master
All checks were successful
Java CI with Maven / build-and-push-frontend (push) Successful in 2m22s
Java CI with Maven / build-and-push-backend (push) Successful in 1m13s

Reviewed-on: #103
This commit is contained in:
sebastian 2024-03-14 15:03:36 +01:00
commit fcbf8b0a17
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;
}
})
}
} }