-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor stats comparison and related components [WIP] Renamed and refactored `RequestStatsCompareComponent` to `RequestStatsComponent` for better clarity and separation of concerns. Added dropdown for quick comparison options and integrated data comparison logic in `stats-compare` component. Updated imports and adjusted the HTML structure accordingly. * Add ComparisonStatsService with basic structure and tests Implemented the ComparisonStatsService with a BehaviorSubject to store item statistics. Included an initial unit test to verify the service creation. * Add ComparisonStatsService with basic structure and tests Implemented the ComparisonStatsService with a BehaviorSubject to store item statistics. Included an initial unit test to verify the service creation. * Remove unused variable and fix resetStatsData logic Eliminated the `comparedData` variable as it was not in use, and corrected the `resetStatsData` method to reset the `comparingData` variable instead. * Enhance stats comparison menu and refactor item fetching Improved the UI for the stats comparison dropdown menu by adding icons and adjusting styling for clarity. Refactored the item fetching logic to use the `ItemsApiService` and simplified parameter subscription handling in components. Additionally, fixed various issues related to comparison data state management. * linter fixes
- Loading branch information
Showing
12 changed files
with
372 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { TestBed } from "@angular/core/testing"; | ||
|
||
import { ComparisonStatsService } from "./comparison-stats.service"; | ||
|
||
describe("ComparisonStatsService", () => { | ||
let service: ComparisonStatsService; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({}); | ||
service = TestBed.inject(ComparisonStatsService); | ||
}); | ||
|
||
it("should be created", () => { | ||
expect(service).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Injectable } from "@angular/core"; | ||
import { BehaviorSubject } from "rxjs"; | ||
import { ItemStatistics } from "../items.service.model"; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class ComparisonStatsService { | ||
|
||
private requestStats = new BehaviorSubject<ItemStatistics[]>([]); | ||
|
||
requestStats$ = this.requestStats.asObservable(); | ||
|
||
|
||
setRequestStats(data: ItemStatistics[]) { | ||
this.requestStats.next(data); | ||
} | ||
|
||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.