fix: order details status (#10650)

This commit is contained in:
Frane Polić
2024-12-18 12:56:18 +01:00
committed by GitHub
parent c9b8db04c1
commit c7008bb569

View File

@@ -61,7 +61,6 @@ export const OrderGeneralSection = ({ order }: OrderGeneralSectionProps) => {
<div className="flex items-center gap-x-4">
<div className="flex items-center gap-x-1.5">
<PaymentBadge order={order} />
{/*TODO: SHOW ORDER STATUS INSTEAD OF FULFILLMENT STATUS HERE - if the last fulfillment is canceled it looks like the order is canceled*/}
<FulfillmentBadge order={order} />
</div>
<ActionMenu
@@ -71,6 +70,7 @@ export const OrderGeneralSection = ({ order }: OrderGeneralSectionProps) => {
{
label: t("actions.cancel"),
onClick: handleCancel,
disabled: !!order.canceled_at,
icon: <XCircle />,
},
],
@@ -100,11 +100,6 @@ const FulfillmentBadge = ({ order }: { order: HttpTypes.AdminOrder }) => {
const PaymentBadge = ({ order }: { order: HttpTypes.AdminOrder }) => {
const { t } = useTranslation()
/**
* TODO: revisit when Order<>Payment are linked
*/
return null
const { label, color } = getOrderPaymentStatus(t, order.payment_status)
return (