diff --git a/app/Datatables/Shop/TariffsDataTable.php b/app/Datatables/Shop/TariffsDataTable.php
index 249201ba..284c0c0d 100644
--- a/app/Datatables/Shop/TariffsDataTable.php
+++ b/app/Datatables/Shop/TariffsDataTable.php
@@ -13,7 +13,7 @@ class TariffsDataTable extends DataTable
public function query(Tariff $model)
{
- $model = $model->with(['sale_channels'])->select(['shop_tariffs.*']);
+ $model = $model->with(['sale_channels'])->withCount(['price_lists', 'offers']);
return $this->buildQuery($model);
}
@@ -42,6 +42,8 @@ class TariffsDataTable extends DataTable
Column::make('sale_channels2')->title('Canaux de vente'),
Column::make('code')->title('Code'),
Column::make('ref')->title('Référence'),
+ Column::make('price_lists_count')->title('#Lst prix'),
+ Column::make('offers_count')->title('#Offres'),
$this->makeColumnButtons(),
];
}
diff --git a/database/migrations/2020_04_20_212813_create_shop_articles_table.php b/database/migrations/2020_04_20_212813_create_shop_articles_table.php
index ce16e90b..3471f995 100644
--- a/database/migrations/2020_04_20_212813_create_shop_articles_table.php
+++ b/database/migrations/2020_04_20_212813_create_shop_articles_table.php
@@ -16,7 +16,7 @@ class CreateShopArticlesTable extends Migration {
{
$table->increments('id');
$table->string('name')->nullable();
- $table->string('description')->nullable();
+ $table->text('description')->nullable();
$table->timestamps();
$table->softDeletes();
});
diff --git a/resources/views/Admin/Botanic/Families/form.blade.php b/resources/views/Admin/Botanic/Families/form.blade.php
index f5dbbd71..d05e2fc4 100644
--- a/resources/views/Admin/Botanic/Families/form.blade.php
+++ b/resources/views/Admin/Botanic/Families/form.blade.php
@@ -3,25 +3,25 @@
{{ Form::label('name', 'Nom') }}
- @include('components.form.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true])
+ @include('components.form.input', ['name' => 'name', 'value' => $family['name'] ?? null, 'required' => true])
{{ Form::label('alias', 'Alias') }}
- @include('components.form.input', ['name' => 'alias', 'value' => (isset($family['alias'])) ? $family['alias'] : null])
+ @include('components.form.input', ['name' => 'alias', 'value' => $family['alias'] ?? null])
{{ Form::label('latin', 'Nom latin') }}
- @include('components.form.input', ['name' => 'latin', 'value' => (isset($family['latin'])) ? $family['latin'] : null, 'required' => true])
+ @include('components.form.input', ['name' => 'latin', 'value' => $family['latin'] ?? null, 'required' => true])
{{ Form::label('description', 'Description') }}
- @include('components.form.textarea', ['name' => 'description', 'value' => isset($family['description']) ? $family['description'] : null, 'class' => 'editor', 'required' => true])
+ @include('components.form.textarea', ['name' => 'description', 'value' => $family['description'] ?? null, 'class' => 'editor', 'required' => true])
@@ -31,11 +31,14 @@
@include('components.save')
@include('load.form.editor')
+@include('load.form.save')
+
@push('js')
@endpush
\ No newline at end of file
diff --git a/resources/views/Admin/Botanic/Genres/form.blade.php b/resources/views/Admin/Botanic/Genres/form.blade.php
index 9032aa50..6219975c 100644
--- a/resources/views/Admin/Botanic/Genres/form.blade.php
+++ b/resources/views/Admin/Botanic/Genres/form.blade.php
@@ -40,4 +40,17 @@
-@include('components.save')
\ No newline at end of file
+@include('components.save')
+
+@include('load.form.editor')
+@include('load.form.save')
+
+
+@push('js')
+
+@endpush
\ No newline at end of file
diff --git a/resources/views/components/form/textarea.blade.php b/resources/views/components/form/textarea.blade.php
index 0e6ab87f..a21f3458 100644
--- a/resources/views/components/form/textarea.blade.php
+++ b/resources/views/components/form/textarea.blade.php
@@ -1,6 +1,6 @@
\ No newline at end of file
+>{{ $value ?? null }}
\ No newline at end of file