mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-31 01:35:15 +02:00
redirect after deleting ticket
This commit is contained in:
parent
74f26fb3f5
commit
d5f5d988fb
@ -8,6 +8,7 @@ import i18n from 'lib-app/i18n';
|
|||||||
import API from 'lib-app/api-call';
|
import API from 'lib-app/api-call';
|
||||||
import SessionStore from 'lib-app/session-store';
|
import SessionStore from 'lib-app/session-store';
|
||||||
import MentionsParser from 'lib-app/mentions-parser';
|
import MentionsParser from 'lib-app/mentions-parser';
|
||||||
|
import history from 'lib-app/history';
|
||||||
|
|
||||||
import TicketEvent from 'app-components/ticket-event';
|
import TicketEvent from 'app-components/ticket-event';
|
||||||
import AreYouSure from 'app-components/are-you-sure';
|
import AreYouSure from 'app-components/are-you-sure';
|
||||||
@ -69,7 +70,6 @@ class TicketViewer extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const ticket = this.props.ticket;
|
const ticket = this.props.ticket;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="ticket-viewer">
|
<div className="ticket-viewer">
|
||||||
<div className="ticket-viewer__header row">
|
<div className="ticket-viewer__header row">
|
||||||
@ -416,7 +416,10 @@ class TicketViewer extends React.Component {
|
|||||||
data: {
|
data: {
|
||||||
ticketNumber: this.props.ticket.ticketNumber
|
ticketNumber: this.props.ticket.ticketNumber
|
||||||
}
|
}
|
||||||
}).then(this.onTicketModification.bind(this));
|
}).then((result) => {
|
||||||
|
this.onTicketModification(result);
|
||||||
|
history.push('/admin/panel/tickets/my-tickets/');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
changeDepartment(index) {
|
changeDepartment(index) {
|
||||||
@ -444,6 +447,7 @@ class TicketViewer extends React.Component {
|
|||||||
}
|
}
|
||||||
}).then(this.onTicketModification.bind(this));
|
}).then(this.onTicketModification.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
addTag(tag) {
|
addTag(tag) {
|
||||||
API.call({
|
API.call({
|
||||||
path: '/ticket/add-tag',
|
path: '/ticket/add-tag',
|
||||||
@ -463,6 +467,7 @@ class TicketViewer extends React.Component {
|
|||||||
}
|
}
|
||||||
}).then(this.onTicketModification.bind(this))
|
}).then(this.onTicketModification.bind(this))
|
||||||
}
|
}
|
||||||
|
|
||||||
onCustomResponsesChanged({index}) {
|
onCustomResponsesChanged({index}) {
|
||||||
let replaceContentWithCustomResponse = () => {
|
let replaceContentWithCustomResponse = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
@ -492,7 +497,7 @@ class TicketViewer extends React.Component {
|
|||||||
const data = {};
|
const data = {};
|
||||||
|
|
||||||
if(ticketeventid){
|
if(ticketeventid){
|
||||||
data.ticketeventId = ticketeventid
|
data.ticketEventId = ticketeventid
|
||||||
}else{
|
}else{
|
||||||
data.ticketNumber = this.props.ticket.ticketNumber
|
data.ticketNumber = this.props.ticket.ticketNumber
|
||||||
}
|
}
|
||||||
@ -523,6 +528,7 @@ class TicketViewer extends React.Component {
|
|||||||
commentError: true
|
commentError: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onSubmit(formState) {
|
onSubmit(formState) {
|
||||||
this.setState({
|
this.setState({
|
||||||
loading: true
|
loading: true
|
||||||
@ -602,6 +608,7 @@ class TicketViewer extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default connect((store) => {
|
export default connect((store) => {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
userId: store.session.userId,
|
userId: store.session.userId,
|
||||||
userStaff: store.session.staff,
|
userStaff: store.session.staff,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user