✨ feat(reservation): Affiche les produits 3-15 ans et trie les formules par position.
🎨 style(reserve.js): Change la couleur du texte du filtre actif en noir.
This commit is contained in:
@@ -220,8 +220,8 @@ const initCatalogueSearch = () => {
|
||||
btn.onclick = () => {
|
||||
const category = btn.dataset.filter.toLowerCase();
|
||||
let count = 0;
|
||||
filters.forEach(f => f.classList.remove('bg-slate-900', 'text-white'));
|
||||
btn.classList.add('bg-slate-900', 'text-white');
|
||||
filters.forEach(f => f.classList.remove('bg-slate-900', 'text-black'));
|
||||
btn.classList.add('bg-slate-900', 'text-black');
|
||||
|
||||
products.forEach(item => {
|
||||
const isVisible = category === 'all' || (item.dataset.category || '').toLowerCase().includes(category);
|
||||
@@ -273,7 +273,7 @@ document.addEventListener('turbo:load', () => {
|
||||
initMobileMenu();
|
||||
initRegisterLogic();
|
||||
initCatalogueSearch();
|
||||
|
||||
|
||||
// Initialize AOS
|
||||
AOS.init({
|
||||
duration: 800,
|
||||
|
||||
@@ -59,8 +59,8 @@ class ReserverController extends AbstractController
|
||||
#[Route('/', name: 'reservation')]
|
||||
public function revervation(FormulesRepository $formulesRepository,ProductRepository $productRepository): Response
|
||||
{
|
||||
$products =$productRepository->findBy([], ['updatedAt' => 'DESC'],3);
|
||||
$formules =$formulesRepository->findBy(['isPublish'=>true], ['updatedAt' => 'DESC'],3);
|
||||
$products =$productRepository->findBy(['category'=>'3-15 ans'], ['updatedAt' => 'DESC'],3);
|
||||
$formules =$formulesRepository->findBy(['isPublish'=>true], ['pos' => 'ASC'],3);
|
||||
return $this->render('revervation/home.twig',[
|
||||
'products' => $products,
|
||||
'formules' => $formules,
|
||||
|
||||
Reference in New Issue
Block a user