-
Notifications
You must be signed in to change notification settings - Fork 64
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
Adding volunteer, ready-to-startinfo to organizer edit mission screen #613
Conversation
…n organizer edit mission screen.
mission.status === MissionStatus.unassigned || | ||
mission.status === MissionStatus.tentative || | ||
mission.status === MissionStatus.assigned; | ||
|
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.
outside of the class
const volunteerStatus = [MissionStatus.unassigned, MissionStatus.tentative, MissionStatus.assigned]
inside of the class
const volunteerEditable = volunteerStatus.includes(mission.status)
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.
Fixed!
selectedVolunteer && values.status === MissionStatus.tentative | ||
? selectedVolunteer.volunteerPhoneNumber | ||
: "", | ||
readyToStart: values.readyToStart, |
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.
const getVolunteerAttribute = (selectedVolunteer, status, attr) => {
if(selectedVolunteer && status === MissionStatus.tentative){
return selectedVolunteer[attr]
}
return ""
}
{...,
tentativeVolunteerUid = getVolunteerAttribute(selectedVolunteer, values.status, "volunteerUid")
}
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.
Had to add one more param to the "getVolunteerAttribute" function but should capture what you are pointing out.
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.
It did not look as pretty as I had hope, my bad there, lets keep it for now
Based on this GitHub issue
#561