feat: Implement frontend for business owners' support ticket system

This commit is contained in:
poduck
2025-11-28 04:56:48 -05:00
parent aa3854a13f
commit 512d95ca2d
10 changed files with 884 additions and 5 deletions

View File

@@ -0,0 +1,17 @@
import { useQuery } from '@tanstack/react-query';
import { apiClient } from '../api/client';
import { User } from '../types';
/**
* Hook to fetch all users (staff, owners, customers) for the current business.
* This can be filtered/refined later based on specific needs (e.g., only staff).
*/
export const useUsers = () => {
return useQuery<User[]>({
queryKey: ['businessUsers'],
queryFn: async () => {
const response = await apiClient.get('/api/business/users/');
return response.data;
},
});
};