Skip to content

OBPIH-6844 Create filters component all products tab#4993

Merged
awalkowiak merged 25 commits intodevelopfrom
OBPIH-6844-2
Jan 14, 2025
Merged

OBPIH-6844 Create filters component all products tab#4993
awalkowiak merged 25 commits intodevelopfrom
OBPIH-6844-2

Conversation

@alannadolny
Copy link
Collaborator

No description provided.

@alannadolny alannadolny self-assigned this Jan 9, 2025
@github-actions github-actions bot added domain: frontend Changes or discussions relating to the frontend UI domain: l10n Changes or discussions relating to localization & Internationalization labels Jan 9, 2025
@codecov
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 0% with 26 lines in your changes missing coverage. Please review.

Project coverage is 7.67%. Comparing base (6fa9a07) to head (e373fed).
Report is 188 commits behind head on develop.

Files with missing lines Patch % Lines
...g/pih/warehouse/inventory/CycleCountService.groovy 0.00% 20 Missing ⚠️
...g/pih/warehouse/api/CycleCountApiController.groovy 0.00% 5 Missing ⚠️
.../inventory/CycleCountCandidateFilterCommand.groovy 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

pageSize,
columns,
data,
setRowsOffset,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpicky (no need to change), but I would be fine with just setOffset

setCategories(categoryList);
setCatalogs(catalogList);
setTags(tagList);
setInternalLocations(binList);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the flow behind it? what is it used for? and what is the .join('|') responsible for?

Copy link
Collaborator Author

@alannadolny alannadolny Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

alannadolny and others added 2 commits January 14, 2025 14:55
OBPIH-6871 Connect endpoint to fetch cycle count candidates with the frontend
@github-actions github-actions bot added the domain: backend Changes or discussions relating to the backend server label Jan 14, 2025
def getCandidates(CycleCountCandidateFilterCommand filterParams) {
List<CycleCountCandidate> candidates = cycleCountService.getCandidates(filterParams, params.facilityId)

if (params.format == "csv") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need format in command if here you don't rely on command.format but on params.format?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's used in getCandidates also

@awalkowiak awalkowiak merged commit 3005f87 into develop Jan 14, 2025
8 checks passed
@awalkowiak awalkowiak deleted the OBPIH-6844-2 branch January 14, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: backend Changes or discussions relating to the backend server domain: frontend Changes or discussions relating to the frontend UI domain: l10n Changes or discussions relating to localization & Internationalization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants