Ivan - Improve TicketInfo style [skip ci]
This commit is contained in:
parent
750251311c
commit
84810ba57d
|
@ -1,4 +1,6 @@
|
|||
import React from 'react';
|
||||
import _ from 'lodash';
|
||||
|
||||
import i18n from 'lib-app/i18n';
|
||||
|
||||
class TicketInfo extends React.Component {
|
||||
|
@ -16,12 +18,12 @@ class TicketInfo extends React.Component {
|
|||
{this.props.ticket.content}
|
||||
</div>
|
||||
<div className="ticket-info__author">
|
||||
Author: {this.props.ticket.author.name}
|
||||
{i18n('AUTHOR')}: {this.props.ticket.author.name}
|
||||
</div>
|
||||
<div className="ticket-info__properties">
|
||||
<div className="ticket-info__properties__status">
|
||||
<span className="ticket-info__properties__label">
|
||||
Status:
|
||||
{i18n('STATUS')}:
|
||||
</span>
|
||||
<span className={this.getStatusClass()}>
|
||||
{(this.props.ticket.closed) ? 'closed' : 'open'}
|
||||
|
@ -29,7 +31,7 @@ class TicketInfo extends React.Component {
|
|||
</div>
|
||||
<div className="ticket-info__properties__priority">
|
||||
<span className="ticket-info__properties__label">
|
||||
Priority:
|
||||
{i18n('PRIORITY')}:
|
||||
</span>
|
||||
<span className={this.getPriorityClass()}>
|
||||
{this.props.ticket.priority}
|
||||
|
@ -37,24 +39,25 @@ class TicketInfo extends React.Component {
|
|||
</div>
|
||||
<div className="ticket-info__properties__owner">
|
||||
<span className="ticket-info__properties__label">
|
||||
Owned:
|
||||
{i18n('OWNED')}:
|
||||
</span>
|
||||
<span className="ticket-info__properties__badge-red">
|
||||
none
|
||||
<span className={this.getOwnedClass()}>
|
||||
{(this.props.ticket.owner) ? i18n('YES') : i18n('NO')}
|
||||
</span>
|
||||
</div>
|
||||
<div className="ticket-info__properties__comments">
|
||||
<span className="ticket-info__properties__label">
|
||||
Comments:
|
||||
{i18n('COMMENTS')}:
|
||||
</span>
|
||||
<span className="ticket-info__properties__badge-blue">
|
||||
21
|
||||
{_.filter(this.props.ticket.events, event => event.type === 'COMMENT').length}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
getStatusClass() {
|
||||
if(this.props.ticket.closed) {
|
||||
return 'ticket-info__properties__badge-red';
|
||||
|
@ -63,6 +66,14 @@ class TicketInfo extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
getOwnedClass() {
|
||||
if(this.props.ticket.owner) {
|
||||
return 'ticket-info__properties__badge-green';
|
||||
} else {
|
||||
return 'ticket-info__properties__badge-red';
|
||||
}
|
||||
}
|
||||
|
||||
getPriorityClass() {
|
||||
let priorityClasses = {
|
||||
'low': 'ticket-info__properties__badge-green',
|
||||
|
|
|
@ -368,7 +368,7 @@ module.exports = [
|
|||
{
|
||||
ticketNumber: '445441',
|
||||
title: 'Problem with installation',
|
||||
content: 'I had a problem with the installation of the php server',
|
||||
content: 'In varius, tellus ut luctus vestibulum, orci erat commodo ligula, sit amet bibendum arcu libero sed magna. Suspendisse in ligula vitae ante placerat varius id in eros. Etiam commodo viverra nisi in ornare. Donec ullamcorper felis sapien, eu laoreet dolor tincidunt nec. Aliquam erat volutpat. Proin semper viverra purus eget facilisis. Proin fermentum et odio in elementum. Maecenas lacinia, massa consectetur gravida lacinia, nisl lectus tincidunt diam, ut viverra ipsum ex sit amet diam. Mauris ac massa turpis. Fusce ultrices venenatis vestibulum. In et nulla purus. Nullam porta vestibulum leo in dignissim. Duis id ullamcorper odio. Ut purus nulla, consequat lobortis volutpat quis, consequat et libero. Maecenas sit amet libero laoreet, dictum sapien at, hendrerit sapien.',
|
||||
department: {
|
||||
id: 2,
|
||||
name: 'Technical Issues'
|
||||
|
@ -502,9 +502,7 @@ module.exports = [
|
|||
name: 'Haskell Curry',
|
||||
email: 'haskell@lambda.com'
|
||||
},
|
||||
owner: {
|
||||
name: 'Steve Jobs'
|
||||
},
|
||||
owner: null,
|
||||
events: [
|
||||
{
|
||||
type: 'ASSIGN',
|
||||
|
@ -516,17 +514,6 @@ module.exports = [
|
|||
staff: true
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'COMMENT',
|
||||
date: '201504090912',
|
||||
content: 'Do you have apache installed? It generally happens if you dont have apache.',
|
||||
author: {
|
||||
name: 'Emilia Clarke',
|
||||
email: 'jobs@steve.com',
|
||||
profilePic: 'http://www.opensupports.com/profilepic.jpg',
|
||||
staff: true
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'UN_ASSIGN',
|
||||
date: '201504100924',
|
||||
|
|
|
@ -30,6 +30,7 @@ export default {
|
|||
'STAFF': 'Staff',
|
||||
'CUSTOMER': 'Customer',
|
||||
'YES': 'Yes',
|
||||
'NO': 'No',
|
||||
'CANCEL': 'Cancel',
|
||||
'MY_ACCOUNT': 'My Account',
|
||||
'DASHBOARD': 'Dashboard',
|
||||
|
@ -114,6 +115,7 @@ export default {
|
|||
'ADD_DEPARTMENT': 'Add department',
|
||||
'UPDATE_DEPARTMENT': 'Update department',
|
||||
'TRANSFER_TICKETS_TO': 'Transfer tickets to',
|
||||
'COMMENTS': 'Comments',
|
||||
|
||||
//VIEW DESCRIPTIONS
|
||||
'CREATE_TICKET_DESCRIPTION': 'This is a form for creating tickets. Fill the form and send us your issues/doubts/suggestions. Our support system will answer it as soon as possible.',
|
||||
|
|
Loading…
Reference in New Issue