Skip to content

Conversation

@rmathew1011
Copy link

@rmathew1011 rmathew1011 commented Oct 23, 2025

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Testing Procedures

Tested this on local set up

@rmathew1011 rmathew1011 linked an issue Oct 23, 2025 that may be closed by this pull request
@rmathew1011 rmathew1011 marked this pull request as ready for review October 23, 2025 21:05
@rmathew1011 rmathew1011 requested a review from a team October 23, 2025 21:05
readonly requiredFields: string[];
readonly lazyReferences: string[];
readonly subsections: DisplaySubsectionView[];
readonly exportViews: ExportView[];
Copy link

@tamu-sad-iii tamu-sad-iii Oct 24, 2025

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}`;
Copy link

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?

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.

https://github.com/TAMULib/scholars-angular/blob/470-export-section-people/src/app/%2Bdisplay/tab/tab.component.html#L1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In Organization Profile View: Add an "Export Directory" button

3 participants