#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

@@ -9,6 +9,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Support\Carbon;
use Illuminate\Support\Collection;
use Toby\Domain\VacationRequestStatesRetriever;
/**
@@ -58,4 +59,12 @@ class Vacation extends Model
fn(Builder $query): Builder => $query->states(VacationRequestStatesRetriever::pendingStates()),
);
}
public function scopeWhereTypes(Builder $query, Collection $types): Builder
{
return $query->whereRelation(
"vacationRequest",
fn(Builder $query): Builder => $query->whereIn("type", $types),
);
}
}