#39 - cr fixes

This commit is contained in:
Adrian Hopek
2022-02-21 15:49:17 +01:00
parent 96192c0f2c
commit e2c3c3b708
5 changed files with 12 additions and 12 deletions

View File

@@ -35,6 +35,8 @@ class TimesheetPerUserSheet implements WithTitle, WithHeadings, WithEvents, With
use RegistersEventListeners;
protected const HOURS_PER_DAY = 8;
protected const START_HOUR = 8;
protected const END_HOUR = 16;
public function __construct(
protected User $user,
@@ -79,8 +81,8 @@ class TimesheetPerUserSheet implements WithTitle, WithHeadings, WithEvents, With
$row = [
Date::dateTimeToExcel($day),
$day->translatedFormat("l"),
$workedThisDay ? $this->toExcelTime(Carbon::createFromTime(8)) : null,
$workedThisDay ? $this->toExcelTime(Carbon::createFromTime(16)) : null,
$workedThisDay ? $this->toExcelTime(Carbon::createFromTime(static::START_HOUR)) : null,
$workedThisDay ? $this->toExcelTime(Carbon::createFromTime(static::END_HOUR)) : null,
$workedThisDay ? static::HOURS_PER_DAY : null,
];