-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MCR-2553: CMS can navigate to rate review q&a via sidebar #2847
MCR-2553: CMS can navigate to rate review q&a via sidebar #2847
Conversation
…work with CMS users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM
const routeName = getRouteName(pathname) | ||
|
||
const shouldRedirect = matchPath( | ||
RoutesRecord.SUBMISSIONS_RATE_QUESTIONS_AND_ANSWERS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JasonLin0991 I agree this is a little funky, we are setting up the route exclusively just to redirect in the rendered component, it is a little bit of a braintwister
Don't know the solution without pulling down code more, I can take a look though on Monday. Assuming from you PR description comment you tried <Redirect />
already in AppRoutes? Is the correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With that said, no blocking, you can merge if you feel ready
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe was replaced with . The complication is the difference in the route paths and parameters between submission summary and rate summary. Summary page id
param is the contract id where as rate summary it is the rate ID. So we would have had to add more logic in AppRoutes
to handle getting the rate ID from the url to generate the redirect path. I decided to put this logic in the RateSummarySideNav
since both routes are nested in this outlet.
I think if we refactored how we setup the routes to use createBrowserRouter
, maybe loader can do the redirecting.
Summary
MCR-2553
qa-by-rates
feature flagExtra work
NOTES
RateSummartySideNav
component instead ofAppRoutes
. I couldn't figure out how to get the URL params inAppRoutes
in order to redirect to the correct rate.Related issues
Screenshots
Test cases covered
RateQuestionResponse.test.tsx
'CMS user tests'
'renders error page if rate revision does not exist'
'renders error page if rate is in draft'
'renders waring banner if CMS user has no assigned division'
RateSummarySideNav.test.tsx
'loads sidebar nav with expected links'
'renders error page if rate status is DRAFT'
'redirects to rate summary Q&A page'
QA guidance