Skip to content

Fix/same time shift protection 2#175

Open
demogorgonzola wants to merge 21 commits intomasterfrom
fix/same-time-shift-protection-2
Open

Fix/same time shift protection 2#175
demogorgonzola wants to merge 21 commits intomasterfrom
fix/same-time-shift-protection-2

Conversation

@demogorgonzola
Copy link
Contributor

Fixes #113

This is the original solution in #156, with admin warnings enabled.

~ 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
~ changed ScheduleFactory to work with recent changes
@Meleeman01 Meleeman01 self-requested a review August 21, 2019 01:12
Copy link
Contributor

@Meleeman01 Meleeman01 left a 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>.
Copy link
Contributor

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

Copy link
Member

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?

}
}

if($slotRoles->isEmpty())
Copy link
Contributor

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
Copy link
Contributor

@Meleeman01 Meleeman01 left a 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>.
Copy link
Member

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?

dracoling added a commit to wf-org/volunteers that referenced this pull request Dec 18, 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.

Add warning when users sign up for multiple shifts at the same time

3 participants