These changes are meant to make it possible for new events that come in to immediately render in the components that depend on them.
This commit is contained in:
parent
74ef9a8b3a
commit
cecb9ef0f0
5 changed files with 92 additions and 59 deletions
|
|
@ -203,6 +203,7 @@
|
|||
<script setup lang="ts">
|
||||
import { computed, ref } from "vue";
|
||||
import ListCardCommunication from "@/components/ListCardCommunication.vue";
|
||||
import { log } from "@/log";
|
||||
import { Communication, LogEntry, PublicReport } from "@/type/api";
|
||||
|
||||
interface Props {
|
||||
|
|
@ -263,11 +264,15 @@ const activeFilterCount = computed(() => {
|
|||
|
||||
// Filtered communications
|
||||
const filteredCommunications = computed((): Communication[] => {
|
||||
log.info(
|
||||
"getting communication column list filteredCommunications",
|
||||
props.all,
|
||||
);
|
||||
if (props.all == null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return props.all.filter((comm) => {
|
||||
const filtered = props.all.filter((comm) => {
|
||||
// Status filter
|
||||
const selectedStatuses = Object.entries(statusFilters.value)
|
||||
.filter(([_, isSelected]) => isSelected)
|
||||
|
|
@ -299,5 +304,10 @@ const filteredCommunications = computed((): Communication[] => {
|
|||
|
||||
return true;
|
||||
});
|
||||
const sorted = filtered.sort((a: Communication, b: Communication): number => {
|
||||
return b.created.getTime() - a.created.getTime();
|
||||
});
|
||||
log.info("filtered and sorted to", sorted);
|
||||
return sorted;
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue