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AA8BR,QAAQ,UAO9FrN,EAAMuM,aAAe3J,EAAuB,OAI9CqI,GAuDEF,GACAxE,EACAM,EACAT,EACApG,EAAMC,KAAKC,SAAS0J,eAAiB5J,EAAMC,KAAK+N,WAAahO,EAAMwF,UAAUyI,sBAC1EjN,EAAAA,cAACkN,EAAAA,oBAAmB,CAChBjN,UAAU,wCACVX,QAASN,EAAMM,QACfkF,UAAWxF,EAAMwF,UAAUyI,qBAC3BD,UAAWhO,EAAMC,KAAK+N,UACtB9N,SAAUF,EAAMC,KAAKC,WA7DjCA,GAAYA,EAASiO,mBAEjBnN,EAAAA,cAAA,OAAKC,UAAU,wCACXD,EAAAA,cAAA,QAAMC,UAAU,WAAWjB,EAAMoO,mBAKrCpN,EAAAA,cAAA,OAAKC,UAAU,wCACXD,EAAAA,cAAA,QAAMC,UAAU,YAAYjB,EAAMoO,uBAkE3ClN,IAIX","sources":["webpack://Msdyn365.Commerce.Online/./src/actions/get-product-attributes-cartlines.action.ts?e311","webpack://Msdyn365.Commerce.Online/./src/themes/bluecrest/views/components/cartlineitem.component.tsx?6ea4"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy';\r\nimport { getCatalogId } from '@msdyn365-commerce/core';\r\nimport { getAttributeValuesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\n/**\r\n * GetProductAttributesCartlines Input Action\r\n */\r\nexport class GetProductAttributesCartlinesInput implements Msdyn365.IActionInput {\r\n public productID: number;\r\n constructor(productID: number) {\r\n this.productID = productID;\r\n }\r\n\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `getProductAttributeCartline`;\r\n public getCacheObjectType = () => 'getProductAttributeCartline';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetProductAttributesCartlinesData {\r\n productAttributes: AttributeValue[];\r\n}\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nexport async function getProductAttributeCartlineAction(\r\n input: GetProductAttributesCartlinesInput,\r\n ctx: Msdyn365.IActionContext\r\n): Promise {\r\n const catalogId = getCatalogId(ctx.requestContext);\r\n const channelID = +ctx.requestContext.apiSettings.channelId;\r\n\r\n const attributeValueResponse = await getAttributeValuesAsync({ callerContext: ctx }, input.productID, channelID, catalogId);\r\n return { productAttributes: attributeValueResponse };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getProductAttributeCartlineAction,\r\n id: 'GetProductAttributesCartlines'\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { CartLinePriceEditor, ICartLinePriceEditorResources, PriceComponent } from '@msdyn365-commerce/components';\r\nimport { ProductPrice } from '@msdyn365-commerce/retail-proxy';\r\nimport MsDyn365, {\r\n IComponentProps,\r\n IGridSettings,\r\n IImageSettings,\r\n Image,\r\n isChannelTypeB2B,\r\n msdyn365Commerce\r\n} from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport {\r\n CartLine,\r\n ChannelDeliveryOptionConfiguration,\r\n ProductCatalog,\r\n ProductDimensionType,\r\n SalesLine,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport { ArrayExtensions, getFallbackImageUrl, validateCatalogId, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getPayloadObject, getTelemetryAttributes, IncrementalQuantity, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\n// import classNames from 'classnames';\r\nimport * as React from 'react';\r\nimport { SimpleProductExtended } from '../checkout.view';\r\nimport {\r\n GetProductAttributesCartlinesInput,\r\n getProductAttributeCartlineAction\r\n} from '../../../../actions/get-product-attributes-cartlines.action';\r\n\r\n/**\r\n * ICartlineResourceString: Interface for specifying the\r\n * resource strings that the component needs.\r\n */\r\nexport interface ICartlineResourceString {\r\n /**\r\n * Display string for discount label.\r\n */\r\n discountStringText: string;\r\n\r\n /**\r\n * String for size key.\r\n */\r\n sizeString: string;\r\n\r\n /**\r\n * String for color key.\r\n */\r\n colorString: string;\r\n\r\n /**\r\n * String associated with the configuration product dimension.\r\n */\r\n configString: string;\r\n\r\n /**\r\n * String for style key.\r\n */\r\n styleString: string;\r\n\r\n /**\r\n * String for amount key.\r\n */\r\n amountString?: string;\r\n\r\n /**\r\n * Display string for quantity label.\r\n */\r\n quantityDisplayString: string;\r\n\r\n /**\r\n * Display string for quantity label.\r\n */\r\n inputQuantityAriaLabel: string;\r\n\r\n /**\r\n * Aria label for the decrement button in quantity component.\r\n */\r\n decrementButtonAriaLabel?: string;\r\n\r\n /**\r\n * Aria label for the increment button in quantity component.\r\n */\r\n incrementButtonAriaLabel?: string;\r\n\r\n /**\r\n * Original text screenreader.\r\n */\r\n originalPriceText: string;\r\n\r\n /**\r\n * Current text screenreader.\r\n */\r\n currentPriceText: string;\r\n\r\n /**\r\n * Shipping Charges Text.\r\n */\r\n shippingChargesText: string;\r\n\r\n /**\r\n * Price Editor Charges Text.\r\n */\r\n priceEditorResources?: ICartLinePriceEditorResources;\r\n\r\n /**\r\n * Sales agreement price prompt text.\r\n */\r\n salesAgreementPricePrompt?: string;\r\n\r\n /**\r\n * Shipping text.\r\n */\r\n shippingText?: string;\r\n confirmedShipDateLabel?: string;\r\n /**\r\n * Request Delivery Date Label.\r\n */\r\n requestDeliveryDateLabel?: string;\r\n}\r\n\r\nexport type CartLineDisplayMode = 'DEFAULT' | 'COMPACT';\r\n\r\n/**\r\n * Represents cart line data interface.\r\n */\r\ninterface ICartLineData {\r\n cartLine: CartLine | SalesLine;\r\n cartState?: ICartState;\r\n product?: SimpleProductExtended;\r\n catalogs?: ProductCatalog[];\r\n}\r\n\r\n/**\r\n * ICartLineProps: The props required to render cartLineitem.\r\n */\r\nexport interface ICartLineProps extends IComponentProps {\r\n /**\r\n * The flag to change the quantity component from interactible to static.\r\n */\r\n disableQuantityInteractivity?: boolean;\r\n\r\n /**\r\n * The primary image url.\r\n */\r\n primaryImageUrl?: string;\r\n\r\n /**\r\n * The product url.\r\n */\r\n productUrl?: string;\r\n\r\n /**\r\n * GridSettings for the product image in cartLine.\r\n */\r\n gridSettings: IGridSettings;\r\n\r\n /**\r\n * ImageSettings for the product image in cartLine.\r\n */\r\n imageSettings: IImageSettings;\r\n\r\n /**\r\n * Boolean flag to indicate if the item is out of stock.\r\n */\r\n isOutOfStock?: boolean;\r\n\r\n /**\r\n * Flag to make quantity section editable.\r\n */\r\n isQuantityEditable?: boolean;\r\n\r\n /**\r\n * Max quantity for line item.\r\n */\r\n maxQuantity?: number;\r\n\r\n /**\r\n * Current quantity for line item.\r\n */\r\n currentQuantity?: number;\r\n\r\n /**\r\n * Resource string for the component.\r\n */\r\n resources: ICartlineResourceString;\r\n\r\n /**\r\n * SalesLine flag.\r\n */\r\n isSalesLine?: boolean;\r\n\r\n /**\r\n * Error message to show in place of quantity.\r\n */\r\n errorMessage?: string;\r\n\r\n /**\r\n * Display mode to use.\r\n */\r\n displayMode?: CartLineDisplayMode;\r\n\r\n /**\r\n * Inventory information label.\r\n */\r\n inventoryInformationLabel?: string;\r\n\r\n /**\r\n * Inventory information class name.\r\n */\r\n inventoryLabelClassName?: string;\r\n\r\n /**\r\n * Flag to show/hide shipping charges for line items.\r\n */\r\n showShippingChargesForLineItems?: boolean;\r\n\r\n /**\r\n * Boolean flag to indicate if cart state status is ready.\r\n */\r\n isCartStateReady?: boolean;\r\n\r\n /**\r\n * Chanel Delivery Option configuration is from api.\r\n */\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n\r\n /**\r\n * The telemetry content.\r\n */\r\n telemetryContent?: ITelemetryContent;\r\n\r\n /**\r\n * The cart line delivery location.\r\n */\r\n deliveryLocation?: string;\r\n productPrices?: ProductPrice[];\r\n\r\n /**\r\n * Quantity onChange callback.\r\n */\r\n quantityOnChange?(cartLine: CartLine, newQuantity: number): boolean;\r\n priceCurrency?: string;\r\n /**\r\n * Sales line confirmed ship date.\r\n */\r\n confirmedShipDate?: string;\r\n\r\n /**\r\n * Sales line request delivery date.\r\n */\r\n requestDeliveryDate?: string;\r\n}\r\n\r\n/**\r\n * Represents dimensions strings.\r\n */\r\ninterface IDimensionStrings {\r\n /**\r\n * String for size key.\r\n */\r\n sizeString: string;\r\n\r\n /**\r\n * String for color key.\r\n */\r\n colorString: string;\r\n\r\n /**\r\n * String associated with the configuration product dimension.\r\n */\r\n configString: string;\r\n\r\n /**\r\n * String for style key.\r\n */\r\n styleString: string;\r\n\r\n /**\r\n * String for amount key.\r\n */\r\n amountString?: string;\r\n}\r\n\r\n/**\r\n * Renders catalog label for the cart line.\r\n * @param props - Cart line props.\r\n * @returns Catalog label.\r\n */\r\nconst CatalogLabelComponent: React.FC = (props: ICartLineProps) => {\r\n const catalogId = props.data.cartLine.CatalogId;\r\n validateCatalogId(catalogId);\r\n\r\n if (!isChannelTypeB2B(props.context.actionContext.requestContext) || !catalogId || !ArrayExtensions.hasElements(props.data.catalogs)) {\r\n return null;\r\n }\r\n\r\n const catalog = props.data.catalogs.find(item => item.RecordId === catalogId);\r\n\r\n if (!catalog || !catalog.Name) {\r\n return null;\r\n }\r\n\r\n return
{catalog.Name}
;\r\n};\r\n\r\nconst cartLineItemFunctions = {\r\n /**\r\n * Render product dimensions.\r\n * @param product - Product data.\r\n * @param dimensionStrings - Dimension strings interface.\r\n * @returns JSX Element.\r\n */\r\n renderProductDimensions: (product: SimpleProduct, dimensionStrings: IDimensionStrings) => {\r\n if (!product.Dimensions) {\r\n return [];\r\n }\r\n\r\n return product.Dimensions.map(productDimension => {\r\n if (productDimension.DimensionTypeValue === ProductDimensionType.Color) {\r\n return (\r\n
\r\n \r\n {dimensionStrings.colorString}\r\n {': '}\r\n {productDimension.DimensionValue?.Value}\r\n \r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === ProductDimensionType.Configuration) {\r\n return (\r\n
\r\n \r\n {dimensionStrings.configString}\r\n {': '}\r\n {productDimension.DimensionValue?.Value}\r\n \r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === ProductDimensionType.Size) {\r\n return (\r\n
\r\n \r\n {dimensionStrings.sizeString}\r\n {': '}\r\n {productDimension.DimensionValue?.Value}\r\n \r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === ProductDimensionType.Style) {\r\n return (\r\n
\r\n \r\n {product.IsGiftCard ? dimensionStrings.amountString : dimensionStrings.styleString}\r\n {': '}\r\n {productDimension.DimensionValue?.Value}\r\n \r\n
\r\n );\r\n }\r\n return null;\r\n });\r\n },\r\n\r\n /**\r\n * Gets the react node for product unit of price display.\r\n * @param props - The cart line props.\r\n * @returns The node representing markup for unit of measure component.\r\n */\r\n\r\n /**\r\n * Render discount lines.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n\r\n /**\r\n * Render inventory label.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n renderInventoryLabel: (props: ICartLineProps) => {\r\n const inventoryCssName = props.inventoryLabelClassName\r\n ? `msc-cart-line__product-inventory-label ${props.inventoryLabelClassName}`\r\n : 'msc-cart-line__product-inventory-label';\r\n\r\n return

{props.inventoryInformationLabel}

;\r\n },\r\n\r\n renderRepairableText: (props: ICartLineProps, isRepairable?: boolean, isRepairableText?: string) => {\r\n const repairableText = props.context?.app?.config?.repairableProductText;\r\n if (isRepairable) {\r\n return

{isRepairableText ? isRepairableText : repairableText}

;\r\n } else {\r\n return <>;\r\n }\r\n },\r\n\r\n /**\r\n * Render shipping label.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n renderShippingLabel: (props: ICartLineProps) => {\r\n const pickupDeliveryModeCode = props.context.request.channel?.PickupDeliveryModeCode;\r\n const channelDeliveryOptionConfig = props.channelDeliveryOptionConfig;\r\n const cartline = props.data.cartLine;\r\n let hasShippingMethod = false;\r\n if (channelDeliveryOptionConfig !== undefined) {\r\n hasShippingMethod = !!(\r\n cartline.DeliveryMode &&\r\n channelDeliveryOptionConfig.PickupDeliveryModeCodes?.some(deliveryMode => deliveryMode !== cartline.DeliveryMode)\r\n );\r\n } else {\r\n hasShippingMethod = !!(cartline.DeliveryMode && cartline.DeliveryMode !== pickupDeliveryModeCode);\r\n }\r\n if (!hasShippingMethod) {\r\n return undefined;\r\n }\r\n\r\n const shippingChargeLines = (cartline.ChargeLines ?? []).filter(chargeLine => chargeLine.IsShipping);\r\n\r\n if (!ArrayExtensions.hasElements(shippingChargeLines)) {\r\n return undefined;\r\n }\r\n\r\n const defaultCharge: number = 0;\r\n const freightFee = shippingChargeLines.reduce((chargeTotal, chargeLine) => {\r\n return chargeTotal + (chargeLine.CalculatedAmount ?? defaultCharge);\r\n }, defaultCharge);\r\n\r\n const priceComponent = (\r\n \r\n );\r\n return (\r\n <>\r\n \r\n {priceComponent}\r\n \r\n );\r\n },\r\n\r\n /**\r\n * Render other charges.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n renderOtherCharges: (props: ICartLineProps) => {\r\n const cartline = props.data.cartLine;\r\n const otherCharges = cartline.ChargeLines?.filter(chargeline => !chargeline.IsShipping);\r\n\r\n return (\r\n otherCharges?.map((otherCharge, index) => {\r\n const itemIndex = index;\r\n return otherCharge.CalculatedAmount ? (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n ) : (\r\n ''\r\n );\r\n }) ?? undefined\r\n );\r\n },\r\n\r\n /**\r\n * Render the sales agreement prompt.\r\n * @param props - The ICartLineProps.\r\n * @returns The JSX.Element.\r\n */\r\n renderSalesAgreementPrompt: (props: ICartLineProps): JSX.Element | null => {\r\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers -- We use 0 to indicate no sales agreement applied on the cart line.\r\n if (props.data.cartLine.SalesAgreementLineRecordId === 0) {\r\n return null;\r\n }\r\n return
{props.resources.salesAgreementPricePrompt}
;\r\n },\r\n renderConfirmedShipDate: (props: ICartLineProps) => {\r\n if (!props.isSalesLine || props.confirmedShipDate === undefined || StringExtensions.isNullOrEmpty(props.confirmedShipDate)) {\r\n return null;\r\n }\r\n return (\r\n
\r\n {props.resources.confirmedShipDateLabel}\r\n {props.confirmedShipDate}\r\n
\r\n );\r\n },\r\n\r\n renderRequestDeliveryDate: (props: ICartLineProps) => {\r\n if (!props.isSalesLine || props.requestDeliveryDate === undefined || StringExtensions.isNullOrEmpty(props.requestDeliveryDate)) {\r\n return null;\r\n }\r\n return (\r\n
\r\n {props.resources.requestDeliveryDateLabel}\r\n {props.requestDeliveryDate}\r\n
\r\n );\r\n }\r\n};\r\n\r\n/**\r\n * Render cartline component.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n// eslint-disable-next-line no-redeclare\r\nconst CartLine: React.FC = (props: ICartLineProps) => {\r\n const { productUrl, resources } = props;\r\n const { product, cartLine } = props.data;\r\n const [isRepairable, setIsRepairable] = React.useState(false);\r\n const [isRepairableText, setIsRepairableText] = React.useState('');\r\n const [productData, setProductData] = React.useState(product);\r\n\r\n React.useEffect(() => {\r\n const getProductAttributes = async () => {\r\n if (productData) {\r\n const getAttributeValueInput = new GetProductAttributesCartlinesInput(Number(productData.RecordId));\r\n try {\r\n const productSpecificationData = await getProductAttributeCartlineAction(\r\n getAttributeValueInput,\r\n props.context.actionContext\r\n );\r\n\r\n setProductData(prevProductData => {\r\n if (prevProductData) {\r\n return {\r\n ...prevProductData,\r\n Attributes: productSpecificationData.productAttributes\r\n };\r\n } else {\r\n return {\r\n ...productData,\r\n Attributes: productSpecificationData.productAttributes\r\n };\r\n }\r\n });\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n }\r\n };\r\n\r\n getProductAttributes();\r\n }, [productData, props.context.actionContext]);\r\n\r\n React.useEffect(() => {\r\n const isRepairableAttr = productData?.Attributes?.find(attr => attr.Name === 'Repairable');\r\n const isRepairableAttrText = productData?.Attributes?.find(attr => attr.Name === 'Repairable Information');\r\n\r\n if (isRepairableAttr?.BooleanValue === true) {\r\n setIsRepairable(true);\r\n if (isRepairableAttrText) {\r\n setIsRepairableText(isRepairableAttrText.TextValue);\r\n }\r\n } else {\r\n setIsRepairable(false);\r\n setIsRepairableText('');\r\n }\r\n }, [productData?.Attributes]);\r\n\r\n const destructDimensionStrings = {\r\n sizeString: resources.sizeString,\r\n colorString: resources.colorString,\r\n styleString: resources.styleString,\r\n configString: resources.configString,\r\n amountString: resources.amountString\r\n };\r\n\r\n const fallbackImageUrl = product && getFallbackImageUrl(product.ItemId, props.context.actionContext.requestContext.apiSettings);\r\n const productDimensions = product && cartLineItemFunctions.renderProductDimensions(product, destructDimensionStrings);\r\n const imageSettings = props.imageSettings;\r\n if (imageSettings) {\r\n imageSettings.cropFocalRegion = true;\r\n }\r\n\r\n const renderInventoryLabel = cartLineItemFunctions.renderInventoryLabel(props);\r\n const renderRepairableText = cartLineItemFunctions.renderRepairableText(props, isRepairable, isRepairableText);\r\n const renderShippingLabel = cartLineItemFunctions.renderShippingLabel(props);\r\n const renderOtherCharges = cartLineItemFunctions.renderOtherCharges(props);\r\n const renderSalesAgreementPrompt = cartLineItemFunctions.renderSalesAgreementPrompt(props);\r\n const renderConfirmedShipDate = cartLineItemFunctions.renderConfirmedShipDate(props);\r\n const renderRequestDeliveryDate = cartLineItemFunctions.renderRequestDeliveryDate(props);\r\n const payLoad = getPayloadObject('click', props.telemetryContent!, '', product?.RecordId.toString());\r\n const productAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n const productName = product?.Name ?? cartLine.Description;\r\n const partNumber = product?.ItemId; //created to view part Number\r\n const imgeClassName = props.data.cartLine.IsInvoiceLine ? 'msc-cart-line__invoice-image' : 'msc-cart-line__product-image';\r\n const cartLineContentClassName = props.data.cartLine.IsInvoiceLine ? 'msc-cart-line__invoice-content' : 'msc-cart-line__content';\r\n\r\n /**\r\n * Render other charges.\r\n * @param newValue - The cart line props.\r\n * @returns Boolean.\r\n */\r\n const onChange = (newValue: number): boolean => {\r\n if (props.quantityOnChange) {\r\n return props.quantityOnChange(props.data.cartLine, newValue);\r\n }\r\n return true;\r\n };\r\n\r\n /**\r\n * Generate error message.\r\n * @returns JSX element.\r\n */\r\n const generateErrorMessage = (): JSX.Element | null => {\r\n if (props.errorMessage) {\r\n return (\r\n
\r\n \r\n {props.errorMessage}\r\n
\r\n );\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Render Saving component.\r\n * @returns JSX element.\r\n */\r\n\r\n /**\r\n * Gets the react node for product unit of measure display.\r\n * @returns The node representing markup for unit of measure component.\r\n */\r\n const renderUnitOfMeasure = () => {\r\n if (props.data.cartLine.IsInvoiceLine) {\r\n return null;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Do not need type check for appsettings\r\n if (!props.context.app.config.unitOfMeasureDisplayType || props.context.app.config.unitOfMeasureDisplayType === 'none') {\r\n return undefined;\r\n }\r\n\r\n if (!product || !product.DefaultUnitOfMeasure) {\r\n return undefined;\r\n }\r\n\r\n return (\r\n
\r\n {product.DefaultUnitOfMeasure}\r\n
\r\n );\r\n };\r\n\r\n /**\r\n * Generate quantity and price component.\r\n * @returns JSX element.\r\n */\r\n const generateQuantityAndPrice = (): JSX.Element[] | null => {\r\n const nodes = [];\r\n const defaultMaxQuantity: number = 10;\r\n const unitOfMeasure = renderUnitOfMeasure();\r\n\r\n // No quantity selector for invoice line\r\n if (!props.data.cartLine.IsInvoiceLine) {\r\n if (props.data.product && props.isQuantityEditable) {\r\n nodes.push(\r\n
\r\n
{resources.quantityDisplayString}
\r\n\r\n {generateErrorMessage()}\r\n\r\n \r\n {unitOfMeasure}\r\n
\r\n );\r\n }\r\n }\r\n\r\n const [discount, setDiscount] = React.useState(0);\r\n const [DiscountAmount, setDiscountAmount] = React.useState(0);\r\n\r\n React.useEffect(() => {\r\n props?.productPrices\r\n ?.filter(PLProduct => product?.ItemId === PLProduct?.ItemId) //filtering data from bc-cart-line-items with the product data in the current component with product ids\r\n .map(data => {\r\n let discountedPrice: number = data?.BasePrice ?? 0;\r\n let originalPrice: number = data?.CustomerContextualPrice ?? 0;\r\n setDiscount(Number((100 - (originalPrice / discountedPrice) * 100).toFixed(2)));\r\n setDiscountAmount(data?.DiscountAmount ?? 0);\r\n });\r\n }, [props?.productPrices]); //created useEffect to rerender this component whenever props?.productPrices gets updated\r\n\r\n nodes.push(\r\n
\r\n {props?.productPrices // this is the data we are receiving from bc-cart-line-items\r\n ?.filter(PLProduct => product?.ItemId === PLProduct?.ItemId)\r\n .map(data => (\r\n
\r\n
\r\n {DiscountAmount > 0 ? (\r\n // discountedPrice\r\n //added toFixed(2) to round to 2 values after decimals\r\n
\r\n
\r\n

Price:

\r\n

${data?.BasePrice?.toFixed(2)}

\r\n

{`${discount}% off`}

\r\n
\r\n
\r\n

Your Price:

\r\n

${data.CustomerContextualPrice?.toFixed(2)}

\r\n
\r\n
\r\n ) : data.BasePrice !== data.AdjustedPrice &&\r\n data.BasePrice === data.TradeAgreementPrice &&\r\n DiscountAmount === 0 ? (\r\n //adjustedPrice\r\n //added toFixed(2) to round to 2 values after decimals\r\n
\r\n
\r\n
Price:
\r\n\r\n

${data.BasePrice?.toFixed(2)}

\r\n
\r\n
\r\n
Your price:
\r\n

${data.CustomerContextualPrice?.toFixed(2)}

\r\n
\r\n
\r\n ) : data.BasePrice !== data.TradeAgreementPrice &&\r\n data.BasePrice !== data.AdjustedPrice &&\r\n data.TradeAgreementPrice !== data.AdjustedPrice ? (\r\n //tradeAgreementPrice && adjusted together scenario\r\n //added toFixed(2) to round to 2 values after decimals\r\n
\r\n
\r\n
Price:
\r\n

${data.TradeAgreementPrice?.toFixed(2)}

\r\n
\r\n
\r\n
Your price:
\r\n

${data.CustomerContextualPrice?.toFixed(2)}

\r\n
\r\n
\r\n ) : data.BasePrice !== data.TradeAgreementPrice ? (\r\n //tradeAgreementPrice\r\n //added toFixed(2) to round to 2 values after decimals\r\n
\r\n
Price:
\r\n

${data.CustomerContextualPrice?.toFixed(2)}

\r\n
\r\n ) : (\r\n //NormalPrice\r\n //added toFixed(2) to round to 2 values after decimals\r\n
\r\n
Price:
\r\n

${data.CustomerContextualPrice?.toFixed(2)}

\r\n
\r\n )}\r\n
\r\n
\r\n ))}\r\n\r\n {props.isOutOfStock ? renderInventoryLabel : null}\r\n
\r\n );\r\n\r\n return nodes;\r\n };\r\n\r\n const _renderStoreLocation = (): JSX.Element | null => {\r\n if (cartLine && cartLine.FulfillmentStoreId) {\r\n return (\r\n
\r\n {props.deliveryLocation}\r\n
\r\n );\r\n } else {\r\n return (\r\n
\r\n {props.deliveryLocation}\r\n
\r\n );\r\n }\r\n };\r\n return (\r\n
\r\n {MsDyn365.isBrowser ? (\r\n \r\n \r\n ) : null}\r\n
\r\n
\r\n \r\n {MsDyn365.isBrowser ? (\r\n \r\n {productName}\r\n \r\n ) : null}\r\n {/* showing part no here */}\r\n

Part No: {partNumber}

\r\n {ArrayExtensions.hasElements(productDimensions) ? (\r\n
{productDimensions}
\r\n ) : (\r\n ''\r\n )}\r\n {renderRepairableText}\r\n {renderInventoryLabel}\r\n {props.showShippingChargesForLineItems &&
{renderShippingLabel}
}\r\n {renderOtherCharges}\r\n {renderSalesAgreementPrompt}\r\n
\r\n {generateQuantityAndPrice()}\r\n {renderConfirmedShipDate}\r\n {renderRequestDeliveryDate}\r\n {renderSalesAgreementPrompt}\r\n {props.data.cartLine.IsInvoiceLine && props.data.cartState && props.resources.priceEditorResources && (\r\n \r\n )}\r\n {_renderStoreLocation()}\r\n
\r\n
\r\n );\r\n};\r\n\r\n// @ts-expect-error\r\nexport const CartLineItemComponent: React.FunctionComponent = msdyn365Commerce.createComponentOverride(\r\n 'CartLineItem',\r\n {\r\n component: CartLine,\r\n ...cartLineItemFunctions\r\n }\r\n);\r\n\r\nexport default CartLineItemComponent;\r\n"],"names":["GetProductAttributesCartlinesInput","constructor","productID","getCacheKey","getCacheObjectType","dataCacheType","this","async","getProductAttributeCartlineAction","input","ctx","catalogId","getCatalogId","requestContext","channelID","apiSettings","channelId","productAttributes","getAttributeValuesAsync","callerContext","Msdyn365","action","id","CatalogLabelComponent","props","data","cartLine","CatalogId","validateCatalogId","isChannelTypeB2B","context","actionContext","ArrayExtensions","hasElements","catalogs","catalog","find","item","RecordId","Name","React","className","cartLineItemFunctions","renderProductDimensions","product","dimensionStrings","Dimensions","map","productDimension","_productDimension$Dim","_productDimension$Dim2","_productDimension$Dim3","_productDimension$Dim4","DimensionTypeValue","ProductDimensionType","Color","key","colorString","DimensionValue","Value","Configuration","configString","Size","sizeString","Style","IsGiftCard","amountString","styleString","renderInventoryLabel","inventoryCssName","inventoryLabelClassName","inventoryInformationLabel","renderRepairableText","isRepairable","isRepairableText","_props$context","repairableText","app","config","repairableProductText","renderShippingLabel","_props$context$reques","_cartline$ChargeLines","pickupDeliveryModeCode","request","channel","PickupDeliveryModeCode","channelDeliveryOptionConfig","cartline","hasShippingMethod","_channelDeliveryOptio","undefined","DeliveryMode","PickupDeliveryModeCodes","some","deliveryMode","shippingChargeLines","ChargeLines","filter","chargeLine","IsShipping","freightFee","reduce","chargeTotal","_chargeLine$Calculate","CalculatedAmount","priceComponent","PriceComponent","price","CustomerContextualPrice","freePriceText","typeName","resources","shippingChargesText","renderOtherCharges","_cartline$ChargeLines2","_otherCharges$map","otherCharges","chargeline","otherCharge","index","itemIndex","String","Description","renderSalesAgreementPrompt","SalesAgreementLineRecordId","salesAgreementPricePrompt","renderConfirmedShipDate","isSalesLine","confirmedShipDate","StringExtensions","isNullOrEmpty","confirmedShipDateLabel","renderRequestDeliveryDate","requestDeliveryDate","requestDeliveryDateLabel","CartLineItemComponent","msdyn365Commerce","createComponentOverride","_objectSpread","component","_product$Name","_props$primaryImageUr","productUrl","setIsRepairable","setIsRepairableText","productData","setProductData","getAttributeValueInput","Number","productSpecificationData","prevProductData","Attributes","e","console","error","getProductAttributes","_productData$Attribut","_productData$Attribut2","isRepairableAttr","attr","isRepairableAttrText","BooleanValue","TextValue","destructDimensionStrings","fallbackImageUrl","getFallbackImageUrl","ItemId","productDimensions","imageSettings","cropFocalRegion","payLoad","getPayloadObject","telemetryContent","toString","productAttribute","getTelemetryAttributes","productName","partNumber","imgeClassName","IsInvoiceLine","cartLineContentClassName","onChange","newValue","quantityOnChange","MsDyn365","isBrowser","href","role","Image","src","primaryImageUrl","fallBackSrc","altText","gridSettings","loadFailureBehavior","Object","assign","showShippingChargesForLineItems","generateQuantityAndPrice","_props$productPrices2","nodes","unitOfMeasure","unitOfMeasureDisplayType","DefaultUnitOfMeasure","_props$maxQuantity","_props$data$product$I","isQuantityEditable","push","quantityDisplayString","errorMessage","IncrementalQuantity","LineId","max","maxQuantity","currentCount","currentQuantity","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","disabled","isCartStateReady","isGiftCard","isOutOfStock","discount","setDiscount","DiscountAmount","setDiscountAmount","_props$productPrices","productPrices","PLProduct","_data$BasePrice","_data$CustomerContext","_data$DiscountAmount","discountedPrice","BasePrice","originalPrice","toFixed","_data$BasePrice2","_data$CustomerContext2","_data$BasePrice3","_data$CustomerContext3","_data$TradeAgreementP","_data$CustomerContext4","_data$CustomerContext5","_data$CustomerContext6","AdjustedPrice","TradeAgreementPrice","cartState","priceEditorResources","CartLinePriceEditor","FulfillmentStoreId","deliveryLocation"],"sourceRoot":""}