-
diff --git a/src/components/calendar/state/yearly/MonthTile.vue b/src/components/calendar/state/yearly/MonthTile.vue
index e6600ac..269324f 100644
--- a/src/components/calendar/state/yearly/MonthTile.vue
+++ b/src/components/calendar/state/yearly/MonthTile.vue
@@ -1,18 +1,15 @@
@@ -22,7 +19,7 @@ const tileMonthName = computed(() => getMonthName(props.monthNumber))
{
return {
day: defaultDay,
month: defaultMonth,
- year: defaultYear,
- period: 'nante'
+ year: defaultYear
}
})
diff --git a/src/stores/CharacterStore.ts b/src/stores/CharacterStore.ts
index 1779ea1..500ed03 100644
--- a/src/stores/CharacterStore.ts
+++ b/src/stores/CharacterStore.ts
@@ -1,20 +1,15 @@
import { charactersList } from '@/data/Characters'
import type { Character } from '@/models/Characters'
import { defineStore } from 'pinia'
-import { computed, type ComputedRef } from 'vue'
export const useCharacters = defineStore('characters', () => {
const characters: Character[] = charactersList
// Get all birth events
- const charactersWithBirthData: ComputedRef = computed(() =>
- characters.filter((character) => character.birth)
- )
+ const charactersWithBirthData: Character[] = characters.filter((character) => character.birth)
// Get all death events
- const charactersWithDeathData: ComputedRef = computed(() =>
- characters.filter((character) => character.death)
- )
+ const charactersWithDeathData: Character[] = characters.filter((character) => character.death)
return { characters, charactersWithBirthData, charactersWithDeathData }
})
diff --git a/src/stores/EventStore.ts b/src/stores/EventStore.ts
index 0f94cd1..1e24890 100644
--- a/src/stores/EventStore.ts
+++ b/src/stores/EventStore.ts
@@ -1,40 +1,34 @@
-import type { CalendarEvent } from '@/models/Events'
-import { defineStore } from 'pinia'
-import { computed, ref, watch, type Ref } from 'vue'
-import { useCalendar } from './CalendarStore'
-import { useCharacters } from './CharacterStore'
import { regularEvents } from '@/data/Events'
import { convertDateToDays, daysPerMonth } from '@/models/Date'
+import type { CalendarEvent } from '@/models/Events'
+import { defineStore } from 'pinia'
+import { ref, watch, type Ref } from 'vue'
+import { useCalendar } from './CalendarStore'
+import { useCharacters } from './CharacterStore'
export const useCalendarEvents = defineStore('calendar-events', () => {
- const { currentDate, currentConfig, currentLeimDate } = useCalendar()
+ const { currentDate, currentConfig } = useCalendar()
const { charactersWithBirthData, charactersWithDeathData } = useCharacters()
- const baseEvents = ref(regularEvents)
+ const baseEvents: CalendarEvent[] = regularEvents
- const characterBirthEvents = computed(() => {
- return charactersWithBirthData.map((character) => {
- return {
- title: `Naissance de ${character.name}`,
- date: character.birth,
- category: 'naissance'
- } as CalendarEvent
- })
+ const characterBirthEvents = charactersWithBirthData.map((character) => {
+ return {
+ title: `Naissance de ${character.name}`,
+ date: character.birth,
+ category: 'naissance'
+ } as CalendarEvent
})
- const characterDeathEvents = computed(() => {
- return charactersWithDeathData.map((character) => {
- return {
- title: `Décès de ${character.name}`,
- date: character.death,
- category: 'mort'
- } as CalendarEvent
- })
+ const characterDeathEvents = charactersWithDeathData.map((character) => {
+ return {
+ title: `Décès de ${character.name}`,
+ date: character.death,
+ category: 'mort'
+ } as CalendarEvent
})
- const allEvents = computed(() => {
- return [...characterBirthEvents.value, ...characterDeathEvents.value, ...baseEvents.value]
- })
+ const allEvents = [...characterBirthEvents, ...characterDeathEvents, ...baseEvents]
// Gets all current event in its default state
const currentEvents: Ref = ref(computeCurrentEvents())
@@ -100,7 +94,7 @@ export const useCalendarEvents = defineStore('calendar-events', () => {
* @returns A list of events that can appear in the current view
*/
function computeCurrentEvents(): CalendarEvent[] {
- return allEvents.value.filter((event) => shouldEventBeDisplayed(event))
+ return allEvents.filter((event) => shouldEventBeDisplayed(event))
}
return { baseEvents, allEvents, currentEvents }