From 84b0e2bd451a8fc45f133a8fe21107cc02de9bb3 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 25 Feb 2022 13:19:44 +0530 Subject: [PATCH] slight optimization in reordering ticket on the admin panel --- www/admin/inner.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/www/admin/inner.js b/www/admin/inner.js index 83143a546..6d3a4115f 100644 --- a/www/admin/inner.js +++ b/www/admin/inner.js @@ -908,19 +908,21 @@ define([ }; var _reorder = function () { - var orderAnswered = Object.keys(hashesById).filter(function (id) { + var hashKeys = Object.keys(hashesById); + + var orderAnswered = hashKeys.filter(function (id) { var d = getTicketData(id); return d && d.lastAdmin && !d.closed; }).sort(sort); - var orderPremium = Object.keys(hashesById).filter(function (id) { + var orderPremium = hashKeys.filter(function (id) { var d = getTicketData(id); return d && d.premium && !d.lastAdmin && !d.closed; }).sort(sort); - var orderNormal = Object.keys(hashesById).filter(function (id) { + var orderNormal = hashKeys.filter(function (id) { var d = getTicketData(id); return d && !d.premium && !d.lastAdmin && !d.closed; }).sort(sort); - var orderClosed = Object.keys(hashesById).filter(function (id) { + var orderClosed = hashKeys.filter(function (id) { var d = getTicketData(id); return d && d.closed; }).sort(sort);