mirror of
https://github.com/Karaka-Management/oms-HumanResourceManagement.git
synced 2026-02-02 22:28:40 +00:00
Merge branch 'develop' of https://github.com/Karaka-Management/oms-HumanResourceManagement into develop
This commit is contained in:
commit
a030f2d432
|
|
@ -85,7 +85,7 @@ final class ApiController extends Controller
|
||||||
public function apiEmployeeFromAccountCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function apiEmployeeFromAccountCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateEmployeeFromAccountCreate($request))) {
|
if (!empty($val = $this->validateEmployeeFromAccountCreate($request))) {
|
||||||
$response->set('employee_create', new FormValidation($val));
|
$response->data['employee_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -154,7 +154,7 @@ final class ApiController extends Controller
|
||||||
public function apiEmployeeNewCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function apiEmployeeNewCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateEmployeeNewCreate($request))) {
|
if (!empty($val = $this->validateEmployeeNewCreate($request))) {
|
||||||
$response->set('employee_create', new FormValidation($val));
|
$response->data['employee_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -225,7 +225,7 @@ final class ApiController extends Controller
|
||||||
public function apiEmployeeHistoryCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function apiEmployeeHistoryCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateEmployeeHistoryCreate($request))) {
|
if (!empty($val = $this->validateEmployeeHistoryCreate($request))) {
|
||||||
$response->set('history_create', new FormValidation($val));
|
$response->data['history_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -297,7 +297,7 @@ final class ApiController extends Controller
|
||||||
public function apiEmployeeWorkHistoryCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function apiEmployeeWorkHistoryCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateEmployeeWorkHistoryCreate($request))) {
|
if (!empty($val = $this->validateEmployeeWorkHistoryCreate($request))) {
|
||||||
$response->set('history_work_create', new FormValidation($val));
|
$response->data['history_work_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -373,7 +373,7 @@ final class ApiController extends Controller
|
||||||
public function apiEmployeeEducationHistoryCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function apiEmployeeEducationHistoryCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateEmployeeEducationHistoryCreate($request))) {
|
if (!empty($val = $this->validateEmployeeEducationHistoryCreate($request))) {
|
||||||
$response->set('history_education_create', new FormValidation($val));
|
$response->data['history_education_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -49,15 +49,14 @@ final class BackendController extends Controller
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/staff-list');
|
$view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/staff-list');
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1002402001, $request, $response));
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002402001, $request, $response);
|
||||||
|
|
||||||
$view->setData('employees', EmployeeMapper::getAll()
|
$view->data['employees'] = EmployeeMapper::getAll()
|
||||||
->with('profile')
|
->with('profile')
|
||||||
->with('profile/account')
|
->with('profile/account')
|
||||||
->with('companyHistory')
|
->with('companyHistory')
|
||||||
->with('companyHistory/unit')
|
->with('companyHistory/unit')
|
||||||
->execute()
|
->execute();
|
||||||
);
|
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
@ -78,10 +77,10 @@ final class BackendController extends Controller
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/staff-create');
|
$view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/staff-create');
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1002402001, $request, $response));
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002402001, $request, $response);
|
||||||
|
|
||||||
$accSelector = new \Modules\Profile\Theme\Backend\Components\AccountGroupSelector\BaseView($this->app->l11nManager, $request, $response);
|
$accSelector = new \Modules\Profile\Theme\Backend\Components\AccountGroupSelector\BaseView($this->app->l11nManager, $request, $response);
|
||||||
$view->addData('accSelector', $accSelector);
|
$view->data['accSelector'] = $accSelector;
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
@ -102,7 +101,7 @@ final class BackendController extends Controller
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/staff-profile');
|
$view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/staff-profile');
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1002402001, $request, $response));
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002402001, $request, $response);
|
||||||
|
|
||||||
$employee = EmployeeMapper::get()
|
$employee = EmployeeMapper::get()
|
||||||
->with('profile')
|
->with('profile')
|
||||||
|
|
@ -125,7 +124,7 @@ final class BackendController extends Controller
|
||||||
->sort('workHistory/start', OrderType::DESC)
|
->sort('workHistory/start', OrderType::DESC)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$view->addData('employee', $employee);
|
$view->data['employee'] = $employee;
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
@ -146,9 +145,9 @@ final class BackendController extends Controller
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/department-list');
|
$view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/department-list');
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1002403001, $request, $response));
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002403001, $request, $response);
|
||||||
|
|
||||||
$view->setData('departments', DepartmentMapper::getAll());
|
$view->data['departments'] = DepartmentMapper::getAll();
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
@ -169,9 +168,9 @@ final class BackendController extends Controller
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/position-list');
|
$view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/position-list');
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1002403001, $request, $response));
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002403001, $request, $response);
|
||||||
|
|
||||||
$view->setData('departments', DepartmentMapper::getAll());
|
$view->data['departments'] = DepartmentMapper::getAll();
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
@ -192,10 +191,10 @@ final class BackendController extends Controller
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/position-create');
|
$view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/position-create');
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1002402001, $request, $response));
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002402001, $request, $response);
|
||||||
|
|
||||||
$accSelector = new \Modules\Profile\Theme\Backend\Components\AccountGroupSelector\BaseView($this->app->l11nManager, $request, $response);
|
$accSelector = new \Modules\Profile\Theme\Backend\Components\AccountGroupSelector\BaseView($this->app->l11nManager, $request, $response);
|
||||||
$view->addData('accSelector', $accSelector);
|
$view->data['accSelector'] = $accSelector;
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,14 +53,6 @@ class Employee implements \JsonSerializable
|
||||||
*/
|
*/
|
||||||
public $image = null;
|
public $image = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* Files.
|
|
||||||
*
|
|
||||||
* @var Media[]
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
private array $files = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Employee department/position history.
|
* Employee department/position history.
|
||||||
*
|
*
|
||||||
|
|
@ -163,18 +155,6 @@ class Employee implements \JsonSerializable
|
||||||
return \hash_equals($this->semiPrivateHash, $hash);
|
return \hash_equals($this->semiPrivateHash, $hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get files
|
|
||||||
*
|
|
||||||
* @return Media[]
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function getFiles() : array
|
|
||||||
{
|
|
||||||
return $this->files;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get media file by type
|
* Get media file by type
|
||||||
*
|
*
|
||||||
|
|
@ -350,4 +330,6 @@ class Employee implements \JsonSerializable
|
||||||
{
|
{
|
||||||
return $this->toArray();
|
return $this->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use \Modules\Media\Models\MediaListTrait;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,14 +52,6 @@ class EmployeeEducationHistory implements \JsonSerializable
|
||||||
|
|
||||||
public string $score = '';
|
public string $score = '';
|
||||||
|
|
||||||
/**
|
|
||||||
* Files.
|
|
||||||
*
|
|
||||||
* @var Media[]
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
private array $files = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start date
|
* Start date
|
||||||
*
|
*
|
||||||
|
|
@ -102,18 +94,6 @@ class EmployeeEducationHistory implements \JsonSerializable
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get files
|
|
||||||
*
|
|
||||||
* @return Media[]
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function getFiles() : array
|
|
||||||
{
|
|
||||||
return $this->files;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get media file by type
|
* Get media file by type
|
||||||
*
|
*
|
||||||
|
|
@ -177,4 +157,6 @@ class EmployeeEducationHistory implements \JsonSerializable
|
||||||
{
|
{
|
||||||
return $this->toArray();
|
return $this->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use \Modules\Media\Models\MediaListTrait;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,14 +73,6 @@ class EmployeeHistory implements \JsonSerializable
|
||||||
*/
|
*/
|
||||||
public Position $position;
|
public Position $position;
|
||||||
|
|
||||||
/**
|
|
||||||
* Files.
|
|
||||||
*
|
|
||||||
* @var Media[]
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
private array $files = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start date
|
* Start date
|
||||||
*
|
*
|
||||||
|
|
@ -125,18 +117,6 @@ class EmployeeHistory implements \JsonSerializable
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get files
|
|
||||||
*
|
|
||||||
* @return Media[]
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function getFiles() : array
|
|
||||||
{
|
|
||||||
return $this->files;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get media file by type
|
* Get media file by type
|
||||||
*
|
*
|
||||||
|
|
@ -200,4 +180,6 @@ class EmployeeHistory implements \JsonSerializable
|
||||||
{
|
{
|
||||||
return $this->toArray();
|
return $this->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use \Modules\Media\Models\MediaListTrait;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,14 +48,6 @@ class EmployeeWorkHistory implements \JsonSerializable
|
||||||
|
|
||||||
public string $jobTitle = '';
|
public string $jobTitle = '';
|
||||||
|
|
||||||
/**
|
|
||||||
* Files.
|
|
||||||
*
|
|
||||||
* @var Media[]
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
private array $files = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start date
|
* Start date
|
||||||
*
|
*
|
||||||
|
|
@ -98,18 +90,6 @@ class EmployeeWorkHistory implements \JsonSerializable
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get files
|
|
||||||
*
|
|
||||||
* @return Media[]
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function getFiles() : array
|
|
||||||
{
|
|
||||||
return $this->files;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get media file by type
|
* Get media file by type
|
||||||
*
|
*
|
||||||
|
|
@ -171,4 +151,6 @@ class EmployeeWorkHistory implements \JsonSerializable
|
||||||
{
|
{
|
||||||
return $this->toArray();
|
return $this->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use \Modules\Media\Models\MediaListTrait;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,9 @@ $footerView->setPages(25);
|
||||||
$footerView->setPage(1);
|
$footerView->setPage(1);
|
||||||
$footerView->setResults(1);
|
$footerView->setResults(1);
|
||||||
|
|
||||||
$departments = $this->getData('departments');
|
$departments = $this->data['departments'];
|
||||||
|
|
||||||
echo $this->getData('nav')->render(); ?>
|
echo $this->data['nav']->render(); ?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ use \Modules\HumanResourceManagement\Models\EmployeeActivityStatus;
|
||||||
* @var \phpOMS\Views\View $this
|
* @var \phpOMS\Views\View $this
|
||||||
*/
|
*/
|
||||||
|
|
||||||
echo $this->getData('nav')->render();
|
echo $this->data['nav']->render();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@ use phpOMS\Uri\UriFactory;
|
||||||
* @var \phpOMS\Views\View $this
|
* @var \phpOMS\Views\View $this
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$employees = $this->getData('employees');
|
$employees = $this->data['employees'];
|
||||||
|
|
||||||
echo $this->getData('nav')->render(); ?>
|
echo $this->data['nav']->render(); ?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,13 @@ declare(strict_types=1);
|
||||||
|
|
||||||
use phpOMS\Uri\UriFactory;
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
$employee = $this->getData('employee');
|
$employee = $this->data['employee'];
|
||||||
$history = $employee->getHistory();
|
$history = $employee->getHistory();
|
||||||
$educationHistory = $employee->getEducationHistory();
|
$educationHistory = $employee->getEducationHistory();
|
||||||
$workHistory = $employee->getWorkHistory();
|
$workHistory = $employee->getWorkHistory();
|
||||||
$recentHistory = $employee->getNewestHistory();
|
$recentHistory = $employee->getNewestHistory();
|
||||||
|
|
||||||
echo $this->getData('nav')->render(); ?>
|
echo $this->data['nav']->render(); ?>
|
||||||
|
|
||||||
<div class="tabview tab-2">
|
<div class="tabview tab-2">
|
||||||
<div class="box wf-100 col-xs-12">
|
<div class="box wf-100 col-xs-12">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user