From 70ebc77f843207a1d4b46c8d960dafbff37e7e2e Mon Sep 17 00:00:00 2001
From: Leonardo Bishop <me@leonardobishop.com>
Date: Fri, 17 Jan 2025 13:42:21 +0000
Subject: Initial commit

---
 pages/agenda.vue | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 pages/agenda.vue

(limited to 'pages/agenda.vue')

diff --git a/pages/agenda.vue b/pages/agenda.vue
new file mode 100644
index 0000000..3e4c1df
--- /dev/null
+++ b/pages/agenda.vue
@@ -0,0 +1,57 @@
+<script setup lang="ts">
+import Panel from '~/components/Panel.vue';
+
+
+const favouritesStore = useFavouritesStore();
+const scheduleStore = useScheduleStore();
+
+const favouriteEvents = computed(() => {
+  return scheduleStore.events.filter((event) => favouritesStore.isFavourite(event));
+});
+
+console.log(favouriteEvents.value);
+
+</script>
+
+<template>
+  <Panel v-if="favouritesStore.status === 'pending'">
+    <span>Updating favourites...</span>
+  </Panel>
+  <Panel v-else-if="favouriteEvents.length > 0">
+    <h2 class="agenda-title">Agenda</h2>
+    <ul class="agenda-list">
+      <li 
+        v-for="event in favouriteEvents" 
+        :key="event.id" 
+        class="agenda-item"
+      >
+        <EventListing :event="event" />
+      </li>
+    </ul>
+  </Panel>
+  <Panel v-else>
+    <span>You have not added any favourites yet.</span>
+  </Panel>
+</template>
+
+<style scoped>
+.agenda-list {
+  list-style: none;
+  margin: 0;
+  padding: 0;
+  display: grid;
+}
+
+.agenda-item {
+  border-bottom: 1px solid var(--color-background-muted); 
+}
+
+.agenda-title {
+  margin-bottom: 1rem;
+}
+
+.agenda-item:last-child {
+  border-bottom: none; 
+}
+
+</style>
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2

