#120 - remote work (#127)

* #120 - wip

* #120 - add icon to home office

* #120 - wip

* #120 - wip

* #120 - wip

* #120 - wip

* #120 - wip

* #120 - ui fixes

* #120 - fix

* #120 - fix

* #120 - fix

* #120 - fix

* #120 - translation fix

* #120 - fix

Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
This commit is contained in:
Adrian Hopek
2022-04-21 07:44:22 +02:00
committed by GitHub
parent cc981b02b4
commit c95d08c861
34 changed files with 277 additions and 86 deletions

View File

@@ -15,6 +15,7 @@ class VacationTypeConfigRetriever
public const KEY_BILLABLE = "billable";
public const KEY_HAS_LIMIT = "has_limit";
public const KEY_AVAILABLE_FOR = "available_for";
public const KEY_IS_VACATION = "is_vacation";
public function __construct(
protected Repository $config,
@@ -40,6 +41,11 @@ class VacationTypeConfigRetriever
return $this->getConfigFor($type)[static::KEY_HAS_LIMIT];
}
public function isVacation(VacationType $type): bool
{
return $this->getConfigFor($type)[static::KEY_IS_VACATION];
}
public function isAvailableFor(VacationType $type, EmploymentForm $employmentForm): bool
{
return in_array($employmentForm, $this->getConfigFor($type)[static::KEY_AVAILABLE_FOR], true);