mirror of
https://github.com/Karaka-Management/oms-HumanResourceTimeRecording.git
synced 2026-02-11 10:28:41 +00:00
template fixes + bug fixes + style fixes
This commit is contained in:
parent
1a1b24f954
commit
4e81fb41cf
|
|
@ -434,7 +434,7 @@ final class Application
|
||||||
private function createDefaultPageView(HttpRequest $request, HttpResponse $response, TimerecordingView $pageView) : void
|
private function createDefaultPageView(HttpRequest $request, HttpResponse $response, TimerecordingView $pageView) : void
|
||||||
{
|
{
|
||||||
$pageView->setOrganizations(UnitMapper::getAll()->execute());
|
$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->setData('nav', $this->getNavigation($request, $response));
|
||||||
|
|
||||||
$pageView->setTemplate('/Web/Timerecording/index');
|
$pageView->setTemplate('/Web/Timerecording/index');
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ final class BackendController extends Controller implements DashboardElementInte
|
||||||
$view->data['employees'] = EmployeeMapper::getAll()
|
$view->data['employees'] = EmployeeMapper::getAll()
|
||||||
->with('profile')
|
->with('profile')
|
||||||
->with('profile/account')
|
->with('profile/account')
|
||||||
->execute();
|
->executeGetArray();
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
@ -102,7 +102,7 @@ final class BackendController extends Controller implements DashboardElementInte
|
||||||
->where('employee', $employee->profile->account->id)
|
->where('employee', $employee->profile->account->id)
|
||||||
->where('start', $start, '<=')
|
->where('start', $start, '<=')
|
||||||
->sort('start', OrderType::DESC)
|
->sort('start', OrderType::DESC)
|
||||||
->execute();
|
->executeGetArray();
|
||||||
|
|
||||||
$view->data['sessions'] = $list;
|
$view->data['sessions'] = $list;
|
||||||
$view->data['lastSession'] = $lastOpenSession;
|
$view->data['lastSession'] = $lastOpenSession;
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ final class TimerecordingController extends Controller
|
||||||
$view->setTemplate('/Modules/HumanResourceTimeRecording/Theme/Timeterminal/overview');
|
$view->setTemplate('/Modules/HumanResourceTimeRecording/Theme/Timeterminal/overview');
|
||||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1006301001, $request, $response);
|
$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;
|
$view->data['sessions'] = $list;
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ final class SessionElementTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testSerialize() : void
|
public function testSerialize() : void
|
||||||
{
|
{
|
||||||
$this->element->session = new NullSession(2);
|
$this->element->session = new NullSession(2);
|
||||||
$this->element->status = ClockingStatus::END;
|
$this->element->status = ClockingStatus::END;
|
||||||
|
|
||||||
$serialized = $this->element->jsonSerialize();
|
$serialized = $this->element->jsonSerialize();
|
||||||
unset($serialized['datetime']);
|
unset($serialized['datetime']);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user