#36 - validate vacation request #47

Merged
Baakoma merged 6 commits from #36-validate-vacation-request into main 2022-02-07 12:29:47 +01:00
Baakoma commented 2022-02-07 10:37:42 +01:00 (Migrated from github.com)

It should close #36

It should close #36
EwelinaLasowy (Migrated from github.com) approved these changes 2022-02-07 12:29:34 +01:00
krzysztofrewak (Migrated from github.com) requested changes 2022-02-07 12:35:45 +01:00
@@ -0,0 +16,4 @@
$period = CarbonPeriod::create($from, $to);
$holidays = $yearPeriod->holidays()->pluck("date");
$validDays = collect();
krzysztofrewak (Migrated from github.com) commented 2022-02-07 12:33:29 +01:00

We are importing Collection already, so less magic helpers = better.

        $validDays = new Collection();
We are importing Collection already, so less magic helpers = better. ```suggestion $validDays = new Collection(); ```
@@ -71,3 +77,4 @@
protected static function newFactory(): VacationRequestFactory
{
return VacationRequestFactory::new();
krzysztofrewak (Migrated from github.com) commented 2022-02-07 12:34:44 +01:00
    public function scopeOverlapsWith(Builder $query, static $vacationRequest): Builder
```suggestion public function scopeOverlapsWith(Builder $query, static $vacationRequest): Builder ```
krzysztofrewak (Migrated from github.com) commented 2022-02-07 12:32:40 +01:00

Do we really need axios here? Maybe fetch API would be enough?

Do we really need axios here? Maybe fetch API would be enough?
Sign in to join this conversation.