From 70efc0500ea453756c7dcf8bf58c87c9d0cf2d26 Mon Sep 17 00:00:00 2001 From: Jatin Mehta Date: Tue, 31 Dec 2024 12:18:20 +0530 Subject: [PATCH] fix: Filter is not working on client active token list --- .../components/Clients/ClientActiveTokens.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/admin-ui/plugins/auth-server/components/Clients/ClientActiveTokens.js b/admin-ui/plugins/auth-server/components/Clients/ClientActiveTokens.js index ff51a7ce0..6edab5015 100644 --- a/admin-ui/plugins/auth-server/components/Clients/ClientActiveTokens.js +++ b/admin-ui/plugins/auth-server/components/Clients/ClientActiveTokens.js @@ -61,7 +61,17 @@ function ClientActiveTokens({ client }) { const onPageChangeClick = (page) => { let startCount = page * limit; setPageNumber(page); - getTokens(parseInt(startCount), limit, `clnId=${client.inum}`); + let conditionquery = `clnId=${client.inum}`; + if (pattern.dateAfter && pattern.dateBefore) { + conditionquery += `,${searchFilter}>${dayjs(pattern.dateAfter).format( + "YYYY-MM-DD" + )}`; + conditionquery += `,${searchFilter}<${dayjs(pattern.dateBefore).format( + "YYYY-MM-DD" + )}`; + } + + getTokens(parseInt(startCount), limit, `${conditionquery}`); }; const onRowCountChangeClick = (count) => {