fix: Discounts visibility in order details table - #4374
Closed
Ryrahul wants to merge 1 commit into
Closed
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
|
Hi @Ryrahul! Nice work on this! Two small things I've noticed
I created a PR that would address both of these |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsxhad custom cell renderers for most columns (featuredAsset, productVariant, unitPrice, quantity, etc.) but was missing one fordiscounts. This caused the auto-generated column renderer inDefaultDisplayComponentto call.join(', ')on an array of Discount objects, which produced[object Object]viaObject.prototype.toString().Added a custom
discountscolumn 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.tsxBreaking changes
None. This is a display-only fix scoped to the order detail table in the Dashboard.
Screenshots
Checklist
Fixes #4326