edit order

This commit is contained in:
hamid zarghami
2026-02-26 09:04:13 +03:30
parent d5a6342158
commit 54b86b718c
9 changed files with 195 additions and 113 deletions
+3 -3
View File
@@ -2,8 +2,8 @@ import { useMutation, useQuery } from "@tanstack/react-query";
import * as api from "../service/OrderService";
import type {
AddTicketType,
CreateFinalOrderType,
OrderPrintFormType,
UpdateOrderType,
} from "../types/Types";
export const useGetOrders = (params?: api.GetOrdersParams) => {
@@ -74,7 +74,7 @@ export const useUpdateOrder = () => {
params,
}: {
orderId: string;
params: CreateFinalOrderType;
params: UpdateOrderType;
}) => api.updateOrder(orderId, params),
});
};
@@ -86,7 +86,7 @@ export const useGetProducts = () => {
});
};
export const useGetAttributes = (id?: number) => {
export const useGetAttributes = (id?: string) => {
return useQuery({
queryKey: ["attributes", id],
queryFn: () => api.getAttributes(id),