@@ -9,13 +9,15 @@ import {
99} from  " @/components/shadcn/sheet"  
1010
1111import  { archiveAllNotifications  } from  " ./graphql/notification.query" 
12+ import  type  { Importance } from  " ~/composables/gql/graphql" 
1213import  { NotificationType  } from  " ~/composables/gql/graphql" 
1314import  { useMutation  } from  " @vue/apollo-composable" 
1415
1516const mutate : archiveAll, loading : loadingArchiveAll } =  useMutation (
1617  archiveAllNotifications  
1718); 
1819const =  useTeleport ();
20+ const =  ref <Importance  |  undefined >(undefined );
1921script >
2022
2123<template >
@@ -57,7 +59,9 @@ const { teleportTarget, determineTeleportTarget } = useTeleport();
5759              Archive All
5860            </Button >
5961
60-             <Select >
62+             <Select 
63+               @update:model-value =" (val) => {importance = val as Importance}" 
64+             >
6165              <SelectTrigger  class =" bg-secondary border-0 h-auto" 
6266                <SelectValue 
6367                  class =" text-muted-foreground" 
@@ -67,20 +71,26 @@ const { teleportTarget, determineTeleportTarget } = useTeleport();
6771              <SelectContent  :to =" teleportTarget" 
6872                <SelectGroup >
6973                  <SelectLabel >Notification Types</SelectLabel >
70-                   <SelectItem  value =" alert " SelectItem >
71-                   <SelectItem  value =" info " SelectItem >
72-                   <SelectItem  value =" warning " SelectItem >
74+                   <SelectItem  : value" Importance.Alert " SelectItem >
75+                   <SelectItem  : value" Importance.Info " SelectItem >
76+                   <SelectItem  : value" Importance.Warning " SelectItem >
7377                </SelectGroup >
7478              </SelectContent >
7579            </Select >
7680          </div >
7781
7882          <TabsContent  value =" unread" class =" flex-1 min-h-0 mt-3" 
79-             <NotificationsList  :type =" NotificationType.Unread" 
83+             <NotificationsList 
84+               :importance =" importance" 
85+               :type =" NotificationType.Unread" 
86+             />
8087          </TabsContent >
8188
8289          <TabsContent  value =" archived" class =" flex-1 min-h-0 mt-3" 
83-             <NotificationsList  :type =" NotificationType.Archive" 
90+             <NotificationsList 
91+               :importance =" importance" 
92+               :type =" NotificationType.Archive" 
93+             />
8494          </TabsContent >
8595        </Tabs >
8696      </div >
0 commit comments