update mapado event working
This commit is contained in:
parent
4cd3bfba57
commit
c98d5eb36b
8 changed files with 184 additions and 126 deletions
|
|
@ -19,6 +19,38 @@
|
|||
</section>
|
||||
|
||||
<section class="collapsable-sections">
|
||||
<?php snippet('collapsable-section', ['title' => 'Prenez vos places !'], slots: true) ?>
|
||||
<?php slot('content') ?>
|
||||
<div
|
||||
class="sessions"
|
||||
x-data="{
|
||||
sessions: null,
|
||||
async fetchSessions() {
|
||||
this.sessions = await updateMapadoEvent('<?= $page->uri() ?>');
|
||||
console.log(this.sessions);
|
||||
}
|
||||
}"
|
||||
x-init="fetchSessions()"
|
||||
>
|
||||
<?php
|
||||
$sessions = $page->isMapadoEvent() != 'true' ? $page->sessions()->toStructure() : $page->remoteSessions()->toStructure();
|
||||
|
||||
foreach ($sessions as $session) :
|
||||
$date = new DateTime($session->date());
|
||||
$formatter = new IntlDateFormatter('fr_FR', IntlDateFormatter::FULL, IntlDateFormatter::NONE);
|
||||
$formattedDate = $formatter->format($date);
|
||||
?>
|
||||
<div class="session grid">
|
||||
<p><?= $formattedDate ?></p>
|
||||
<p><?= $session->time() ?></p>
|
||||
<p><?= $page->place() ?></p>
|
||||
<p>test</p>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endslot() ?>
|
||||
<?php endsnippet() ?>
|
||||
|
||||
<?php snippet('collapsable-section', ['title' => 'Distribution et production'], slots: true) ?>
|
||||
<?php slot('content') ?>
|
||||
<div class="production">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue