13/7/1404

This commit is contained in:
2025-10-05 09:44:14 +03:30
parent 4e182d3e37
commit 2a818f5784
453 changed files with 58044 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
import useAxios from "@/utils/useAxios";
import type {Order} from "@/models/order";
import type {TableInput, TableOutput} from "@/models/table";
import type {Ref, UnwrapRef} from "vue";
import type {Transaction} from "@/models/transaction";
import {useUserStore} from "@/store/userStore";
const userStore = useUserStore()
export const createOrder = async (obj: Order): Promise<any> => {
return await useAxios.post<Order>(`/customer${!userStore.isSingle ? '' : '/single'}/order`, obj)
}
export const getOrders = async (tbl: Ref<UnwrapRef<TableInput>>): Promise<TableOutput<Transaction>> => {
return await useAxios.post<TableOutput<Order>>(`/customer${!userStore.isSingle ? '' : '/single'}/order/table`, tbl)
}