From 1e761345be9fd179b03682b8291158147485135d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Frane=20Poli=C4=87?=
<16856471+fPolic@users.noreply.github.com>
Date: Tue, 25 Nov 2025 20:37:45 +0100
Subject: [PATCH] feat(dashboard): show promo tooltip on the edit flows
(#14121)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Summary
**What** — What changes are introduced in this PR?
Display a tootlipt on line items when creating OrderEdit/Exchange to show which promotions are applied on the items.
---
## Checklist
Please ensure the following before requesting a review:
- [x] I have added a **changeset** for this PR
- Every non-breaking change should be marked as a **patch**
- To add a changeset, run `yarn changeset` and follow the prompts
- [ ] The changes are covered by relevant **tests**
- [x] I have verified the code works as intended locally
- [ ] I have linked the related issue(s) if applicable
---
.changeset/cozy-candles-work.md | 5 +++
.../order-edit-item.tsx | 31 +++++++++++++++--
.../exchange-inbound-item.tsx | 33 ++++++++++++++++---
.../exchange-outbound-item.tsx | 27 ++++++++++++---
4 files changed, 85 insertions(+), 11 deletions(-)
create mode 100644 .changeset/cozy-candles-work.md
diff --git a/.changeset/cozy-candles-work.md b/.changeset/cozy-candles-work.md
new file mode 100644
index 0000000000..441e79a511
--- /dev/null
+++ b/.changeset/cozy-candles-work.md
@@ -0,0 +1,5 @@
+---
+"@medusajs/dashboard": patch
+---
+
+feat(dashboard): show promo tooltip on edit flows
diff --git a/packages/admin/dashboard/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-item.tsx b/packages/admin/dashboard/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-item.tsx
index fd164a19ed..126239bb81 100644
--- a/packages/admin/dashboard/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-item.tsx
+++ b/packages/admin/dashboard/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-item.tsx
@@ -1,6 +1,11 @@
-import { ArrowUturnLeft, DocumentSeries, XCircle } from "@medusajs/icons"
+import {
+ ArrowUturnLeft,
+ DocumentSeries,
+ ReceiptPercent,
+ XCircle,
+} from "@medusajs/icons"
import { AdminOrderLineItem } from "@medusajs/types"
-import { Badge, Input, Text, toast } from "@medusajs/ui"
+import { Badge, Input, Text, toast, Tooltip } from "@medusajs/ui"
import { useTranslation } from "react-i18next"
import { ActionMenu } from "../../../../../components/common/action-menu"
@@ -45,6 +50,10 @@ function OrderEditItem({ item, currencyCode, orderId }: OrderEditItemProps) {
return !!updateAction && item.quantity === item.detail.fulfilled_quantity
}, [item])
+ const appliedPromoCodes = useMemo(() => {
+ return (item.adjustments || []).map((adjustment) => adjustment.code)
+ }, [item])
+
/**
* HANDLERS
*/
@@ -166,7 +175,7 @@ function OrderEditItem({ item, currencyCode, orderId }: OrderEditItemProps) {
)}
-