Skip to content

Commit

Permalink
Feat: Added a default time frame
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingcedru committed Oct 7, 2024
1 parent fc6d7fd commit 84c7788
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export class AllMetereadsComponent implements OnInit {
dataSource: MatTableDataSource<any>;
readdata: any;

startDate: Date = new Date(new Date().setMonth(new Date().getMonth() - 1));
devicedata: any;
p: number = 1;
total: number = 0;
Expand Down Expand Up @@ -284,7 +285,7 @@ export class AllMetereadsComponent implements OnInit {
this.externalId = result.externalId;
}

this.FilterForm.controls['start'].setValue(result.commissioningDate);
this.FilterForm.controls['start'].setValue(this.startDate);
this.FilterForm.controls['end'].setValue(new Date());

this.getPagedData();
Expand Down Expand Up @@ -330,4 +331,4 @@ export class AllMetereadsComponent implements OnInit {
this.p = event.pageIndex + 1;
this.getPagedData();
}
}
}

0 comments on commit 84c7788

Please sign in to comment.