Create print

This commit is contained in:
hamid zarghami
2026-02-22 12:38:19 +03:30
parent 11f8f4326b
commit f2fbd8552a
11 changed files with 137 additions and 17 deletions
+17 -1
View File
@@ -1,6 +1,10 @@
import { useMutation, useQuery } from "@tanstack/react-query";
import * as api from "../service/OrderService";
import type { AddTicketType, CreateFinalOrderType } from "../types/Types";
import type {
AddTicketType,
CreateFinalOrderType,
OrderPrintFormType,
} from "../types/Types";
export const useGetOrders = () => {
return useQuery({
@@ -97,3 +101,15 @@ export const useGetOrderItem = (id?: string) => {
enabled: !!id,
});
};
export const useSubmitOrderPrint = () => {
return useMutation({
mutationFn: ({
orderId,
params,
}: {
orderId: string;
params: OrderPrintFormType;
}) => api.submitOrderPrint(orderId, params),
});
};