Create print
This commit is contained in:
@@ -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),
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user