template fixes + bug fixes + style fixes

This commit is contained in:
Dennis Eichhorn 2024-04-02 21:40:47 +00:00
parent 1a1b24f954
commit 4e81fb41cf
4 changed files with 5 additions and 5 deletions

View File

@ -434,7 +434,7 @@ final class Application
private function createDefaultPageView(HttpRequest $request, HttpResponse $response, TimerecordingView $pageView) : void
{
$pageView->setOrganizations(UnitMapper::getAll()->execute());
$pageView->profile = ProfileMapper::get()->where('account', $request->header->account)->execute();
$pageView->profile = ProfileMapper::get()->where('account', $request->header->account)->executeGetArray();
$pageView->setData('nav', $this->getNavigation($request, $response));
$pageView->setTemplate('/Web/Timerecording/index');

View File

@ -58,7 +58,7 @@ final class BackendController extends Controller implements DashboardElementInte
$view->data['employees'] = EmployeeMapper::getAll()
->with('profile')
->with('profile/account')
->execute();
->executeGetArray();
return $view;
}
@ -102,7 +102,7 @@ final class BackendController extends Controller implements DashboardElementInte
->where('employee', $employee->profile->account->id)
->where('start', $start, '<=')
->sort('start', OrderType::DESC)
->execute();
->executeGetArray();
$view->data['sessions'] = $list;
$view->data['lastSession'] = $lastOpenSession;

View File

@ -49,7 +49,7 @@ final class TimerecordingController extends Controller
$view->setTemplate('/Modules/HumanResourceTimeRecording/Theme/Timeterminal/overview');
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1006301001, $request, $response);
$list = SessionMapper::getAll()->sort('id', OrderType::DESC)->limit(50)->execute();
$list = SessionMapper::getAll()->sort('id', OrderType::DESC)->limit(50)->executeGetArray();
$view->data['sessions'] = $list;
return $view;

View File

@ -54,7 +54,7 @@ final class SessionElementTest extends \PHPUnit\Framework\TestCase
public function testSerialize() : void
{
$this->element->session = new NullSession(2);
$this->element->status = ClockingStatus::END;
$this->element->status = ClockingStatus::END;
$serialized = $this->element->jsonSerialize();
unset($serialized['datetime']);