Skip to content
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

manage participants screen improvements #584

Merged

Conversation

ashleysmithTTD
Copy link
Contributor

@ashleysmithTTD ashleysmithTTD commented Dec 5, 2024

What Changed:

  • Removed the column for status in dbo.participants since all participants were defaulting to approved now
  • Cleaned up participants in integ and prod, so there are no more awaitingApproval status
  • Removed any references and checks related to ParticipantStatus
  • Changed anything titled getApprovedParticipants to getAllParticipants
  • Remove logic to approve a participant or get participants awaiting approval
  • Moved HighlightedResult into its own component file
  • Renamed ApprovedParticipantsTable to ParticipantManagementTable
  • Remove anything related to Participant Request and account pending
  • Added paging and search to participants table (and fixed bug on changing rows per page in AuditTrailTable)

Test Plan:

  • ensure adding a new participant workflow still works
  • ensure paging and search on participants table works


export async function down(knex: Knex): Promise<void> {
await knex.schema.alterTable('participants', (table) => {
table.enu('status', ['initialize', 'awaitingApproval', 'approved']);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should i leave this as is which sets all values to null or should i set all rows to 'approved'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably set them all to approved. I don't think the UI is expecting a null approval status.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

const result = participants.sort((a, b) => a.name.localeCompare(b.name));
return res.status(200).json(result);
};

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed and moved over from participantsApproval.ts

import { SiteDTO } from '../../../api/services/adminServiceHelpers';
import { HighlightedResult } from './ParticipantApprovalForm';
import { SiteDTO } from '../../../../api/services/adminServiceHelpers';
import { HighlightedResult } from './HighlightedResult';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why this component was housed in ParticipantApprovalForm but moved it to its own file since we are deleting ParticipantApprovalForm anyways

@@ -283,20 +266,3 @@ export type ParticipantApprovalFormDetails = {
apiRoles: number[];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this too? ParticipantApprovalFormDetails

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah nice catch!


export async function down(knex: Knex): Promise<void> {
await knex.schema.alterTable('participants', (table) => {
table.enu('status', ['initialize', 'awaitingApproval', 'approved']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably set them all to approved. I don't think the UI is expecting a null approval status.

};

type HighlightedResultProps = Readonly<{
result: Fuse.FuseResult<SiteDTO>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This core component shouldn't have a dependency on a specific data type. Should be able to make this generic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generalized it

@ashleysmithTTD ashleysmithTTD merged commit de0d0d8 into main Dec 12, 2024
3 checks passed
@ashleysmithTTD ashleysmithTTD deleted the ans-UID2-4200-manage-participants-screen-improvements branch December 12, 2024 20:42
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