Skip to content

Conversation

alex-struk
Copy link
Collaborator

This PR closes issue: [issue #DMM-428]

Includes tests? [N]
Updated docs? [N]

Proposed changes:

  • Adds a "Export Contact List" button on the admin's /users path that allows admins to download CSV report of all users in the system through a modal interface that allows for query configuration where user may select from Vendor/Government user types as well as various fields, such as first name, last name, email and organization name

@alex-struk alex-struk requested a review from IanFonzie April 9, 2025 21:40
Copy link

sonarqubecloud bot commented Apr 9, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@alex-struk
Copy link
Collaborator Author

  • I added support for custom endpoints in the backend framework. Previously I was registering the endpoint directly at a high level, but I think the new solution is more graceful as it registers it at the appropriate level (in user.ts). You can see previous solution in this commit
  • I added a new database function to bundle users with organizations in one query. Previously it would pull each affiliation separately for each user which is not ideal. Previous solution is visible in this commit
  • src/front-end/typescript/lib/app/update.ts edit was necessary since it started to throw a typescript error there after related imports
  • Front end performance is low when there are a lot of users in the list (interacting with modal is slow). There's a PR from Kaegan where he worked on performance on that page, so I'll re-visit this once I get to that PR.

- created a separate resource to handle endpoint requests
- removed custom endpoint logic
- move validation logic to the validation.ts file
- used enum for user types
- replaced custom checkboxes with existing checkbox components
@alex-struk
Copy link
Collaborator Author

  • now using the endpoint from a separate resource (needed to use readMany for the right url structure, but it seems to be working well)
  • replaced user types with enums
  • put validation into proper place
  • made use of userTypeToTitleCase (moved to shared library)
  • implemented existing checkbox and formfield components

> Attempt to add <Link download component were not successful because:
> - There is no hook to close the modal after the download is triggered
> - The modal component API doesn't support custom components for the 'Actions' property
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
5.7% Duplication on New Code (required ≤ 3%)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@alex-struk alex-struk merged commit eac6969 into development Jul 22, 2025
7 of 8 checks passed
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.

2 participants