data['sessions']; $sessionCount = \count($sessions); /** @var Session $lastOpenSession */ $lastOpenSession = $this->data['lastSession']; $type = $lastOpenSession !== null ? $lastOpenSession->getType() : ClockingType::OFFICE; $status = $lastOpenSession !== null ? $lastOpenSession->getStatus() : ClockingStatus::END; /** @var \phpOMS\Stdlib\Base\SmartDateTime $startWeek */ $startWeek = new SmartDateTime('now'); $startWeek = $startWeek->getStartOfWeek(); $endWeek = $startWeek->createModify(0, 0, 6); $startMonth = new SmartDateTime('now'); $startMonth = $startMonth->getStartOfMonth(); $endMonth = $startMonth->createModify(0, 1, -1); $busy = [ 'total' => 0, 'month' => 0, 'week' => 0, ]; echo $this->data['nav']->render(); ?>
| This month | |
| Last month | |
| This year |
| Used Vacation | |
| Last Vacation | |
| Next Vacation |
| = $this->getHtml('Date'); ?> | = $this->getHtml('Type'); ?> | = $this->getHtml('Status'); ?> | = $this->getHtml('Start'); ?> | = $this->getHtml('Break'); ?> | = $this->getHtml('End'); ?> | = $this->getHtml('Total'); ?> |
| getStart()->format('Y-m-d') === $lastOpenSession->getStart()->format('Y-m-d') ) : ?> Today = $session->getStart()->format('Y-m-d'); ?> - = $this->getHtml('D' . $session->getStart()->format('w')); ?> | = $this->getHtml('CT' . $session->getType()); ?> | = $this->getHtml('CS' . $session->getStatus()); ?> | = $session->getStart()->format('H:i'); ?> | = (int) ($session->getBreak() / 3600); ?>h = ((int) ($session->getBreak() / 60) % 60); ?>m | = $session->getEnd() !== null ? $session->getEnd()->format('H:i') : ''; ?> | = (int) ($session->getBusy() / 3600); ?>h = ((int) ($session->getBusy() / 60) % 60); ?>m getBusy(); if ($session->getStart()->getTimestamp() < $startWeek->getTimestamp() || $count === $sessionCount ) : ?> |
| = $startWeek->format('Y/m/d'); ?> - = $endWeek->format('Y/m/d'); ?> | = (int) ($busy['week'] / 3600); ?>h = ((int) ($busy['week'] / 60) % 60); ?>m createModify(0, 0, -7); $busy['week'] = 0; endif; ?> getBusy(); if ($session->getStart()->getTimestamp() < $startMonth->getTimestamp() || $count === $sessionCount ) : ?> | |||||
|---|---|---|---|---|---|---|
| = $startMonth->format('Y/m/d'); ?> - = $endMonth->format('Y/m/d'); ?> | = (int) ($busy['month'] / 3600); ?>h = ((int) ($busy['month'] / 60) % 60); ?>m createModify(0, -1, 0); $busy['month'] = 0; endif; ?> | |||||
| = $this->getHtml('Empty', '0', '0'); ?> | ||||||