coding style
This commit is contained in:
@@ -4,8 +4,8 @@ namespace App\Datatables\Admin\Shop;
|
||||
|
||||
use App\Datatables\ParentDataTable as DataTable;
|
||||
use App\Models\Shop\Article;
|
||||
use App\Repositories\Shop\Articles;
|
||||
use App\Repositories\Shop\ArticleImages;
|
||||
use App\Repositories\Shop\Articles;
|
||||
use App\Repositories\Shop\Tags;
|
||||
use Yajra\DataTables\Html\Column;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ class ParentDataTable extends DataTable
|
||||
]);
|
||||
}
|
||||
|
||||
public function getButtonDel($field ='id', $title = 'Effacer')
|
||||
public function getButtonDel($field = 'id', $title = 'Effacer')
|
||||
{
|
||||
return view('components.form.buttons.delete', [
|
||||
'dataId' => '{{$'.$field.'}}',
|
||||
|
||||
@@ -41,7 +41,7 @@ class CustomerInvoicesDataTable extends DataTable
|
||||
'class' => 'btn-sm btn-secondary btn-invoice mr-2',
|
||||
'icon' => 'fa-file-pdf',
|
||||
'title' => 'Télécharger la facture',
|
||||
'url' => route('Shop.Invoices.pdf') . '/{{$uuid}}',
|
||||
'url' => route('Shop.Invoices.pdf').'/{{$uuid}}',
|
||||
]);
|
||||
|
||||
$buttons .= self::getButtonShow('uuid', 'Voir la facture');
|
||||
|
||||
@@ -29,6 +29,7 @@ class InvoicesDataTable extends DataTable
|
||||
})
|
||||
->editColumn('customer.last_name', function (Invoice $invoice) {
|
||||
$customer = $invoice->customer ?? false;
|
||||
|
||||
return $customer ? $customer->last_name.' '.$customer->first_name : '';
|
||||
})
|
||||
->rawColumns(['action']);
|
||||
|
||||
Reference in New Issue
Block a user