QoL 54: booking lengths, dispatch board lengths and cron run times written 1h 30m like logged time, decimal hours written 12.5 h including project hours, and the client export minutes in the same form

This commit is contained in:
johnnyq
2026-11-21 01:15:09 -05:00
parent 8b332846b4
commit 14990ac931
6 changed files with 12 additions and 11 deletions

View File

@@ -211,13 +211,13 @@ function projectDuePill($row) {
return '';
}
/** Hours for people: "45m", "3h", "12.5h". */
/** Hours for people: "45m", "3 h", "12.5 h". */
function projectHoursText($seconds) {
$seconds = max(0, intval($seconds));
if ($seconds < 3600) {
return round($seconds / 60) . 'm';
}
return rtrim(rtrim(number_format($seconds / 3600, 1, '.', ''), '0'), '.') . 'h';
return rtrim(rtrim(number_format($seconds / 3600, 1, '.', ''), '0'), '.') . ' h';
}
/** A budget in hours as posted - a positive number up to 999999, or null for none. */