Skip to content

Commit

Permalink
fix(ticket): priority not updating in realtime
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Jan 11, 2019
1 parent 0d4ed8f commit 721f42d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions src/public/js/modules/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,28 +463,9 @@ define('modules/ui', [
socketUi.updateTicketPriority = function() {
socket.removeAllListeners('updateTicketPriority');
socket.on('updateTicketPriority', function(data) {
var prioritySelect = $('select#tPriority[data-ticketId="' + data._id + '"] option[value="' + data.priority + '"]');
var prioritySelect = $('select#tPriority[data-ticketId="' + data._id + '"] option[value="' + data.priority._id + '"]');
if (prioritySelect.length > 0)
prioritySelect.prop('selected', true);
else {
prioritySelect = $('div#tPriority[data-ticketId="' + data._id + '"]');
if (prioritySelect.length > 0) {
var priorityname = 'Normal';
switch (data.priority) {
case 1:
priorityname = 'Normal';
break;
case 2:
priorityname = 'Urgent';
break;
case 3:
priorityname = 'Critical';
break;
}

prioritySelect.html(priorityname);
}
}
});
};

Expand Down
Empty file added src/socketio/ticketSocket.js
Empty file.

0 comments on commit 721f42d

Please sign in to comment.