Skip to content

Commit 281c2a6

Browse files
committed
[Auto Generated]
1 parent 4c7b4e4 commit 281c2a6

File tree

8 files changed

+518
-5
lines changed

8 files changed

+518
-5
lines changed

dist/components/order-shipment/order-shipment.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/components/shipment-item/shipment-item.css

Lines changed: 483 additions & 0 deletions
Large diffs are not rendered by default.

dist/components/shipment-item/shipment-item.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pages/order/order-tracking-details/order-tracking-details.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2905,6 +2905,9 @@ h5,
29052905
font-weight: 600;
29062906
line-height: 140%;
29072907
}
2908+
.shipment-item__bagItem___YVBW1 .shipment-item__bagInfo___j7W8G .shipment-item__productCustomizationContainer___wXSug {
2909+
margin-top: 8px;
2910+
}
29082911
.shipment-item__bagItem___YVBW1 .shipment-item__bagInfo___j7W8G .shipment-item__requestReattempt___iY8FT {
29092912
width: 163px;
29102913
padding-top: 16px;

dist/pages/order/order-tracking-details/order-tracking-details.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github_app_jwt.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzM3NTc1MTksImV4cCI6MTc3Mzc1ODA4OSwiaXNzIjoiMzA1NjEyNSJ9.YmKdTeiERCyZ_mr7d0AmyFN1mMhMiDljr6gokoeEIhEyegN3k8aQHVPCr8RAP9AdhEQKjDseQAe1gxm-qjz5oI-_BNuvOhV6gsgBjBId42SlHuw6dfGMqyOGPRtXo4W4wwv6jRowvuFdxXBrVr7wocx-xON0d7uotWfMU_bGiIYdY3BZpFDXBlDPGw8O4D-7RmYuK5sfsY3cDtrZ1V8sxRDTfDNlY1XQHFImAzHYW1tLGhIQBYXmCV6Z-ZWN86u9d8ZA_vU5WXQ2s-7rpDRRcE3L9aYO9jojfgBjFBWx1h33P_5hnxmiwmmkxTyrDxM4ncVPrMTvql0KPZyEK_Pysw
1+
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzM3NzMwMjMsImV4cCI6MTc3Mzc3MzU5MywiaXNzIjoiMzA1NjEyNSJ9.MowOObXiXR9M8FhsBKl-maRGyfQgEiytJCletBBXHBzjl6N_oMinjgnrSfBycvQAP0W10wZL98P5A8mcJ7uBFY_16RtvQV0ZBJ7bZx5QLLb2i7ZxstiR5Iqf0nXp7t5wMQ24eodyIRDf0NDmFYsZ_Nmnv3GjzO4-Yxfc9qSKyDbLc8iyBENVmGkYvFeB5G3qU3vBL8Ii2vyZnNJUftTBLX0TqqGBJEXFZZ_VuLLi5mWxF21GV-GLTTNkesVUTablqs-THCPR2KQRB5gAc3ceA2T8E-07qkTwaYvgyCOt_Usaxh-A9qx0tcqkfSUHfwhIyNVtoW0Ura_YMCdw3RNXyw

src/components/shipment-item/shipment-item.jsx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
*/
1616

17-
import React, { useMemo } from "react";
17+
import React, { useMemo, useState } from "react";
1818
import { FDKLink } from "fdk-core/components";
1919
import * as styles from "./shipment-item.less";
2020
import SvgWrapper from "../../components/core/svgWrapper/SvgWrapper";
@@ -23,6 +23,8 @@ import { useGlobalTranslation } from "fdk-core/utils";
2323
import ScheduleIcon from "../../assets/images/schedule.svg";
2424
import { BagImage, BundleBagImage } from "../../components/bag/bag";
2525
import { getProductImgAspectRatio } from "../../helper/utils";
26+
import Accordion from "../accordion/accordion";
27+
import { transformDisplayToAccordionContent } from "../../helper/customization-display";
2628

2729
function ShipmentItem({
2830
bag,
@@ -76,6 +78,13 @@ function ShipmentItem({
7678
return endDate < now;
7779
};
7880

81+
const customizationOptions = transformDisplayToAccordionContent(
82+
bag?.meta?._custom_json?._display || []
83+
);
84+
const [accordionItems, setAccordionItems] = useState([
85+
{ title: "Customization", content: customizationOptions, open: false },
86+
]);
87+
7988
const bundleGroupId = bag?.bundle_details?.bundle_group_id;
8089
const isBundleItem =
8190
bundleGroupId && bundleGroups && bundleGroups[bundleGroupId]?.length > 0;
@@ -208,6 +217,20 @@ function ShipmentItem({
208217
</div>
209218
)}
210219
</div>
220+
{customizationOptions.length > 0 && (
221+
<div className={styles.productCustomizationContainer}>
222+
<Accordion
223+
items={accordionItems}
224+
onItemClick={(index) =>
225+
setAccordionItems((prev) =>
226+
prev.map((acc, i) =>
227+
i === index ? { ...acc, open: !acc.open } : acc
228+
)
229+
)
230+
}
231+
/>
232+
</div>
233+
)}
211234
<div className={styles.buttonContainer}>
212235
<div
213236
className={`${styles.requestReattempt} ${

src/components/shipment-item/shipment-item.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@
114114
line-height: 140%;
115115
}
116116

117+
.productCustomizationContainer {
118+
margin-top: 8px;
119+
}
120+
117121
.requestReattempt {
118122
width: 163px;
119123
padding-top: 16px;

0 commit comments

Comments
 (0)