fixes
This commit is contained in:
@@ -24,11 +24,14 @@ class DeliveriesDataTable extends DataTable
|
||||
'value' => $delivery->active,
|
||||
'on' => __('active'),
|
||||
'off' => __('inactive'),
|
||||
'meta' => 'data-id='.$delivery->id,
|
||||
'meta' => 'data-id=' . $delivery->id,
|
||||
'size' => 'sm',
|
||||
]);
|
||||
})
|
||||
->rawColumns(['active', 'action']);
|
||||
->editColumn('address', function (Delivery $delivery) {
|
||||
return $delivery->address . ' ' . $delivery->zipcode . ' ' . $delivery->city;
|
||||
})
|
||||
->rawColumns(['active', 'address', 'action']);
|
||||
return parent::modifier($datatables);
|
||||
}
|
||||
|
||||
@@ -38,9 +41,7 @@ class DeliveriesDataTable extends DataTable
|
||||
Column::make('active')->title(__('active'))->width(60)->class('text-center'),
|
||||
Column::make('name')->title('Nom'),
|
||||
Column::make('sale_channel.name')->title(__('shop.sale_channels.name')),
|
||||
Column::make('address')->title('Adresse'),
|
||||
Column::make('zipcode')->title('Code postal'),
|
||||
Column::make('city')->title('Ville'),
|
||||
Column::make('address')->title('Adresse')->searchable(false),
|
||||
$this->makeColumnButtons(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ class Customer extends Model
|
||||
return $this->hasMany(Invoice::class);
|
||||
}
|
||||
|
||||
public function Deliveries()
|
||||
public function Delivery()
|
||||
{
|
||||
return $this->hasMany(Delivery::class);
|
||||
return $this->belongsTo(Delivery::class);
|
||||
}
|
||||
|
||||
public function Orders()
|
||||
|
||||
Reference in New Issue
Block a user