mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-31 01:35:15 +02:00
Ivan - Add message for ticket comment error [skip ci]
This commit is contained in:
parent
b6af2f44ab
commit
d2c2327a60
@ -14,6 +14,7 @@ import FormField from 'core-components/form-field';
|
||||
import SubmitButton from 'core-components/submit-button';
|
||||
import DropDown from 'core-components/drop-down';
|
||||
import Button from 'core-components/button';
|
||||
import Message from 'core-components/message';
|
||||
|
||||
class TicketViewer extends React.Component {
|
||||
static propTypes = {
|
||||
@ -188,6 +189,7 @@ class TicketViewer extends React.Component {
|
||||
<SubmitButton>{i18n('RESPOND_TICKET')}</SubmitButton>
|
||||
</Form>
|
||||
</div>
|
||||
{(this.state.commentError) ? this.renderCommentError() : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -216,6 +218,12 @@ class TicketViewer extends React.Component {
|
||||
return customResponsesNode;
|
||||
}
|
||||
|
||||
renderCommentError() {
|
||||
return (
|
||||
<Message className="ticket-viewer__message" type="error">{i18n('TICKET_COMMENT_ERROR')}</Message>
|
||||
);
|
||||
}
|
||||
|
||||
getCommentFormProps() {
|
||||
return {
|
||||
onSubmit: this.onSubmit.bind(this),
|
||||
@ -316,7 +324,8 @@ class TicketViewer extends React.Component {
|
||||
|
||||
onCommentSuccess() {
|
||||
this.setState({
|
||||
loading: false
|
||||
loading: false,
|
||||
commentError: false
|
||||
});
|
||||
|
||||
this.onTicketModification();
|
||||
@ -324,7 +333,8 @@ class TicketViewer extends React.Component {
|
||||
|
||||
onCommentFail() {
|
||||
this.setState({
|
||||
loading: false
|
||||
loading: false,
|
||||
commentError: true
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ class DashboardListArticlesPage extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div classnames="dashboard-list-articles-page">
|
||||
<div className="dashboard-list-articles-page">
|
||||
<Header title={i18n('LIST_ARTICLES')} description={i18n('LIST_ARTICLES_DESCRIPTION')}/>
|
||||
<SearchBox className="dashboard-list-articles-page__search-box" onSearch={this.onSearch.bind(this)} searchOnType />
|
||||
{(!this.state.showSearchResults) ? this.renderArticleList() : this.renderSearchResults()}
|
||||
|
@ -157,6 +157,7 @@ export default {
|
||||
'PASSWORD_NOT_MATCH': 'Password does not match',
|
||||
'INVALID_RECOVER': 'Invalid recover data',
|
||||
'TICKET_SENT_ERROR': 'An error occurred while trying to create the ticket.',
|
||||
'TICKET_COMMENT_ERROR': 'An error occurred while trying to add the comment.',
|
||||
'NO_PERMISSION': 'You\'ve no permission to access to this page.',
|
||||
'INVALID_USER': 'User id is invalid',
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user