Skip to content

fix: Discounts visibility in order details table - #4374

Closed
Ryrahul wants to merge 1 commit into
vendurehq:masterfrom
Ryrahul:fix/discounts-order-table
Closed

fix: Discounts visibility in order details table#4374
Ryrahul wants to merge 1 commit into
vendurehq:masterfrom
Ryrahul:fix/discounts-order-table

Conversation

@Ryrahul

@Ryrahul Ryrahul commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Description

Fix [object Object] being displayed in the "Discounts" column of the order detail table in the Dashboard.

The order line table in order-table.tsx had custom cell renderers for most columns (featuredAsset, productVariant, unitPrice, quantity, etc.) but was missing one for discounts. This caused the auto-generated column renderer in DefaultDisplayComponent to call .join(', ') on an array of Discount objects, which produced [object Object] via Object.prototype.toString().

Added a custom discounts column renderer that displays each discount's description along with the formatted amount in a stacked layout, consistent with how other price columns (like Unit Price and Total) display gross/net values.

File changed:
packages/dashboard/src/app/routes/_authenticated/_orders/components/order-table.tsx


Breaking changes

None. This is a display-only fix scoped to the order detail table in the Dashboard.


Screenshots

image

Checklist

  • I have set a clear title
  • My PR is small and contains a single feature
  • I have checked my own PR
  • I have added or updated test cases
  • I have updated the README if needed

Fixes #4326

@vercel

vercel Bot commented Feb 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vendure-storybook Ready Ready Preview, Comment Feb 18, 2026 4:52pm

Request Review

@gabriellbui

gabriellbui commented Feb 19, 2026

Copy link
Copy Markdown
Collaborator

Hi @Ryrahul! Nice work on this! Two small things I've noticed

  1. The other price columns use MoneyGrossNet to show both gross and net amounts. To keep it consistent I would use that here as well instead of Money
  2. I think the root problem is in DefaultDisplayComponent as you have also mentioned. However, it's still gonna call .join(', ') on similar object arrays without a custom renderer resulting in the same [object Object]. I think we should also consider that.

I created a PR that would address both of these

@vendure-ci-automation-bot vendure-ci-automation-bot Bot locked and limited conversation to collaborators Feb 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard: incorrect display of discounts on the detailed order page in the OrderLine

2 participants