many fixes and expands and module expansions

This commit is contained in:
Dennis Eichhorn 2021-04-04 17:10:52 +02:00
parent ade1247b35
commit 5bec4e1e7b
12 changed files with 684 additions and 34 deletions

View File

@ -34,6 +34,32 @@
}
}
},
"hr_staff_media": {
"name": "hr_staff_media",
"fields": {
"hr_staff_media_id": {
"name": "hr_staff_media_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"hr_staff_media_item": {
"name": "hr_staff_media_item",
"type": "INT",
"null": false,
"foreignTable": "hr_staff",
"foreignKey": "hr_staff_id"
},
"hr_staff_media_media": {
"name": "hr_staff_media_media",
"type": "INT",
"null": false,
"foreignTable": "media",
"foreignKey": "media_id"
}
}
},
"hr_staff_history": {
"name": "hr_staff_history",
"fields": {
@ -87,5 +113,173 @@
"default": null
}
}
},
"hr_staff_history_media": {
"name": "hr_staff_history_media",
"fields": {
"hr_staff_history_media_id": {
"name": "hr_staff_history_media_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"hr_staff_history_media_item": {
"name": "hr_staff_history_media_item",
"type": "INT",
"null": false,
"foreignTable": "hr_staff_history",
"foreignKey": "hr_staff_history_id"
},
"hr_staff_history_media_media": {
"name": "hr_staff_history_media_media",
"type": "INT",
"null": false,
"foreignTable": "media",
"foreignKey": "media_id"
}
}
},
"hr_staff_education_history": {
"name": "hr_staff_education_history",
"fields": {
"hr_staff_education_history_id": {
"name": "hr_staff_education_history_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"hr_staff_education_history_staff": {
"name": "hr_staff_education_history_staff",
"type": "INT",
"null": false,
"foreignTable": "hr_staff",
"foreignKey": "hr_staff_id"
},
"hr_staff_education_history_address": {
"name": "hr_staff_education_history_address",
"type": "TEXT",
"null": false
},
"hr_staff_education_history_title": {
"name": "hr_staff_education_history_title",
"type": "VARCHAR(255)",
"null": false
},
"hr_staff_education_history_passed": {
"name": "hr_staff_education_history_passed",
"type": "TINYINT",
"null": false
},
"hr_staff_education_history_score": {
"name": "hr_staff_education_history_score",
"type": "VARCHAR(255)",
"null": false
},
"hr_staff_education_history_start": {
"name": "hr_staff_education_history_start",
"type": "DATETIME",
"null": false
},
"hr_staff_education_history_end": {
"name": "hr_staff_education_history_end",
"type": "DATETIME",
"null": true,
"default": null
}
}
},
"hr_staff_education_history_media": {
"name": "hr_staff_education_history_media",
"fields": {
"hr_staff_education_history_media_id": {
"name": "hr_staff_education_history_media_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"hr_staff_education_history_media_item": {
"name": "hr_staff_education_history_media_item",
"type": "INT",
"null": false,
"foreignTable": "hr_staff_education_history",
"foreignKey": "hr_staff_education_history_id"
},
"hr_staff_education_history_media_media": {
"name": "hr_staff_education_history_media_media",
"type": "INT",
"null": false,
"foreignTable": "media",
"foreignKey": "media_id"
}
}
},
"hr_staff_work_history": {
"name": "hr_staff_work_history",
"fields": {
"hr_staff_work_history_id": {
"name": "hr_staff_work_history_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"hr_staff_work_history_staff": {
"name": "hr_staff_work_history_staff",
"type": "INT",
"null": false,
"foreignTable": "hr_staff",
"foreignKey": "hr_staff_id"
},
"hr_staff_work_history_address": {
"name": "hr_staff_work_history_address",
"type": "TEXT",
"null": false
},
"hr_staff_work_history_title": {
"name": "hr_staff_work_history_title",
"type": "VARCHAR(255)",
"null": false
},
"hr_staff_work_history_start": {
"name": "hr_staff_work_history_start",
"type": "DATETIME",
"null": false
},
"hr_staff_work_history_end": {
"name": "hr_staff_education_history_end",
"type": "DATETIME",
"null": true,
"default": null
}
}
},
"hr_staff_work_history_media": {
"name": "hr_staff_work_history_media",
"fields": {
"hr_staff_work_history_media_id": {
"name": "hr_staff_work_history_media_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"hr_staff_work_history_media_item": {
"name": "hr_staff_work_history_media_item",
"type": "INT",
"null": false,
"foreignTable": "hr_staff_work_history",
"foreignKey": "hr_staff_work_history_id"
},
"hr_staff_work_history_media_media": {
"name": "hr_staff_work_history_media_media",
"type": "INT",
"null": false,
"foreignTable": "media",
"foreignKey": "media_id"
}
}
}
}

