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:
co-authored by
Carlos R. L. Rodrigues
parent
0430e63b0b
commit
39c3f6d92a
@@ -5,7 +5,7 @@ export const getOrderPaymentStatus = (
|
||||
t: TFunction<"translation">,
|
||||
status: PaymentStatus
|
||||
) => {
|
||||
const [label, color] = {
|
||||
const [label, color] = ({
|
||||
not_paid: [t("orders.payment.status.notPaid"), "red"],
|
||||
awaiting: [t("orders.payment.status.awaiting"), "orange"],
|
||||
captured: [t("orders.payment.status.captured"), "green"],
|
||||
@@ -16,7 +16,9 @@ export const getOrderPaymentStatus = (
|
||||
],
|
||||
canceled: [t("orders.payment.status.canceled"), "red"],
|
||||
requires_action: [t("orders.payment.status.requiresAction"), "orange"],
|
||||
}[status] as [string, "red" | "orange" | "green"]
|
||||
}[status] ||
|
||||
// TODO: remove this when Order<>Payment are linked
|
||||
"not_paid") as [string, "red" | "orange" | "green"]
|
||||
|
||||
return { label, color }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user