Create order in admin

This commit is contained in:
hamid zarghami
2026-02-01 10:02:45 +03:30
parent 2ced4666c8
commit 5c536667b1
18 changed files with 712 additions and 4 deletions
+21
View File
@@ -36,3 +36,24 @@ export const useAddTicket = () => {
}) => api.addTicket(orderId, params),
});
};
export const useCreateOrder = () => {
return useMutation({
mutationFn: api.submitOrder,
});
};
export const useGetProducts = () => {
return useQuery({
queryKey: ["products"],
queryFn: api.getProducts,
});
};
export const useGetAttributes = (id?: number) => {
return useQuery({
queryKey: ["attributes"],
queryFn: () => api.getAttributes(id),
enabled: !!id,
});
};