-
Notifications
You must be signed in to change notification settings - Fork 88
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
Update URL paths and remove unused code #2118
base: master
Are you sure you want to change the base?
Conversation
private static readonly JOB_ID_FRAGMENT_PARAM = 'job'; | ||
private static readonly LOI_ID_FRAGMENT_PARAM = 'site'; | ||
private static readonly SUBMISSION_ID_FRAGMENT_PARAM = 'submission'; | ||
private static readonly TASK_ID_FRAGMENT_PARAM = 'task'; |
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.
Hi @amysorto ! This will rename the fragments, but we also need the router to use the URI rather than URL fragment. The exact patterns are described in the issue descriptions. Please lmk if you have any questions!
@amysorto Gentle ping! |
I deleted everything inside |
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.
Some quick feedback, will do another pass tomorrow.
@@ -95,6 +95,21 @@ const routes: Routes = [ | |||
component: TermsComponent, | |||
canActivate: [AuthGuard], | |||
}, | |||
{ | |||
path: `${NavigationService.SURVEY_SEGMENT}/:${NavigationService.SURVEY_ID}/${NavigationService.LOI_SEGMENT}/:${NavigationService.LOI_ID}`, |
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.
Can we use destructuring assignment to make these constants more readable? ie somewhere above const {SURVEY_SEGMENT, LOI_SEGMENT, ...} = NavigationService;
?
this.setFragmentParams(new HttpParams({fromString: ''})); | ||
showSubmissionDetail(surveyId: string, loiId: string, submissionId: string) { | ||
this.router.navigateByUrl( | ||
`${NavigationService.SURVEY_SEGMENT}/${surveyId}/${NavigationService.LOI_SEGMENT}/${loiId}/${NavigationService.SUBMISSION_SEGMENT}/${submissionId}` |
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.
Same here.
Fixes #1243
Also removed
LOI_JOB_ID_FRAGMENT_PARAM
since it not currently being used