View File

@ -18,6 +18,10 @@ use Modules\Admin\Models\Account;
use Modules\HumanResourceManagement\Models\Employee;
use Modules\HumanResourceManagement\Models\EmployeeHistory;
use Modules\HumanResourceManagement\Models\EmployeeHistoryMapper;
use Modules\HumanResourceManagement\Models\EmployeeEducationHistory;
use Modules\HumanResourceManagement\Models\EmployeeEducationHistoryMapper;
use Modules\HumanResourceManagement\Models\EmployeeWorkHistory;
use Modules\HumanResourceManagement\Models\EmployeeWorkHistoryMapper;
use Modules\HumanResourceManagement\Models\EmployeeMapper;
use Modules\Profile\Models\Profile;
use Modules\Profile\Models\ProfileMapper;
@ -26,6 +30,7 @@ use phpOMS\Message\NotificationLevel;
use phpOMS\Message\RequestAbstract;
use phpOMS\Message\ResponseAbstract;
use phpOMS\Model\Message\FormValidation;
use phpOMS\Stdlib\Base\AddressType;
/**
* HumanResourceManagement controller class.
@ -275,4 +280,164 @@ final class ApiController extends Controller
return $history;
}
/**
* Api method to create an employee history
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return void
*
* @api
*
* @since 1.0.0
*/
public function apiEmployeeWorkHistoryCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
{
if (!empty($val = $this->validateEmployeeWorkHistoryCreate($request))) {
$response->set('history_work_create', new FormValidation($val));
$response->header->status = RequestStatusCode::R_400;
return;
}
$history = $this->createEmployeeWorkHistoryFromRequest($request);
$this->createModel($request->header->account, $history, EmployeeWorkHistoryMapper::class, 'history', $request->getOrigin());
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'History', 'History successfully created', $history);
}
/**
* Validate employee history
*
* @param RequestAbstract $request Request
*
* @return array<string, bool>
*
* @since 1.0.0
*/
private function validateEmployeeWorkHistoryCreate(RequestAbstract $request) : array
{
$val = [];
if (($val['employee'] = empty($request->getData('employee')))
|| ($val['start'] = empty($request->getData('start')))
|| ($val['title'] = empty($request->getData('title')))
|| ($val['name'] = empty($request->getData('name')))
) {
return $val;
}
return [];
}
/**
* Method to create employee history from request.
*
* @param RequestAbstract $request Request
*
* @return EmployeeWorkHistory
*
* @since 1.0.0
*/
private function createEmployeeWorkHistoryFromRequest(RequestAbstract $request) : EmployeeWorkHistory
{
$history = new EmployeeWorkHistory((int) ($request->getData('employee') ?? 0));
$history->setStart(new \DateTime($request->getData('start') ?? 'now'));
$history->jobTitle = $request->getData('title');
$history->address->name = $request->getData('name');
$history->address->address = $request->getData('address') ?? '';
$history->address->postal = $request->getData('postal') ?? '';
$history->address->city = $request->getData('city') ?? '';
$history->address->state = $request->getData('state') ?? '';
$history->address->setCountry($request->getData('country') ?? '');
$history->address->setType(AddressType::WORK);
if (!empty($request->getData('end'))) {
$history->setEnd(new \DateTime($request->getData('end')));
}
return $history;
}
/**
* Api method to create an employee history
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return void
*
* @api
*
* @since 1.0.0
*/
public function apiEmployeeEducationHistoryCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
{
if (!empty($val = $this->validateEmployeeEducationHistoryCreate($request))) {
$response->set('history_education_create', new FormValidation($val));
$response->header->status = RequestStatusCode::R_400;
return;
}
$history = $this->createEmployeeEducationHistoryFromRequest($request);
$this->createModel($request->header->account, $history, EmployeeEducationHistoryMapper::class, 'history', $request->getOrigin());
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'History', 'History successfully created', $history);
}
/**
* Validate employee history
*
* @param RequestAbstract $request Request
*
* @return array<string, bool>
*
* @since 1.0.0
*/
private function validateEmployeeEducationHistoryCreate(RequestAbstract $request) : array
{
$val = [];
if (($val['employee'] = empty($request->getData('employee')))
|| ($val['start'] = empty($request->getData('start')))
|| ($val['title'] = empty($request->getData('title')))
|| ($val['name'] = empty($request->getData('name')))
) {
return $val;
}
return [];
}
/**
* Method to create employee history from request.
*
* @param RequestAbstract $request Request
*
* @return EmployeeEducationHistory
*
* @since 1.0.0
*/
private function createEmployeeEducationHistoryFromRequest(RequestAbstract $request) : EmployeeEducationHistory
{
$history = new EmployeeEducationHistory((int) ($request->getData('employee') ?? 0));
$history->setStart(new \DateTime($request->getData('start') ?? 'now'));
$history->educationTitle = $request->getData('title');
$history->score = $request->getData('score') ?? '';
$history->passed = (bool) ($request->getData('passed') ?? true);
$history->address->name = $request->getData('name');
$history->address->address = $request->getData('address') ?? '';
$history->address->postal = $request->getData('postal') ?? '';
$history->address->city = $request->getData('city') ?? '';
$history->address->state = $request->getData('state') ?? '';
$history->address->setCountry($request->getData('country') ?? '');
$history->address->setType(AddressType::EDUCATION);
if (!empty($request->getData('end'))) {
$history->setEnd(new \DateTime($request->getData('end')));
}
return $history;
}
}

