Product starred fix

This commit is contained in:
Jérémy Munsch 2022-12-05 14:14:51 +01:00
parent 1b0a9d2a18
commit 2d4f9111f4
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
3 changed files with 9 additions and 1 deletions

View file

@ -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');

View file

@ -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>

View file

@ -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">