invoice list

This commit is contained in:
hamid zarghami
2026-02-21 12:45:34 +03:30
parent 1cf254de13
commit 002e45de0b
4 changed files with 124 additions and 24 deletions
+8 -1
View File
@@ -1,7 +1,14 @@
import axios from "@/config/axios";
import type { CreatePreInvoiceType } from "../types/Types";
import type { CreatePreInvoiceType, GetInvoiceResponseType } from "../types/Types";
export const createInvoice = async (params: CreatePreInvoiceType) => {
const { data } = await axios.post("/admin/invoice", params);
return data;
};
export const getInvoice = async (page = 1): Promise<GetInvoiceResponseType> => {
const { data } = await axios.get<GetInvoiceResponseType>("/admin/invoice", {
params: { page },
});
return data;
};