From e9c14f355dc3a79f0d937c8c7f24d565d5bcb04c Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Wed, 1 May 2024 14:47:06 +0200 Subject: [PATCH] Fixed some bugs One issue was a missing ui component and the other was about the previous commit's changes with startDate --- src/components/calendar/CalendarMenu.vue | 1 + src/components/calendar/search/CalendarSearch.vue | 6 +++--- .../calendar/search/lists/EventCallout.vue | 4 ++-- src/components/calendar/search/lists/SearchList.vue | 6 +++--- src/data/Events.ts | 13 ++----------- src/models/Events.ts | 2 +- 6 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/components/calendar/CalendarMenu.vue b/src/components/calendar/CalendarMenu.vue index d6869b8..2afe5f3 100644 --- a/src/components/calendar/CalendarMenu.vue +++ b/src/components/calendar/CalendarMenu.vue @@ -2,6 +2,7 @@ import { useCalendar } from '@/stores/CalendarStore' import { Button } from '@/components/ui/button' +import { PhMagnifyingGlass } from '@phosphor-icons/vue' import CalendarMenuNav from './CalendarMenuNav.vue' import CalendarMenuToday from './CalendarMenuToday.vue' import CalendarSwitch from './CalendarSwitch.vue' diff --git a/src/components/calendar/search/CalendarSearch.vue b/src/components/calendar/search/CalendarSearch.vue index 2ab164d..8daa23d 100644 --- a/src/components/calendar/search/CalendarSearch.vue +++ b/src/components/calendar/search/CalendarSearch.vue @@ -139,7 +139,7 @@ const searchResults = computed<(Character | CalendarEvent)[]>(() => { } hitCategories = selectedCategories.value.every((selectedCat) => { - return allCategories.includes(selectedCat) + return allCategories.includes(selectedCat as CalendarEventCategory) }) return (hitTitle || hitDesc) && hitCategories @@ -162,7 +162,7 @@ const searchResults = computed<(Character | CalendarEvent)[]>(() => { // Handle categories logic let hitCategories: boolean = false - let allCategories: CalendarEventCategory[] = [] + let allCategories: CharacterCategory[] = [] if (item.category) { allCategories.push(item.category) @@ -173,7 +173,7 @@ const searchResults = computed<(Character | CalendarEvent)[]>(() => { } hitCategories = selectedCategories.value.every((selectedCat) => { - return allCategories.includes(selectedCat) + return allCategories.includes(selectedCat as CharacterCategory) }) return hitTitle && hitCategories diff --git a/src/components/calendar/search/lists/EventCallout.vue b/src/components/calendar/search/lists/EventCallout.vue index 0b0f64f..7aebc83 100644 --- a/src/components/calendar/search/lists/EventCallout.vue +++ b/src/components/calendar/search/lists/EventCallout.vue @@ -53,10 +53,10 @@ const { defaultDate, getFormattedDateTitle } = useCalendar()
{{ getFormattedDateTitle(event.date, true) }}
+{{ getFormattedDateTitle(event.startDate, true) }}