Skip to content

feat(workshops): update required fields for enrollment creation #66718

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

Conversation

drizco
Copy link
Contributor

@drizco drizco commented Jun 25, 2025

removes unnecessary params from workshop enrollment creation endpoint. also using rails strong parameters. lays the groundwork for removing the enrollment form entirely. I also removed some school_info validation from the enrollment model since that should be handled already in school_info model instead. I also tweaked the workshop_enroll component even though it's going to be deleted soon to get rid of a react error that was bugging me. it was complaining that nothing was returned from the render function because instead we are navigating to a different page (so the renderSuccess function was returning undefined). moved the relevant code to the on submission complete handler instead.

Links

Testing story

Deployment strategy

Follow-up work

Privacy

Security

Caching

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@drizco drizco marked this pull request as ready for review June 25, 2025 18:34
@drizco drizco requested a review from a team June 25, 2025 18:34
Copy link
Contributor

@TurnerRiley TurnerRiley left a comment

Choose a reason for hiding this comment

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

Wow love how simple this cleanup was! (I was afraid it was gonna be a lot of changes)

@@ -83,6 +83,10 @@ export default class WorkshopEnroll extends React.Component {
signUpUrl: result.sign_up_url,
workshopUrl: result.workshop_url,
});

if (result.workshop_enrollment_status === SUBMISSION_STATUSES.SUCCESS) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ahhh thank you, this was bugging me too!

@drizco drizco force-pushed the ryan/workshops/feat/update-required-fields-for-enrollment-creation branch from 3b6ee58 to eab544c Compare June 30, 2025 15:22
@drizco drizco merged commit 7d317d7 into staging Jun 30, 2025
6 checks passed
@drizco drizco deleted the ryan/workshops/feat/update-required-fields-for-enrollment-creation branch June 30, 2025 21:45
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