OBPIH-6844 Create filters component all products tab#4993
OBPIH-6844 Create filters component all products tab#4993awalkowiak merged 25 commits intodevelopfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4993 +/- ##
============================================
- Coverage 7.68% 7.67% -0.01%
+ Complexity 833 831 -2
============================================
Files 610 609 -1
Lines 42521 42543 +22
Branches 10315 10330 +15
============================================
- Hits 3268 3266 -2
- Misses 38773 38797 +24
Partials 480 480 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| pageSize, | ||
| columns, | ||
| data, | ||
| setRowsOffset, |
There was a problem hiding this comment.
nitpicky (no need to change), but I would be fine with just setOffset
| setCategories(categoryList); | ||
| setCatalogs(catalogList); | ||
| setTags(tagList); | ||
| setInternalLocations(binList); |
There was a problem hiding this comment.
as a tiny optimization if it's fetched at once, we could create one object based state for those, so that those would be:
const [selectOptions, setSelectOptions] = useState({
tags: [],
categories: [],
...
})by doing so we wouldn't have to re-render the component 4 times.
| }, [paramsDependencies]); | ||
| }; | ||
|
|
||
| export default useQueryParamsListener; |
There was a problem hiding this comment.
what's the flow behind it? what is it used for? and what is the .join('|') responsible for?
There was a problem hiding this comment.
join is to concat all of the params to one simple string to detect changes in params.
I had to implement detecting the changes in params this way because those filters have a lot of asynchronous operations and this fact led to the issues with sending requests with wrong parameters, so now it's reacting to changes in params.
I joined it with "|" but it can be something else.
OBPIH-6871 Connect endpoint to fetch cycle count candidates with the frontend
| def getCandidates(CycleCountCandidateFilterCommand filterParams) { | ||
| List<CycleCountCandidate> candidates = cycleCountService.getCandidates(filterParams, params.facilityId) | ||
|
|
||
| if (params.format == "csv") { |
There was a problem hiding this comment.
why do we need format in command if here you don't rely on command.format but on params.format?
There was a problem hiding this comment.
it's used in getCandidates also
No description provided.