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

organization modal #26

Closed
wants to merge 2 commits into from
Closed

organization modal #26

wants to merge 2 commits into from

Conversation

rkzel
Copy link
Collaborator

@rkzel rkzel commented Jun 19, 2019

This is for just displaying the modal. Not very functional by now, it's mainly missing storing the address somewhere: whihc means validation is also complaining. It's ready for integration though. Also, Organizations Card uses Education tiles until it has its own tiles (created in another ticket).

@Schwartz10 Schwartz10 requested review from chadoh and Schwartz10 June 19, 2019 15:40

const organizationsNotEmpty = Object.keys(organizations).length > 0

const cardProps = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is okay for now, but it would be nice to remove any unnecessary variables if possible. If we could just add these as props that would save us another variable here. But i think this pattern exists elsewhere in the app, so it might be easier to just make one sweeping change. What are your thoughts?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if only "Object.keys(organizations).length" could be expressed in more concise way... How about replacing it with _.isEmpty() from lodash? Remove extra variable, replace the length test with isEmpty?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I was referring to cardProps, not organizationNotEmpty. But i don't think we should add another dependency just to make that check. The check you're making is fine and can still be written in one line anyways.

Copy link
Collaborator

@Schwartz10 Schwartz10 left a comment

Choose a reason for hiding this comment

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

Hey, this is really close. You just need to update the forms in state to add room for organizations. Will wait for @chadoh to review as well before merging.

@Schwartz10
Copy link
Collaborator

@chadoh we're going to close this for #29 and work off one commit

@Schwartz10 Schwartz10 closed this Jun 22, 2019
@rkzel rkzel deleted the 9-add-org-modal branch July 22, 2019 12:17
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.

2 participants