Notification UI and house invitation

This commit is contained in:
2026-02-19 19:16:26 +07:00
parent 84ed1e6c21
commit fa689ea4aa
35 changed files with 2592 additions and 112 deletions

View File

@@ -2,6 +2,7 @@ import { getSession } from '@lib/auth/session';
import { queryOptions } from '@tanstack/react-query';
import { getAllAudit } from './audit.api';
import { getAllHouse, getCurrentUserHouses } from './house.api';
import { getAllNotifications, getTopFiveNotification } from './notify.api';
import {
getAdminSettings,
getCurrentUserLanguage,
@@ -75,3 +76,17 @@ export const housesQueries = {
queryFn: () => getCurrentUserHouses(),
}),
};
export const notificationQueries = {
all: ['notification'],
list: (params: { page: number; limit: number }) =>
queryOptions({
queryKey: [...notificationQueries.all, 'list', params],
queryFn: () => getAllNotifications({ data: params }),
}),
topFive: () =>
queryOptions({
queryKey: [...notificationQueries.all, 'topFive'],
queryFn: () => getTopFiveNotification(),
}),
};