update order page

This commit is contained in:
2026-07-02 19:41:27 +03:30
parent 141f70c6f8
commit b76b4704de
6 changed files with 130 additions and 24 deletions
@@ -2,6 +2,7 @@ import axios from "@/config/axios";
import type {
CreatePreInvoiceType,
GetInvoiceResponseType,
InvoiceItemDetailType,
InvoiceType,
UpdatePreInvoiceType,
} from "../types/Types";
@@ -23,6 +24,13 @@ export const getInvoiceById = async (id: string) => {
return data;
};
export const getInvoiceItemById = async (id: string) => {
const { data } = await axios.get<{ data: InvoiceItemDetailType }>(
`/admin/invoice/item/${id}`,
);
return data;
};
export const updateInvoice = async (id: string, params: UpdatePreInvoiceType) => {
const { data } = await axios.patch(`/admin/invoice/${id}`, params);
return data;