Refactor datatable sort columns

This commit is contained in:
Hillel Coren 2016-11-24 11:46:57 +02:00
parent 5c6c9e399b
commit eb710348bf
13 changed files with 6 additions and 7 deletions

View File

@ -53,7 +53,6 @@ class ExpenseController extends BaseController
'entityType' => ENTITY_EXPENSE,
'datatable' => new ExpenseDatatable(),
'title' => trans('texts.expenses'),
'sortCol' => '3',
]);
}

View File

@ -58,7 +58,6 @@ class InvoiceController extends BaseController
$data = [
'title' => trans('texts.invoices'),
'entityType' => ENTITY_INVOICE,
'sortCol' => '3',
'statuses' => Invoice::getStatuses(),
'datatable' => new InvoiceDatatable(),
];

View File

@ -64,7 +64,6 @@ class PaymentController extends BaseController
'entityType' => ENTITY_PAYMENT,
'datatable' => new PaymentDatatable(),
'title' => trans('texts.payments'),
'sortCol' => '7',
]);
}

View File

@ -44,7 +44,6 @@ class ProductController extends BaseController
'datatable' => new ProductDatatable(),
'title' => trans('texts.products'),
'statuses' => Product::getStatuses(),
'sortCol' => '4',
]);
}

View File

@ -49,7 +49,6 @@ class QuoteController extends BaseController
'title' => trans('texts.quotes'),
'entityType' => ENTITY_QUOTE,
'datatable' => $datatable,
'sortCol' => '3',
];
return response()->view('list_wrapper', $data);

View File

@ -71,7 +71,6 @@ class TaskController extends BaseController
'entityType' => ENTITY_TASK,
'datatable' => new TaskDatatable(),
'title' => trans('texts.tasks'),
'sortCol' => '2',
]);
}

View File

@ -42,7 +42,6 @@ class VendorController extends BaseController
'entityType' => 'vendor',
'datatable' => new VendorDatatable(),
'title' => trans('texts.vendors'),
'sortCol' => '4',
]);
}

View File

@ -7,6 +7,7 @@ use Auth;
class ExpenseDatatable extends EntityDatatable
{
public $entityType = ENTITY_EXPENSE;
public $sortCol = 3;
public function columns()
{

View File

@ -7,6 +7,7 @@ use Auth;
class InvoiceDatatable extends EntityDatatable
{
public $entityType = ENTITY_INVOICE;
public $sortCol = 3;
public function columns()
{

View File

@ -8,6 +8,7 @@ use App\Models\PaymentMethod;
class PaymentDatatable extends EntityDatatable
{
public $entityType = ENTITY_PAYMENT;
public $sortCol = 7;
protected static $refundableGateways = [
GATEWAY_STRIPE,

View File

@ -8,6 +8,7 @@ use Str;
class ProductDatatable extends EntityDatatable
{
public $entityType = ENTITY_PRODUCT;
public $sortCol = 4;
public function columns()
{

View File

@ -8,6 +8,7 @@ use App\Models\Task;
class TaskDatatable extends EntityDatatable
{
public $entityType = ENTITY_TASK;
public $sortCol = 2;
public function columns()
{

View File

@ -7,6 +7,7 @@ use Auth;
class VendorDatatable extends EntityDatatable
{
public $entityType = ENTITY_VENDOR;
public $sortCol = 4;
public function columns()
{