chg: [auditLogs:index] Added possibility to view and filter logs base on `created` field

pull/121/head
Sami Mokaddem 2022-11-14 16:11:18 +01:00
parent 0b26bd629f
commit 62c228c44e
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
2 changed files with 7 additions and 2 deletions

View File

@ -8,11 +8,10 @@ use Cake\ORM\TableRegistry;
use \Cake\Database\Expression\QueryExpression;
use Cake\Http\Exception\UnauthorizedException;
use Cake\Core\Configure;
use PhpParser\Node\Stmt\Echo_;
class AuditLogsController extends AppController
{
public $filterFields = ['model_id', 'model', 'request_action', 'user_id', 'model_title'];
public $filterFields = ['model_id', 'model', 'request_action', 'user_id', 'model_title', 'AuditLogs.created'];
public $quickFilterFields = ['model', 'request_action', 'model_title'];
public $containFields = ['Users'];

View File

@ -28,6 +28,12 @@ echo $this->element('genericElements/IndexTable/index_table', [
'sort' => 'request_ip',
'data_path' => 'request_ip',
],
[
'name' => 'created',
'sort' => 'created',
'data_path' => 'created',
'element' => 'datetime'
],
[
'name' => __('Username'),
'sort' => 'user.username',