diff --git a/ts/components/CommunicationColumnList.vue b/ts/components/CommunicationColumnList.vue index e407fdc7..442b859d 100644 --- a/ts/components/CommunicationColumnList.vue +++ b/ts/components/CommunicationColumnList.vue @@ -183,7 +183,7 @@ function selectCommunication(communication: Communication) { } // Computed properties -const filteredCommunications = computed(() => { +const filteredCommunications = computed((): Communication[] => { if (props.all == null) { return []; } diff --git a/ts/store/communication.ts b/ts/store/communication.ts index 619b0f60..6d0f3d93 100644 --- a/ts/store/communication.ts +++ b/ts/store/communication.ts @@ -1,6 +1,6 @@ import { defineStore } from "pinia"; import { ref } from "vue"; -import { Communication } from "@/type/api"; +import { Communication, CommunicationDTO } from "@/type/api"; import { SSEManager, SSEMessage } from "@/SSEManager"; import { useSessionStore } from "@/store/session"; @@ -38,7 +38,9 @@ export const useCommunicationStore = defineStore("communication", () => { throw new Error(`HTTP error! status: ${response.status}`); } const data = await response.json(); - all.value = data.communications; + all.value = data.communications.map((c: CommunicationDTO) => + Communication.fromJSON(c), + ); return data.communications; } catch (err) { console.error("Error loading communications:", err);