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

Don't show the scholarship dropdown for new facilitators attending summer workshops #28252

Merged
merged 5 commits into from Apr 30, 2019

Conversation

Projects
None yet
2 participants
@clareconstantine
Copy link
Contributor

commented Apr 26, 2019

Another piece of PLC-165

New facilitators attend local summer workshops to observe and learn how to facilitate. This change hides the scholarship dropdown next to their name in the workshop dashboard, since facilitators do not receive scholarships.

Screen Shot 2019-04-26 at 4 43 06 PM

@clareconstantine clareconstantine requested review from breville and hacodeorg Apr 26, 2019

@@ -33,4 +34,10 @@ def pre_workshop_survey
def attendances
object.attendances.count
end

def new_facilitator

This comment has been minimized.

Copy link
@hacodeorg

hacodeorg Apr 29, 2019

Contributor

I'd suggest a better function name here. The function name is new facilitator which is quite generic, while it actually checks for very specific conditions accepted facilitator for current year summer workshop.

Another approach for your consideration, what we actually want to check is whether a person can have a scholarship or not. We could have a function like cannot_have_scholarship on the server side which returns an no_scholarship_reason message to client. The client will just display it if the message is non-empty. Otherwise, it will show the dropdown.

@@ -103,6 +103,10 @@ export class WorkshopEnrollmentSchoolInfo extends React.Component {
}

scholarshipInfo(enrollment) {
if (enrollment.new_facilitator) {

This comment has been minimized.

Copy link
@hacodeorg

hacodeorg Apr 29, 2019

Contributor

This logic, certain facilitators cannot have scholarship, should live in model instead of UI component.

@@ -0,0 +1,5 @@
module Pd
module EnrollmentConstants
NO_NEW_FACILITATOR = "No (New Facilitator)"

This comment has been minimized.

Copy link
@hacodeorg

hacodeorg Apr 30, 2019

Contributor

Suggest SCHOLARSHIP_INELIGIBLE_NEW_FACILITATOR. We will have constants with the same SCHOLARSHIP_INELIGIBLE_ prefix when we add more reasons to deny scholarship.

@clareconstantine clareconstantine merged commit 03303e6 into staging Apr 30, 2019

1 of 2 checks passed

DTS The staging branch is closed. Check #developers.
continuous-integration/drone/pr Build is passing
Details

@clareconstantine clareconstantine deleted the no-schol-dropdown-for-new-fac branch May 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.