mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -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,
|
'entityType' => ENTITY_EXPENSE,
|
||||||
'datatable' => new ExpenseDatatable(),
|
'datatable' => new ExpenseDatatable(),
|
||||||
'title' => trans('texts.expenses'),
|
'title' => trans('texts.expenses'),
|
||||||
'sortCol' => '3',
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,6 @@ class InvoiceController extends BaseController
|
|||||||
$data = [
|
$data = [
|
||||||
'title' => trans('texts.invoices'),
|
'title' => trans('texts.invoices'),
|
||||||
'entityType' => ENTITY_INVOICE,
|
'entityType' => ENTITY_INVOICE,
|
||||||
'sortCol' => '3',
|
|
||||||
'statuses' => Invoice::getStatuses(),
|
'statuses' => Invoice::getStatuses(),
|
||||||
'datatable' => new InvoiceDatatable(),
|
'datatable' => new InvoiceDatatable(),
|
||||||
];
|
];
|
||||||
|
@ -64,7 +64,6 @@ class PaymentController extends BaseController
|
|||||||
'entityType' => ENTITY_PAYMENT,
|
'entityType' => ENTITY_PAYMENT,
|
||||||
'datatable' => new PaymentDatatable(),
|
'datatable' => new PaymentDatatable(),
|
||||||
'title' => trans('texts.payments'),
|
'title' => trans('texts.payments'),
|
||||||
'sortCol' => '7',
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,6 @@ class ProductController extends BaseController
|
|||||||
'datatable' => new ProductDatatable(),
|
'datatable' => new ProductDatatable(),
|
||||||
'title' => trans('texts.products'),
|
'title' => trans('texts.products'),
|
||||||
'statuses' => Product::getStatuses(),
|
'statuses' => Product::getStatuses(),
|
||||||
'sortCol' => '4',
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,6 @@ class QuoteController extends BaseController
|
|||||||
'title' => trans('texts.quotes'),
|
'title' => trans('texts.quotes'),
|
||||||
'entityType' => ENTITY_QUOTE,
|
'entityType' => ENTITY_QUOTE,
|
||||||
'datatable' => $datatable,
|
'datatable' => $datatable,
|
||||||
'sortCol' => '3',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return response()->view('list_wrapper', $data);
|
return response()->view('list_wrapper', $data);
|
||||||
|
@ -71,7 +71,6 @@ class TaskController extends BaseController
|
|||||||
'entityType' => ENTITY_TASK,
|
'entityType' => ENTITY_TASK,
|
||||||
'datatable' => new TaskDatatable(),
|
'datatable' => new TaskDatatable(),
|
||||||
'title' => trans('texts.tasks'),
|
'title' => trans('texts.tasks'),
|
||||||
'sortCol' => '2',
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,6 @@ class VendorController extends BaseController
|
|||||||
'entityType' => 'vendor',
|
'entityType' => 'vendor',
|
||||||
'datatable' => new VendorDatatable(),
|
'datatable' => new VendorDatatable(),
|
||||||
'title' => trans('texts.vendors'),
|
'title' => trans('texts.vendors'),
|
||||||
'sortCol' => '4',
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ use Auth;
|
|||||||
class ExpenseDatatable extends EntityDatatable
|
class ExpenseDatatable extends EntityDatatable
|
||||||
{
|
{
|
||||||
public $entityType = ENTITY_EXPENSE;
|
public $entityType = ENTITY_EXPENSE;
|
||||||
|
public $sortCol = 3;
|
||||||
|
|
||||||
public function columns()
|
public function columns()
|
||||||
{
|
{
|
||||||
|
@ -7,6 +7,7 @@ use Auth;
|
|||||||
class InvoiceDatatable extends EntityDatatable
|
class InvoiceDatatable extends EntityDatatable
|
||||||
{
|
{
|
||||||
public $entityType = ENTITY_INVOICE;
|
public $entityType = ENTITY_INVOICE;
|
||||||
|
public $sortCol = 3;
|
||||||
|
|
||||||
public function columns()
|
public function columns()
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,7 @@ use App\Models\PaymentMethod;
|
|||||||
class PaymentDatatable extends EntityDatatable
|
class PaymentDatatable extends EntityDatatable
|
||||||
{
|
{
|
||||||
public $entityType = ENTITY_PAYMENT;
|
public $entityType = ENTITY_PAYMENT;
|
||||||
|
public $sortCol = 7;
|
||||||
|
|
||||||
protected static $refundableGateways = [
|
protected static $refundableGateways = [
|
||||||
GATEWAY_STRIPE,
|
GATEWAY_STRIPE,
|
||||||
|
@ -8,6 +8,7 @@ use Str;
|
|||||||
class ProductDatatable extends EntityDatatable
|
class ProductDatatable extends EntityDatatable
|
||||||
{
|
{
|
||||||
public $entityType = ENTITY_PRODUCT;
|
public $entityType = ENTITY_PRODUCT;
|
||||||
|
public $sortCol = 4;
|
||||||
|
|
||||||
public function columns()
|
public function columns()
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,7 @@ use App\Models\Task;
|
|||||||
class TaskDatatable extends EntityDatatable
|
class TaskDatatable extends EntityDatatable
|
||||||
{
|
{
|
||||||
public $entityType = ENTITY_TASK;
|
public $entityType = ENTITY_TASK;
|
||||||
|
public $sortCol = 2;
|
||||||
|
|
||||||
public function columns()
|
public function columns()
|
||||||
{
|
{
|
||||||
|
@ -7,6 +7,7 @@ use Auth;
|
|||||||
class VendorDatatable extends EntityDatatable
|
class VendorDatatable extends EntityDatatable
|
||||||
{
|
{
|
||||||
public $entityType = ENTITY_VENDOR;
|
public $entityType = ENTITY_VENDOR;
|
||||||
|
public $sortCol = 4;
|
||||||
|
|
||||||
public function columns()
|
public function columns()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user