Skip to content

Commit ea5686b

Browse files
committed
WIP: Create initial internal issue
1 parent 794017f commit ea5686b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

ui/shared/InternalIssueFiler.jsx

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
33
import { connect } from 'react-redux';
4+
import { create } from '../helpers/http';
5+
import { getApiUrl } from '../helpers/url';
46
import {
57
Button,
68
Modal,
@@ -136,9 +138,8 @@ export class InternalIssueFilerClass extends React.Component {
136138

137139
submitInternalIssue = async () => {
138140
const { summary } = this.state;
139-
const { notify } = this.props;
140141

141-
notify(summary, 'danger');
142+
create(getApiUrl('/internal_issue/'), { summary });
142143
};
143144

144145
render() {
@@ -161,13 +162,16 @@ export class InternalIssueFilerClass extends React.Component {
161162
type="text"
162163
placeholder="Intermittent..."
163164
pattern=".{0,255}"
164-
defaultValue={summary}
165+
value={summary}
166+
onChange={(evt) =>
167+
this.setState({ summary: evt.target.value })
168+
}
165169
/>
166170
</div>
167171
</form>
168172
</ModalBody>
169173
<ModalFooter>
170-
<Button color="secondary" onClick={this.submitFiler}>
174+
<Button color="secondary" onClick={this.submitInternalIssue}>
171175
Submit Internal Issue
172176
</Button>{' '}
173177
<Button color="secondary" onClick={toggle}>

0 commit comments

Comments
 (0)