change vacation request name

This commit is contained in:
Adrian Hopek
2022-03-17 13:32:38 +01:00
parent dc77292278
commit 4f6883b451
6 changed files with 11 additions and 42 deletions

View File

@@ -19,6 +19,7 @@ use Toby\Domain\States\VacationRequest\VacationRequestState;
/**
* @property int $id
* @property string $name
* @property VacationType $type
* @property VacationRequestState $state
* @property Carbon $from
@@ -90,6 +91,11 @@ class VacationRequest extends Model
->where("to", ">=", $vacationRequest->from);
}
public function getNameAttribute(): string
{
return "{$this->id}/{$this->yearPeriod->year}";
}
public function hasFlowSkipped(): bool
{
return $this->flow_skipped;