mirror of
https://github.com/Karaka-Management/oms-HumanResourceManagement.git
synced 2026-01-21 08:28:41 +00:00
Show departments from organization
This commit is contained in:
parent
e05709a5f0
commit
a9fc6e942e
|
|
@ -19,7 +19,9 @@ use phpOMS\Message\ResponseAbstract;
|
|||
use phpOMS\Module\ModuleAbstract;
|
||||
use phpOMS\Module\WebInterface;
|
||||
use phpOMS\Views\View;
|
||||
|
||||
use Modules\HumanResourceManagement\Models\EmployeeMapper;
|
||||
use Modules\Organization\Models\DepartmentMapper;
|
||||
|
||||
/**
|
||||
* Human Resources controller class.
|
||||
|
|
@ -127,6 +129,8 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
$view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/department-list');
|
||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1002403001, $request, $response));
|
||||
|
||||
$view->setData('departments', DepartmentMapper::getAll());
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ $footerView->setPages(1 / 25);
|
|||
$footerView->setPage(1);
|
||||
$footerView->setResults(1);
|
||||
|
||||
$departments = $this->getData('departments');
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<div class="row">
|
||||
|
|
@ -38,14 +40,13 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tfoot>
|
||||
<tr><td colspan="4"><?= $footerView->render(); ?>
|
||||
<tbody>
|
||||
<?php $c = 0; foreach ([] as $key => $value) : $c++;
|
||||
<?php $c = 0; foreach ($departments as $key => $value) : $c++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/admin/group/settings?{?}&id=' . $value->getId()); ?>
|
||||
<tr>
|
||||
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getId(), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getName(), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td>
|
||||
<td>
|
||||
<td>
|
||||
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getParent()->getName(), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if($c === 0) : ?>
|
||||
<tr><td colspan="4" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user