mirror of
https://github.com/Karaka-Management/oms-Organization.git
synced 2026-02-16 16:28:41 +00:00
fix templates
This commit is contained in:
parent
816a50dee8
commit
9260574868
|
|
@ -333,13 +333,16 @@ final class BackendController extends Controller
|
||||||
$view->setTemplate('/Modules/Organization/Theme/Backend/position-list');
|
$view->setTemplate('/Modules/Organization/Theme/Backend/position-list');
|
||||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1004705001, $request, $response);
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1004705001, $request, $response);
|
||||||
|
|
||||||
if ($request->getData('ptype') === 'p') {
|
$view->data['positions'] = PositionMapper::getAll()
|
||||||
$view->data['positions'] = PositionMapper::getAll()->with('parent')->with('department')->where('id', $request->getDataInt('offset') ?? 0, '<')->limit(25)->executeGetArray();
|
->with('parent')
|
||||||
} elseif ($request->getData('ptype') === 'n') {
|
->with('department')
|
||||||
$view->data['positions'] = PositionMapper::getAll()->with('parent')->with('department')->where('id', $request->getDataInt('offset') ?? 0, '>')->limit(25)->executeGetArray();
|
->limit(25)
|
||||||
} else {
|
->paginate(
|
||||||
$view->data['positions'] = PositionMapper::getAll()->with('parent')->with('department')->where('id', 0, '>')->limit(25)->executeGetArray();
|
'id',
|
||||||
}
|
$request->getData('ptype'),
|
||||||
|
$request->getDataInt('offset')
|
||||||
|
)
|
||||||
|
->executeGetArray();
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user