-
Notifications
You must be signed in to change notification settings - Fork 17
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 Service Spec editor for admin/settings #131
Conversation
[CALL_API]: { | ||
endpoint: `${API_ROOT}/admin/serviceSpecs`, | ||
method: 'GET', | ||
headers: { |
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.
nit: seems like headers are the same for all API calls here we could extract in a function to DRY it up
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 tried to do this, but failed... Not sure how to pass this around in this special formatting here...
|
||
export default connect( state => { | ||
const formValues = state.form.serviceSpec | ||
return { formValues: formValues } |
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.
nit return { formValues }
|
||
componentWillMount() { | ||
this.props.fetchServiceSpecSettings() | ||
|
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.
nit: extra line
<li className="list-group-item" key={specSetting._id}> | ||
<div className="feed-element"> | ||
<div className="media-body"> | ||
<ServiceSpecForm initialValues={specSetting} edit={specSetting.edit} onSubmit={this.onSaveSpec} onCancel={ () => this.onCancel()} onDelete={this.onDeleteSpec}/> |
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.
nit: any reason you don't have onCancel={ this.onCancel }
?
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.
cause it needs to bind to this. the alternative might be to bind it in the constructor like some of the onSave type stuff
34e5de8
to
aba1f46
Compare
No description provided.