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

adding Service Spec editor for admin/settings #131

Merged
merged 1 commit into from
Jul 19, 2017
Merged

Conversation

jeremyd
Copy link
Contributor

@jeremyd jeremyd commented Jul 18, 2017

No description provided.

@jeremyd jeremyd requested a review from geoffrey July 18, 2017 18:28
[CALL_API]: {
endpoint: `${API_ROOT}/admin/serviceSpecs`,
method: 'GET',
headers: {

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

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 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 }

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

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}/>
Copy link

@geoffrey geoffrey Jul 18, 2017

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 } ?

Copy link
Contributor Author

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

@jeremyd jeremyd force-pushed the servicespec branch 2 times, most recently from 34e5de8 to aba1f46 Compare July 19, 2017 00:34
@jeremyd jeremyd merged commit 7a16f7a into master Jul 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants