invoice + plan

This commit is contained in:
hamid zarghami
2025-02-15 16:22:42 +03:30
parent 65faa4de5f
commit 8f39afeb48
20 changed files with 1125 additions and 262 deletions
@@ -0,0 +1,9 @@
import * as api from "../service/CustomerService";
import { useQuery } from "@tanstack/react-query";
export const useGetCustomers = () => {
return useQuery({
queryKey: ["invoices"],
queryFn: () => api.getCustomers(),
});
};
@@ -0,0 +1,6 @@
import axios from "../../../config/axios";
export const getCustomers = async () => {
const { data } = await axios.get(`/users/customers`);
return data;
};
+20
View File
@@ -0,0 +1,20 @@
export type CustomerItemType = {
birthDate: string;
createdAt: string;
email: string | null;
firstName: string;
id: string;
invoices: unknown[];
lastName: string;
nationalCode: string;
phone: string;
role: {
id: string;
createdAt: string;
// Add other properties of role if needed
};
subscriptions: unknown[];
tickets: unknown[];
updatedAt: string;
userName: string | null;
};