timesheet lockdown with grace period (#1644)

This commit is contained in:
Honza Kopecký
2020-07-02 18:54:17 +02:00
committed by GitHub
parent e22830790b
commit 091740f407
32 changed files with 1180 additions and 148 deletions

View File

@@ -77,4 +77,24 @@ class TimesheetConfiguration implements SystemBundleConfiguration
{
return (int) $this->find('rounding.default.duration');
}
public function getLockdownPeriodStart(): string
{
return (string) $this->find('rules.lockdown_period_start');
}
public function getLockdownPeriodEnd(): string
{
return (string) $this->find('rules.lockdown_period_end');
}
public function getLockdownGracePeriod(): string
{
return (string) $this->find('rules.lockdown_grace_period');
}
public function isLockdownActive(): bool
{
return !empty($this->find('rules.lockdown_period_start')) && !empty($this->find('rules.lockdown_period_end'));
}
}