Initial commit from monorepo

This commit is contained in:
Ruslan Bakiev
2026-01-07 09:10:35 +07:00
commit 3db50d9637
371 changed files with 43223 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
export const useOrdersRestAPI = () => {
const config = useRuntimeConfig()
const getTeamOrders = async (teamUuid) => {
try {
const response = await $fetch(`${config.public.odooApiUrl}/fastapi/orders/api/v1/orders/team/${teamUuid}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
}
})
return response
} catch (error) {
console.error('Error fetching team orders:', error)
throw error
}
}
const getOrderByUuid = async (orderUuid) => {
try {
const response = await $fetch(`${config.public.odooApiUrl}/fastapi/orders/api/v1/orders/${orderUuid}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
}
})
return response
} catch (error) {
console.error('Error fetching order:', error)
throw error
}
}
const getCompanies = async () => {
try {
const response = await $fetch(`${config.public.odooApiUrl}/fastapi/companies/api/v1/companies`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
}
})
return response
} catch (error) {
console.error('Error fetching companies:', error)
throw error
}
}
return {
getTeamOrders,
getOrderByUuid,
getCompanies
}
}