From 4e2b2b80f43bb2674895f101997f5269b77d6b37 Mon Sep 17 00:00:00 2001
From: WilliamDiakite
Date: Thu, 17 Oct 2024 18:17:18 -0400
Subject: [PATCH] =?UTF-8?q?integrates=20bookings=20for=20clinique=20num?=
=?UTF-8?q?=C3=A9rique?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/lib/components/ArticleAside.svelte | 58 +++++++++++++++++++++++++-
src/lib/labouvroir | 2 +-
src/lib/types.ts | 2 +
3 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/src/lib/components/ArticleAside.svelte b/src/lib/components/ArticleAside.svelte
index d6d8643..665a96c 100644
--- a/src/lib/components/ArticleAside.svelte
+++ b/src/lib/components/ArticleAside.svelte
@@ -2,8 +2,25 @@
import { t, dateToLocalizedString } from '$i18n/i18n';
import { MemberLink, Tree } from '$components';
import type { Blog, Event, Resource, Project, Meeting } from '$lib/types';
+ import { onMount } from 'svelte';
export let content: Blog | Event | Resource | Project | Meeting;
+
+ onMount(() => {
+ const dialog = document.querySelector('dialog');
+ const button = document.querySelector('button.register');
+
+ if (dialog && button) {
+ button.addEventListener('click', () => {
+ dialog.showModal();
+ });
+ dialog.addEventListener('click', (e) => {
+ if (e.target === dialog) {
+ dialog.close();
+ }
+ });
+ }
+ });
- {#if content.meta.link}
+ {#if content.meta.recurrent}
+
+ {:else if content.meta.link}
{$t('news.register')}
{:else}
{$t('news.noRegistration')}
@@ -137,6 +156,18 @@
{/if}
+{#if content.meta.kind === 'event' && content.meta.recurrent === 'clinique'}
+
+{/if}
+