#43 - vacation summary for employee (#66)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* #5 - bump dependencies

* #43 - wip

* #43 - add composer script

* #43 - fix

* #43 - fix

* #43 - wip

* #43 - ecs fix

* #43 - cr fix

* #43 - cr fix

* #43 - fix

Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
This commit is contained in:
Adrian Hopek
2022-03-03 09:03:17 +01:00
committed by GitHub
parent d825dd727f
commit 3d9726039c
69 changed files with 3122 additions and 1762 deletions

View File

@@ -14,8 +14,7 @@ class UserAvatarGenerator
{
public function __construct(
protected InitialAvatar $generator,
) {
}
) {}
public function generateFor(User $user): string
{

View File

@@ -13,8 +13,7 @@ class YearPeriodRetriever
public function __construct(
protected Session $session,
) {
}
) {}
public function selected(): YearPeriod
{

View File

@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace Toby\Eloquent\Models;
use Database\Factories\VacationRequestActivityFactory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Toby\Domain\States\VacationRequest\VacationRequestState;
@@ -17,6 +19,8 @@ use Toby\Domain\States\VacationRequest\VacationRequestState;
*/
class VacationRequestActivity extends Model
{
use HasFactory;
protected $guarded = [];
protected $casts = [
@@ -33,4 +37,9 @@ class VacationRequestActivity extends Model
{
return $this->belongsTo(VacationRequest::class);
}
protected static function newFactory(): VacationRequestActivityFactory
{
return VacationRequestActivityFactory::new();
}
}

View File

@@ -14,8 +14,7 @@ class UserObserver
public function __construct(
protected UserAvatarGenerator $generator,
protected YearPeriodRetriever $yearPeriodRetriever,
) {
}
) {}
public function created(User $user): void
{

View File

@@ -13,8 +13,7 @@ class VacationRequestObserver
public function __construct(
protected Auth $auth,
protected Dispatcher $dispatcher,
) {
}
) {}
public function creating(VacationRequest $vacationRequest): void
{

View File

@@ -14,8 +14,7 @@ class YearPeriodObserver
public function __construct(
protected UserAvatarGenerator $generator,
protected PolishHolidaysRetriever $polishHolidaysRetriever,
) {
}
) {}
public function created(YearPeriod $yearPeriod): void
{

View File

@@ -13,8 +13,7 @@ class SelectedYearPeriodScope implements Scope
{
public function __construct(
protected YearPeriodRetriever $yearPeriodRetriever,
) {
}
) {}
public function apply(Builder $builder, Model $model): Builder
{