Filter communications in the frontend
Since we will know about communications we just moved into another state in frontend land.
This commit is contained in:
parent
3a3cd78cac
commit
633abd19a9
2 changed files with 12 additions and 1 deletions
|
|
@ -14,7 +14,7 @@
|
|||
</template>
|
||||
<template #left>
|
||||
<CommunicationColumnList
|
||||
:all="storeCommunication.all"
|
||||
:all="visibleCommunications"
|
||||
@deselect="handleDeselect"
|
||||
:loading="storeCommunication.loading"
|
||||
:selectedID="selectedId"
|
||||
|
|
@ -192,6 +192,14 @@ const selectedReport = computedAsync(
|
|||
return await storePublicReport.byURI(selectedCommunication.value.source);
|
||||
},
|
||||
);
|
||||
const visibleCommunications = computed((): Communication[] => {
|
||||
if (!storeCommunication.all) {
|
||||
return [];
|
||||
}
|
||||
return storeCommunication.all.filter((c: Communication) => {
|
||||
return c.status == "new" || c.status == "opened";
|
||||
});
|
||||
});
|
||||
const handleDeselect = (id: string) => {
|
||||
selectedId.value = undefined;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue