update order page
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user