|
@@ -28,6 +28,7 @@ export class SensorComponent implements OnInit, OnDestroy {
|
|
|
unitDescription: string;
|
|
unitDescription: string;
|
|
|
today: Date = moment().toDate();
|
|
today: Date = moment().toDate();
|
|
|
subscription: Subscription[] = [];
|
|
subscription: Subscription[] = [];
|
|
|
|
|
+ showIntervalError: boolean = false;
|
|
|
|
|
|
|
|
constructor(
|
|
constructor(
|
|
|
private activatedRoute: ActivatedRoute,
|
|
private activatedRoute: ActivatedRoute,
|
|
@@ -72,7 +73,15 @@ export class SensorComponent implements OnInit, OnDestroy {
|
|
|
* Shows get data button
|
|
* Shows get data button
|
|
|
*/
|
|
*/
|
|
|
onDateChanged(): void {
|
|
onDateChanged(): void {
|
|
|
- this.dateChanged = true;
|
|
|
|
|
|
|
+ if (moment(this.to).diff(moment(this.from), 'months') > 6){
|
|
|
|
|
+ this.dateChanged = false;
|
|
|
|
|
+ this.showIntervalError = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ else{
|
|
|
|
|
+ this.dateChanged = true;
|
|
|
|
|
+ this.showIntervalError = false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|