mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 23:14:33 -04:00
Refactor datatable sort columns
This commit is contained in:
parent
5c6c9e399b
commit
eb710348bf
@ -53,7 +53,6 @@ class ExpenseController extends BaseController
|
||||
'entityType' => ENTITY_EXPENSE,
|
||||
'datatable' => new ExpenseDatatable(),
|
||||
'title' => trans('texts.expenses'),
|
||||
'sortCol' => '3',
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,6 @@ class InvoiceController extends BaseController
|
||||
$data = [
|
||||
'title' => trans('texts.invoices'),
|
||||
'entityType' => ENTITY_INVOICE,
|
||||
'sortCol' => '3',
|
||||
'statuses' => Invoice::getStatuses(),
|
||||
'datatable' => new InvoiceDatatable(),
|
||||
];
|
||||
|
@ -64,7 +64,6 @@ class PaymentController extends BaseController
|
||||
'entityType' => ENTITY_PAYMENT,
|
||||
'datatable' => new PaymentDatatable(),
|
||||
'title' => trans('texts.payments'),
|
||||
'sortCol' => '7',
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,6 @@ class ProductController extends BaseController
|
||||
'datatable' => new ProductDatatable(),
|
||||
'title' => trans('texts.products'),
|
||||
'statuses' => Product::getStatuses(),
|
||||
'sortCol' => '4',
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -71,7 +71,6 @@ class TaskController extends BaseController
|
||||
'entityType' => ENTITY_TASK,
|
||||
'datatable' => new TaskDatatable(),
|
||||
'title' => trans('texts.tasks'),
|
||||
'sortCol' => '2',
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,6 @@ class VendorController extends BaseController
|
||||
'entityType' => 'vendor',
|
||||
'datatable' => new VendorDatatable(),
|
||||
'title' => trans('texts.vendors'),
|
||||
'sortCol' => '4',
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ use Auth;
|
||||
class ExpenseDatatable extends EntityDatatable
|
||||
{
|
||||
public $entityType = ENTITY_EXPENSE;
|
||||
public $sortCol = 3;
|
||||
|
||||
public function columns()
|
||||
{
|
||||
|
@ -7,6 +7,7 @@ use Auth;
|
||||
class InvoiceDatatable extends EntityDatatable
|
||||
{
|
||||
public $entityType = ENTITY_INVOICE;
|
||||
public $sortCol = 3;
|
||||
|
||||
public function columns()
|
||||
{
|
||||
|
@ -8,6 +8,7 @@ use App\Models\PaymentMethod;
|
||||
class PaymentDatatable extends EntityDatatable
|
||||
{
|
||||
public $entityType = ENTITY_PAYMENT;
|
||||
public $sortCol = 7;
|
||||
|
||||
protected static $refundableGateways = [
|
||||
GATEWAY_STRIPE,
|
||||
|
@ -8,6 +8,7 @@ use Str;
|
||||
class ProductDatatable extends EntityDatatable
|
||||
{
|
||||
public $entityType = ENTITY_PRODUCT;
|
||||
public $sortCol = 4;
|
||||
|
||||
public function columns()
|
||||
{
|
||||
|
@ -8,6 +8,7 @@ use App\Models\Task;
|
||||
class TaskDatatable extends EntityDatatable
|
||||
{
|
||||
public $entityType = ENTITY_TASK;
|
||||
public $sortCol = 2;
|
||||
|
||||
public function columns()
|
||||
{
|
||||
|
@ -7,6 +7,7 @@ use Auth;
|
||||
class VendorDatatable extends EntityDatatable
|
||||
{
|
||||
public $entityType = ENTITY_VENDOR;
|
||||
public $sortCol = 4;
|
||||
|
||||
public function columns()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user