[WIP] Refactor architecture, models
This commit is contained in:
@@ -23,7 +23,7 @@ class GenresDataTable extends DataTable
|
||||
Column::make('alias'),
|
||||
Column::make('latin'),
|
||||
Column::make('family.name'),
|
||||
Column::make('species_count')->title('Nb Espèces'),
|
||||
Column::make('species_count')->title('Nb Espèces')->searchable(false),
|
||||
Column::computed('action')
|
||||
->exportable(false)
|
||||
->printable(false)
|
||||
|
||||
@@ -21,9 +21,9 @@ class SpeciesDataTable extends DataTable
|
||||
return [
|
||||
Column::make('name')->title('Nom'),
|
||||
Column::make('alias'),
|
||||
Column::make('genre_name'),
|
||||
Column::make('genre.name'),
|
||||
Column::make('latin'),
|
||||
Column::make('varieties_count')->title('Nb variétés'),
|
||||
Column::make('varieties_count')->title('Nb variétés')->searchable(false),
|
||||
Column::computed('action')
|
||||
->exportable(false)
|
||||
->printable(false)
|
||||
|
||||
@@ -19,8 +19,8 @@ class VarietiesDataTable extends DataTable
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
Column::make('specie_name'),
|
||||
Column::make('name'),
|
||||
Column::make('specie_name')->title('Espèce'),
|
||||
Column::make('name')->title('Nom'),
|
||||
Column::computed('action')
|
||||
->exportable(false)
|
||||
->printable(false)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\DataTables;
|
||||
namespace App\DataTables\Shop;
|
||||
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use App\DataTables\ParentDataTable as DataTable;
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\DataTables;
|
||||
namespace App\DataTables\Shop;
|
||||
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use App\DataTables\ParentDataTable as DataTable;
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\DataTables;
|
||||
namespace App\DataTables\Shop;
|
||||
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use App\DataTables\ParentDataTable as DataTable;
|
||||
use App\Models\Shop\Product;
|
||||
use App\Models\Shop\Customer;
|
||||
|
||||
class ProductsDataTable extends DataTable
|
||||
class CustomersDataTable extends DataTable
|
||||
{
|
||||
public $model_name = 'Products';
|
||||
public $model_name = 'Customers';
|
||||
|
||||
public function query(Product $model)
|
||||
{
|
||||
@@ -19,8 +19,6 @@ class ProductsDataTable extends DataTable
|
||||
{
|
||||
return [
|
||||
Column::make('name'),
|
||||
Column::make('alias'),
|
||||
Column::make('latin'),
|
||||
Column::computed('action')
|
||||
->exportable(false)
|
||||
->printable(false)
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\DataTables;
|
||||
namespace App\DataTables\Shop;
|
||||
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use App\DataTables\ParentDataTable as DataTable;
|
||||
use App\Models\Shop\Product;
|
||||
use App\Models\Shop\Invoice;
|
||||
|
||||
class ProductsDataTable extends DataTable
|
||||
class InvoicesDataTable extends DataTable
|
||||
{
|
||||
public $model_name = 'Products';
|
||||
public $model_name = 'Invoices';
|
||||
|
||||
public function query(Product $model)
|
||||
{
|
||||
@@ -19,8 +19,6 @@ class ProductsDataTable extends DataTable
|
||||
{
|
||||
return [
|
||||
Column::make('name'),
|
||||
Column::make('alias'),
|
||||
Column::make('latin'),
|
||||
Column::computed('action')
|
||||
->exportable(false)
|
||||
->printable(false)
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\DataTables;
|
||||
namespace App\DataTables\Shop;
|
||||
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use App\DataTables\ParentDataTable as DataTable;
|
||||
use App\Models\Shop\Product;
|
||||
use App\Models\Shop\Order;
|
||||
|
||||
class ProductsDataTable extends DataTable
|
||||
class OrdersDataTable extends DataTable
|
||||
{
|
||||
public $model_name = 'Products';
|
||||
public $model_name = 'Orders';
|
||||
|
||||
public function query(Product $model)
|
||||
{
|
||||
@@ -19,8 +19,6 @@ class ProductsDataTable extends DataTable
|
||||
{
|
||||
return [
|
||||
Column::make('name'),
|
||||
Column::make('alias'),
|
||||
Column::make('latin'),
|
||||
Column::computed('action')
|
||||
->exportable(false)
|
||||
->printable(false)
|
||||
Reference in New Issue
Block a user