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

Add new component with the system selector/button + actions #65

Merged
merged 5 commits into from Jan 18, 2017

Conversation

MasterCarl
Copy link
Contributor

The elements are now hidden by default, the 'local' system is selected in this case

const schoolService = Server.service('/schools');
const systemService = Server.service('/systems');

String.prototype.capitalizeFirstLetter = function () {
Copy link
Contributor

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

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

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

Choose a reason for hiding this comment

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

why remove school?

Copy link
Contributor Author

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 :)

MasterCarl and others added 3 commits January 14, 2017 16:21
# Conflicts:
#	src/modules/login/actions/login.js
#	src/modules/login/components/login_form.jsx
#	src/modules/login/containers/login.js
@nicoknoll nicoknoll merged commit 2714ec2 into master Jan 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants