mirror of
https://github.com/Karaka-Management/oms-HumanResourceManagement.git
synced 2026-02-13 03:18:41 +00:00
template fixes + bug fixes + style fixes
This commit is contained in:
parent
09ee2c2ec8
commit
3d95e798e9
|
|
@ -64,7 +64,7 @@ final class ApiController extends Controller
|
||||||
*/
|
*/
|
||||||
public function apiEmployeeCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
|
public function apiEmployeeCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
|
||||||
{
|
{
|
||||||
if ($request->hasData('profiles')) {
|
if ($request->hasData('accounts')) {
|
||||||
$this->apiEmployeeFromAccountCreate($request, $response, $data);
|
$this->apiEmployeeFromAccountCreate($request, $response, $data);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -112,7 +112,7 @@ final class ApiController extends Controller
|
||||||
private function validateEmployeeFromAccountCreate(RequestAbstract $request) : array
|
private function validateEmployeeFromAccountCreate(RequestAbstract $request) : array
|
||||||
{
|
{
|
||||||
$val = [];
|
$val = [];
|
||||||
if (($val['profiles'] = !$request->hasData('profiles'))) {
|
if (($val['accounts'] = !$request->hasData('accounts'))) {
|
||||||
return $val;
|
return $val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -130,7 +130,7 @@ final class ApiController extends Controller
|
||||||
*/
|
*/
|
||||||
private function createEmployeeFromAccountFromRequest(RequestAbstract $request) : array
|
private function createEmployeeFromAccountFromRequest(RequestAbstract $request) : array
|
||||||
{
|
{
|
||||||
$accounts = $request->getDataList('profiles');
|
$accounts = $request->getDataList('accounts');
|
||||||
$employees = [];
|
$employees = [];
|
||||||
|
|
||||||
foreach ($accounts as $account) {
|
foreach ($accounts as $account) {
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ final class BackendController extends Controller
|
||||||
->with('profile/image')
|
->with('profile/image')
|
||||||
->with('companyHistory')
|
->with('companyHistory')
|
||||||
->with('companyHistory/unit')
|
->with('companyHistory/unit')
|
||||||
->execute();
|
->executeGetArray();
|
||||||
|
|
||||||
/** @var \Model\Setting $profileImage */
|
/** @var \Model\Setting $profileImage */
|
||||||
$profileImage = $this->app->appSettings->get(names: SettingsEnum::DEFAULT_PROFILE_IMAGE, module: 'Profile');
|
$profileImage = $this->app->appSettings->get(names: SettingsEnum::DEFAULT_PROFILE_IMAGE, module: 'Profile');
|
||||||
|
|
@ -163,7 +163,7 @@ final class BackendController extends Controller
|
||||||
->where('employee', $employee->id)
|
->where('employee', $employee->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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user