allow to order tables by more fields (#1902)

This commit is contained in:
Kevin Papst
2020-08-21 10:48:57 +02:00
committed by GitHub
parent af4101c9fe
commit e6d01f2a23
6 changed files with 28 additions and 22 deletions

View File

@@ -16,7 +16,7 @@ use App\Entity\Project;
*/
class ActivityQuery extends ProjectQuery
{
public const ACTIVITY_ORDER_ALLOWED = ['id', 'name', 'comment', 'customer', 'project'];
public const ACTIVITY_ORDER_ALLOWED = ['id', 'name', 'comment', 'customer', 'project', 'visible'];
/**
* @var Project[]|int[]

View File

@@ -16,7 +16,10 @@ class CustomerQuery extends BaseQuery implements VisibilityInterface
{
use VisibilityTrait;
public const CUSTOMER_ORDER_ALLOWED = ['id', 'name', 'comment', 'country', 'number'];
public const CUSTOMER_ORDER_ALLOWED = [
'id', 'name', 'comment', 'country', 'number', 'homepage', 'email', 'mobile', 'fax',
'phone', 'currency', 'address', 'contact', 'company', 'vatId', 'visible'
];
public function __construct()
{

View File

@@ -18,7 +18,10 @@ class ProjectQuery extends BaseQuery implements VisibilityInterface
{
use VisibilityTrait;
public const PROJECT_ORDER_ALLOWED = ['id', 'name', 'comment', 'customer', 'orderNumber', 'projectStart', 'projectEnd'];
public const PROJECT_ORDER_ALLOWED = [
'id', 'name', 'comment', 'customer', 'orderNumber', 'projectStart',
'projectEnd', 'orderNumber', 'orderDate', 'start', 'end', 'visible'
];
/**
* @var array