|
|
@@ -87,22 +87,15 @@ export class CalculatorComponent implements HsPanelComponent, OnInit {
|
|
|
*/
|
|
|
resetDate() {
|
|
|
this.calcService.selectedDate = undefined;
|
|
|
+ this.calcService.selectedDateCalendar = undefined;
|
|
|
this.calcService.availableDates = undefined;
|
|
|
}
|
|
|
|
|
|
- updateRangeSlider(value: string) {
|
|
|
- this.calcService.dateCalendarSelects.next({date: value});
|
|
|
- }
|
|
|
-
|
|
|
updateSelectedDate(value: NgbDateStruct) {
|
|
|
this.calcService.selectedDate = value.year + '-' + value.month + '-' + value.day;
|
|
|
}
|
|
|
|
|
|
- isWeekend(date: NgbDateStruct) {
|
|
|
- return date.day > 5;
|
|
|
- }
|
|
|
-
|
|
|
- hasTask(date: NgbDateStruct): boolean {
|
|
|
+ hasDataAvailable(date: NgbDateStruct): boolean {
|
|
|
if (this.calcService && this.calcService.availableDates) {
|
|
|
let found = this.calcService.availableDates.filter((item, index) => {
|
|
|
return item.indexOf(`${date.year}-${date.month.toString().padStart(2, "0")}-${date.day.toString().padStart(2, "0")}`) == 0;
|