-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix/same time shift protection 2 #175
base: master
Are you sure you want to change the base?
Conversation
~ moved indirect access to controller ~ some more consistent nameing changes
+ [docs] also included for how the warning code works
This may come in handy later, but is entirely besides the main point and beyond the scope of the issue.
+ slot factory for quick build ~ more robust factories ~ a way to shut off env + more scripts for testing ~ better slot tests
This reverts commit 1bf2ceb.
This reverts commit 14211ec.
~ changed ScheduleFactory to work with recent changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on line 186 of the slotController, you need to change the variable name to $user_name so that your code won't error out.
for the userAllowed function in the SlotController, check for banned members.
and get rid of the spaces in the hrefs in the links of your concurrent slot partials.
after that it should be just fine
<span> | ||
@if(isset($admin) && $admin === true) | ||
{{ $user_name }} is currently signed up for another | ||
<a href=" {{ env('SITE_URL') }} /slot/{{ $concurrent_slot_id }}/view">overlapping shift</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this space in the href url is causing problems, eliminate the space so we can actually see the page. infact all of the hrefs in this portion of the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Meleeman01 Can you fix this issue?
@@ -55,6 +55,11 @@ private function userAllowed(Slot $slot) | |||
} | |||
} | |||
|
|||
if($slotRoles->isEmpty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this allows banned users to sign up for shifts. i would rework this logic slightly and check for banned
~ ScheduleFactory now has "volunteer" role by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
everything seems to be working as intended great job
<span> | ||
@if(isset($admin) && $admin === true) | ||
{{ $user_name }} is currently signed up for another | ||
<a href=" {{ env('SITE_URL') }} /slot/{{ $concurrent_slot_id }}/view">overlapping shift</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Meleeman01 Can you fix this issue?
Fixes #113
This is the original solution in #156, with admin warnings enabled.