Skip to content

Commit 04aa883

Browse files
rename variable
rename variable
1 parent 8dc7628 commit 04aa883

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

packages/template-retail-react-app/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Integrate Order Details page to display orders data from OMS [#3573](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3573)
66
- Integrate Order History page to display data from OMS [#3581](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3581)
77
- Add shipping display support for OMS [#3588](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3588)
8+
- BOPIS multishipment with OMS [#3613] (https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3613)
89
- [Feature] Update passwordless login and password reset to use email mode by default. The mode can now be configured across the login page, auth modal, and checkout page [#3525](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3525)
910
- Update "Continue Securely" button text to "Continue" for passwordless login [#3556](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3556)
1011

packages/template-retail-react-app/app/pages/account/order-detail.jsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,9 @@ const AccountOrderDetail = () => {
137137
// Check if order has OMS data
138138
const isOmsOrder = useMemo(() => !!order?.omsData, [order?.omsData])
139139

140-
// Check if order is OMS multi-shipment order
141-
const isOmsMultiShipment = useMemo(
142-
() =>
143-
isOmsOrder &&
144-
((order?.omsData?.shipments?.length ?? 0) > 1 || (order?.shipments?.length ?? 0) > 1),
140+
// Check if order is multi-shipment order
141+
const isMultiShipmentOrder = useMemo(
142+
() => (order?.omsData?.shipments?.length ?? 0) > 1 || (order?.shipments?.length ?? 0) > 1,
145143
[isOmsOrder, order?.omsData?.shipments?.length, order?.shipments?.length]
146144
)
147145

@@ -397,8 +395,8 @@ const AccountOrderDetail = () => {
397395
</Stack>
398396
)
399397
})}
400-
{/* Delivery Shipments */}
401-
{!isOmsMultiShipment &&
398+
{/* Any type of Non-OMS or any type of single shipment order: show DeliveryMethods and Shipments info*/}
399+
{(!isOmsOrder || !isMultiShipmentOrder) &&
402400
deliveryShipments.map((shipment, index) => {
403401
const omsShipment = isOmsOrder
404402
? order.omsData.shipments?.[index]
@@ -458,8 +456,9 @@ const AccountOrderDetail = () => {
458456
)
459457
})}
460458

461-
{/* OMS multi-shipment: show OMS shipment info only;*/}
462-
{isOmsMultiShipment &&
459+
{/* Any OMS multi-shipment: Only show OMS Shipments info;*/}
460+
{isOmsOrder &&
461+
isMultiShipmentOrder &&
463462
order?.omsData?.shipments?.map((shipment, index) => (
464463
<React.Fragment key={`oms-shipment-${index}`}>
465464
{renderShippingMethod(

0 commit comments

Comments
 (0)