From 1ff558bd9ed1927ddcbb63ce303295a6bf8fe4b0 Mon Sep 17 00:00:00 2001 From: Yoshiyuki Tabata Date: Tue, 11 Jan 2022 11:56:07 +0900 Subject: [PATCH] Closes #9488 --- .../theme/base/admin/resources/js/services.js | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/themes/src/main/resources/theme/base/admin/resources/js/services.js b/themes/src/main/resources/theme/base/admin/resources/js/services.js index 6d39d9c8b9..689724fe68 100755 --- a/themes/src/main/resources/theme/base/admin/resources/js/services.js +++ b/themes/src/main/resources/theme/base/admin/resources/js/services.js @@ -1589,15 +1589,15 @@ module.factory('TimeUnit', function() { if (time % 60 == 0) { unit = 'Minutes'; time = time / 60; + if (time % 60 == 0) { + unit = 'Hours'; + time = time / 60; + if (time % 24 == 0) { + unit = 'Days'; + } + } } - if (time % 60 == 0) { - unit = 'Hours'; - time = time / 60; - } - if (time % 24 == 0) { - unit = 'Days' - time = time / 24; - } + return unit; } @@ -1642,14 +1642,14 @@ module.factory('TimeUnit2', function() { if (time % 60 == 0) { unit = 'Minutes'; time = time / 60; - } - if (time % 60 == 0) { - unit = 'Hours'; - time = time / 60; - } - if (time % 24 == 0) { - unit = 'Days' - time = time / 24; + if (time % 60 == 0) { + unit = 'Hours'; + time = time / 60; + if (time % 24 == 0) { + unit = 'Days'; + time = time / 24; + } + } } } }