display correct count of support tickets per category

This commit is contained in:
ansuz 2022-08-02 17:01:47 +05:30
parent 82c3ebe696
commit 6942cdcf4b
1 changed files with 9 additions and 2 deletions

View File

@ -1184,11 +1184,18 @@ define([
$t.css('order', i).appendTo(cols[j]);
updateTicketDetails($t, d.premium);
});
if (!list.length) {
var len;
try {
len = cols[j].find('div.cp-support-list-ticket').length;
} catch (err) {
UI.warn(Messages.error);
return void console.error(err);
}
if (!len) {
cols[j].hide();
} else {
cols[j].show();
cols[j].find('.cp-support-count').text(list.length);
cols[j].find('.cp-support-count').text(len);
}
});
};