Skip to content

Commit

Permalink
Fix the displayed time display in the projects-time
Browse files Browse the repository at this point in the history
- adjust projects-time elements to correctly display the time for new log time units

In the latest Timedone version 1 time unit is now 15 minutes(was 30)
  • Loading branch information
Seregy committed Mar 13, 2024
1 parent 50fbaa4 commit 3b335d4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -491,13 +491,13 @@ function buildLogLineContainer(logLine) {
/**
* Converts time units into human-readable duration
*
* @param {number} timeUnits integer amount of work log time units, 1 unit is 30
* @param {number} timeUnits integer amount of work log time units, 1 unit is 15
* minutes
* @return {string} localized duration string
*/
function timeUnitsToString(timeUnits) {
const hours = Math.floor(timeUnits / 2);
const minutes = timeUnits % 2 * 30;
const hours = Math.floor(timeUnits / 4);
const minutes = timeUnits % 4 * 15;

return i18nService.getLocalizedStrings().feature.projectTimeDuration(
{hours: hours, minutes: minutes});
Expand Down

0 comments on commit 3b335d4

Please sign in to comment.