design invoice

This commit is contained in:
hamid zarghami
2026-02-21 11:38:39 +03:30
parent 7d702c41f8
commit 8a0a62b6d7
10 changed files with 427 additions and 5 deletions
+14
View File
@@ -0,0 +1,14 @@
import { useMutation, useQueryClient } from "@tanstack/react-query";
import * as api from "../service/InvoiceService";
import type { CreatePreInvoiceType } from "../types/Types";
export const useCreatePreInvoice = () => {
const queryClient = useQueryClient();
return useMutation({
mutationFn: (params: CreatePreInvoiceType) => api.createPreInvoice(params),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ["orders-invoiced"] });
},
});
};