#71 - annual summary #113
@@ -5,7 +5,6 @@ declare(strict_types=1);
|
|||||||
|
|
|||||||
namespace Toby\Infrastructure\Http\Controllers;
|
namespace Toby\Infrastructure\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Carbon;
|
|
||||||
|
Could you add return types for arrow functions? Could you add return types for arrow functions?
|
|||||||
use Inertia\Response;
|
use Inertia\Response;
|
||||||
use Toby\Eloquent\Helpers\YearPeriodRetriever;
|
use Toby\Eloquent\Helpers\YearPeriodRetriever;
|
||||||
use Toby\Eloquent\Models\Holiday;
|
use Toby\Eloquent\Models\Holiday;
|
||||||
@@ -18,24 +17,20 @@ class AnnualSummaryController extends Controller
|
|||||||
|
Could you add return types for arrow functions? Could you add return types for arrow functions?
Could you add return types for arrow functions? Could you add return types for arrow functions?
|
|||||||
{
|
{
|
||||||
$yearPeriod = $yearPeriodRetriever->selected();
|
$yearPeriod = $yearPeriodRetriever->selected();
|
||||||
|
|
||||||
$startDate = Carbon::createFromDate($yearPeriod->year)->startOfYear()->startOfWeek();
|
|
||||||
|
Could you add return types for arrow functions? Could you add return types for arrow functions?
|
|||||||
$endDate = Carbon::createFromDate($yearPeriod->year)->endOfYear()->endOfWeek();
|
|
||||||
|
Could you add return types for arrow functions? Could you add return types for arrow functions?
|
|||||||
|
|
||||||
|
Could you add return types for arrow functions? Could you add return types for arrow functions?
|
|||||||
$holidays = $yearPeriod->holidays()
|
$holidays = $yearPeriod->holidays()
|
||||||
->whereBetween("date", [$startDate, $endDate])
|
|
||||||
|
Could you add return types for arrow functions? Could you add return types for arrow functions?
|
|||||||
->get();
|
->get();
|
||||||
|
|
||||||
$vacations = $request->user()
|
$vacations = $request->user()
|
||||||
->vacations()
|
->vacations()
|
||||||
->with("vacationRequest.vacations")
|
->with("vacationRequest.vacations")
|
||||||
->whereBetween("date", [$startDate, $endDate])
|
->whereBelongsTo($yearPeriod)
|
||||||
|
Could you add return types for arrow functions? Could you add return types for arrow functions?
Could you add return types for arrow functions? Could you add return types for arrow functions?
|
|||||||
->approved()
|
->approved()
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
$pendingVacations = $request->user()
|
$pendingVacations = $request->user()
|
||||||
->vacations()
|
->vacations()
|
||||||
->with("vacationRequest.vacations")
|
->with("vacationRequest.vacations")
|
||||||
->whereBetween("date", [$startDate, $endDate])
|
->whereBelongsTo($yearPeriod)
|
||||||
|
Could you add return types for arrow functions? Could you add return types for arrow functions?
Could you add return types for arrow functions? Could you add return types for arrow functions?
|
|||||||
->pending()
|
->pending()
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
|||||||
|
Could you add return types for arrow functions? Could you add return types for arrow functions?
Could you add return types for arrow functions? Could you add return types for arrow functions?
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
<Popper
|
<Popper
|
||||||
v-if="day.isVacation || day.isPendingVacation"
|
v-if="day.isVacation || day.isPendingVacation"
|
||||||
open-delay="200"
|
open-delay="200"
|
||||||
arrow
|
|
||||||
hover
|
hover
|
||||||
offset-distance="0"
|
offset-distance="0"
|
||||||
>
|
>
|
||||||
@@ -56,7 +55,6 @@
|
|||||||
<Popper
|
<Popper
|
||||||
v-else-if="day.isHoliday"
|
v-else-if="day.isHoliday"
|
||||||
open-delay="200"
|
open-delay="200"
|
||||||
arrow
|
|
||||||
hover
|
hover
|
||||||
offset-distance="0"
|
offset-distance="0"
|
||||||
>
|
>
|
||||||
@@ -68,7 +66,7 @@
|
|||||||
{{ day.date.day }}
|
{{ day.date.day }}
|
||||||
</time>
|
</time>
|
||||||
</button>
|
</button>
|
||||||
<template #popper>
|
<template #content>
|
||||||
<div class="py-2 px-6 text-sm font-semibold text-left text-gray-700 bg-white rounded-lg border border-gray-400">
|
<div class="py-2 px-6 text-sm font-semibold text-left text-gray-700 bg-white rounded-lg border border-gray-400">
|
||||||
{{ holidays[day.date.toISODate()] }}
|
{{ holidays[day.date.toISODate()] }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user
Could you add return types for arrow functions?
Could you add return types for arrow functions?