diff --git a/web/components/Notifications/List.vue b/web/components/Notifications/List.vue index decde3dcc8..4a67f567e8 100644 --- a/web/components/Notifications/List.vue +++ b/web/components/Notifications/List.vue @@ -3,10 +3,11 @@ import { getNotifications, NOTIFICATION_FRAGMENT, } from "./graphql/notification.query"; -import type { NotificationType } from "~/composables/gql/graphql"; +import type { Importance, NotificationType } from "~/composables/gql/graphql"; import { useFragment } from "~/composables/gql/fragment-masking"; import { useQuery } from "@vue/apollo-composable"; import { vInfiniteScroll } from "@vueuse/components"; +import { CheckIcon } from "@heroicons/vue/24/solid"; /** * Page size is the max amount of items fetched from the api in a single request. @@ -15,19 +16,22 @@ const props = withDefaults( defineProps<{ type: NotificationType; pageSize?: number; + importance?: Importance; }>(), { pageSize: 15, + importance: undefined, } ); -const { result, error, fetchMore } = useQuery(getNotifications, { +const { result, error, fetchMore } = useQuery(getNotifications, () => ({ filter: { offset: 0, limit: props.pageSize, type: props.type, + importance: props.importance, }, -}); +})); watch(error, (newVal) => { console.log("[getNotifications] error:", newVal); @@ -52,6 +56,7 @@ async function onLoadMore() { offset: notifications.value.length, limit: props.pageSize, type: props.type, + importance: props.importance, }, }, }); @@ -59,6 +64,15 @@ async function onLoadMore() {