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
Add new component with the system selector/button + actions #65
Conversation
const schoolService = Server.service('/schools'); | ||
const systemService = Server.service('/systems'); | ||
|
||
String.prototype.capitalizeFirstLetter = function () { |
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.
Whoa maybe don't extend the String class here but just make it either make it a normal function or put it somewhere so it's available for everything.
return this.substr(0, 1).toUpperCase() + this.substr(1); | ||
}; | ||
|
||
Array.prototype.indexBy = function (property) { |
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.
Same
password: '' | ||
} | ||
password: '', | ||
systemId: '0000d186816abba584714c92' // the id of the 'local' system. |
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.
We should discuss with @Langleu how it should work for the local system as it isn't related to any school
@@ -20,72 +24,25 @@ class LoginForm extends React.Component { | |||
this.props.actions.login.bind(this)({ | |||
email: this.state.email, | |||
password: this.state.password, | |||
school: this.state.school || undefined, |
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.
why remove school?
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.
I removed it since we didn't use the parameter in the login action. However, we should actually pass it to the account service since there's a field schoolId
in our model. I'll put it back :)
# Conflicts: # src/modules/login/actions/login.js # src/modules/login/components/login_form.jsx # src/modules/login/containers/login.js
The elements are now hidden by default, the 'local' system is selected in this case