View File

@ -49,7 +49,7 @@ final class BackendController extends Controller
$view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/staff-list');
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1002402001, $request, $response));
$view->setData('employees', EmployeeMapper::getAll(depth: 6));
$view->setData('employees', EmployeeMapper::getAll(depth: 4));
return $view;
}

View File

@ -54,6 +54,14 @@ class Employee implements \JsonSerializable, ArrayableInterface
*/
public $image = null;
/**
* Files.
*
* @var Media[]
* @since 1.0.0
*/
private array $files = [];
/**
* Employee department/position history.
*

View File

@ -15,6 +15,8 @@ declare(strict_types=1);
namespace Modules\HumanResourceManagement\Models;
use phpOMS\Contract\ArrayableInterface;
use Modules\Admin\Models\Address;
use Modules\Media\Models\Media;
/**
* Employee class.
@ -42,6 +44,22 @@ class EmployeeEducationHistory implements \JsonSerializable, ArrayableInterface
*/
private $employee = 0;
public Address $address;
public string $educationTitle = '';
public bool $passed = true;
public string $score = '';
/**
* Files.
*
* @var Media[]
* @since 1.0.0
*/
private array $files = [];
/**
* Start date
*
@ -69,6 +87,7 @@ class EmployeeEducationHistory implements \JsonSerializable, ArrayableInterface
{
$this->employee = $employee;
$this->start = new \DateTime('now');
$this->address = new Address();
}
/**

View File

@ -0,0 +1,90 @@
<?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package Modules\HumanResourceManagement\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\HumanResourceManagement\Models;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use Modules\Media\Models\MediaMapper;
/**
* EmployeHistory mapper class.
*
* @package Modules\HumanResourceManagement\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class EmployeeEducationHistoryMapper extends DataMapperAbstract
{
/**
* Columns.
*
* @var array<string, array{name:string, type:string, internal:string, autocomplete?:bool, readonly?:bool, writeonly?:bool, annotations?:array}>
* @since 1.0.0
*/
protected static array $columns = [
'hr_staff_education_history_id' => ['name' => 'hr_staff_education_history_id', 'type' => 'int', 'internal' => 'id'],
'hr_staff_education_history_staff' => ['name' => 'hr_staff_education_history_staff', 'type' => 'int', 'internal' => 'employee'],
'hr_staff_education_history_address' => ['name' => 'hr_staff_education_history_address', 'type' => 'Serializable', 'internal' => 'address'],
'hr_staff_education_history_title' => ['name' => 'hr_staff_education_history_title', 'type' => 'string', 'internal' => 'educationTitle'],
'hr_staff_education_history_passed' => ['name' => 'hr_staff_education_history_passed', 'type' => 'bool', 'internal' => 'passed'],
'hr_staff_education_history_score' => ['name' => 'hr_staff_education_history_score', 'type' => 'string', 'internal' => 'score'],
'hr_staff_education_history_start' => ['name' => 'hr_staff_education_history_start', 'type' => 'DateTime', 'internal' => 'start'],
'hr_staff_education_history_end' => ['name' => 'hr_staff_education_history_end', 'type' => 'DateTime', 'internal' => 'end'],
];
/**
* Belongs to.
*
* @var array<string, array{mapper:string, external:string}>
* @since 1.0.0
*/
protected static array $belongsTo = [
'employee' => [
'mapper' => EmployeeMapper::class,
'external' => 'hr_staff_education_history_staff',
],
];
/**
* Has many relation.
*
* @var array<string, array{mapper:string, table:string, self?:?string, external?:?string, column?:string}>
* @since 1.0.0
*/
protected static array $hasMany = [
'files' => [
'mapper' => MediaMapper::class, /* mapper of the related object */
'table' => 'hr_staff_work_history_media', /* table of the related object, null if no relation table is used (many->1) */
'external' => 'hr_staff_work_history_media_media',
'self' => 'hr_staff_work_history_media_item',
],
];
/**
* Primary field name.
*
* @var string
* @since 1.0.0
*/
protected static string $primaryField = 'hr_staff_education_history_id';
/**
* Primary table.
*
* @var string
* @since 1.0.0
*/
protected static string $table = 'hr_staff_education_history';
}

