issue-20 #46
@ -13,11 +13,11 @@
|
|||||||
<label id="example-name-label" class="example-name-label">0</label>
|
<label id="example-name-label" class="example-name-label">0</label>
|
||||||
<label class="example-value-label">{{task!.eta}}</label>
|
<label class="example-value-label">{{task!.eta}}</label>
|
||||||
</div>
|
</div>
|
||||||
<mat-slider min="0" [max]="task!.eta" step="15" style="width: 100%;" [discrete]="true" [showTickMarks]="true" #slider>
|
<mat-slider min="0" [max]="task!.eta" step="15" style="width: 100%;" [discrete]="true" [showTickMarks]="true" #slider >
|
||||||
<input matSliderThumb>
|
<input matSliderThumb [(ngModel)]="slideMinutes">
|
||||||
</mat-slider>
|
</mat-slider>
|
||||||
</div>
|
</div>
|
||||||
<button style="margin-left: 20px" mat-raised-button color="primary">Add</button>
|
<button style="margin-left: 20px" mat-raised-button color="primary" (click)="addSlideMinutes()">Add</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="progress-stacked" >
|
<div class="progress-stacked" >
|
||||||
|
@ -32,6 +32,7 @@ export class AdvancedSchedulerComponent implements OnInit, OnChanges{
|
|||||||
|
|
||||||
@ViewChild('startTimePicker') startTimePicker?: DateTimePickerComponent;
|
@ViewChild('startTimePicker') startTimePicker?: DateTimePickerComponent;
|
||||||
@ViewChild('stopTimePicker') stopTimePicker?: DateTimePickerComponent;
|
@ViewChild('stopTimePicker') stopTimePicker?: DateTimePickerComponent;
|
||||||
|
slideMinutes: number = 0;
|
||||||
|
|
||||||
@Output('onStartTimeSet') startTimeEmitter : EventEmitter<Date> = new EventEmitter<Date>();
|
@Output('onStartTimeSet') startTimeEmitter : EventEmitter<Date> = new EventEmitter<Date>();
|
||||||
@Output('onEndTimeSet') endTimeEmitter : EventEmitter<Date> = new EventEmitter<Date>();
|
@Output('onEndTimeSet') endTimeEmitter : EventEmitter<Date> = new EventEmitter<Date>();
|
||||||
@ -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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user