mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-29 16:54:53 +02:00
Add reopen option after a ticket is closed (#1041)
This commit is contained in:
parent
c64f1f1ea6
commit
0f976ebde9
@ -83,6 +83,7 @@ class TicketViewer extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { ticket, userStaff, userId, editable, allowAttachments, assignmentAllowed } = this.props;
|
const { ticket, userStaff, userId, editable, allowAttachments, assignmentAllowed } = this.props;
|
||||||
|
const showResponseField = (!ticket.closed && (editable || !assignmentAllowed));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="ticket-viewer">
|
<div className="ticket-viewer">
|
||||||
@ -107,7 +108,14 @@ class TicketViewer extends React.Component {
|
|||||||
<div className="ticket-viewer__comments">
|
<div className="ticket-viewer__comments">
|
||||||
{ticket.events && ticket.events.map(this.renderTicketEvent.bind(this))}
|
{ticket.events && ticket.events.map(this.renderTicketEvent.bind(this))}
|
||||||
</div>
|
</div>
|
||||||
{(!ticket.closed && (editable || !assignmentAllowed)) ? this.renderResponseField() : (this.showDeleteButton()) ? this.renderDeleteTicketButton() : null}
|
<div className="ticket-viewer__reopen-closeticket-buttons">
|
||||||
|
{!showResponseField ? this.renderReopenTicketButton() : null}
|
||||||
|
{
|
||||||
|
showResponseField ?
|
||||||
|
this.renderResponseField() :
|
||||||
|
(this.showDeleteButton()) ? this.renderDeleteTicketButton() : null
|
||||||
|
}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -247,15 +255,19 @@ class TicketViewer extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<div className="ticket-viewer__edit-status__buttons">
|
<div className="ticket-viewer__edit-status__buttons">
|
||||||
{this.renderCancelButton("Status")}
|
{this.renderCancelButton("Status")}
|
||||||
{this.props.ticket.closed ?
|
{this.props.ticket.closed ? this.renderReopenTicketButton() : this.renderCloseTicketButton()}
|
||||||
<Button type='secondary' size="medium" onClick={this.onReopenClick.bind(this)}>
|
|
||||||
{i18n('RE_OPEN')}
|
|
||||||
</Button> :
|
|
||||||
this.renderCloseTicketButton()}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderReopenTicketButton() {
|
||||||
|
return (
|
||||||
|
<Button type='secondary' size="medium" onClick={this.onReopenClick.bind(this)}>
|
||||||
|
{i18n('RE_OPEN')}
|
||||||
|
</Button>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
renderHeaders() {
|
renderHeaders() {
|
||||||
const ticket = this.props.ticket;
|
const ticket = this.props.ticket;
|
||||||
|
|
||||||
|
@ -168,6 +168,13 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__reopen-closeticket-buttons {
|
||||||
|
width: 230px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
&__response {
|
&__response {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -215,8 +222,8 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__delete-button {
|
// &__delete-button {
|
||||||
}
|
// }
|
||||||
|
|
||||||
@media screen and (max-width: 1151px) {
|
@media screen and (max-width: 1151px) {
|
||||||
.ticket-viewer__info {
|
.ticket-viewer__info {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user