View File

@ -21,6 +21,7 @@ use Modules\Organization\Models\NullUnit;
use Modules\Organization\Models\Position;
use Modules\Organization\Models\Unit;
use phpOMS\Contract\ArrayableInterface;
use Modules\Media\Models\Media;
/**
* Employee class.
@ -72,6 +73,14 @@ class EmployeeHistory implements \JsonSerializable, ArrayableInterface
*/
private $position = null;
/**
* Files.
*
* @var Media[]
* @since 1.0.0
*/
private array $files = [];
/**
* Start date
*

View File

@ -18,6 +18,7 @@ use Modules\Organization\Models\DepartmentMapper;
use Modules\Organization\Models\PositionMapper;
use Modules\Organization\Models\UnitMapper;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use Modules\Media\Models\MediaMapper;
/**
* EmployeHistory mapper class.
@ -70,6 +71,21 @@ final class EmployeeHistoryMapper extends DataMapperAbstract
],
];
/**
* Has many relation.
*
* @var array<string, array{mapper:string, table:string, self?:?string, external?:?string, column?:string}>
* @since 1.0.0
*/
protected static array $hasMany = [
'files' => [
'mapper' => MediaMapper::class, /* mapper of the related object */
'table' => 'hr_staff_work_history_media', /* table of the related object, null if no relation table is used (many->1) */
'external' => 'hr_staff_work_history_media_media',
'self' => 'hr_staff_work_history_media_item',
],
];
/**
* Primary field name.
*

View File

@ -76,12 +76,30 @@ final class EmployeeMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static array $hasMany = [
'files' => [
'mapper' => MediaMapper::class, /* mapper of the related object */
'table' => 'hr_staff_media', /* table of the related object, null if no relation table is used (many->1) */
'external' => 'hr_staff_media_media',
'self' => 'hr_staff_media_item',
],
'companyHistory' => [
'mapper' => EmployeeHistoryMapper::class,
'table' => 'hr_staff_history', // @todo: is this requried? This is stored in the mapper already. In other places I'm not using this, either use it everywhere or nowhere. Using the mapper is slower but protects us from table name changes!
'self' => 'hr_staff_history_staff',
'external' => null,
],
'workHistory' => [
'mapper' => EmployeeWorkHistoryMapper::class,
'table' => 'hr_staff_work_history', // @todo: is this requried? This is stored in the mapper already. In other places I'm not using this, either use it everywhere or nowhere. Using the mapper is slower but protects us from table name changes!
'self' => 'hr_staff_work_history_staff',
'external' => null,
],
'educationHistory' => [
'mapper' => EmployeeEducationHistoryMapper::class,
'table' => 'hr_staff_education_history', // @todo: is this requried? This is stored in the mapper already. In other places I'm not using this, either use it everywhere or nowhere. Using the mapper is slower but protects us from table name changes!
'self' => 'hr_staff_education_history_staff',
'external' => null,
],
];
/**

View File

@ -15,6 +15,8 @@ declare(strict_types=1);
namespace Modules\HumanResourceManagement\Models;
use phpOMS\Contract\ArrayableInterface;
use Modules\Admin\Models\Address;
use Modules\Media\Models\Media;
/**
* Employee class.
@ -42,6 +44,18 @@ class EmployeeWorkHistory implements \JsonSerializable, ArrayableInterface
*/
private $employee = 0;
public Address $address;
public string $jobTitle = '';
/**
* Files.
*
* @var Media[]
* @since 1.0.0
*/
private array $files = [];
/**
* Start date
*
@ -69,6 +83,7 @@ class EmployeeWorkHistory implements \JsonSerializable, ArrayableInterface
{
$this->employee = $employee;
$this->start = new \DateTime('now');
$this->address = new Address();
}
/**

View File

@ -0,0 +1,88 @@
<?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package Modules\HumanResourceManagement\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\HumanResourceManagement\Models;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use Modules\Media\Models\MediaMapper;
/**
* EmployeHistory mapper class.
*
* @package Modules\HumanResourceManagement\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class EmployeeWorkHistoryMapper extends DataMapperAbstract
{
/**
* Columns.
*
* @var array<string, array{name:string, type:string, internal:string, autocomplete?:bool, readonly?:bool, writeonly?:bool, annotations?:array}>
* @since 1.0.0
*/
protected static array $columns = [
'hr_staff_work_history_id' => ['name' => 'hr_staff_work_history_id', 'type' => 'int', 'internal' => 'id'],
'hr_staff_work_history_staff' => ['name' => 'hr_staff_work_history_staff', 'type' => 'int', 'internal' => 'employee'],
'hr_staff_work_history_address' => ['name' => 'hr_staff_work_history_address', 'type' => 'Serializable', 'internal' => 'address'],
'hr_staff_work_history_title' => ['name' => 'hr_staff_work_history_title', 'type' => 'string', 'internal' => 'jobTitle'],
'hr_staff_work_history_start' => ['name' => 'hr_staff_work_history_start', 'type' => 'DateTime', 'internal' => 'start'],
'hr_staff_work_history_end' => ['name' => 'hr_staff_work_history_end', 'type' => 'DateTime', 'internal' => 'end'],
];
/**
* Belongs to.
*
* @var array<string, array{mapper:string, external:string}>
* @since 1.0.0
*/
protected static array $belongsTo = [
'employee' => [
'mapper' => EmployeeMapper::class,
'external' => 'hr_staff_work_history_staff',
],
];
/**
* Has many relation.
*
* @var array<string, array{mapper:string, table:string, self?:?string, external?:?string, column?:string}>
* @since 1.0.0
*/
protected static array $hasMany = [
'files' => [
'mapper' => MediaMapper::class, /* mapper of the related object */
'table' => 'hr_staff_work_history_media', /* table of the related object, null if no relation table is used (many->1) */
'external' => 'hr_staff_work_history_media_media',
'self' => 'hr_staff_work_history_media_item',
],
];
/**
* Primary field name.
*
* @var string
* @since 1.0.0
*/
protected static string $primaryField = 'hr_staff_work_history_id';
/**
* Primary table.
*
* @var string
* @since 1.0.0
*/
protected static string $table = 'hr_staff_work_history';
}

