added punch-in punch-out / time-clock mode (#812)

This commit is contained in:
Kevin Papst
2019-05-27 01:36:43 +02:00
committed by GitHub
parent ebff4a765a
commit d9dca96a32
20 changed files with 231 additions and 113 deletions

View File

@@ -13,6 +13,7 @@ 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;
@@ -31,6 +32,11 @@ class TimesheetConfiguration implements SystemBundleConfiguration
return $this->find('mode') === self::MODE_DURATION_ONLY;
}
public function isPunchInOut(): bool
{
return $this->find('mode') === self::MODE_PUNCH_IN_OUT;
}
public function isMarkdownEnabled(): bool
{
return (bool) $this->find('markdown_content');