mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-27 15:54:23 +02:00
Ivan - Ticket viewer Minor tweaks [skip ci]
This commit is contained in:
parent
fff2bca646
commit
e89283e5d3
@ -132,17 +132,6 @@ class TicketViewer extends React.Component {
|
|||||||
'high': 'HIGH'
|
'high': 'HIGH'
|
||||||
};
|
};
|
||||||
|
|
||||||
let ownerNode = null;
|
|
||||||
if (this.props.assignmentAllowed && _.isEmpty(ticket.owner)) {
|
|
||||||
ownerNode = (
|
|
||||||
<Button type="secondary" size="extra-small" onClick={this.onAssignClick.bind(this)}>
|
|
||||||
{i18n('ASSIGN_TO_ME')}
|
|
||||||
</Button>
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
ownerNode = i18n((ticket.closed) ? 'CLOSED' : 'OPENED');
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="ticket-viewer__headers">
|
<div className="ticket-viewer__headers">
|
||||||
<div className="ticket-viewer__info-row-header row">
|
<div className="ticket-viewer__info-row-header row">
|
||||||
@ -168,13 +157,29 @@ class TicketViewer extends React.Component {
|
|||||||
{(ticket.owner) ? ticket.owner.name : i18n('NONE')}
|
{(ticket.owner) ? ticket.owner.name : i18n('NONE')}
|
||||||
</div>
|
</div>
|
||||||
<div className="col-md-4">
|
<div className="col-md-4">
|
||||||
{ownerNode}
|
{this.renderOwnerNode()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderOwnerNode() {
|
||||||
|
let ownerNode = null;
|
||||||
|
|
||||||
|
if (this.props.assignmentAllowed && _.isEmpty(this.props.ticket.owner)) {
|
||||||
|
ownerNode = (
|
||||||
|
<Button type="secondary" size="extra-small" onClick={this.onAssignClick.bind(this)}>
|
||||||
|
{i18n('ASSIGN_TO_ME')}
|
||||||
|
</Button>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
ownerNode = i18n((this.props.closed) ? 'CLOSED' : 'OPENED');
|
||||||
|
}
|
||||||
|
|
||||||
|
return ownerNode;
|
||||||
|
}
|
||||||
|
|
||||||
renderTicketEvent(options, index) {
|
renderTicketEvent(options, index) {
|
||||||
return (
|
return (
|
||||||
<TicketEvent {...options} key={index} />
|
<TicketEvent {...options} key={index} />
|
||||||
|
@ -85,19 +85,19 @@ module.exports = [
|
|||||||
return {
|
return {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
data: {
|
data: {
|
||||||
ticketNumber: '118551',
|
ticketNumber: '878552',
|
||||||
title: 'Lorem ipsum door',
|
title: 'Lorem ipsum door',
|
||||||
content: 'I had a problem with the installation of the php server',
|
content: 'I had a problem with the installation of the php server',
|
||||||
department: {
|
department: {
|
||||||
id: 1,
|
id: 1,
|
||||||
name: 'Sales Support'
|
name: 'Sales Support'
|
||||||
},
|
},
|
||||||
date: 20150409,
|
date: '20160415',
|
||||||
file: 'http://www.opensupports.com/some_file.zip',
|
file: 'http://www.opensupports.com/some_file.zip',
|
||||||
language: 'en',
|
language: 'en',
|
||||||
unread: false,
|
unread: false,
|
||||||
closed: false,
|
closed: false,
|
||||||
priority: 'high',
|
priority: 'medium',
|
||||||
author: {
|
author: {
|
||||||
name: 'Haskell Curry',
|
name: 'Haskell Curry',
|
||||||
email: 'haskell@lambda.com'
|
email: 'haskell@lambda.com'
|
||||||
@ -108,7 +108,7 @@ module.exports = [
|
|||||||
events: [
|
events: [
|
||||||
{
|
{
|
||||||
type: 'ASSIGN',
|
type: 'ASSIGN',
|
||||||
date: 20150409,
|
date: '20150409',
|
||||||
author: {
|
author: {
|
||||||
name: 'Emilia Clarke',
|
name: 'Emilia Clarke',
|
||||||
email: 'jobs@steve.com',
|
email: 'jobs@steve.com',
|
||||||
@ -118,7 +118,7 @@ module.exports = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'COMMENT',
|
type: 'COMMENT',
|
||||||
date: 20150409,
|
date: '20150409',
|
||||||
content: 'Do you have apache installed? It generally happens if you dont have apache.',
|
content: 'Do you have apache installed? It generally happens if you dont have apache.',
|
||||||
author: {
|
author: {
|
||||||
name: 'Emilia Clarke',
|
name: 'Emilia Clarke',
|
||||||
@ -129,7 +129,7 @@ module.exports = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'UN_ASSIGN',
|
type: 'UN_ASSIGN',
|
||||||
date: 20150410,
|
date: '20150410',
|
||||||
author: {
|
author: {
|
||||||
name: 'Emilia Clarke',
|
name: 'Emilia Clarke',
|
||||||
email: 'jobs@steve.com',
|
email: 'jobs@steve.com',
|
||||||
@ -139,7 +139,7 @@ module.exports = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'DEPARTMENT_CHANGED',
|
type: 'DEPARTMENT_CHANGED',
|
||||||
date: 20150411,
|
date: '20150411',
|
||||||
content: 'System support',
|
content: 'System support',
|
||||||
author: {
|
author: {
|
||||||
name: 'Emilia Clarke',
|
name: 'Emilia Clarke',
|
||||||
@ -150,7 +150,7 @@ module.exports = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'COMMENT',
|
type: 'COMMENT',
|
||||||
date: 20150412,
|
date: '20150412',
|
||||||
content: 'I have already installed apache, but the problem persists',
|
content: 'I have already installed apache, but the problem persists',
|
||||||
author: {
|
author: {
|
||||||
name: 'Haskell Curry',
|
name: 'Haskell Curry',
|
||||||
@ -160,7 +160,7 @@ module.exports = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'PRIORITY_CHANGED',
|
type: 'PRIORITY_CHANGED',
|
||||||
date: 20150413,
|
date: '20150413',
|
||||||
content: 'MEDIUM',
|
content: 'MEDIUM',
|
||||||
author: {
|
author: {
|
||||||
name: 'Emilia Clarke',
|
name: 'Emilia Clarke',
|
||||||
@ -171,7 +171,7 @@ module.exports = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'COMMENT',
|
type: 'COMMENT',
|
||||||
date: 20150511,
|
date: '20150511',
|
||||||
content: 'Thanks!, I soved it by myself',
|
content: 'Thanks!, I soved it by myself',
|
||||||
author: {
|
author: {
|
||||||
name: 'Haskell Curry',
|
name: 'Haskell Curry',
|
||||||
@ -181,7 +181,7 @@ module.exports = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'CLOSE',
|
type: 'CLOSE',
|
||||||
date: 20150513,
|
date: '20150513',
|
||||||
author: {
|
author: {
|
||||||
name: 'Emilia Clarke',
|
name: 'Emilia Clarke',
|
||||||
email: 'jobs@steve.com',
|
email: 'jobs@steve.com',
|
||||||
@ -191,7 +191,7 @@ module.exports = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'RE_OPEN',
|
type: 'RE_OPEN',
|
||||||
date: 20151018,
|
date: '20151018',
|
||||||
author: {
|
author: {
|
||||||
name: 'Haskell Curry',
|
name: 'Haskell Curry',
|
||||||
email: 'haskell@lambda.com',
|
email: 'haskell@lambda.com',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user