#39 - generate timesheet #56
@@ -4,9 +4,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Toby\Domain;
|
namespace Toby\Domain;
|
||||||
|
|
||||||
use Carbon\CarbonImmutable;
|
|
||||||
use Carbon\CarbonInterface;
|
|
||||||
use Carbon\CarbonPeriod;
|
use Carbon\CarbonPeriod;
|
||||||
|
use Illuminate\Support\Carbon;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Toby\Domain\Enums\VacationRequestState;
|
use Toby\Domain\Enums\VacationRequestState;
|
||||||
use Toby\Eloquent\Helpers\YearPeriodRetriever;
|
use Toby\Eloquent\Helpers\YearPeriodRetriever;
|
||||||
@@ -20,33 +19,16 @@ class CalendarGenerator
|
|||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function generate(YearPeriod $yearPeriod, string $month): array
|
public function generate(Carbon $month): array
|
||||||
{
|
{
|
||||||
$date = CarbonImmutable::create($yearPeriod->year, $this->monthNameToNumber($month));
|
$period = CarbonPeriod::create($month->copy()->startOfMonth(), $month->copy()->endOfMonth());
|
||||||
$period = CarbonPeriod::create($date->startOfMonth(), $date->endOfMonth());
|
$yearPeriod = YearPeriod::findByYear($month->year);
|
||||||
|
|
||||||
$holidays = $yearPeriod->holidays()->pluck("date");
|
$holidays = $yearPeriod->holidays()->pluck("date");
|
||||||
|
|
||||||
return $this->generateCalendar($period, $holidays);
|
return $this->generateCalendar($period, $holidays);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function monthNameToNumber($name): int
|
|
||||||
{
|
|
||||||
return match ($name) {
|
|
||||||
default => CarbonInterface::JANUARY,
|
|
||||||
"february" => CarbonInterface::FEBRUARY,
|
|
||||||
"march" => CarbonInterface::MARCH,
|
|
||||||
"april" => CarbonInterface::APRIL,
|
|
||||||
"may" => CarbonInterface::MAY,
|
|
||||||
"june" => CarbonInterface::JUNE,
|
|
||||||
"july" => CarbonInterface::JULY,
|
|
||||||
"august" => CarbonInterface::AUGUST,
|
|
||||||
"september" => CarbonInterface::SEPTEMBER,
|
|
||||||
"october" => CarbonInterface::OCTOBER,
|
|
||||||
"november" => CarbonInterface::NOVEMBER,
|
|
||||||
"december" => CarbonInterface::DECEMBER,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function generateCalendar(CarbonPeriod $period, Collection $holidays): array
|
protected function generateCalendar(CarbonPeriod $period, Collection $holidays): array
|
||||||
{
|
{
|
||||||
$calendar = [];
|
$calendar = [];
|
||||||
|
|||||||
53
app/Domain/Enums/Month.php
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
|
|||||||
|
<?php
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
declare(strict_types=1);
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
namespace Toby\Domain\Enums;
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
use Carbon\CarbonInterface;
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
use Illuminate\Support\Carbon;
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
use Illuminate\Support\Str;
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
enum Month: string
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
{
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
case January = "january";
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
case February = "february";
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
case March = "march";
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
case April = "april";
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
case May = "may";
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
case June = "june";
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
case July = "july";
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
case August = "august";
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
case September = "september";
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
case October = "october";
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
case November = "november";
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
case December = "december";
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
public function toCarbonNumber(): int
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
{
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
return match ($this) {
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
self::January => CarbonInterface::JANUARY,
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
self::February => CarbonInterface::FEBRUARY,
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
self::March => CarbonInterface::MARCH,
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
self::April => CarbonInterface::APRIL,
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
self::May => CarbonInterface::MAY,
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
self::June => CarbonInterface::JUNE,
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
self::July => CarbonInterface::JULY,
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
self::August => CarbonInterface::AUGUST,
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
self::September => CarbonInterface::SEPTEMBER,
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
self::October => CarbonInterface::OCTOBER,
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
self::November => CarbonInterface::NOVEMBER,
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
self::December => CarbonInterface::DECEMBER,
|
||||||
```suggestion
static::January => CarbonInterface::JANUARY,
static::February => CarbonInterface::FEBRUARY,
static::March => CarbonInterface::MARCH,
static::April => CarbonInterface::APRIL,
static::May => CarbonInterface::MAY,
static::June => CarbonInterface::JUNE,
static::July => CarbonInterface::JULY,
static::August => CarbonInterface::AUGUST,
static::September => CarbonInterface::SEPTEMBER,
static::October => CarbonInterface::OCTOBER,
static::November => CarbonInterface::NOVEMBER,
static::December => CarbonInterface::DECEMBER,
```
Plus maybe some exception could be thrown on unknow value/default? Plus maybe some exception could be thrown on unknow value/default?
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
};
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
}
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
public static function current(): Month
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
{
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
return Month::from(Str::lower(Carbon::now()->englishMonth));
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
}
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
public static function fromNameOrCurrent(string $name): Month
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
{
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
return Month::tryFrom($name) ?? Month::current();
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
}
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
}
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
37
app/Domain/TimesheetExport.php
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
Why not to use Why not to use `map()`?
Why not to use Why not to use `map()`?
|
|||||||
|
<?php
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
declare(strict_types=1);
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
namespace Toby\Domain;
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
use Illuminate\Database\Eloquent\Collection;
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
use Illuminate\Support\Carbon;
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
use Toby\Eloquent\Models\User;
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
class TimesheetExport implements WithMultipleSheets
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
{
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
protected Collection $users;
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
protected Carbon $month;
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
public function sheets(): array
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
{
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
return $this->users
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
->map(fn(User $user) => new TimesheetPerUserSheet($user, $this->month))
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
->toArray();
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
}
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
public function forUsers(Collection $users): static
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
{
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
$this->users = $users;
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
return $this;
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
}
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
public function forMonth(Carbon $month): static
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
{
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
$this->month = $month;
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
return $this;
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
}
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
|
}
|
||||||
|
Why not to use Why not to use `map()`?
|
|||||||
222
app/Domain/TimesheetPerUserSheet.php
Normal file
@@ -0,0 +1,222 @@
|
|||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
<?php
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
declare(strict_types=1);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
namespace Toby\Domain;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Carbon\CarbonInterface;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Carbon\CarbonPeriod;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Generator;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Illuminate\Support\Carbon;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Illuminate\Support\Collection;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Maatwebsite\Excel\Concerns\FromGenerator;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Maatwebsite\Excel\Concerns\RegistersEventListeners;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Maatwebsite\Excel\Concerns\WithEvents;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Maatwebsite\Excel\Concerns\WithStrictNullComparison;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Maatwebsite\Excel\Concerns\WithStyles;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Maatwebsite\Excel\Concerns\WithTitle;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Maatwebsite\Excel\Events\AfterSheet;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use PhpOffice\PhpSpreadsheet\Shared\Date;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use PhpOffice\PhpSpreadsheet\Style\Alignment;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use PhpOffice\PhpSpreadsheet\Style\Border;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use PhpOffice\PhpSpreadsheet\Style\Fill;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Toby\Domain\Enums\VacationRequestState;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Toby\Domain\Enums\VacationType;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Toby\Eloquent\Models\Holiday;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Toby\Eloquent\Models\User;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use Toby\Eloquent\Models\Vacation;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
class TimesheetPerUserSheet implements WithTitle, WithHeadings, WithEvents, WithStyles, WithStrictNullComparison, ShouldAutoSize, FromGenerator
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
{
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
use RegistersEventListeners;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
protected const HOURS_PER_DAY = 8;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
protected const START_HOUR = 8;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
protected const END_HOUR = 16;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
public function __construct(
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
protected User $user,
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
protected Carbon $month,
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
) {
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
public function title(): string
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
{
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
return $this->user->fullName;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
public function headings(): array
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
{
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$types = VacationType::cases();
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$headings = [
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
__("Date"),
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
__("Day of week"),
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
__("Start date"),
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
__("End date"),
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
__("Worked hours"),
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
];
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
foreach ($types as $type) {
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$headings[] = $type->label();
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
return $headings;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
public function generator(): Generator
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
{
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$period = CarbonPeriod::create($this->month->copy()->startOfMonth(), $this->month->copy()->endOfMonth());
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$vacations = $this->getVacationsForPeriod($this->user, $period);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$holidays = $this->getHolidaysForPeriod($period);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
foreach ($period as $day) {
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$vacationsForDay = $vacations->get($day->toDateString(), new Collection());
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$workedThisDay = $this->checkIfWorkedThisDay($day, $holidays, $vacationsForDay);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$row = [
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
Date::dateTimeToExcel($day),
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$day->translatedFormat("l"),
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$workedThisDay ? $this->toExcelTime(Carbon::createFromTime(static::START_HOUR)) : null,
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$workedThisDay ? $this->toExcelTime(Carbon::createFromTime(static::END_HOUR)) : null,
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$workedThisDay ? static::HOURS_PER_DAY : null,
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
];
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
foreach (VacationType::cases() as $type) {
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$row[] = $vacationsForDay->has($type->value) ? static::HOURS_PER_DAY : null;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
yield $row;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
public function styles(Worksheet $sheet): void
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
{
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$lastRow = $sheet->getHighestRow();
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$lastColumn = $sheet->getHighestColumn();
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet->getStyle("A1:{$lastColumn}1")
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getFont()->setBold(true);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet->getStyle("A1:{$lastColumn}1")
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getAlignment()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setVertical(Alignment::VERTICAL_CENTER);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet->getStyle("A1:{$lastColumn}1")
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getFill()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setFillType(Fill::FILL_SOLID)
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getStartColor()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setRGB("D9D9D9");
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet->getStyle("C1:{$lastColumn}{$lastRow}")
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getAlignment()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setHorizontal(Alignment::HORIZONTAL_CENTER);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet->getStyle("A2:A{$lastRow}")
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getNumberFormat()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setFormatCode(NumberFormat::FORMAT_DATE_DDMMYYYY);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet->getStyle("C1:D{$lastRow}")
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getNumberFormat()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setFormatCode(NumberFormat::FORMAT_DATE_TIME3);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet->getStyle("A2:A{$lastRow}")
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getFont()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setBold(true);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
for ($i = 2; $i < $lastRow; $i++) {
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$date = Date::excelToDateTimeObject($sheet->getCell("A{$i}")->getValue());
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
if (Carbon::createFromInterface($date)->isWeekend()) {
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet->getStyle("A{$i}:{$lastColumn}{$i}")
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getFill()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setFillType(Fill::FILL_SOLID)
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getStartColor()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setRGB("FEE2E2");
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet->getStyle("A1:{$lastColumn}{$lastRow}")
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getBorders()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getAllBorders()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setBorderStyle(Border::BORDER_THIN)
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getColor()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setRGB("B7B7B7");
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
public static function afterSheet(AfterSheet $event): void
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
{
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet = $event->getSheet();
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$lastRow = $sheet->getDelegate()->getHighestRow();
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet->append([
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
__("Sum:"),
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
null,
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
null,
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
null,
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
"=SUM(E2:E{$lastRow})",
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
]);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$lastRow++;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet->getDelegate()->getStyle("A{$lastRow}")
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getAlignment()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setHorizontal(Alignment::HORIZONTAL_RIGHT);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet->getDelegate()->getStyle("A{$lastRow}")
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getFont()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setBold(true);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet->getDelegate()->getStyle("E{$lastRow}")
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getAlignment()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setHorizontal(Alignment::HORIZONTAL_CENTER);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet->getDelegate()->mergeCells("A{$lastRow}:D{$lastRow}");
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$sheet->getDelegate()->getStyle("A{$lastRow}:E{$lastRow}")
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getBorders()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getAllBorders()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setBorderStyle(Border::BORDER_THIN)
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->getColor()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->setRGB("B7B7B7");
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
protected function getVacationsForPeriod(User $user, CarbonPeriod $period): Collection
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
{
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
return $user->vacations()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->with("vacationRequest")
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->whereBetween("date", [$period->start, $period->end])
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->whereRelation("vacationRequest", "state", VacationRequestState::Approved->value)
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->get()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->groupBy(
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
[
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
fn(Vacation $vacation) => $vacation->date->toDateString(),
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
fn(Vacation $vacation) => $vacation->vacationRequest->type->value,
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
],
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
protected function getHolidaysForPeriod(CarbonPeriod $period): Collection
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
{
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
return Holiday::query()
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->whereBetween("date", [$period->start, $period->end])
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
->pluck("date");
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
protected function toExcelTime(Carbon $time): float
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
{
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$excelTimestamp = Date::dateTimeToExcel($time);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
$excelDate = floor($excelTimestamp);
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
return $excelTimestamp - $excelDate;
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
protected function checkIfWorkedThisDay(CarbonInterface $day, Collection $holidays, Collection $vacations): bool
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
{
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
return $day->isWeekday() && $holidays->doesntContain($day) && $vacations->isEmpty();
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
|
}
|
||||||
|
Maybe move these hours to consts as start hour and end hour? Maybe move these hours to consts as start hour and end hour?
|
|||||||
35
app/Infrastructure/Http/Controllers/TimesheetController.php
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Toby\Infrastructure\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Carbon;
|
||||||
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
|
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||||
|
use Toby\Domain\Enums\Month;
|
||||||
|
use Toby\Domain\TimesheetExport;
|
||||||
|
use Toby\Eloquent\Helpers\YearPeriodRetriever;
|
||||||
|
use Toby\Eloquent\Models\User;
|
||||||
|
|
||||||
|
class TimesheetController extends Controller
|
||||||
|
{
|
||||||
|
public function __invoke(Month $month, YearPeriodRetriever $yearPeriodRetriever): BinaryFileResponse
|
||||||
|
{
|
||||||
|
$yearPeriod = $yearPeriodRetriever->selected();
|
||||||
|
$carbonMonth = Carbon::create($yearPeriod->year, $month->toCarbonNumber());
|
||||||
|
|
||||||
|
$users = User::query()
|
||||||
|
->orderBy("last_name")
|
||||||
|
->orderBy("first_name")
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$filename = "{$carbonMonth->translatedFormat("F Y")}.xlsx";
|
||||||
|
|
||||||
|
$timesheet = (new TimesheetExport())
|
||||||
|
->forMonth($carbonMonth)
|
||||||
|
->forUsers($users);
|
||||||
|
|
||||||
|
return Excel::download($timesheet, $filename);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,11 +4,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Toby\Infrastructure\Http\Controllers;
|
namespace Toby\Infrastructure\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
use Illuminate\Support\Str;
|
|
||||||
use Inertia\Response;
|
use Inertia\Response;
|
||||||
use Toby\Domain\CalendarGenerator;
|
use Toby\Domain\CalendarGenerator;
|
||||||
|
use Toby\Domain\Enums\Month;
|
||||||
use Toby\Eloquent\Helpers\YearPeriodRetriever;
|
use Toby\Eloquent\Helpers\YearPeriodRetriever;
|
||||||
use Toby\Eloquent\Models\User;
|
use Toby\Eloquent\Models\User;
|
||||||
use Toby\Infrastructure\Http\Resources\UserResource;
|
use Toby\Infrastructure\Http\Resources\UserResource;
|
||||||
@@ -16,22 +15,25 @@ use Toby\Infrastructure\Http\Resources\UserResource;
|
|||||||
class VacationCalendarController extends Controller
|
class VacationCalendarController extends Controller
|
||||||
{
|
{
|
||||||
public function index(
|
public function index(
|
||||||
Request $request,
|
|
||||||
YearPeriodRetriever $yearPeriodRetriever,
|
YearPeriodRetriever $yearPeriodRetriever,
|
||||||
CalendarGenerator $calendarGenerator,
|
CalendarGenerator $calendarGenerator,
|
||||||
|
?string $month = null,
|
||||||
): Response {
|
): Response {
|
||||||
$month = Str::lower($request->query("month", Carbon::now()->englishMonth));
|
$month = Month::fromNameOrCurrent((string)$month);
|
||||||
|
|
||||||
$yearPeriod = $yearPeriodRetriever->selected();
|
$yearPeriod = $yearPeriodRetriever->selected();
|
||||||
|
$carbonMonth = Carbon::create($yearPeriod->year, $month->toCarbonNumber());
|
||||||
|
|
||||||
$users = User::query()
|
$users = User::query()
|
||||||
->orderBy("last_name")
|
->orderBy("last_name")
|
||||||
->orderBy("first_name")
|
->orderBy("first_name")
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
$calendar = $calendarGenerator->generate($yearPeriod, $month);
|
$calendar = $calendarGenerator->generate($carbonMonth);
|
||||||
|
|
||||||
return inertia("Calendar", [
|
return inertia("Calendar", [
|
||||||
"calendar" => $calendar,
|
"calendar" => $calendar,
|
||||||
"currentMonth" => $month,
|
"currentMonth" => $month->value,
|
||||||
"users" => UserResource::collection($users),
|
"users" => UserResource::collection($users),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
"laravel/telescope": "^4.6",
|
"laravel/telescope": "^4.6",
|
||||||
"laravel/tinker": "^2.5",
|
"laravel/tinker": "^2.5",
|
||||||
"lasserafn/php-initial-avatar-generator": "^4.2",
|
"lasserafn/php-initial-avatar-generator": "^4.2",
|
||||||
|
"maatwebsite/excel": "^3.1",
|
||||||
"spatie/laravel-google-calendar": "^3.5"
|
"spatie/laravel-google-calendar": "^3.5"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|||||||
696
composer.lock
generated
@@ -4,64 +4,8 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "c0f36b87659921d0b7db0464b5d79ed5",
|
"content-hash": "09609461b05d589abb8bc0cbac9c653c",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
|
||||||
"name": "asm89/stack-cors",
|
|
||||||
"version": "v2.1.1",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/asm89/stack-cors.git",
|
|
||||||
"reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/asm89/stack-cors/zipball/73e5b88775c64ccc0b84fb60836b30dc9d92ac4a",
|
|
||||||
"reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": "^7.2|^8.0",
|
|
||||||
"symfony/http-foundation": "^4|^5|^6",
|
|
||||||
"symfony/http-kernel": "^4|^5|^6"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "^7|^9",
|
|
||||||
"squizlabs/php_codesniffer": "^3.5"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "2.1-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Asm89\\Stack\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Alexander",
|
|
||||||
"email": "iam.asm89@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Cross-origin resource sharing library and stack middleware",
|
|
||||||
"homepage": "https://github.com/asm89/stack-cors",
|
|
||||||
"keywords": [
|
|
||||||
"cors",
|
|
||||||
"stack"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/asm89/stack-cors/issues",
|
|
||||||
"source": "https://github.com/asm89/stack-cors/tree/v2.1.1"
|
|
||||||
},
|
|
||||||
"time": "2022-01-18T09:12:03+00:00"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "azuyalabs/yasumi",
|
"name": "azuyalabs/yasumi",
|
||||||
"version": "2.5.0",
|
"version": "2.5.0",
|
||||||
@@ -709,6 +653,57 @@
|
|||||||
],
|
],
|
||||||
"time": "2021-10-11T09:18:27+00:00"
|
"time": "2021-10-11T09:18:27+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "ezyang/htmlpurifier",
|
||||||
|
"version": "v4.14.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/ezyang/htmlpurifier.git",
|
||||||
|
"reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/12ab42bd6e742c70c0a52f7b82477fcd44e64b75",
|
||||||
|
"reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.2"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"HTMLPurifier": "library/"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"library/HTMLPurifier.composer.php"
|
||||||
|
],
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/library/HTMLPurifier/Language/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"LGPL-2.1-or-later"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Edward Z. Yang",
|
||||||
|
"email": "admin@htmlpurifier.org",
|
||||||
|
"homepage": "http://ezyang.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Standards compliant HTML filter written in PHP",
|
||||||
|
"homepage": "http://htmlpurifier.org/",
|
||||||
|
"keywords": [
|
||||||
|
"html"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/ezyang/htmlpurifier/issues",
|
||||||
|
"source": "https://github.com/ezyang/htmlpurifier/tree/v4.14.0"
|
||||||
|
},
|
||||||
|
"time": "2021-12-25T01:21:49+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "firebase/php-jwt",
|
"name": "firebase/php-jwt",
|
||||||
"version": "v5.5.1",
|
"version": "v5.5.1",
|
||||||
@@ -768,25 +763,23 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "fruitcake/laravel-cors",
|
"name": "fruitcake/laravel-cors",
|
||||||
"version": "v2.0.5",
|
"version": "v2.1.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/fruitcake/laravel-cors.git",
|
"url": "https://github.com/fruitcake/laravel-cors.git",
|
||||||
"reference": "3a066e5cac32e2d1cdaacd6b961692778f37b5fc"
|
"reference": "361d71f00a0eea8b74da26ae75d0d207c53aa5b3"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/3a066e5cac32e2d1cdaacd6b961692778f37b5fc",
|
"url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/361d71f00a0eea8b74da26ae75d0d207c53aa5b3",
|
||||||
"reference": "3a066e5cac32e2d1cdaacd6b961692778f37b5fc",
|
"reference": "361d71f00a0eea8b74da26ae75d0d207c53aa5b3",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"asm89/stack-cors": "^2.0.1",
|
"fruitcake/php-cors": "^1",
|
||||||
"illuminate/contracts": "^6|^7|^8|^9",
|
"illuminate/contracts": "^6|^7|^8|^9",
|
||||||
"illuminate/support": "^6|^7|^8|^9",
|
"illuminate/support": "^6|^7|^8|^9",
|
||||||
"php": ">=7.2",
|
"php": ">=7.2"
|
||||||
"symfony/http-foundation": "^4|^5|^6",
|
|
||||||
"symfony/http-kernel": "^4.3.4|^5|^6"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"laravel/framework": "^6|^7.24|^8",
|
"laravel/framework": "^6|^7.24|^8",
|
||||||
@@ -797,7 +790,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.0-dev"
|
"dev-master": "2.1-dev"
|
||||||
},
|
},
|
||||||
"laravel": {
|
"laravel": {
|
||||||
"providers": [
|
"providers": [
|
||||||
@@ -833,7 +826,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/fruitcake/laravel-cors/issues",
|
"issues": "https://github.com/fruitcake/laravel-cors/issues",
|
||||||
"source": "https://github.com/fruitcake/laravel-cors/tree/v2.0.5"
|
"source": "https://github.com/fruitcake/laravel-cors/tree/v2.1.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -845,7 +838,78 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-01-03T14:53:04+00:00"
|
"time": "2022-02-19T14:17:28+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fruitcake/php-cors",
|
||||||
|
"version": "v1.2.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/fruitcake/php-cors.git",
|
||||||
|
"reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/fruitcake/php-cors/zipball/58571acbaa5f9f462c9c77e911700ac66f446d4e",
|
||||||
|
"reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.4|^8.0",
|
||||||
|
"symfony/http-foundation": "^4.4|^5.4|^6"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpstan/phpstan": "^1.4",
|
||||||
|
"phpunit/phpunit": "^9",
|
||||||
|
"squizlabs/php_codesniffer": "^3.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "1.1-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Fruitcake\\Cors\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fruitcake",
|
||||||
|
"homepage": "https://fruitcake.nl"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Barryvdh",
|
||||||
|
"email": "barryvdh@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Cross-origin resource sharing library for the Symfony HttpFoundation",
|
||||||
|
"homepage": "https://github.com/fruitcake/php-cors",
|
||||||
|
"keywords": [
|
||||||
|
"cors",
|
||||||
|
"laravel",
|
||||||
|
"symfony"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/fruitcake/php-cors/issues",
|
||||||
|
"source": "https://github.com/fruitcake/php-cors/tree/v1.2.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://fruitcake.nl",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/barryvdh",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2022-02-20T15:07:15+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "google/apiclient",
|
"name": "google/apiclient",
|
||||||
@@ -920,7 +984,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "google/apiclient-services",
|
"name": "google/apiclient-services",
|
||||||
"version": "v0.235.0",
|
"version": "v0.236.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/googleapis/google-api-php-client-services.git",
|
"url": "https://github.com/googleapis/google-api-php-client-services.git",
|
||||||
@@ -958,7 +1022,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/googleapis/google-api-php-client-services/issues",
|
"issues": "https://github.com/googleapis/google-api-php-client-services/issues",
|
||||||
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.235.0"
|
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.236.0"
|
||||||
},
|
},
|
||||||
"time": "2022-02-07T14:04:26+00:00"
|
"time": "2022-02-07T14:04:26+00:00"
|
||||||
},
|
},
|
||||||
@@ -1437,12 +1501,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
|
||||||
"Inertia\\": "src"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"./helpers.php"
|
"./helpers.php"
|
||||||
]
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Inertia\\": "src"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
@@ -2632,6 +2696,262 @@
|
|||||||
},
|
},
|
||||||
"time": "2021-08-15T23:05:49+00:00"
|
"time": "2021-08-15T23:05:49+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "maatwebsite/excel",
|
||||||
|
"version": "3.1.36",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/SpartnerNL/Laravel-Excel.git",
|
||||||
|
"reference": "eb31f30d72c51c3fb11644b636945accbe50404f"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/eb31f30d72c51c3fb11644b636945accbe50404f",
|
||||||
|
"reference": "eb31f30d72c51c3fb11644b636945accbe50404f",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-json": "*",
|
||||||
|
"illuminate/support": "5.8.*|^6.0|^7.0|^8.0|^9.0",
|
||||||
|
"php": "^7.0|^8.0",
|
||||||
|
"phpoffice/phpspreadsheet": "^1.18"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"orchestra/testbench": "^6.0|^7.0",
|
||||||
|
"predis/predis": "^1.1"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Maatwebsite\\Excel\\ExcelServiceProvider"
|
||||||
|
],
|
||||||
|
"aliases": {
|
||||||
|
"Excel": "Maatwebsite\\Excel\\Facades\\Excel"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Maatwebsite\\Excel\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Patrick Brouwers",
|
||||||
|
"email": "patrick@spartner.nl"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Supercharged Excel exports and imports in Laravel",
|
||||||
|
"keywords": [
|
||||||
|
"PHPExcel",
|
||||||
|
"batch",
|
||||||
|
"csv",
|
||||||
|
"excel",
|
||||||
|
"export",
|
||||||
|
"import",
|
||||||
|
"laravel",
|
||||||
|
"php",
|
||||||
|
"phpspreadsheet"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/SpartnerNL/Laravel-Excel/issues",
|
||||||
|
"source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.36"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://laravel-excel.com/commercial-support",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/patrickbrouwers",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2022-01-27T18:34:20+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "maennchen/zipstream-php",
|
||||||
|
"version": "2.1.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/maennchen/ZipStream-PHP.git",
|
||||||
|
"reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58",
|
||||||
|
"reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"myclabs/php-enum": "^1.5",
|
||||||
|
"php": ">= 7.1",
|
||||||
|
"psr/http-message": "^1.0",
|
||||||
|
"symfony/polyfill-mbstring": "^1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"ext-zip": "*",
|
||||||
|
"guzzlehttp/guzzle": ">= 6.3",
|
||||||
|
"mikey179/vfsstream": "^1.6",
|
||||||
|
"phpunit/phpunit": ">= 7.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"ZipStream\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Paul Duncan",
|
||||||
|
"email": "pabs@pablotron.org"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jonatan Männchen",
|
||||||
|
"email": "jonatan@maennchen.ch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jesse Donat",
|
||||||
|
"email": "donatj@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "András Kolesár",
|
||||||
|
"email": "kolesar@kolesar.hu"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
|
||||||
|
"keywords": [
|
||||||
|
"stream",
|
||||||
|
"zip"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/maennchen/ZipStream-PHP/issues",
|
||||||
|
"source": "https://github.com/maennchen/ZipStream-PHP/tree/master"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://opencollective.com/zipstream",
|
||||||
|
"type": "open_collective"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2020-05-30T13:11:16+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "markbaker/complex",
|
||||||
|
"version": "3.0.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/MarkBaker/PHPComplex.git",
|
||||||
|
"reference": "ab8bc271e404909db09ff2d5ffa1e538085c0f22"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/ab8bc271e404909db09ff2d5ffa1e538085c0f22",
|
||||||
|
"reference": "ab8bc271e404909db09ff2d5ffa1e538085c0f22",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.2 || ^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
|
||||||
|
"phpcompatibility/php-compatibility": "^9.0",
|
||||||
|
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.3",
|
||||||
|
"squizlabs/php_codesniffer": "^3.4"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Complex\\": "classes/src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Mark Baker",
|
||||||
|
"email": "mark@lange.demon.co.uk"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHP Class for working with complex numbers",
|
||||||
|
"homepage": "https://github.com/MarkBaker/PHPComplex",
|
||||||
|
"keywords": [
|
||||||
|
"complex",
|
||||||
|
"mathematics"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/MarkBaker/PHPComplex/issues",
|
||||||
|
"source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.1"
|
||||||
|
},
|
||||||
|
"time": "2021-06-29T15:32:53+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "markbaker/matrix",
|
||||||
|
"version": "3.0.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/MarkBaker/PHPMatrix.git",
|
||||||
|
"reference": "c66aefcafb4f6c269510e9ac46b82619a904c576"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/c66aefcafb4f6c269510e9ac46b82619a904c576",
|
||||||
|
"reference": "c66aefcafb4f6c269510e9ac46b82619a904c576",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.1 || ^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
|
||||||
|
"phpcompatibility/php-compatibility": "^9.0",
|
||||||
|
"phpdocumentor/phpdocumentor": "2.*",
|
||||||
|
"phploc/phploc": "^4.0",
|
||||||
|
"phpmd/phpmd": "2.*",
|
||||||
|
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.3",
|
||||||
|
"sebastian/phpcpd": "^4.0",
|
||||||
|
"squizlabs/php_codesniffer": "^3.4"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Matrix\\": "classes/src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Mark Baker",
|
||||||
|
"email": "mark@demon-angel.eu"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHP Class for working with matrices",
|
||||||
|
"homepage": "https://github.com/MarkBaker/PHPMatrix",
|
||||||
|
"keywords": [
|
||||||
|
"mathematics",
|
||||||
|
"matrix",
|
||||||
|
"vector"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/MarkBaker/PHPMatrix/issues",
|
||||||
|
"source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.0"
|
||||||
|
},
|
||||||
|
"time": "2021-07-01T19:01:15+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "meyfa/php-svg",
|
"name": "meyfa/php-svg",
|
||||||
"version": "v0.9.1",
|
"version": "v0.9.1",
|
||||||
@@ -2781,6 +3101,66 @@
|
|||||||
],
|
],
|
||||||
"time": "2021-10-01T21:08:31+00:00"
|
"time": "2021-10-01T21:08:31+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "myclabs/php-enum",
|
||||||
|
"version": "1.8.3",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/myclabs/php-enum.git",
|
||||||
|
"reference": "b942d263c641ddb5190929ff840c68f78713e937"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/b942d263c641ddb5190929ff840c68f78713e937",
|
||||||
|
"reference": "b942d263c641ddb5190929ff840c68f78713e937",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-json": "*",
|
||||||
|
"php": "^7.3 || ^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^9.5",
|
||||||
|
"squizlabs/php_codesniffer": "1.*",
|
||||||
|
"vimeo/psalm": "^4.6.2"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"MyCLabs\\Enum\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP Enum contributors",
|
||||||
|
"homepage": "https://github.com/myclabs/php-enum/graphs/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHP Enum implementation",
|
||||||
|
"homepage": "http://github.com/myclabs/php-enum",
|
||||||
|
"keywords": [
|
||||||
|
"enum"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/myclabs/php-enum/issues",
|
||||||
|
"source": "https://github.com/myclabs/php-enum/tree/1.8.3"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/mnapoli",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-07-05T08:18:36+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "nesbot/carbon",
|
"name": "nesbot/carbon",
|
||||||
"version": "2.57.0",
|
"version": "2.57.0",
|
||||||
@@ -3360,6 +3740,110 @@
|
|||||||
},
|
},
|
||||||
"time": "2021-12-17T14:08:35+00:00"
|
"time": "2021-12-17T14:08:35+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "phpoffice/phpspreadsheet",
|
||||||
|
"version": "1.22.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
|
||||||
|
"reference": "3a9e29b4f386a08a151a33578e80ef1747037a48"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/3a9e29b4f386a08a151a33578e80ef1747037a48",
|
||||||
|
"reference": "3a9e29b4f386a08a151a33578e80ef1747037a48",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-ctype": "*",
|
||||||
|
"ext-dom": "*",
|
||||||
|
"ext-fileinfo": "*",
|
||||||
|
"ext-gd": "*",
|
||||||
|
"ext-iconv": "*",
|
||||||
|
"ext-libxml": "*",
|
||||||
|
"ext-mbstring": "*",
|
||||||
|
"ext-simplexml": "*",
|
||||||
|
"ext-xml": "*",
|
||||||
|
"ext-xmlreader": "*",
|
||||||
|
"ext-xmlwriter": "*",
|
||||||
|
"ext-zip": "*",
|
||||||
|
"ext-zlib": "*",
|
||||||
|
"ezyang/htmlpurifier": "^4.13",
|
||||||
|
"maennchen/zipstream-php": "^2.1",
|
||||||
|
"markbaker/complex": "^3.0",
|
||||||
|
"markbaker/matrix": "^3.0",
|
||||||
|
"php": "^7.3 || ^8.0",
|
||||||
|
"psr/http-client": "^1.0",
|
||||||
|
"psr/http-factory": "^1.0",
|
||||||
|
"psr/simple-cache": "^1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
|
||||||
|
"dompdf/dompdf": "^1.0",
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.2",
|
||||||
|
"jpgraph/jpgraph": "^4.0",
|
||||||
|
"mpdf/mpdf": "8.0.17",
|
||||||
|
"phpcompatibility/php-compatibility": "^9.3",
|
||||||
|
"phpstan/phpstan": "^1.1",
|
||||||
|
"phpstan/phpstan-phpunit": "^1.0",
|
||||||
|
"phpunit/phpunit": "^8.5 || ^9.0",
|
||||||
|
"squizlabs/php_codesniffer": "^3.6",
|
||||||
|
"tecnickcom/tcpdf": "^6.4"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"dompdf/dompdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)",
|
||||||
|
"jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers",
|
||||||
|
"mpdf/mpdf": "Option for rendering PDF with PDF Writer",
|
||||||
|
"tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Maarten Balliauw",
|
||||||
|
"homepage": "https://blog.maartenballiauw.be"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Mark Baker",
|
||||||
|
"homepage": "https://markbakeruk.net"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Franck Lefevre",
|
||||||
|
"homepage": "https://rootslabs.net"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Erik Tilt"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Adrien Crivelli"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
|
||||||
|
"homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
|
||||||
|
"keywords": [
|
||||||
|
"OpenXML",
|
||||||
|
"excel",
|
||||||
|
"gnumeric",
|
||||||
|
"ods",
|
||||||
|
"php",
|
||||||
|
"spreadsheet",
|
||||||
|
"xls",
|
||||||
|
"xlsx"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
|
||||||
|
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.22.0"
|
||||||
|
},
|
||||||
|
"time": "2022-02-18T12:57:07+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "phpoption/phpoption",
|
"name": "phpoption/phpoption",
|
||||||
"version": "1.8.1",
|
"version": "1.8.1",
|
||||||
@@ -3906,25 +4390,25 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/simple-cache",
|
"name": "psr/simple-cache",
|
||||||
"version": "3.0.0",
|
"version": "1.0.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/php-fig/simple-cache.git",
|
"url": "https://github.com/php-fig/simple-cache.git",
|
||||||
"reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865"
|
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865",
|
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
||||||
"reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865",
|
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.0.0"
|
"php": ">=5.3.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "3.0.x-dev"
|
"dev-master": "1.0.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -3939,7 +4423,7 @@
|
|||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "PHP-FIG",
|
"name": "PHP-FIG",
|
||||||
"homepage": "https://www.php-fig.org/"
|
"homepage": "http://www.php-fig.org/"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Common interfaces for simple caching",
|
"description": "Common interfaces for simple caching",
|
||||||
@@ -3951,9 +4435,9 @@
|
|||||||
"simple-cache"
|
"simple-cache"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/php-fig/simple-cache/tree/3.0.0"
|
"source": "https://github.com/php-fig/simple-cache/tree/master"
|
||||||
},
|
},
|
||||||
"time": "2021-10-29T13:26:27+00:00"
|
"time": "2017-10-23T01:57:42+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psy/psysh",
|
"name": "psy/psysh",
|
||||||
@@ -7445,16 +7929,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phar-io/version",
|
"name": "phar-io/version",
|
||||||
"version": "3.1.1",
|
"version": "3.2.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phar-io/version.git",
|
"url": "https://github.com/phar-io/version.git",
|
||||||
"reference": "15a90844ad40f127afd244c0cad228de2a80052a"
|
"reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phar-io/version/zipball/15a90844ad40f127afd244c0cad228de2a80052a",
|
"url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
|
||||||
"reference": "15a90844ad40f127afd244c0cad228de2a80052a",
|
"reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -7490,9 +7974,9 @@
|
|||||||
"description": "Library for handling version information and constraints",
|
"description": "Library for handling version information and constraints",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/phar-io/version/issues",
|
"issues": "https://github.com/phar-io/version/issues",
|
||||||
"source": "https://github.com/phar-io/version/tree/3.1.1"
|
"source": "https://github.com/phar-io/version/tree/3.2.1"
|
||||||
},
|
},
|
||||||
"time": "2022-02-07T21:56:48+00:00"
|
"time": "2022-02-21T01:04:05+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "php-webdriver/webdriver",
|
"name": "php-webdriver/webdriver",
|
||||||
@@ -7788,16 +8272,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-code-coverage",
|
"name": "phpunit/php-code-coverage",
|
||||||
"version": "9.2.10",
|
"version": "9.2.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||||
"reference": "d5850aaf931743067f4bfc1ae4cbd06468400687"
|
"reference": "665a1ac0a763c51afc30d6d130dac0813092b17f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d5850aaf931743067f4bfc1ae4cbd06468400687",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/665a1ac0a763c51afc30d6d130dac0813092b17f",
|
||||||
"reference": "d5850aaf931743067f4bfc1ae4cbd06468400687",
|
"reference": "665a1ac0a763c51afc30d6d130dac0813092b17f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -7853,7 +8337,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
|
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
|
||||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.10"
|
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.11"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -7861,7 +8345,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-12-05T09:12:13+00:00"
|
"time": "2022-02-18T12:46:09+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-file-iterator",
|
"name": "phpunit/php-file-iterator",
|
||||||
@@ -8106,16 +8590,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit",
|
"name": "phpunit/phpunit",
|
||||||
"version": "9.5.13",
|
"version": "9.5.14",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||||
"reference": "597cb647654ede35e43b137926dfdfef0fb11743"
|
"reference": "1883687169c017d6ae37c58883ca3994cfc34189"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/597cb647654ede35e43b137926dfdfef0fb11743",
|
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1883687169c017d6ae37c58883ca3994cfc34189",
|
||||||
"reference": "597cb647654ede35e43b137926dfdfef0fb11743",
|
"reference": "1883687169c017d6ae37c58883ca3994cfc34189",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -8193,7 +8677,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.13"
|
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.14"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -8205,7 +8689,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-01-24T07:33:35+00:00"
|
"time": "2022-02-18T12:54:07+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/cli-parser",
|
"name": "sebastian/cli-parser",
|
||||||
@@ -9299,16 +9783,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/ignition",
|
"name": "spatie/ignition",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/spatie/ignition.git",
|
"url": "https://github.com/spatie/ignition.git",
|
||||||
"reference": "617c41d1bf675d95a7bd9adc826ba93d43affe7f"
|
"reference": "6b7bb804f4834b080f5ac941f6ac6800a485011e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/spatie/ignition/zipball/617c41d1bf675d95a7bd9adc826ba93d43affe7f",
|
"url": "https://api.github.com/repos/spatie/ignition/zipball/6b7bb804f4834b080f5ac941f6ac6800a485011e",
|
||||||
"reference": "617c41d1bf675d95a7bd9adc826ba93d43affe7f",
|
"reference": "6b7bb804f4834b080f5ac941f6ac6800a485011e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -9366,7 +9850,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-02-16T09:02:42+00:00"
|
"time": "2022-02-17T21:40:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/laravel-ignition",
|
"name": "spatie/laravel-ignition",
|
||||||
|
|||||||
104
config/excel.php
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
I would import that too. I would import that too.
I would import that too. I would import that too.
|
|||||||
|
<?php
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
declare(strict_types=1);
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
use Maatwebsite\Excel\DefaultValueBinder;
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
use Maatwebsite\Excel\Excel;
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
return [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"exports" => [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"chunk_size" => 1000,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"pre_calculate_formulas" => false,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"strict_null_comparison" => false,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"csv" => [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"delimiter" => ",",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"enclosure" => '"',
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"line_ending" => PHP_EOL,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"use_bom" => false,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"include_separator_line" => false,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"excel_compatibility" => false,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"output_encoding" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
],
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"properties" => [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"creator" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"lastModifiedBy" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"title" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"description" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"subject" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"keywords" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"category" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"manager" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"company" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
],
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
],
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"imports" => [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"read_only" => true,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"ignore_empty" => false,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"heading_row" => [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"formatter" => "slug",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
],
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"csv" => [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"delimiter" => ",",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"enclosure" => '"',
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"escape_character" => "\\",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"contiguous" => false,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"input_encoding" => "UTF-8",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
],
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"properties" => [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"creator" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"lastModifiedBy" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"title" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"description" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"subject" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"keywords" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"category" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"manager" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"company" => "",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
],
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
],
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"extension_detector" => [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"xlsx" => Excel::XLSX,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"xlsm" => Excel::XLSX,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"xltx" => Excel::XLSX,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"xltm" => Excel::XLSX,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"xls" => Excel::XLS,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"xlt" => Excel::XLS,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"ods" => Excel::ODS,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"ots" => Excel::ODS,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"slk" => Excel::SLK,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"xml" => Excel::XML,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"gnumeric" => Excel::GNUMERIC,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"htm" => Excel::HTML,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"html" => Excel::HTML,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"csv" => Excel::CSV,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"tsv" => Excel::TSV,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"pdf" => Excel::DOMPDF,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
],
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"value_binder" => [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"default" => DefaultValueBinder::class,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
],
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"cache" => [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"driver" => "memory",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"batch" => [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"memory_limit" => 60000,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
],
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"illuminate" => [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"store" => null,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
],
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
],
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"transactions" => [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"handler" => "db",
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"db" => [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"connection" => null,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
],
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
],
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"temporary_files" => [
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"local_path" => storage_path("framework/cache/laravel-excel"),
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"remote_disk" => null,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"remote_prefix" => null,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
"force_resync_remote" => null,
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
],
|
||||||
|
I would import that too. I would import that too.
|
|||||||
|
];
|
||||||
|
I would import that too. I would import that too.
|
|||||||
@@ -1,10 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<InertiaHead title="Kalendarz urlopów" />
|
<InertiaHead title="Kalendarz urlopów" />
|
||||||
<div class="bg-white shadow-md">
|
<div class="bg-white shadow-md">
|
||||||
<div class="p-4 sm:px-6">
|
<div class="flex justify-between items-center p-4 sm:px-6">
|
||||||
<h2 class="text-lg leading-6 font-medium text-gray-900">
|
<div>
|
||||||
Kalendarz urlopów
|
<h2 class="text-lg leading-6 font-medium text-gray-900">
|
||||||
</h2>
|
Kalendarz urlopów
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a
|
||||||
|
:href="`/timesheet/${selectedMonth.value}`"
|
||||||
|
class="inline-flex items-center px-4 py-3 border border-transparent text-sm leading-4 font-medium rounded-md shadow-sm text-white bg-blumilk-600 hover:bg-blumilk-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blumilk-500"
|
||||||
|
>
|
||||||
|
Pobierz plik excel
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overflow-x-auto">
|
<div class="overflow-x-auto">
|
||||||
<table class="w-full text-center table-fixed text-sm border border-gray-300">
|
<table class="w-full text-center table-fixed text-sm border border-gray-300">
|
||||||
@@ -19,7 +29,7 @@
|
|||||||
<MenuButton
|
<MenuButton
|
||||||
class="inline-flex justify-center w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blumilk-500"
|
class="inline-flex justify-center w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blumilk-500"
|
||||||
>
|
>
|
||||||
{{ selectedMonth.name }}
|
{{ selectedMonth.name }} {{ years.current }}
|
||||||
<ChevronDownIcon class="-mr-1 ml-2 h-5 w-5" />
|
<ChevronDownIcon class="-mr-1 ml-2 h-5 w-5" />
|
||||||
</MenuButton>
|
</MenuButton>
|
||||||
</div>
|
</div>
|
||||||
@@ -42,8 +52,7 @@
|
|||||||
v-slot="{ active }"
|
v-slot="{ active }"
|
||||||
>
|
>
|
||||||
<InertiaLink
|
<InertiaLink
|
||||||
href="/vacation-calendar"
|
:href="`/vacation-calendar/${month.value}`"
|
||||||
:data="{ month: month.value }"
|
|
||||||
:class="[active ? 'bg-gray-100 text-gray-900' : 'text-gray-700', 'flex w-full font-normal px-4 py-2 text-sm']"
|
:class="[active ? 'bg-gray-100 text-gray-900' : 'text-gray-700', 'flex w-full font-normal px-4 py-2 text-sm']"
|
||||||
>
|
>
|
||||||
{{ month.name }}
|
{{ month.name }}
|
||||||
@@ -151,6 +160,10 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: () => 'january',
|
default: () => 'january',
|
||||||
},
|
},
|
||||||
|
years: {
|
||||||
|
type: Object,
|
||||||
|
default: () => null,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const {getMonths, findMonth} = useMonthInfo()
|
const {getMonths, findMonth} = useMonthInfo()
|
||||||
|
|||||||
@@ -45,6 +45,12 @@
|
|||||||
"Vacation request has been approved.": "Wniosek urlopowy został zatwierdzony.",
|
"Vacation request has been approved.": "Wniosek urlopowy został zatwierdzony.",
|
||||||
"Vacation request has been rejected.": "Wniosek urlopowy został odrzucony.",
|
"Vacation request has been rejected.": "Wniosek urlopowy został odrzucony.",
|
||||||
"Vacation request has been cancelled.": "Wniosek urlopowy został anulowany.",
|
"Vacation request has been cancelled.": "Wniosek urlopowy został anulowany.",
|
||||||
|
"Sum:": "Suma:",
|
||||||
|
"Date": "Data",
|
||||||
|
"Day of week": "Dzień tygodnia",
|
||||||
|
"Start date": "Data rozpoczecia",
|
||||||
|
"End date": "Data zakończenia",
|
||||||
|
"Worked hours": "Ilość godzin",
|
||||||
"Hi :user!": "Cześć :user!",
|
"Hi :user!": "Cześć :user!",
|
||||||
"The vacation request :title has changed state to :state.": "Wniosek urlopowy :title zmienił status na :state.",
|
"The vacation request :title has changed state to :state.": "Wniosek urlopowy :title zmienił status na :state.",
|
||||||
"Vacation request :title": "Wniosek urlopowy :title",
|
"Vacation request :title": "Wniosek urlopowy :title",
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ use Toby\Infrastructure\Http\Controllers\GoogleController;
|
|||||||
use Toby\Infrastructure\Http\Controllers\HolidayController;
|
use Toby\Infrastructure\Http\Controllers\HolidayController;
|
||||||
use Toby\Infrastructure\Http\Controllers\LogoutController;
|
use Toby\Infrastructure\Http\Controllers\LogoutController;
|
||||||
use Toby\Infrastructure\Http\Controllers\SelectYearPeriodController;
|
use Toby\Infrastructure\Http\Controllers\SelectYearPeriodController;
|
||||||
|
use Toby\Infrastructure\Http\Controllers\TimesheetController;
|
||||||
use Toby\Infrastructure\Http\Controllers\UserController;
|
use Toby\Infrastructure\Http\Controllers\UserController;
|
||||||
use Toby\Infrastructure\Http\Controllers\VacationCalendarController;
|
use Toby\Infrastructure\Http\Controllers\VacationCalendarController;
|
||||||
use Toby\Infrastructure\Http\Controllers\VacationLimitController;
|
use Toby\Infrastructure\Http\Controllers\VacationLimitController;
|
||||||
@@ -24,8 +25,10 @@ Route::middleware("auth")->group(function (): void {
|
|||||||
|
|
||||||
Route::get("/vacation-limits", [VacationLimitController::class, "edit"])
|
Route::get("/vacation-limits", [VacationLimitController::class, "edit"])
|
||||||
->name("vacation.limits");
|
->name("vacation.limits");
|
||||||
Route::get("/vacation-calendar", [VacationCalendarController::class, "index"])
|
Route::get("/vacation-calendar/{month?}", [VacationCalendarController::class, "index"])
|
||||||
->name("vacation.calendar");
|
->name("vacation.calendar");
|
||||||
|
Route::get("/timesheet/{month}", TimesheetController::class)
|
||||||
|
->name("timesheet");
|
||||||
|
|
||||||
Route::get("/vacation-limits", [VacationLimitController::class, "edit"])->name("vacation.limits");
|
Route::get("/vacation-limits", [VacationLimitController::class, "edit"])->name("vacation.limits");
|
||||||
Route::put("/vacation-limits", [VacationLimitController::class, "update"]);
|
Route::put("/vacation-limits", [VacationLimitController::class, "update"]);
|
||||||
|
|||||||

I think we can simplify it:
I think we can simplify it: