feat: import work hours from SaaS and exchange signed time sheet

This commit is contained in:
fromme committed 2026-09-26 12:13:59 +02:00
1 parent 7cf39850e6
commit 1a7c272414
73 files changed
+10488 -72

No files matched your search

+18
View File
@@ -30,6 +30,24 @@ class AppRuntime implements RuntimeExtensionInterface
) {
}
/**
* Minutes as hours and minutes, the way a timesheet reads them: 510 becomes "8:30".
*
* Hours are not padded and not capped at 24 - a month total is a perfectly ordinary
* "195:45". Null is a day the SaaS never reported, which is not the same as zero.
*/
public function formatDurationHoursMinutes(?int $minutes, string $empty = '–'): string
{
if (null === $minutes) {
return $empty;
}
$sign = $minutes < 0 ? '-' : '';
$minutes = abs($minutes);
return sprintf('%s%d:%02d', $sign, intdiv($minutes, 60), $minutes % 60);
}
public function seasonAssignmentLabel(SeasonAssignment $seasonAssignment): string
{
return $this->seasonAssignmentLabeler->label($seasonAssignment);