fix orders datatables on profile, fix deliveries for profile (public & active)
This commit is contained in:
@@ -18,10 +18,16 @@ class CustomerOrdersDataTable extends DataTable
|
||||
|
||||
public $stateSave = true;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->url = route('Shop.Orders.index');
|
||||
}
|
||||
|
||||
|
||||
public function query(Order $model)
|
||||
{
|
||||
$customer_id = Auth::id();
|
||||
$model = $model->byCustomer($customer_id)->with(['delivery']);
|
||||
$customerId = Auth::id();
|
||||
$model = $model->byCustomer($customerId)->with(['delivery']);
|
||||
|
||||
return $this->buildQuery($model);
|
||||
}
|
||||
@@ -46,8 +52,8 @@ class CustomerOrdersDataTable extends DataTable
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
Column::make('ref')->title('Ref'),
|
||||
Column::make('status')->title('Statut'),
|
||||
Column::make('ref')->title('Ref'),
|
||||
Column::make('created_at')->title('Date'),
|
||||
Column::make('payment_type')->title('Règlement'),
|
||||
Column::make('total_shipped')->title('Montant')->class('text-right'),
|
||||
|
||||
Reference in New Issue
Block a user