Skip to content

124 structure make rides associated with shifts #127

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

AthenaJenkins
Copy link

@AthenaJenkins AthenaJenkins commented May 1, 2025

This PR updated our ride model so now it is not directly associated with a date and driver, but instead gets those data from its associated shift.
This required making small changes in many files (eg everywhere there was @ride.driver had to be changed to @ride.shift.driver)
All the rspec and cucumber tests pass, although that isn't really a guarantee the app is completely functional.

Additional changes:
This issue actually ended up being much more involved than I previously thought as I had to add completely new functionality for selecting a shift when creating a new ride. Right now you select a date, and then an ajax call collects the shifts on that date and you can associate a ride to that shift. There currently is no way to create a ride without associating it to a shift. All the javascript for this was put into a new file. A bunch of work also had to be done to get it to automatically select the right shift if you came to that page from the shift view page, but it all seems to work decently well

Also, I took the opportunity to change shift.shift_date to simply shift.date because that was bothering me.

Also I need to add tests for the new shift selection functionality

@AthenaJenkins AthenaJenkins linked an issue May 1, 2025 that may be closed by this pull request
@AthenaJenkins AthenaJenkins marked this pull request as draft May 1, 2025 21:57
Copy link

codecov bot commented May 1, 2025

Codecov Report

Attention: Patch coverage is 88.46154% with 3 lines in your changes missing coverage. Please review.

Project coverage is 96.22%. Comparing base (69321d3) to head (0b697df).
Report is 92 commits behind head on main.

Files with missing lines Patch % Lines
app/controllers/shifts_controller.rb 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #127      +/-   ##
==========================================
- Coverage   96.91%   96.22%   -0.70%     
==========================================
  Files          27       27              
  Lines         389      397       +8     
==========================================
+ Hits          377      382       +5     
- Misses         12       15       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

[structure] make rides associated with shifts
1 participant