diff --git a/client/src/app-components/ticket-viewer.js b/client/src/app-components/ticket-viewer.js
index 0f5a9b0b..8f3f5442 100644
--- a/client/src/app-components/ticket-viewer.js
+++ b/client/src/app-components/ticket-viewer.js
@@ -74,11 +74,7 @@ class TicketViewer extends React.Component {
};
componentDidMount() {
- const {
- staffMembersLoaded,
- userStaff,
- dispatch
- } = this.props;
+ const { staffMembersLoaded, userStaff, dispatch } = this.props;
if(!staffMembersLoaded && userStaff) {
dispatch(AdminDataActions.retrieveStaffMembers());
@@ -86,14 +82,7 @@ class TicketViewer extends React.Component {
}
render() {
- const {
- ticket,
- userStaff,
- userId,
- editable,
- allowAttachments,
- assignmentAllowed
- } = this.props;
+ const { ticket, userStaff, userId, editable, allowAttachments, assignmentAllowed } = this.props;
return (
@@ -239,10 +228,7 @@ class TicketViewer extends React.Component {
}
renderEditTags() {
- const {
- tags,
- ticket
- } = this.props;
+ const { tags, ticket } = this.props;
return (
@@ -310,10 +296,7 @@ class TicketViewer extends React.Component {
}
renderTags() {
- const {
- ticket,
- tags
- } = this.props;
+ const { ticket, tags } = this.props;
const TAGS = (
ticket.tags.length ?
ticket.tags.map((tagName, index) => {
@@ -327,10 +310,7 @@ class TicketViewer extends React.Component {
}
renderOwnerNode() {
- const {
- assignmentAllowed,
- ticket
- } = this.props;
+ const { assignmentAllowed, ticket } = this.props;
const filtersOnlyWithOwner = ticket.owner && {owners: [ticket.owner.id*1]};
let ownerNode = null;
@@ -408,16 +388,11 @@ class TicketViewer extends React.Component {
}
renderCancelButton(option) {
- return
+ return
}
renderTicketEvent(options, index) {
- const {
- userStaff,
- ticket,
- userId,
- allowAttachments
- } = this.props;
+ const { userStaff, ticket, userId, allowAttachments } = this.props;
if(userStaff && typeof options.content === 'string') {
options.content = MentionsParser.parse(options.content);
@@ -581,6 +556,10 @@ class TicketViewer extends React.Component {
}));
}
+ this.setState({
+ editOwner: false
+ });
+
return APICallPromise.then(this.onTicketModification.bind(this));
}
@@ -662,11 +641,11 @@ class TicketViewer extends React.Component {
}
changeDepartment(departmentId) {
- const {
- userId,
- userDepartments,
- ticket
- } = this.props;
+ const { userId, userDepartments, ticket } = this.props;
+
+ this.setState({
+ editDepartment: false
+ });
return API.call({
path: '/ticket/change-department',
@@ -816,17 +795,12 @@ class TicketViewer extends React.Component {
onTicketModification() {
const { onChange } = this.props;
- if(onChange) {
- onChange();
- }
+
+ onChange && onChange();
}
getStaffAssignmentItems() {
- const {
- userDepartments,
- userId,
- ticket
- } = this.props;
+ const { userDepartments, userId, ticket } = this.props;
let staffAssignmentItems = [
{content: i18n('NONE'), contentOnSelected: i18n('NONE'), id: 0}
];
@@ -850,11 +824,7 @@ class TicketViewer extends React.Component {
}
getStaffList() {
- const {
- userId,
- staffMembers,
- ticket
- } = this.props;
+ const { userId, staffMembers, ticket } = this.props;
return _.filter(staffMembers, ({id, departments}) => {
return (id != userId) && _.some(departments, {id: ticket.department.id});
@@ -862,11 +832,7 @@ class TicketViewer extends React.Component {
}
getCurrentStaff() {
- const {
- userId,
- staffMembers,
- ticket
- } = this.props;
+ const { userId, staffMembers, ticket } = this.props;
return _.find(staffMembers, ({id}) => {return id == userId});
}
@@ -876,12 +842,7 @@ class TicketViewer extends React.Component {
}
showDeleteButton() {
- const {
- ticket,
- userLevel,
- userId,
- userStaff
- } = this.props;
+ const { ticket, userLevel, userId, userStaff } = this.props;
if(!ticket.owner) {
if(userLevel === 3) return true;
diff --git a/client/src/app/admin/panel/staff/invite-staff-modal.js b/client/src/app/admin/panel/staff/invite-staff-modal.js
index c98e608c..83578214 100644
--- a/client/src/app/admin/panel/staff/invite-staff-modal.js
+++ b/client/src/app/admin/panel/staff/invite-staff-modal.js
@@ -51,12 +51,14 @@ class InviteStaffModal extends React.Component {
-