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

WIP: No Overlapping Rides per Driver #517

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

raissaji
Copy link
Contributor

@raissaji raissaji commented May 6, 2024

Summary

This pull request is a WIP to ensure that each driver's scheduled rides are at least 5 minutes apart. Let's call the ride being created the impending ride. So far, the following has been implemented:

  • The program identifies which drivers have rides that overlap with the impending ride's ride time
  • Creates a console log saying which driver has a conflict

The following is the remainder of what needs to be implemented

  • Remove the conflicting drivers from the DriverPage

Test Plan

Screenshot 2024-05-05 at 8 55 10 PM

Here, we scheduled one ride for driver bruh bruh at 9 AM - 9:20 AM and one ride for driver Ed von Aderkas at 1:50 PM - 3:11 PM.

Screenshot 2024-05-05 at 8 55 53 PM

Here, we add a ride from 9:04 AM - 9:15 AM. This impending ride should conflict with bruh bruh's schedule.

Screenshot 2024-05-05 at 8 56 18 PM

In the console log, bruh bruh indeed has a conflict. To complete this PR, we need to note the ID of every driver with a conflict and remove them from the available drivers displayed on the next page (the DriverPage).

@raissaji raissaji requested a review from a team as a code owner May 6, 2024 01:00
@dti-github-bot
Copy link
Member

[diff-counting] Significant lines: 70.

Copy link
Collaborator

@Atikpui007 Atikpui007 left a comment

Choose a reason for hiding this comment

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

This is a good start towards the PR. Ideally we would not want to console.log but show errors on the page.

An approach you should consider.

@raissaji raissaji changed the title No Overlapping Rides per Driver WIP: No Overlapping Rides per Driver May 6, 2024
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.

None yet

3 participants