Allow admins to reopen support tickets

pull/1/head
yflory 4 years ago
parent beba9d084d
commit 11959bef1b

@ -91,7 +91,7 @@
} }
} }
.cp-support-form-container { .cp-support-form-container {
display: none !important; display: none;
} }
} }
button { button {

@ -107,6 +107,16 @@
background-color: @cp_admin-premium-bg; background-color: @cp_admin-premium-bg;
} }
} }
&.cp-support-list-closed {
.cp-support-list-actions {
.cp-support-answer {
display: inline !important;
}
}
.cp-support-form-container {
display: block !important;
}
}
} }
.cp-support-list-ticket:not(.cp-support-list-closed) { .cp-support-list-ticket:not(.cp-support-list-closed) {

@ -840,6 +840,7 @@ define([
return; return;
} }
if (msg.type !== 'TICKET') { return; } if (msg.type !== 'TICKET') { return; }
$ticket.removeClass('cp-support-list-closed');
if (!$ticket.length) { if (!$ticket.length) {
$ticket = APP.support.makeTicket($div, content, function (hideButton) { $ticket = APP.support.makeTicket($div, content, function (hideButton) {

@ -119,6 +119,7 @@ define([
return; return;
} }
if (msg.type !== 'TICKET') { return; } if (msg.type !== 'TICKET') { return; }
$ticket.removeClass('cp-support-list-closed');
if (!$ticket.length) { if (!$ticket.length) {
$ticket = APP.support.makeTicket($div, content, function () { $ticket = APP.support.makeTicket($div, content, function () {

@ -52,6 +52,11 @@ define([
}); });
return ret; return ret;
}).filter(Boolean); }).filter(Boolean);
// "dest" is the recipient that is not the admin support mailbox.
// In the support page, make sure dest is always ourselves.
dest.channel = privateData.support;
dest.curvePublic = user.curvePublic;
} }
// Send the message to the admin mailbox and to the user mailbox // Send the message to the admin mailbox and to the user mailbox

Loading…
Cancel
Save