Fixed build issues

This commit is contained in:
AmirReza Jamali
2025-09-09 13:32:58 +03:30
parent d73a64fe52
commit 83bd4394fc
18 changed files with 139 additions and 80 deletions
+8
View File
@@ -27,6 +27,7 @@ export const useCustomersInfiniteQuery = (params?: Record<string, any>) => {
initialPageParam: 0,
getNextPageParam: (lastPage) => {
if (!lastPage.meta) return;
const { offset, limit, total } = lastPage.meta;
const nextOffset = offset + limit;
@@ -42,6 +43,13 @@ export const useGetAllCustomers = () => {
queryFn: () => customersService.getCustomers(),
});
};
export const useGetCustomersDetails = (id: string) => {
const queryKey = useMemo(() => ["GET ALL CUSTOMERS", id], [id]);
return useQuery({
queryKey,
queryFn: () => customersService.customerDetails(id),
});
};
export const useAssignCompany = (id: string, successCallback?: () => void) => {
const queryClient = useQueryClient();
const mutationKey = useMemo(