From 90438ea937139215d0a902dfd65cc46110085385 Mon Sep 17 00:00:00 2001 From: Aakash Date: Thu, 18 Dec 2025 11:55:19 +0530 Subject: [PATCH] Fixed time badge calculation in va logs on client dashboard --- views/client/dashboard-va-logs.ejs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/views/client/dashboard-va-logs.ejs b/views/client/dashboard-va-logs.ejs index b88b2ed..2a50c88 100644 --- a/views/client/dashboard-va-logs.ejs +++ b/views/client/dashboard-va-logs.ejs @@ -226,16 +226,17 @@ // }); } - function formatTime(seconds) { - if (!seconds) return '0m'; + function formatTime(milliseconds) { + if (!milliseconds) return '0m'; + const seconds = Math.floor(milliseconds / 1000); const hours = Math.floor(seconds / 3600); const minutes = Math.floor((seconds % 3600) / 60); if (hours > 0) { - return `${hours}h ${minutes}m`; + return `${hours}h ${minutes}m ${seconds % 60}s`; } - return `${minutes}m`; + return `${minutes}m ${seconds % 60}s`; } function formatDate(dateString) {