-
Notifications
You must be signed in to change notification settings - Fork 0
470 export section people #498
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
base: sprint12-staging
Are you sure you want to change the base?
Conversation
| readonly requiredFields: string[]; | ||
| readonly lazyReferences: string[]; | ||
| readonly subsections: DisplaySubsectionView[]; | ||
| readonly exportViews: ExportView[]; |
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.
Is this required? If not, I think the addition to the export domain model should be removed.
| addExportToQueryParams(queryParams, section); | ||
| const tree = this.router.createUrlTree([''], { queryParams }); | ||
| const query = tree.toString().substring(1); | ||
| return `${this.appConfig.serviceUrl}/individual/${this.individual?.id}/export${query}&view=${section.name}`; |
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.
This code:
return `${this.appConfig.serviceUrl}/individual/${this.individual?.id}/export${query}&view=${section.name}`;I'm not sure about this line.
When ${this.individual?.id} is undefined, then the URL generated will have double slashes.
If there is no individual, will this URL be valid?
${this.appConfig.serviceUrl}/individual/export${query}&view=${section.name}If so, then I suggest conditionally adding both the id AND the forward slash based on the same condition.
If not, then what URL should be used?
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.
This component would not render without an individual. The does not require optional chaining.
Description
Added export button to section : people.
Created export link using getSectionExportUrl for exporting the people directory.
added the boolean check - hasExport(section) check to conditionally display export option.
Added css style for the export button.
Type of change
Please delete options that are not relevant.
Testing Procedures
Tested this on local set up