diff --git a/client/src/app-components/ticket-action.js b/client/src/app-components/ticket-event.js similarity index 52% rename from client/src/app-components/ticket-action.js rename to client/src/app-components/ticket-event.js index fb3657db..dd99b24c 100644 --- a/client/src/app-components/ticket-action.js +++ b/client/src/app-components/ticket-event.js @@ -4,7 +4,7 @@ import classNames from 'classnames'; import i18n from 'lib-app/i18n'; import Icon from 'core-components/icon'; -class TicketAction extends React.Component { +class TicketEvent extends React.Component { static propTypes = { type: React.PropTypes.oneOf([ 'COMMENT', @@ -31,12 +31,12 @@ class TicketAction extends React.Component { return (
- +
{iconNode}
- {this.renderActionDescription()} + {this.renderEventDescription()}
); @@ -44,21 +44,21 @@ class TicketAction extends React.Component { renderStaffPic() { return ( -
- +
+
); } renderIcon() { return ( -
+
); } - renderActionDescription() { + renderEventDescription() { const renders = { 'COMMENT': this.renderComment.bind(this), 'ASSIGN': this.renderAssignment.bind(this), @@ -74,14 +74,14 @@ class TicketAction extends React.Component { renderComment() { return ( -
- -
- {this.props.author.name} - ({i18n((this.props.author.staff) ? 'STAFF' : 'CUSTOMER')}) +
+ +
+ {this.props.author.name} + ({i18n((this.props.author.staff) ? 'STAFF' : 'CUSTOMER')})
-
{this.props.date}
-
+
{this.props.date}
+
{this.renderFileRow(this.props.file)}
); @@ -89,62 +89,62 @@ class TicketAction extends React.Component { renderAssignment() { return ( -
- {this.props.author.name} - assigned this ticket - on {this.props.date} +
+ {this.props.author.name} + assigned this ticket + on {this.props.date}
) } renderUnAssignment() { return ( -
- {this.props.author.name} - unassigned this ticket - on {this.props.date} +
+ {this.props.author.name} + unassigned this ticket + on {this.props.date}
) } renderClosed() { return ( -
- {this.props.author.name} - closed this ticket - on {this.props.date} +
+ {this.props.author.name} + closed this ticket + on {this.props.date}
) } renderReOpened() { return ( -
- {this.props.author.name} - reopen this ticket - on {this.props.date} +
+ {this.props.author.name} + reopen this ticket + on {this.props.date}
); } renderDepartmentChange() { return ( -
- {this.props.author.name} - change department to - {this.props.content} - on {this.props.date} +
+ {this.props.author.name} + change department to + {this.props.content} + on {this.props.date}
); } renderPriorityChange() { return ( -
- {this.props.author.name} - change priority to - {this.props.content} - on {this.props.date} +
+ {this.props.author.name} + change priority to + {this.props.content} + on {this.props.date}
); } @@ -177,14 +177,14 @@ class TicketAction extends React.Component { }; const classes = { 'row': true, - 'ticket-action': true, - 'ticket-action_staff': this.props.author && this.props.author.staff, - 'ticket-action_circled': circledTypes[this.props.type], - 'ticket-action_unassignment': this.props.type === 'UN_ASSIGN', - 'ticket-action_close': this.props.type === 'CLOSE', - 'ticket-action_reopen': this.props.type === 'RE_OPEN', - 'ticket-action_department': this.props.type === 'DEPARTMENT_CHANGED', - 'ticket-action_priority': this.props.type === 'PRIORITY_CHANGED' + 'ticket-event': true, + 'ticket-event_staff': this.props.author && this.props.author.staff, + 'ticket-event_circled': circledTypes[this.props.type], + 'ticket-event_unassignment': this.props.type === 'UN_ASSIGN', + 'ticket-event_close': this.props.type === 'CLOSE', + 'ticket-event_reopen': this.props.type === 'RE_OPEN', + 'ticket-event_department': this.props.type === 'DEPARTMENT_CHANGED', + 'ticket-event_priority': this.props.type === 'PRIORITY_CHANGED' }; return classNames(classes); @@ -225,4 +225,4 @@ class TicketAction extends React.Component { } } -export default TicketAction; \ No newline at end of file +export default TicketEvent; \ No newline at end of file diff --git a/client/src/app-components/ticket-action.scss b/client/src/app-components/ticket-event.scss similarity index 87% rename from client/src/app-components/ticket-action.scss rename to client/src/app-components/ticket-event.scss index 0e9eb818..5e36aaa0 100644 --- a/client/src/app-components/ticket-action.scss +++ b/client/src/app-components/ticket-event.scss @@ -1,6 +1,6 @@ @import "../scss/vars"; -.ticket-action { +.ticket-event { margin-top: 20px; text-align: left; position: relative; @@ -91,11 +91,11 @@ } &_staff { - .ticket-action__icon { + .ticket-event__icon { background-color: $primary-blue; } - .ticket-action__comment-author-type { + .ticket-event__comment-author-type { color: $primary-blue; } } @@ -104,11 +104,11 @@ margin-top: 35px; margin-bottom: 30px; - .ticket-action__connector { + .ticket-event__connector { top: 28px; } - .ticket-action__icon { + .ticket-event__icon { background-color: white; color: $primary-black; border: 3px solid $light-grey; @@ -121,48 +121,48 @@ margin-top: -8px; } - .ticket-action__circled { + .ticket-event__circled { color: $primary-black; font-size: $font-size--sm; margin-top: 1px; } - .ticket-action__circled-author { + .ticket-event__circled-author { color: $secondary-blue; } - .ticket-action__circled-indication { + .ticket-event__circled-indication { color: $primary-green; } } &_unassignment { - .ticket-action__icon { + .ticket-event__icon { padding-left: 6px; } } &_close { - .ticket-action__icon { + .ticket-event__icon { padding-left: 9px; } } &_reopen { - .ticket-action__icon { + .ticket-event__icon { padding-left: 9px; padding-top: 5px; } } &_department { - .ticket-action__icon { + .ticket-event__icon { padding-left: 6px; } } &_priority { - .ticket-action__icon { + .ticket-event__icon { padding-left: 11px; padding-top: 5px; } diff --git a/client/src/app-components/ticket-viewer.js b/client/src/app-components/ticket-viewer.js index 89237ab3..4b69e7cb 100644 --- a/client/src/app-components/ticket-viewer.js +++ b/client/src/app-components/ticket-viewer.js @@ -7,7 +7,7 @@ import store from 'app/store'; import SessionStore from 'lib-app/session-store'; import SessionActions from 'actions/session-actions'; -import TicketAction from 'app-components/ticket-action'; +import TicketEvent from 'app-components/ticket-event'; import AreYouSure from 'app-components/are-you-sure'; import Form from 'core-components/form'; import FormField from 'core-components/form-field'; @@ -49,10 +49,10 @@ class TicketViewer extends React.Component {
{this.props.editable ? this.renderEditableHeaders() : this.renderHeaders()}
- +
- {ticket.actions && ticket.actions.map(this.renderAction.bind(this))} + {ticket.events && ticket.events.map(this.renderTicketEvent.bind(this))}
{i18n('RESPOND')}
@@ -162,9 +162,9 @@ class TicketViewer extends React.Component { ); } - renderAction(action, index) { + renderTicketEvent(options, index) { return ( - + ); } diff --git a/client/src/data/fixtures/user-fixtures.js b/client/src/data/fixtures/user-fixtures.js index 04cf2cd5..ead1820c 100644 --- a/client/src/data/fixtures/user-fixtures.js +++ b/client/src/data/fixtures/user-fixtures.js @@ -159,7 +159,7 @@ module.exports = [ name: 'Steve Jobs', email: 'steve@jobs.com' }, - actions: [ + events: [ { type: 'ASSIGN', date: 20150409, @@ -275,7 +275,7 @@ module.exports = [ owner: { name: 'Steve Jobs' }, - actions: [ + events: [ { type: 'ASSIGN', date: 20150409, @@ -391,7 +391,7 @@ module.exports = [ owner: { name: 'Steve Jobs' }, - actions: [ + events: [ { type: 'ASSIGN', date: 20150409,