UICHKIN-504: Fix link for navigate to New Fee/Fine modal#719
UICHKIN-504: Fix link for navigate to New Fee/Fine modal#719Dmitriy-Litvinenko merged 1 commit intomasterfrom
Conversation
Jest Unit Test Results 1 files ±0 19 suites ±0 20s ⏱️ +2s Results for commit cea68a2. ± Comparison against base commit 18ab8b0. This pull request removes 1 test.♻️ This comment has been updated with latest results. |
55f8bdf to
6f4686b
Compare
| const patron = get(users, [0, 'patronGroup'], ''); | ||
| const pg = (patronGroups.find(p => p.id === patron) || {}).group; | ||
| const path = `/users/view/${loan.userId}?filters=pg.${pg}&layer=charge&loan=${loan.id}`; | ||
| const path = `/users/${loan.userId}/charge/${loan.id}`; |
There was a problem hiding this comment.
What caused this bug?
There was a problem hiding this comment.
The logic is somewhat outdated:
- We're creating a link with parameters that aren't used anywhere.
- We're directing the link to the "charge" layer, although in this case it should point directly to the "charge".
- The "charge" layer is unstable.
| const patron = get(users, [0, 'patronGroup'], ''); | ||
| const pg = (patronGroups.find(p => p.id === patron) || {}).group; | ||
| const path = `/users/view/${loan.userId}?filters=pg.${pg}&layer=charge&loan=${loan.id}`; | ||
| const path = `/users/${loan.userId}/charge/${loan.id}`; |
There was a problem hiding this comment.
Should this condition https://github.com/folio-org/ui-users/blob/master/src/index.js#L69 be removed from ui-users?
There was a problem hiding this comment.
I don't remember any places where this condition was used, but I can't guarantee that there aren't any.
6f4686b to
cea68a2
Compare
|



Purpose
Fix link for navigate to New Fee/Fine modal
Refs
https://issues.folio.org/browse/UICHKIN-504