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

258: Enable editing campaign riders #259

Merged
merged 11 commits into from
Jan 3, 2024
Merged

258: Enable editing campaign riders #259

merged 11 commits into from
Jan 3, 2024

Conversation

teesloane
Copy link
Contributor

Closes #258

This set of commits makes the following changes:

  • add a route to allow the editing of a rider
  • update the AddRiderFormComponent to be able to edit riders.
  • rename the AddRiderFormComponent -> CampaignRiderFormComponent
  • Update the RiderSelectionComponent to have an update callback (not sure if this is right, but I'm not sure if the same logic is possible in mount.)
  • Add Tests

Screencap of the changes

CleanShot.2023-11-15.at.09.51.22.mp4

With these changes, we explicitly expect that selected_rider is an attr
on the <.rider_select> component, and then pass that on toe the
RiderSelectionComponent. No implementation changes necessary as
`selected_rider` can be nil
At the bottom of the file there was a handle_event match for `add_rider` that
caught all params; however this was never being caught as the original
`add_rider` that matches first wasn't checking for a missing rider_id.
This was probably brought in from branching off of #251
@teesloane teesloane changed the title 258: Enabler editing campaign riders 258: Enable editing campaign riders Nov 20, 2023
Copy link
Member

@mveytsman mveytsman left a comment

Choose a reason for hiding this comment

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

Love it!

Small change around the broadcast / handling of the update campaign rider event.

lib/bike_brigade/delivery.ex Outdated Show resolved Hide resolved
@teesloane
Copy link
Contributor Author

Fixed and ready for re-review!

@teesloane teesloane merged commit 34fd617 into main Jan 3, 2024
1 check passed
@teesloane teesloane deleted the 258-edit-rider branch January 3, 2024 14:17
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.

Edit rider on campaign page
2 participants