View File

@ -17,7 +17,9 @@ use Modules\Media\Models\NullMedia;
use phpOMS\Uri\UriFactory;
$employee = $this->getData('employee');
$history = $employee->getHistorY();
$history = $employee->getHistory();
$education = $employee->getEducationHistory();
$work = $employee->getWorkHistory();
$recentHistory = $employee->getNewestHistory();
echo $this->getData('nav')->render(); ?>
@ -40,9 +42,9 @@ echo $this->getData('nav')->render(); ?>
<div class="tab">
<div class="row">
<div class="col-xs-12 col-md-6">
<section itemscope itemtype="http://schema.org/Person" class="box wf-100">
<header><h1><span itemprop="familyName"><?= $this->printHtml($employee->profile->account->name2); ?></span>, <span itemprop="givenName"><?= $this->printHtml($employee->profile->account->name1); ?></span></h1></header>
<div class="inner">
<section itemscope itemtype="http://schema.org/Person" class="portlet">
<div class="portlet-head"><span itemprop="familyName"><?= $this->printHtml($employee->profile->account->name2); ?></span>, <span itemprop="givenName"><?= $this->printHtml($employee->profile->account->name1); ?></span></div>
<div class="portlet-body">
<!-- @formatter:off -->
<span class="rf">
<img class="m-profile rf"
@ -50,9 +52,9 @@ echo $this->getData('nav')->render(); ?>
itemprop="logo" loading="lazy"
src="<?=
$employee->image instanceof NullMedia ?
$employee->profile->image instanceof NullMedia ?
($employee->profile->image instanceof NullMedia ?
UriFactory::build('Web/Backend/img/user_default_' . \mt_rand(1, 6) .'.png') :
UriFactory::build('{/prefix}' . $employee->profile->image->getPath()) :
UriFactory::build('{/prefix}' . $employee->profile->image->getPath())) :
UriFactory::build('{/prefix}' . $employee->image->getPath()); ?>"
>
</span>
@ -105,9 +107,9 @@ echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12">
<div class="box wf-100 x-overflow">
<div class="portlet x-overflow">
<div class="portlet-head"><?= $this->getHtml('History'); ?><i class="fa fa-download floatRight download btn"></i></div>
<table id="historyList" class="default">
<caption><?= $this->getHtml('History'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead>
<td><?= $this->getHtml('Start'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('End'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
@ -132,9 +134,9 @@ echo $this->getData('nav')->render(); ?>
<div class="tab">
<div class="row">
<div class="col-xs-12">
<section class="box wf-100">
<header><h1><?= $this->getHtml('Clocking'); ?></h1></header>
<div class="inner">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Clocking'); ?></div>
<div class="portlet-body">
</div>
</section>
</div>
@ -144,9 +146,9 @@ echo $this->getData('nav')->render(); ?>
<div class="tab">
<div class="row">
<div class="col-xs-12">
<section class="box wf-100">
<header><h1><?= $this->getHtml('Clocking'); ?></h1></header>
<div class="inner">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Documents'); ?></div>
<div class="portlet-body">
</div>
</section>
</div>
@ -156,9 +158,9 @@ echo $this->getData('nav')->render(); ?>
<div class="tab">
<div class="row">
<div class="col-xs-12">
<section class="box wf-100">
<header><h1><?= $this->getHtml('Clocking'); ?></h1></header>
<div class="inner">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Contracts'); ?></div>
<div class="portlet-body">
</div>
</section>
</div>
@ -168,9 +170,9 @@ echo $this->getData('nav')->render(); ?>
<div class="tab">
<div class="row">
<div class="col-xs-12">
<section class="box wf-100">
<header><h1><?= $this->getHtml('Clocking'); ?></h1></header>
<div class="inner">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Remarks'); ?></div>
<div class="portlet-body">
</div>
</section>
</div>
@ -180,9 +182,9 @@ echo $this->getData('nav')->render(); ?>
<div class="tab">
<div class="row">
<div class="col-xs-12">
<section class="box wf-100">
<header><h1><?= $this->getHtml('Clocking'); ?></h1></header>
<div class="inner">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Evaluations'); ?></div>
<div class="portlet-body">
</div>
</section>
</div>
@ -192,11 +194,24 @@ echo $this->getData('nav')->render(); ?>
<div class="tab">
<div class="row">
<div class="col-xs-12">
<section class="box wf-100">
<header><h1><?= $this->getHtml('Clocking'); ?></h1></header>
<div class="inner">
</div>
</section>
<div class="portlet x-overflow">
<div class="portlet-head"><?= $this->getHtml('Education'); ?><i class="fa fa-download floatRight download btn"></i></div>
<table id="historyList" class="default">
<thead>
<td><?= $this->getHtml('Start'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('End'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Title'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Address'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<tfoot>
<tbody>
<?php foreach ($education as $hist) : ?>
<tr><td><?= $hist->getStart()->format('Y-m-d'); ?>
<td><?= $hist->getEnd() === null ? '' : $hist->getEnd()->format('Y-m-d'); ?>
<td><?= $this->printHtml($hist->educationTitle); ?>
<td><?= $this->printHtml($hist->address->name); ?>
<?php endforeach; ?>
</table>
</div>
</div>
</div>
</div>
@ -204,11 +219,24 @@ echo $this->getData('nav')->render(); ?>
<div class="tab">
<div class="row">
<div class="col-xs-12">
<section class="box wf-100">
<header><h1><?= $this->getHtml('Clocking'); ?></h1></header>
<div class="inner">
</div>
</section>
<div class="portlet x-overflow">
<div class="portlet-head"><?= $this->getHtml('Work'); ?><i class="fa fa-download floatRight download btn"></i></div>
<table id="historyList" class="default">
<thead>
<td><?= $this->getHtml('Start'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('End'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Title'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Address'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<tfoot>
<tbody>
<?php foreach ($work as $hist) : ?>
<tr><td><?= $hist->getStart()->format('Y-m-d'); ?>
<td><?= $hist->getEnd() === null ? '' : $hist->getEnd()->format('Y-m-d'); ?>
<td><?= $this->printHtml($hist->jobTitle); ?>
<td><?= $this->printHtml($hist->address->name); ?>
<?php endforeach; ?>
</table>
</div>
</div>
</div>
</div>