add "duration + fixed start time" tracking mode (#859)

This commit is contained in:
Kevin Papst
2019-06-15 23:04:53 +02:00
committed by GitHub
parent 92f3f4ee57
commit 59d2946b91
36 changed files with 1094 additions and 265 deletions

View File

@@ -11,10 +11,6 @@ namespace App\Configuration;
class TimesheetConfiguration implements SystemBundleConfiguration
{
public const MODE_DURATION_ONLY = 'duration_only';
public const MODE_DEFAULT = 'default';
public const MODE_PUNCH_IN_OUT = 'punch';
use StringAccessibleConfigTrait;
public function getPrefix(): string
@@ -27,14 +23,14 @@ class TimesheetConfiguration implements SystemBundleConfiguration
return (bool) $this->find('rules.allow_future_times');
}
public function isDurationOnly(): bool
public function getTrackingMode(): string
{
return $this->find('mode') === self::MODE_DURATION_ONLY;
return (string) $this->find('mode');
}
public function isPunchInOut(): bool
public function getDefaultBeginTime(): string
{
return $this->find('mode') === self::MODE_PUNCH_IN_OUT;
return (string) $this->find('default_begin');
}
public function isMarkdownEnabled(): bool