@pradip1995/segment-animation-order 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pradip1995/segment-animation-order",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Motion/Lumière order confirmed, failed, and details pages",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -16,6 +16,10 @@
16
16
  ".": "./src/index.ts",
17
17
  "./manifest": "./src/manifest.ts"
18
18
  },
19
+ "scripts": {
20
+ "typecheck": "tsc --noEmit",
21
+ "lint": "tsc --noEmit"
22
+ },
19
23
  "peerDependencies": {
20
24
  "@medusajs/types": ">=2",
21
25
  "@pradip1995/commerce-core": "^4.0.0",
@@ -25,7 +29,7 @@
25
29
  "react-dom": ">=19"
26
30
  },
27
31
  "dependencies": {
28
- "@pradip1995/segment-primitives": "^0.4.11",
32
+ "@pradip1995/segment-primitives": "^0.4.20",
29
33
  "framer-motion": "^11.0.0"
30
34
  },
31
35
  "devDependencies": {
@@ -36,9 +40,5 @@
36
40
  "next": ">=15",
37
41
  "react": "19.0.3",
38
42
  "typescript": "^5.7.2"
39
- },
40
- "scripts": {
41
- "typecheck": "tsc --noEmit",
42
- "lint": "tsc --noEmit"
43
43
  }
44
- }
44
+ }
@@ -106,9 +106,8 @@ export default function OrderActions({ order }: { order: HttpTypes.StoreOrder })
106
106
  const router = useRouter()
107
107
  const pathname = usePathname() || ""
108
108
  const countryCode = pathname.split("/").filter(Boolean)[0] || "in"
109
- const items = presentOrderLines(order).purchasedItems as LineItem[]
109
+ const items = presentOrderLines(order).returnExchangeItems as LineItem[]
110
110
  const activeReturns = getActiveReturns(order)
111
- const hasOpenReturn = activeReturns.length > 0
112
111
  const showCancel = canCancelOrder(order)
113
112
  const showReturnExchange = canReturnOrExchange(order)
114
113
  const showReorder = canReorder(order)
@@ -116,7 +115,9 @@ export default function OrderActions({ order }: { order: HttpTypes.StoreOrder })
116
115
  const hasEligibleItems = items.some(
117
116
  (item) => getEligibleQty(item, activeReturns) > 0
118
117
  )
119
- const returnActionsDisabled = hasOpenReturn || !hasEligibleItems
118
+ // Do not block the whole order when one return is open — remaining /
119
+ // delivered replacement qty must stay actionable (H.ankit flow).
120
+ const returnActionsDisabled = !hasEligibleItems
120
121
 
121
122
  useEffect(() => {
122
123
  setMounted(true)