Product starred fix
This commit is contained in:
parent
1b0a9d2a18
commit
2d4f9111f4
3 changed files with 9 additions and 1 deletions
|
|
@ -61,6 +61,10 @@ class ProductController extends Controller
|
|||
$products->where('type', $request->type);
|
||||
}
|
||||
|
||||
if ($this->indexModeStarredOnly) {
|
||||
$products->where('star', true);
|
||||
}
|
||||
|
||||
$this->sortQuery($products);
|
||||
$searchFields = trans('Nom, Description, Réf');
|
||||
|
||||
|
|
|
|||
|
|
@ -45,13 +45,14 @@
|
|||
'price' => __('Prix en € HT'),
|
||||
'description' => __('Description'),
|
||||
'range' => __('Gamme'),
|
||||
'star' => __('Mis en avant'),
|
||||
'status' => __('Publication'),
|
||||
'updated_at' => __('Mis à jour le')
|
||||
]);
|
||||
@endphp
|
||||
@include('back.modules.tableColSorter', [
|
||||
'cols' => $cols,
|
||||
'mobileHide' => ['status'],
|
||||
'mobileHide' => ['status', 'star'],
|
||||
])
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@
|
|||
<td>
|
||||
<span>{{ $productModel->range->name }}</span>
|
||||
</td>
|
||||
<td class="d-none d-md-table-cell">
|
||||
@if ($productModel->star){{ __('Oui') }}@else{{ __('Non') }}@endif
|
||||
</td>
|
||||
<td class="d-none d-md-table-cell">
|
||||
<form action="{{ route('bo.products.change-published', $productModel->id) }}"
|
||||
method="POST">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue