feat(dashboard): basic Order UI (#7225)
**WHAT** - rudimentary list and details pages - fix Order<>Promotion link - fix Order<>SalesChannel link **NOTE** - displaying basic info since we don't have Fulfillments & Payments linked ATM - `disaply_id` needs to be added to order - `tax_rate` needs to be added to order --- https://github.com/medusajs/medusa/assets/16856471/cd4e98c7-345e-4193-8c1e-ad4ed1584993 Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
This commit is contained in:
@@ -23,6 +23,7 @@ import { stores } from "./stores"
|
||||
import { tags } from "./tags"
|
||||
import { taxes } from "./taxes"
|
||||
import { users } from "./users"
|
||||
import { orders } from "./orders"
|
||||
import { workflowExecutions } from "./workflow-executions"
|
||||
import { shippingProfiles } from "./shipping-profiles"
|
||||
|
||||
@@ -43,6 +44,7 @@ export const client = {
|
||||
shippingProfiles: shippingProfiles,
|
||||
tags: tags,
|
||||
users: users,
|
||||
orders: orders,
|
||||
regions: regions,
|
||||
taxes: taxes,
|
||||
invites: invites,
|
||||
|
||||
15
packages/admin-next/dashboard/src/lib/client/orders.ts
Normal file
15
packages/admin-next/dashboard/src/lib/client/orders.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { getRequest } from "./common"
|
||||
import { OrderListRes, OrderRes } from "../../types/api-responses"
|
||||
|
||||
async function retrieveOrder(id: string, query?: Record<string, any>) {
|
||||
return getRequest<OrderRes, Record<string, any>>(`/admin/orders/${id}`, query)
|
||||
}
|
||||
|
||||
async function listOrders(query?: Record<string, any>) {
|
||||
return getRequest<OrderListRes, Record<string, any>>(`/admin/orders`, query)
|
||||
}
|
||||
|
||||
export const orders = {
|
||||
list: listOrders,
|
||||
retrieve: retrieveOrder,
|
||||
}
|
||||
Reference in New Issue
Block a user