order ticket

This commit is contained in:
hamid zarghami
2026-01-28 16:01:00 +03:30
parent a5ea0174ee
commit 10245bdb08
9 changed files with 577 additions and 80 deletions
+14
View File
@@ -1,9 +1,11 @@
import axios from "@/config/axios";
import type {
AddTicketType,
MyOrdersResponseType,
OrderDetailResponseType,
OrderType,
ProductsResponseType,
TicketsResponseType,
} from "../type/Types";
import { OrderStatusEnum, TabMyOrdersEnum } from "../enum/OrderEnum";
@@ -56,3 +58,15 @@ export const getOrderDetails = async (id: string) => {
);
return data;
};
export const getTickets = async (orderId: string) => {
const { data } = await axios.get<TicketsResponseType>(
`/public/ticket/order/${orderId}`,
);
return data;
};
export const addTicket = async (orderId: string, params: AddTicketType) => {
const { data } = await axios.post(`/public/ticket/order/${orderId}`, params);
return data;
};