diff --git a/frontend/src/app/schedules/advanced-scheduler/advanced-scheduler.component.html b/frontend/src/app/schedules/advanced-scheduler/advanced-scheduler.component.html index 41878ed..79f7a1b 100644 --- a/frontend/src/app/schedules/advanced-scheduler/advanced-scheduler.component.html +++ b/frontend/src/app/schedules/advanced-scheduler/advanced-scheduler.component.html @@ -13,11 +13,11 @@ - - + + - +
diff --git a/frontend/src/app/schedules/advanced-scheduler/advanced-scheduler.component.ts b/frontend/src/app/schedules/advanced-scheduler/advanced-scheduler.component.ts index ff90c90..ca801bd 100644 --- a/frontend/src/app/schedules/advanced-scheduler/advanced-scheduler.component.ts +++ b/frontend/src/app/schedules/advanced-scheduler/advanced-scheduler.component.ts @@ -32,6 +32,7 @@ export class AdvancedSchedulerComponent implements OnInit, OnChanges{ @ViewChild('startTimePicker') startTimePicker?: DateTimePickerComponent; @ViewChild('stopTimePicker') stopTimePicker?: DateTimePickerComponent; + slideMinutes: number = 0; @Output('onStartTimeSet') startTimeEmitter : EventEmitter = new EventEmitter(); @Output('onEndTimeSet') endTimeEmitter : EventEmitter = new EventEmitter(); @@ -152,4 +153,14 @@ export class AdvancedSchedulerComponent implements OnInit, OnChanges{ } } + addSlideMinutes() { + if(this.selectedStartTime != undefined) { + const updatedStopTime = moment(this.selectedStartTime); + updatedStopTime.add(this.slideMinutes, 'm'); + + if(updatedStopTime.isAfter(moment(this.selectedStopTime))) { + this.setStopTime(updatedStopTime.toDate()); + } + } + } }