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: Deactivated riders should not be assigned to rides #504

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

selenaliu1
Copy link
Contributor

Summary

Worked on admin side, filtering out the deactivated riders when they add a ride so that only active riders are displayed.

Test Plan

Tested through trying to add rider on admin side.

Notes

  • Still need to work on student side, do not let deactivated students request a ride.
  • Should test if admin can add a deactivated student when editing a ride.

Breaking Changes

@selenaliu1 selenaliu1 requested a review from a team as a code owner March 23, 2024 20:25
@dti-github-bot
Copy link
Member

[diff-counting] Significant lines: 13.

Copy link
Contributor

@raissaji raissaji left a comment

Choose a reason for hiding this comment

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

Good work! WIP is simple so far, so no substantial improvements from me. However, something to consider is how you want to update/re-retrieve the list of valid rider IDs (lines 67-79) when you activate a deactivated rider.

@@ -129,7 +129,7 @@ const StudentsTable = ({ searchName }: studentTableProps) => {
endDate
)}`;
const usageData = getUsageData(id);
const isStudentInvalid = moment().isAfter(moment(endDate)) && active;
const isStudentInvalid = moment().isAfter(moment(endDate)) && !active;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be || instead of &&.

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