Skip to content

Commit

Permalink
Filter progress list by date (hobbyfarm#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
jggoebel committed May 7, 2024
1 parent 4151298 commit 4454991
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/app/session-statistics/session-statistics.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,11 @@ export class SessionStatisticsComponent implements OnInit, OnChanges {

private updateTotalSessions(progressData: Progress[]) {
this.totalSessionsPerScenario.clear();
progressData = progressData.filter(
(progress: Progress) =>
progress.started >= this.startDate &&
progress.last_update < this.endDate
);
this.totalSessionsPerScenario = progressData.reduce(
(totalSessions, progress) => {
const partialSum = totalSessions.get(progress.scenario) ?? 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ export class SessionTimeStatisticsComponent implements OnInit {
}

private updateData() {
console.log(this.progresses);
const evaluatedProgressData = this.progresses.filter(
(progress: Progress) => this.selectedScenario == progress.scenario
);
Expand Down

0 comments on commit 4454991

Please sign in to comment.