feat(dashboard,medusa): Draft order detail (#6703)
**What** - Adds draft order details page - Adds Shipping and Billing address forms to both draft order and order pages - Adds Email form to both draft order and order pages - Adds transfer ownership form to draft order, order and customer pages - Update Combobox component allowing it to work with async data (`useInfiniteQuery`) **@medusajs/medusa** - Include country as a default relation of draft order addresses
This commit is contained in:
@@ -2,6 +2,7 @@ import type {
|
||||
AdminCollectionsRes,
|
||||
AdminCustomerGroupsRes,
|
||||
AdminCustomersRes,
|
||||
AdminDraftOrdersRes,
|
||||
AdminGiftCardsRes,
|
||||
AdminOrdersRes,
|
||||
AdminProductsRes,
|
||||
@@ -98,6 +99,27 @@ export const v1Routes: RouteObject[] = [
|
||||
crumb: (data: AdminOrdersRes) =>
|
||||
`Order #${data.order.display_id}`,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "shipping-address",
|
||||
lazy: () =>
|
||||
import("../../routes/orders/order-shipping-address"),
|
||||
},
|
||||
{
|
||||
path: "billing-address",
|
||||
lazy: () =>
|
||||
import("../../routes/orders/order-billing-address"),
|
||||
},
|
||||
{
|
||||
path: "email",
|
||||
lazy: () => import("../../routes/orders/order-email"),
|
||||
},
|
||||
{
|
||||
path: "transfer-ownership",
|
||||
lazy: () =>
|
||||
import("../../routes/orders/order-transfer-ownership"),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -108,7 +130,7 @@ export const v1Routes: RouteObject[] = [
|
||||
},
|
||||
children: [
|
||||
{
|
||||
index: true,
|
||||
path: "",
|
||||
lazy: () =>
|
||||
import("../../routes/draft-orders/draft-order-list"),
|
||||
},
|
||||
@@ -116,6 +138,38 @@ export const v1Routes: RouteObject[] = [
|
||||
path: ":id",
|
||||
lazy: () =>
|
||||
import("../../routes/draft-orders/draft-order-detail"),
|
||||
handle: {
|
||||
crumb: (data: AdminDraftOrdersRes) =>
|
||||
`Draft #${data.draft_order.display_id}`,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "transfer-ownership",
|
||||
lazy: () =>
|
||||
import(
|
||||
"../../routes/draft-orders/draft-order-transfer-ownership"
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "shipping-address",
|
||||
lazy: () =>
|
||||
import(
|
||||
"../../routes/draft-orders/draft-order-shipping-address"
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "billing-address",
|
||||
lazy: () =>
|
||||
import(
|
||||
"../../routes/draft-orders/draft-order-billing-address"
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "email",
|
||||
lazy: () =>
|
||||
import("../../routes/draft-orders/draft-order-email"),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user