minor fixes
This commit is contained in:
@@ -13,10 +13,18 @@ class DeliveriesDataTable extends DataTable
|
||||
public function query(Delivery $model)
|
||||
{
|
||||
$model = $model->with('sale_channel');
|
||||
$model = self::filterBySaleChannel($model);
|
||||
|
||||
return $this->buildQuery($model);
|
||||
}
|
||||
|
||||
public static function filterBySaleChannel($model, $sale_channel_id = false)
|
||||
{
|
||||
$sale_channel_id = $sale_channel_id ? $sale_channel_id : self::isFilteredByField('sale_channel_id');
|
||||
|
||||
return $sale_channel_id ? $model->bySaleChannel($sale_channel_id) : $model;
|
||||
}
|
||||
|
||||
public function modifier($datatables)
|
||||
{
|
||||
$datatables
|
||||
@@ -26,7 +34,7 @@ class DeliveriesDataTable extends DataTable
|
||||
'on' => __('active'),
|
||||
'off' => __('inactive'),
|
||||
'meta' => 'data-id='.$delivery->id,
|
||||
'size' => 'sm',
|
||||
'size' => 'xs',
|
||||
]);
|
||||
})
|
||||
->editColumn('is_public', function (Delivery $delivery) {
|
||||
|
||||
Reference in New Issue
Block a user