program / calendar - fix session go to event page

This commit is contained in:
isUnknown 2024-09-05 12:13:58 +02:00
parent 0c848b3194
commit 0aae5777fb
3 changed files with 11 additions and 8 deletions

View file

@ -8,10 +8,6 @@
const urlParams = new URLSearchParams(queryString);
const tab = urlParams.get('tab');
return tab;
},
goTo(event, href) {
if (event.target.tagName === 'A') return
location.href = href
}
}"
>
@ -22,7 +18,7 @@
}"
>
<?php if ($page->categories()->isNotEmpty()): ?>
<section class="filters">
<button
x-data="{title: 'Calendrier'}"
@ -43,7 +39,6 @@
@click="if (tab === filterTitle) { tab = 'Programme' } else { tab = filterTitle; filter = title }"
></button>
<?php endforeach ?>
<?php endif ?>
</section>
<section class="page-title">
<h1 x-text="tab"></h1>
@ -85,7 +80,7 @@
}
?>
<template x-if="tab === 'Calendrier' || ('<?= $session['category'] ?>'.length > 0 && tab.includes('<?= $session['category'] ?>'))">
<li class="collapsable__item--padding session grid js-link" style="--color: <?= $session['color'] ?>" @click="goTo(event, '<?= $session['event-url'] ?>')" title="En savoir plus">
<li class="collapsable__item--padding session grid js-link" style="--color: <?= $session['color'] ?>">
<div class="session__info">
<p><?= $formattedDate ?></p>
<p><?= $session['time'] ?><?php e($endTime, ' - ' . $endTime) ?></p>
@ -120,6 +115,7 @@
<a class="ticket-link" title="Plateforme de réservation" href="<?= $session['ticketingUrl'] ?>" target="_blank"><?php snippet('ticket') ?>Billetterie</a>
<?php endif ?>
</div>
<a class="event-link" href="<?= $session['event-url'] ?>" title="En savoir plus"></a>
</li>
</template>
<?php endforeach ?>