mirror of
https://github.com/Karaka-Management/oms-Organization.git
synced 2026-01-10 15:48:40 +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->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1004705001, $request, $response);
|
||||
|
||||
if ($request->getData('ptype') === 'p') {
|
||||
$view->data['positions'] = PositionMapper::getAll()->with('parent')->with('department')->where('id', $request->getDataInt('offset') ?? 0, '<')->limit(25)->executeGetArray();
|
||||
} elseif ($request->getData('ptype') === 'n') {
|
||||
$view->data['positions'] = PositionMapper::getAll()->with('parent')->with('department')->where('id', $request->getDataInt('offset') ?? 0, '>')->limit(25)->executeGetArray();
|
||||
} else {
|
||||
$view->data['positions'] = PositionMapper::getAll()->with('parent')->with('department')->where('id', 0, '>')->limit(25)->executeGetArray();
|
||||
}
|
||||
$view->data['positions'] = PositionMapper::getAll()
|
||||
->with('parent')
|
||||
->with('department')
|
||||
->limit(25)
|
||||
->paginate(
|
||||
'id',
|
||||
$request->getData('ptype'),
|
||||
$request->getDataInt('offset')
|
||||
)
|
||||
->executeGetArray();
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user