#39 - generate timesheet #56
@@ -21,6 +21,7 @@ use Maatwebsite\Excel\Events\AfterSheet;
|
|||||||
|
|
|||||||
use PhpOffice\PhpSpreadsheet\Shared\Date;
|
use PhpOffice\PhpSpreadsheet\Shared\Date;
|
||||||
use PhpOffice\PhpSpreadsheet\Style\Alignment;
|
use PhpOffice\PhpSpreadsheet\Style\Alignment;
|
||||||
use PhpOffice\PhpSpreadsheet\Style\Border;
|
use PhpOffice\PhpSpreadsheet\Style\Border;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Style\Color;
|
||||||
|
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;
|
use PhpOffice\PhpSpreadsheet\Style\Fill;
|
||||||
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||||
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||||
@@ -141,7 +142,9 @@ class TimesheetPerUserSheet implements WithTitle, WithHeadings, WithEvents, With
|
|||||||
|
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}")
|
$sheet->getStyle("A1:{$lastColumn}{$lastRow}")
|
||||||
->getBorders()
|
->getBorders()
|
||||||
->getAllBorders()
|
->getAllBorders()
|
||||||
->setBorderStyle(Border::BORDER_THIN);
|
->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?
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?
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function afterSheet(AfterSheet $event): void
|
public static function afterSheet(AfterSheet $event): void
|
||||||
@@ -176,7 +179,9 @@ class TimesheetPerUserSheet implements WithTitle, WithHeadings, WithEvents, With
|
|||||||
|
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}")
|
$sheet->getDelegate()->getStyle("A{$lastRow}:E{$lastRow}")
|
||||||
->getBorders()
|
->getBorders()
|
||||||
->getAllBorders()
|
->getAllBorders()
|
||||||
->setBorderStyle(Border::BORDER_THIN);
|
->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?
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?
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function getVacationsForPeriod(User $user, CarbonPeriod $period): Collection
|
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?
|
|||||||
Maybe move these hours to consts as start hour and end hour?
Maybe move these hours to consts as start hour and end hour?