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BmuB,EAAOC,QAAUC","sources":["webpack://Dobbies.Commerce/./src/themes/dobbies/utilities/quantity/Quantity.tsx?0e68","webpack://Dobbies.Commerce/./src/themes/dobbies/views/components/cartlineitem.component.tsx?8794","webpack://Dobbies.Commerce/./src/themes/dobbies/views/order-confirmation.view.tsx?eee0","webpack://Dobbies.Commerce/./src/themes/dobbiesclub/views/order-confirmation.view.tsx?a6fc","webpack://Dobbies.Commerce/./lib/order-confirmation/module-registration.js?add0","webpack://Dobbies.Commerce/./src/actions/get-sales-order-confirmation-with-hydrations.ts?6854","webpack://Dobbies.Commerce/./src/actions/get-tender-types.ts?d667","webpack://Dobbies.Commerce/./src/modules/order-confirmation/components/get-help.tsx?fe55","webpack://Dobbies.Commerce/./src/modules/order-confirmation/components/get-order-summary.tsx?2e84","webpack://Dobbies.Commerce/./src/modules/order-confirmation/components/get-payment-methods.tsx?feb6","webpack://Dobbies.Commerce/./src/modules/order-confirmation/order-confirmation.tsx?bea0","webpack://Dobbies.Commerce/./src/modules/order-confirmation/order-confirmation.view.tsx?f5ab","webpack://Dobbies.Commerce/external var \"React\"?0d3b","webpack://Dobbies.Commerce/external var \"ReactDOM\"?853b"],"sourcesContent":["import debounce from 'lodash/debounce';\r\nimport { reaction } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { IQuantityProps } from './Quantity.props';\r\n\r\ninterface IQuantityState {\r\n currentInput: number;\r\n}\r\n/**\r\n * Quantity Component - This component is used to add or remove quantity\r\n */\r\n@observer\r\nexport default class Quantity extends React.PureComponent {\r\n public static defaultProps: Partial = {\r\n min: 1,\r\n decrementGlyphClass: 'fas fa-minus',\r\n incrementGlyphClass: 'fas fa-plus'\r\n };\r\n\r\n private inputRef: React.RefObject = React.createRef();\r\n\r\n constructor(props: IQuantityProps) {\r\n super(props);\r\n this.state = { currentInput: props.currentCount || 1 };\r\n this._onIncrement = this._onIncrement.bind(this);\r\n this._onDecrement = this._onDecrement.bind(this);\r\n this._handleChange = this._handleChange.bind(this);\r\n }\r\n public componentDidMount(): void {\r\n reaction(\r\n () => this.props.currentCount,\r\n () => {\r\n this.setState({ currentInput: this.props.currentCount || 1 });\r\n }\r\n );\r\n }\r\n public componentDidUpdate(): void {\r\n reaction(\r\n () => this.props.currentCount,\r\n () => {\r\n this.setState({ currentInput: this.props.currentCount || 1 });\r\n }\r\n );\r\n }\r\n\r\n public render(): JSX.Element {\r\n const glyphMinusClassName: string = `${this.props.decrementGlyphClass!} quantity__controls-glyph`;\r\n const glyphPlusClassName: string = `${this.props.incrementGlyphClass!} quantity__controls-glyph`;\r\n const disabled = this.state.currentInput === this.props.min;\r\n const incDisabled = this.state.currentInput === this.props.max;\r\n const currentValue = this.state.currentInput;\r\n let extraClass = '';\r\n if (disabled) {\r\n // The quantity has reached its boundaries (max or min)\r\n extraClass = 'disabled';\r\n } else if (this.props.disabled) {\r\n // this.props.disabled shows if the state is not succeded yet\r\n extraClass = 'transition';\r\n }\r\n let extraClassInc = '';\r\n if (incDisabled) {\r\n // The quantity has reached its boundaries (max or min)\r\n extraClassInc = 'disabled';\r\n } else if (this.props.disabled) {\r\n // this.props.disabled shows if the state is not succeded yet\r\n extraClassInc = 'transition';\r\n }\r\n return (\r\n <>\r\n
\r\n {this.props.hideQuantityControls !== true && (\r\n \r\n \r\n \r\n )}\r\n \r\n {this.props.hideQuantityControls !== true && (\r\n \r\n \r\n \r\n )}\r\n
\r\n \r\n );\r\n }\r\n\r\n private _onIncrement(): void {\r\n let invokeCallback = false;\r\n const currQuantity = this.state.currentInput;\r\n let updatedQuantity: number;\r\n\r\n if (currQuantity < this.props.max) {\r\n invokeCallback = true;\r\n updatedQuantity = currQuantity + 1;\r\n } else {\r\n invokeCallback = false;\r\n updatedQuantity = this.props.max;\r\n }\r\n\r\n invokeCallback && this.props.onChange && this.props.onChange(updatedQuantity);\r\n }\r\n\r\n private _onDecrement(): void {\r\n let invokeCallback = false;\r\n const currQuantity = this.state.currentInput;\r\n let updatedQuantity: number;\r\n\r\n if (currQuantity > 1) {\r\n invokeCallback = true;\r\n updatedQuantity = currQuantity - 1;\r\n } else {\r\n invokeCallback = false;\r\n updatedQuantity = 1;\r\n }\r\n\r\n invokeCallback && this.props.onChange && this.props.onChange(updatedQuantity);\r\n }\r\n\r\n private _handleChange(e: React.ChangeEvent): void {\r\n const currentValue = parseInt(e.target.value, 10);\r\n const minValue = this.props.min === undefined ? 1 : this.props.min;\r\n const inputElement =\r\n this.inputRef && this.inputRef.current && this.inputRef.current instanceof HTMLInputElement && this.inputRef.current;\r\n\r\n if (currentValue > this.props.max) {\r\n this.setState({ currentInput: this.props.max }, () => {\r\n debounce(() => {\r\n this.props.onChange && this.props.onChange(this.state.currentInput);\r\n }, 200)();\r\n });\r\n } else {\r\n this.setState({ currentInput: currentValue }, () => {\r\n debounce(() => {\r\n if (!isNaN(this.state.currentInput) && !(this.state.currentInput < minValue)) {\r\n this.props.onChange && this.props.onChange(this.state.currentInput);\r\n\r\n if (inputElement) {\r\n inputElement.setAttribute('aria-valuenow', currentValue.toString());\r\n inputElement.setAttribute('value', currentValue.toString());\r\n }\r\n }\r\n }, 200)();\r\n });\r\n }\r\n }\r\n\r\n private _validateMin = (): void => {\r\n const minValue = this.props.min === undefined ? 1 : this.props.min;\r\n if (isNaN(this.state.currentInput) || this.state.currentInput < minValue) {\r\n this.props.onChange && this.props.onChange(minValue);\r\n } else {\r\n this.props.onChange && this.props.onChange(this.state.currentInput);\r\n }\r\n };\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 { ArrayExtensions, getFallbackImageUrl, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { IComponentProps, IGridSettings, IImageSettings, Image } from '@msdyn365-commerce/core';\r\nimport { ChannelDeliveryOptionConfiguration, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { CartLine } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport classNames from 'classnames';\r\nimport * as React from 'react';\r\nimport { Quantity } from '../../utilities/quantity';\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 /** Display string for discount label */\r\n discountStringText: string;\r\n /** String for size key */\r\n sizeString: string;\r\n /** String for color key */\r\n colorString: string;\r\n /** String associated with the configuration product dimension */\r\n configString: string;\r\n /** String for style key */\r\n styleString: string;\r\n /** String for amount key */\r\n amountString?: string;\r\n /** Display string for quantity label */\r\n quantityDisplayString: string;\r\n /** Display string for quantity label */\r\n inputQuantityAriaLabel: string;\r\n /** Aria label for the decrement button in quanitity component */\r\n decrementButtonAriaLabel?: string;\r\n /** Aria label for the increment button in quanitity component */\r\n incrementButtonAriaLabel?: string;\r\n /** original text screenreader */\r\n originalPriceText: string;\r\n /** current text screenreader */\r\n currentPriceText: string;\r\n /** shipping Charges Text */\r\n shippingChargesText: string;\r\n}\r\n\r\ninterface ICartLineData {\r\n cartLine: CartLine;\r\n product?: SimpleProduct;\r\n}\r\n\r\nexport type CartLineDisplayMode = 'DEFAULT' | 'COMPACT';\r\n\r\n/**\r\n * ICartLineProps: The props required to render cartLineitem\r\n */\r\nexport interface ICartLineProps extends IComponentProps {\r\n /** The flag to change the quantity component from interactible to static */\r\n disableQuantityInteractivity?: boolean;\r\n /** The primary image url */\r\n primaryImageUrl?: string;\r\n /** The product url */\r\n productUrl?: string;\r\n /** GridSettings for the product image in cartLine */\r\n gridSettings: IGridSettings;\r\n /** ImageSettings for the product image in cartLine */\r\n imageSettings: IImageSettings;\r\n /** Boolean flag to indicate if the item is out of stock */\r\n isOutOfStock?: boolean;\r\n /** Flag to make quantity section editable */\r\n isQuantityEditable?: boolean;\r\n /** Max quantity for line item */\r\n maxQuantity?: number;\r\n /** Current quantity for line item */\r\n currentQuantity?: number;\r\n /** Resource string for the component */\r\n resources: ICartlineResourceString;\r\n /** SalesLine flag */\r\n isSalesLine?: boolean;\r\n /** Error message to show in place of quantity */\r\n errorMessage?: string;\r\n /** Display mode to use */\r\n displayMode?: CartLineDisplayMode;\r\n /** Inventory information label */\r\n inventoryInformationLabel?: string;\r\n /** Inventory information class name */\r\n inventoryLabelClassName?: string;\r\n /** Flag to show/hide shipping charges for line items */\r\n showShippingChargesForLineItems?: boolean;\r\n /** Boolean flag to indicate if cart state status is ready */\r\n isCartStateReady?: boolean;\r\n /** Chanel Delivery Option configuration is from api. */\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n /** The telemetry content */\r\n telemetryContent?: ITelemetryContent;\r\n /* VSI Customization - START - 23/11/20 */\r\n /* Flag to hide quantity controls */\r\n hideQuantityControls?: boolean;\r\n isOrderConfirmation?: boolean;\r\n /* VSI Customization - END */\r\n /** Quantity onChange callback */\r\n quantityOnChange?(cartLine: CartLine, newQuantity: number): void;\r\n}\r\n\r\ninterface IDimensionStrings {\r\n /** String for size key */\r\n sizeString: string;\r\n /** String for color key */\r\n colorString: string;\r\n /** String associated with the configuration product dimension */\r\n configString: string;\r\n /** String for style key */\r\n styleString: string;\r\n /** String for amount key */\r\n amountString?: string;\r\n}\r\n\r\nconst CartLineItemFunctions = {\r\n renderProductDimensions: (Product: SimpleProduct, DimensionStrings: IDimensionStrings) => {\r\n if (!Product || !Product.Dimensions) {\r\n return [];\r\n }\r\n\r\n return Product.Dimensions.map(productDimension => {\r\n if (productDimension.DimensionTypeValue === 1) {\r\n return (\r\n
\r\n \r\n {DimensionStrings.colorString}\r\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n \r\n
\r\n );\r\n }\r\n\r\n // if (productDimension.DimensionTypeValue === 2) {\r\n // \treturn (\r\n // \t\t
\r\n // \t\t\t\r\n // \t\t\t\t{DimensionStrings.configString}\r\n // \t\t\t\t{productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n // \t\t\t\r\n // \t\t
\r\n // \t);\r\n // }\r\n\r\n if (productDimension.DimensionTypeValue === 3) {\r\n return (\r\n
\r\n \r\n {DimensionStrings.sizeString}\r\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n \r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === 4) {\r\n return (\r\n
\r\n \r\n {Product.IsGiftCard ? DimensionStrings.amountString : DimensionStrings.styleString}\r\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n \r\n
\r\n );\r\n }\r\n return null;\r\n });\r\n },\r\n renderDiscountLines: (props: ICartLineProps) => {\r\n if (!props.data.cartLine.DiscountLines || props.data.cartLine.DiscountLines.length === 0) {\r\n return null;\r\n }\r\n return props.data.cartLine.DiscountLines.map((discountLine, index) => {\r\n return (\r\n
\r\n \r\n {discountLine.OfferName ? discountLine.OfferName : ''}:{` ${props.resources.discountStringText || 'Discount'} `}\r\n \r\n \r\n {discountLine.DiscountCost && (\r\n <>\r\n \r\n \r\n )}\r\n \r\n {discountLine && discountLine.Percentage !== undefined && discountLine.Percentage !== 0 && (\r\n {` (${discountLine.Percentage}%)`}\r\n )}\r\n
\r\n );\r\n });\r\n },\r\n renderInventoryLabel: (props: ICartLineProps) => {\r\n if (!props.inventoryInformationLabel) {\r\n return null;\r\n }\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 return {props.inventoryInformationLabel};\r\n },\r\n renderShippingLabel: (props: ICartLineProps) => {\r\n const pickupDeliveryModeCode = props.context.request.channel && 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 ? true\r\n : false;\r\n } else {\r\n hasShippingMethod = !!cartline.DeliveryMode && cartline.DeliveryMode !== pickupDeliveryModeCode ? true : false;\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 (shippingChargeLines.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const freightFee = shippingChargeLines.reduce((chargeTotal, chargeLine) => {\r\n return chargeTotal + (chargeLine.CalculatedAmount || 0);\r\n }, 0);\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 renderOtherCharges: (props: ICartLineProps) => {\r\n const cartline = props.data.cartLine;\r\n const otherCharges = cartline.ChargeLines && cartline.ChargeLines.filter(chargeline => !chargeline.IsShipping);\r\n\r\n return (\r\n (otherCharges &&\r\n otherCharges.map((otherCharge, key) => {\r\n return otherCharge && otherCharge.CalculatedAmount ? (\r\n
\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// tslint:disable-next-line:max-func-body-length\r\nconst CartLine: React.FC = (props: ICartLineProps) => {\r\n const { productUrl, resources, isCartStateReady, isOrderConfirmation } = props;\r\n const { product, cartLine } = props.data;\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 const fallbackImageUrl = product && getFallbackImageUrl(cartLine.ItemId, props.context.actionContext.requestContext.apiSettings);\r\n const imageSettings = props.imageSettings;\r\n imageSettings.cropFocalRegion = !ObjectExtensions.isNullOrUndefined(imageSettings);\r\n\r\n const productDimensions = product && CartLineItemFunctions.renderProductDimensions(product, destructDimensionStrings);\r\n const renderDisountLines = CartLineItemFunctions.renderDiscountLines(props);\r\n // const renderInventoryLabel = CartLineItemFunctions.renderInventoryLabel(props);\r\n const renderShippingLabel = CartLineItemFunctions.renderShippingLabel(props);\r\n // const renderOtherCharges = CartLineItemFunctions.renderOtherCharges(props);\r\n const payLoad = getPayloadObject('click', props.telemetryContent!, '', product?.RecordId.toString());\r\n const prodAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n const productName = product?.Name || cartLine.Description;\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 /* VSI Customization - START - 16/11/20 */\r\n const onChange = (newValue: number) => {\r\n if (props.quantityOnChange) {\r\n props.quantityOnChange(props.data.cartLine, newValue);\r\n }\r\n };\r\n /* VSI Customization - END */\r\n const _generateQuantityAndPrice = (): JSX.Element[] | null => {\r\n const nodes = [];\r\n\r\n const errorMessage = _generateErrorMessage();\r\n\r\n if (props.isOutOfStock) {\r\n if (cartLine.IsGiftCardLine) {\r\n return null;\r\n }\r\n if (errorMessage) {\r\n return [errorMessage];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /* VSI Customization - END */\r\n if (props.isQuantityEditable && !props.data.product?.IsGiftCard) {\r\n if (errorMessage) {\r\n nodes.push(errorMessage);\r\n }\r\n nodes.push(\r\n /* VSI Customization - START - 16/11/20 */\r\n
\r\n \r\n \r\n
\r\n /* VSI Customization - END */\r\n );\r\n } else {\r\n nodes.push(\r\n
\r\n \r\n {errorMessage}\r\n {props.data.cartLine.Quantity}\r\n
\r\n );\r\n }\r\n\r\n /* VSI Customization - START - 17/10/20 */\r\n (isCartStateReady !== true || isOrderConfirmation !== true) &&\r\n nodes.push(\r\n
\r\n \r\n
\r\n );\r\n\r\n return nodes;\r\n };\r\n if (props.displayMode === 'COMPACT') {\r\n const reducedDimensions: string = product?.Dimensions\r\n ? product.Dimensions.reduce((str, productDimension) => {\r\n if (productDimension.DimensionValue && productDimension.DimensionValue.Value) {\r\n if (str) {\r\n return `${str}, ${productDimension.DimensionValue.Value}`;\r\n }\r\n\r\n return `${productDimension.DimensionValue.Value}`;\r\n }\r\n\r\n return str;\r\n }, '')\r\n : '';\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {productName}\r\n \r\n {reducedDimensions !== '' ?
{reducedDimensions}
: ''}\r\n {_generateQuantityAndPrice()}\r\n
\r\n
\r\n );\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n {productName}\r\n \r\n {ArrayExtensions.hasElements(productDimensions) ? (\r\n
{productDimensions}
\r\n ) : (\r\n ''\r\n )}\r\n {!props.isOrderConfirmation && renderDisountLines}\r\n {/* renderInventoryLabel */}\r\n {props.showShippingChargesForLineItems &&
{renderShippingLabel}
}\r\n {/* renderOtherCharges */}\r\n {_generateQuantityAndPrice()}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\n// @ts-ignore\r\n/* export const CartLineItemComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n 'CartLineItem',\r\n { component: CartLine, ...CartLineItemFunctions }\r\n); */\r\nexport default CartLine;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { IGroup, IGroupDelivery, IGroups, IOrderInformation, ISalesLine } from '@msdyn365-commerce-modules/order-management/src/common';\r\n\r\nimport { IOrderConfirmationViewProps } from '@msdyn365-commerce-modules/order-management/src/modules/order-confirmation/';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React, { useEffect, useState } from 'react';\r\n\r\nimport {\r\n IHelp,\r\n IOrderSummary,\r\n IPaymentMethods\r\n} from '@msdyn365-commerce-modules/order-management/src/modules/order-confirmation/../../common';\r\nimport { getProductUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport {\r\n CommerceProperty,\r\n CommercePropertyValue,\r\n ProductSearchCriteria,\r\n ProductSearchResult,\r\n SalesLine,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport { searchByCriteriaAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport get from 'lodash/get';\r\nimport { IOrderConfirmationProps, IOrderConfirmationResources } from '../definition-extensions/order-confirmation.ext.props.autogenerated';\r\nimport CartLine from './components/cartlineitem.component';\r\n\r\n/* VSI Customization - START - 23/11/20 */\r\nexport interface ISalesInfoProps {\r\n itemCount: React.ReactElement;\r\n grossAmount: React.ReactElement;\r\n}\r\n\r\nexport interface IOrderDate {\r\n dateLabel: string;\r\n orderCreatedDate: string;\r\n}\r\n\r\nexport interface IVendorProducts {\r\n name: string | undefined;\r\n time: string | undefined;\r\n productList: number[];\r\n}\r\nexport interface DeliveryAddressShip { \r\n props: { \r\n deliveryType: string; \r\n address: { \r\n Name: string; \r\n Street: string; \r\n City: string; \r\n ZipCode: string; \r\n Phone: string; \r\n }; \r\n }; \r\n};\r\n/* VSI Customization - END - 18/12/20 */\r\n// remove customixation for .29 version\r\n// Converting functional component to simple function to reduce cycolmatic complexity by adding undefined in props and checking condition in functio instead of main FC\r\n// tslint:disable-next-line:no-any\r\n// const _orderConfirmationOrderSummary = (props: IOrderSummary | undefined, salesOrder: any) => {\r\n// if (!props) {\r\n// return;\r\n// }\r\n// const { orderSummaryProps, heading, subtotal, totalAmount, earnedPoints } = props;\r\n// const shippingChargeAmount = salesOrder.ShippingChargeAmount;\r\n// return (\r\n// \r\n// {heading}\r\n// {subtotal}\r\n// {}\r\n// {/* {shipping} */}\r\n//

\r\n// {'Home Delivery'}\r\n// \r\n// {shippingChargeAmount > 0 ? `ÂŁ${shippingChargeAmount.toFixed(2)}` : 'ÂŁ0.00'}\r\n// \r\n//

\r\n// {totalAmount}\r\n// {earnedPoints}\r\n//
\r\n// );\r\n// };\r\n\r\nexport const OrderConfirmationPayment: React.FC = ({ paymentMethodsProps, title, methods }) => (\r\n \r\n {/* VSI-Customization -- START\r\n Payment not required on order-confirmation page as per design\r\n */}\r\n {title}\r\n {methods}\r\n {/* VSI-Customization -- END */}\r\n \r\n);\r\n// Converting functional component to simple function to reduce cycolmatic complexity by adding undefined in props and checking condition in functio instead of main FC\r\nconst _orderConfirmationHelp = (props: IHelp | undefined) => {\r\n if (!props) {\r\n return;\r\n }\r\n const { helpProps, needHelpLabel, helpLineNumberLabel, contactNumber } = props;\r\n return (\r\n \r\n {needHelpLabel}\r\n {helpLineNumberLabel}\r\n {contactNumber}\r\n \r\n );\r\n};\r\n/* VSI Customization - START - 23/11/20 */\r\nconst _getCountandPrice = (props: IOrderConfirmationViewProps & IOrderConfirmationProps<{}>): ISalesInfoProps => {\r\n const {\r\n data: { orderHydration },\r\n resources: { itemLabel, itemsLabel, orderTotalLabelText }\r\n } = props;\r\n const salesOrder = orderHydration && orderHydration.result && orderHydration.result.salesOrder;\r\n // items count\r\n let itemsCount = 0;\r\n salesOrder &&\r\n salesOrder.SalesLines &&\r\n salesOrder.SalesLines.map(salesLine => {\r\n const quantity = salesLine.Quantity;\r\n itemsCount = quantity ? itemsCount + quantity : itemsCount;\r\n });\r\n // format price\r\n const grossAmount = salesOrder && salesOrder.GrossAmount;\r\n const totalAmount = grossAmount && props.context.cultureFormatter.formatCurrency(grossAmount.toString(), props.context.request.channel?.Currency);\r\n return {\r\n itemCount: (\r\n \r\n \r\n {itemsCount}\r\n \r\n \r\n {itemsCount === 1 ? itemLabel : itemsLabel}\r\n \r\n \r\n ),\r\n grossAmount: (\r\n \r\n \r\n {orderTotalLabelText}\r\n \r\n \r\n {totalAmount}\r\n \r\n \r\n )\r\n };\r\n};\r\n\r\nexport const OrderConfirmationOrderInfomation: React.FC = props => {\r\n const { orderInformationProps, channelReferenceId, itemCount, grossAmount, dateLabel, orderCreatedDate } = props;\r\n const { isAuthenticated } = props?.[\"context\"].actionContext.requestContext.user;\r\n const orderno_no = get(channelReferenceId, 'props.children[0].props.children[1].props.children');\r\n const itemCount_str = get(itemCount, 'props.children[1].props.children');\r\n const itemCount_no = get(itemCount, 'props.children[0].props.children');\r\n const gross_amount = get(grossAmount, 'props.children[1].props.children');\r\n if(isAuthenticated){\r\n return(\r\n \r\n {/* VSI Customization - START - 23/11/20 */}\r\n {/*
\r\n {orderno_str}\r\n {orderno_no}\r\n
*/}\r\n \r\n {/* VSI Customization - END - 27/11/20 */}\r\n {channelReferenceId}\r\n
\r\n
\r\n \r\n {dateLabel}\r\n \r\n \r\n {orderCreatedDate}\r\n \r\n
\r\n \r\n
\r\n {itemCount}\r\n {grossAmount}\r\n
\r\n
\r\n \r\n
\r\n )\r\n }else{\r\n return(\r\n <>\r\n
\r\n
\r\n
\r\n

Order number: {orderno_no}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Order date: {orderCreatedDate}
\r\n
\r\n
\r\n
\r\n
\r\n

{itemCount_no} {itemCount_str} | Order total: {gross_amount}

\r\n
\r\n
\r\n
\r\n \r\n )\r\n }\r\n};\r\n\r\n/* VSI Customization - START - 23/11/20 - Removed OrderConfirmationSalesLine FC - END */\r\n\r\nexport const OrderConfirmationGroupDelivery: React.FC = ({\r\n deliveryProps,\r\n heading,\r\n count,\r\n processing,\r\n address,\r\n trackingInfo\r\n}) => (\r\n \r\n {heading}\r\n {address}\r\n \r\n);\r\nexport const OrderConfirmationGroupDeliveryGuest = (props: IOrderConfirmationViewProps) => {\r\n\r\n const delivery_ship = props.groups?.groups.find(addr => {\r\n const deliveryAddress = addr.delivery.address as DeliveryAddressShip | undefined;\r\n const deliveryType = deliveryAddress?.props?.deliveryType;\r\n return deliveryType && deliveryType.trim().toLowerCase() === \"ship\";\r\n});\r\n\r\nconst delivery_cnc = props.groups?.groups.find(addr => {\r\n const deliveryAddress = addr.delivery.address as DeliveryAddressShip | undefined;\r\n const deliveryType = deliveryAddress?.props?.deliveryType;\r\n return deliveryType && (deliveryType.trim().toLowerCase() === \"click and collect\" || deliveryType.trim().toLowerCase() === 'pickup');\r\n});\r\n const bothDeliveries = [delivery_ship, delivery_cnc];\r\n return(\r\n
\r\n {bothDeliveries.length && bothDeliveries?.map(addr => {\r\n const deliveryAddressShip = addr?.delivery.address as DeliveryAddressShip | undefined;\r\n if(addr && deliveryAddressShip?.props?.deliveryType === \"ship\"){\r\n const address_name = deliveryAddressShip?.props?.address.Name\r\n const address_street = deliveryAddressShip?.props?.address.Street\r\n const address_city = deliveryAddressShip?.props?.address.City\r\n const address_zipcode = deliveryAddressShip?.props?.address.ZipCode\r\n const address_phone = deliveryAddressShip?.props?.address.Phone\r\n return (\r\n
\r\n
\r\n
Home delivery address:
\r\n

\r\n {address_name}
\r\n {address_street} {address_city} {address_zipcode}
\r\n Phone: {address_phone}
\r\n Email address: {props.salesOrder?.ReceiptEmail ? props.salesOrder?.ReceiptEmail : \"\"}\r\n

\r\n
\r\n
\r\n )\r\n }else{\r\n return <>\r\n }\r\n })}\r\n
\r\n) \r\n};\r\nexport const OrderConfirmationGroupPickupGuest = (props: IGroupDelivery) => {\r\n const address = props.address as { props: { address: { City: string; FullAddress: string } } } | undefined;\r\n const address_city = address?.props.address.City;\r\n const Full_address = address?.props.address.FullAddress;\r\n return(\r\n
\r\n
\r\n
\r\n
\r\n Collection store: {address_city}\r\n

\r\n {Full_address}\r\n {/* {address_street}, Lasswade Edinburgh
\r\n EH18 1AZ GBR
*/}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n) \r\n};\r\n// Just to display address against group i.e. only picked up group\r\nexport const OrderConfirmationGroup: React.FC = props => {\r\n const { groupProps, delivery } = props;\r\n return (\r\n \r\n {delivery && }\r\n {/* VSI Customization - START - 23/11/20 - Displayed sales line in OrderConfirmationGroups function and removed from here - VSI Customization - END */}\r\n \r\n );\r\n};\r\n\r\n/* VSI Customization - START - 23/11/20 */\r\n// Following function displays sales line items\r\nconst _displaySalesLine = (\r\n salesLineItem: SalesLine,\r\n simpleProduct: SimpleProduct,\r\n props: IOrderConfirmationViewProps & IOrderConfirmationProps<{}>\r\n): React.ReactElement => {\r\n const { resources } = props;\r\n // resources required for ICartlineItem component\r\n const _resources = {\r\n discountStringText: resources.discountStringLabel,\r\n sizeString: resources.productDimensionSize,\r\n colorString: resources.productDimensionColor,\r\n configString: resources.productDimensionConfiguration,\r\n styleString: resources.productDimensionStyle,\r\n quantityDisplayString: resources.quantityLabel,\r\n inputQuantityAriaLabel: resources.quantityLabel,\r\n originalPriceText: resources.originalPriceLabel,\r\n currentPriceText: resources.currentPriceLabel,\r\n shippingChargesText: resources.shippingChargesLabel\r\n };\r\n const _imageSettings = {\r\n viewports: {\r\n xs: { q: `w=50&h=50&m=6`, w: 0, h: 0 },\r\n xl: { q: `w=50&h=50&m=6`, w: 0, h: 0 }\r\n }\r\n };\r\n return (\r\n \r\n );\r\n};\r\n// Following function displayes price with each sales line\r\nconst _displaySalesLinePrice = (\r\n salesLineItem: SalesLine,\r\n props: IOrderConfirmationViewProps & IOrderConfirmationProps<{}>\r\n): React.ReactElement => {\r\n const {\r\n id,\r\n context,\r\n typeName,\r\n resources: { originalPriceLabel, currentPriceLabel }\r\n } = props;\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n/* VSI Customization - END */\r\n\r\n// Converted functional component to simple function to pass order confirmation props to it\r\n// This functions just displays picked up group\r\nconst _renderOrderConfirmationGroup = (props: IOrderConfirmationViewProps & IOrderConfirmationProps<{}>, group: IGroup, pickUpOrderNumber: number) => {\r\n const { salesLines, salesLinesProps, groupProps, delivery } = group;\r\n const { isAuthenticated } = props.context.request.user;\r\n return (\r\n <>\r\n {salesLines && salesLines.length > 0 && (\r\n \r\n {delivery && isAuthenticated ? : }\r\n \r\n {salesLines.map((salesLine: ISalesLine, index: number) => {\r\n const salesLineItem = salesLine.data.salesLine;\r\n const simpleProduct = salesLine.data.product;\r\n return (\r\n \r\n {simpleProduct && _displaySalesLine(salesLineItem, simpleProduct, props)}\r\n {_displaySalesLinePrice(salesLineItem, props)}\r\n \r\n );\r\n })}\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\n// Following function displays picked up groups only\r\nconst _renderPickedOrders = (props: IOrderConfirmationViewProps & IOrderConfirmationProps<{}>, groups: IGroups) => {\r\n const {\r\n resources: { clickandCollectLabel, pickedOrderIndex }\r\n } = props;\r\n // filter pickedup groups\r\n const filteredPickedupGroups = groups.groups.filter(group => {\r\n const deliveryType = group.data.deliveryType.trim().toLowerCase();\r\n return deliveryType === 'click and collect' || deliveryType === 'pickup' || deliveryType !== 'ship';\r\n });\r\n const pickedUpCount = filteredPickedupGroups.length;\r\n return (\r\n <>\r\n {filteredPickedupGroups.map((group: IGroup, index: number) => {\r\n const pickUpOrderNumber = index + 1;\r\n const _orderIndex = pickedOrderIndex && pickedOrderIndex.replace('{index}', pickUpOrderNumber.toString());\r\n return (\r\n \r\n \r\n \r\n {clickandCollectLabel}\r\n \r\n {pickedUpCount > 1 && (\r\n \r\n {_orderIndex}\r\n \r\n )}\r\n \r\n {_renderOrderConfirmationGroup(props, group, pickUpOrderNumber)}\r\n \r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\n/* VSI Customization - END */\r\nconst OrderConfirmationView: React.FC> = props => {\r\n const {\r\n moduleProps,\r\n heading,\r\n alert,\r\n loading,\r\n orderInfomation,\r\n orderSummary,\r\n payment,\r\n help,\r\n groups,\r\n salesLines,\r\n context: { actionContext },\r\n slots: { helpCentreBlock, textBlockBanner },\r\n data: { orderHydration },\r\n resources: { orderPlacedOnLabel, dobbiesLabel, notAvailableText }\r\n } = props;\r\n const { isAuthenticated } = props.context.request.user;\r\n /* VSI Customization - START - 23/11/20 */\r\n const [vendorProducts, SetVendorProducts] = useState([]);\r\n const [vendorsInfo, SetVendorInfo] = useState([]);\r\n const [deliveryGroup, SetDeliveryGroup] = useState(-1);\r\n const [pickedUpGroup, SetPickedUpGroup] = useState([]);\r\n const salesOrderInfo = _getCountandPrice(props);\r\n const salesOrder = orderHydration && orderHydration.result && orderHydration.result.salesOrder;\r\n const products = orderHydration && orderHydration.result && orderHydration.result.products;\r\n useEffect(() => {\r\n salesLines &&\r\n salesLines.length > 0 &&\r\n _getProductsVendorInfo(\r\n actionContext,\r\n products,\r\n salesLines,\r\n dobbiesLabel,\r\n notAvailableText,\r\n SetVendorProducts,\r\n SetVendorInfo,\r\n vendorProducts,\r\n vendorsInfo\r\n ).catch(err => {\r\n return;\r\n });\r\n _configureAddresses(groups, SetPickedUpGroup, pickedUpGroup, SetDeliveryGroup, deliveryGroup);\r\n }, []);\r\n const createdDateTime = salesOrder && salesOrder.SalesLines && salesOrder.SalesLines[0] && salesOrder.SalesLines[0].SalesDate;\r\n const locale = get(props, 'context.request.locale') || 'en-US';\r\n const orderCreatedDate = (createdDateTime && new Date(createdDateTime).toLocaleDateString(locale)) || '';\r\n const created = {\r\n dateLabel: orderPlacedOnLabel,\r\n orderCreatedDate: orderCreatedDate\r\n };\r\n // home delivery address shown at top\r\n const deliveryDetails = deliveryGroup !== -1 && groups && groups.groups[deliveryGroup].delivery;\r\n /* VSI Customization - END - 18/12/20 */\r\n return (\r\n \r\n \r\n {isAuthenticated && \r\n \r\n {orderInfomation && heading}\r\n }\r\n \r\n {alert}\r\n {loading}\r\n {/* VSI Customization - START - 23/11/20 */}\r\n {!isAuthenticated &&\r\n
\r\n \r\n {orderInfomation && heading}\r\n \r\n
}\r\n {orderInfomation && }\r\n {deliveryDetails && isAuthenticated ? : }\r\n {/* Following function just displays shipped items */}\r\n {vendorsInfo && _displayVendorProducts(props, vendorsInfo)}\r\n {/* Following functions just displays pickedup items */}\r\n {groups && _renderPickedOrders(props, groups)}\r\n {/* VSI Customization - END - 23/12/20 */}\r\n
\r\n \r\n {orderSummary && }\r\n {/* {_orderConfirmationOrderSummary(orderSummary, props.salesOrder)} */}\r\n {payment && }\r\n {/* VSI Customization - START - 23/11/20 */}\r\n {orderInfomation && (\r\n \r\n {helpCentreBlock}\r\n \r\n )}\r\n {!isAuthenticated &&\r\n \r\n {textBlockBanner}\r\n }\r\n {/* VSI Customization - END */}\r\n {_orderConfirmationHelp(help)}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\n/* VSI Customization - START - 18/12/20 */\r\nconst _displayHeadingRow = (\r\n resources: IOrderConfirmationResources,\r\n vendorInfo: IVendorProducts | undefined,\r\n index: number,\r\n total: number\r\n) => {\r\n const { deliveryHeading, shippedOrderIndex, dispatchedByLabel, dobbiesLabel, shippingTimeLabel } = resources;\r\n const orderIndex = shippedOrderIndex && shippedOrderIndex.replace('{index}', index.toString()).replace('{total}', total.toString());\r\n return (\r\n \r\n \r\n \r\n {deliveryHeading}{' '}\r\n \r\n {total > 1 && (\r\n \r\n {orderIndex}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {dispatchedByLabel}{' '}\r\n \r\n \r\n {vendorInfo ? vendorInfo.name : dobbiesLabel}\r\n \r\n \r\n {vendorInfo && vendorInfo.time && (\r\n \r\n \r\n {shippingTimeLabel}{' '}\r\n \r\n \r\n {vendorInfo.time}\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n// Display shipped products\r\nconst _displayVendorProducts = (props: IOrderConfirmationViewProps & IOrderConfirmationProps<{}>, vendorsInfo: IVendorProducts[]) => {\r\n return(\r\n \r\n {vendorsInfo &&\r\n vendorsInfo.map((vendorInfo: IVendorProducts, index: number) => {\r\n // filter shipped products from each sales line\r\n const vendorsSalesLines =\r\n props.salesLines &&\r\n props.salesLines.filter(salesLine => {\r\n const salesLineProductID = salesLine.data.product && salesLine.data.product.RecordId;\r\n // filtering vendor's product of current index of vendorInfo\r\n const isSameVendor = vendorInfo.productList.find(vendorProductID => {\r\n return vendorProductID === salesLineProductID;\r\n });\r\n return isSameVendor && salesLine;\r\n });\r\n const currentIndex = index + 1; // 1..n instead of 0...n-1\r\n return (\r\n \r\n {_displayHeadingRow(props.resources, vendorInfo, currentIndex, vendorsInfo.length)}\r\n {vendorsSalesLines &&\r\n vendorsSalesLines.map((vendorsSalesLine, salesIndex) => {\r\n const salesLineItem = vendorsSalesLine.data.salesLine;\r\n const simpleProduct = vendorsSalesLine.data.product;\r\n return (\r\n \r\n {simpleProduct && _displaySalesLine(salesLineItem, simpleProduct, props)}\r\n {_displaySalesLinePrice(salesLineItem, props)}\r\n \r\n );\r\n })}\r\n \r\n );\r\n })}\r\n \r\n)};\r\n\r\n// This function stores picked up groups in an array if any and stores delivery address to display on top if any\r\nconst _configureAddresses = (\r\n groups: IGroups | undefined,\r\n SetPickedUpGroup: React.Dispatch>,\r\n pickedUpGroup: number[],\r\n SetDeliveryGroup: React.Dispatch>,\r\n deliveryGroup: number\r\n) => {\r\n if (pickedUpGroup.length > 0 || deliveryGroup !== -1) {\r\n return;\r\n }\r\n let deliveryAddressGroup = -1;\r\n const pickedUpList: number[] = [];\r\n groups &&\r\n groups.groups.map((group: IGroup, index: number) => {\r\n const addresstype = group.data.deliveryType.trim().toLowerCase();\r\n if (addresstype === 'ship') {\r\n deliveryAddressGroup = index;\r\n } else if (addresstype === 'pickup') {\r\n pickedUpList.push(index);\r\n }\r\n });\r\n if (deliveryAddressGroup !== deliveryGroup) {\r\n SetDeliveryGroup(deliveryAddressGroup);\r\n }\r\n if (pickedUpList !== pickedUpGroup) {\r\n SetPickedUpGroup(pickedUpList);\r\n }\r\n};\r\n\r\n// Returns array filled with vendor and their product details\r\nconst _getVendorInfo = (\r\n hybridProducts: SimpleProduct[],\r\n vendorsProducts: SimpleProduct[],\r\n salesLines: ISalesLine[],\r\n dobbiesLabel: string\r\n): IVendorProducts[] => {\r\n if (hybridProducts && hybridProducts.length && hybridProducts.length > 0) {\r\n const vendorList: IVendorProducts[] = [];\r\n // store all vendors name or undefined if not\r\n vendorsProducts &&\r\n vendorsProducts.map(vendorsProduct => {\r\n const vendorNameProperty =\r\n vendorsProduct.ExtensionProperties &&\r\n vendorsProduct.ExtensionProperties.find(property => {\r\n const propertykey = property.Key && property.Key.trim().toLowerCase();\r\n return propertykey === 'vendorname';\r\n });\r\n const vendorName = vendorNameProperty && vendorNameProperty.Value && vendorNameProperty.Value.StringValue;\r\n // check if vendor name is already stored in vendor list\r\n const isDuplicate = vendorList.find(vendor => {\r\n return vendor && vendor.name === vendorName;\r\n });\r\n if (!isDuplicate) {\r\n const shippingTimeProperty =\r\n vendorsProduct.ExtensionProperties &&\r\n vendorsProduct.ExtensionProperties.find(property => {\r\n const propertykey = property.Key && property.Key.trim().toLowerCase();\r\n return propertykey === 'estimatedshippingtime';\r\n });\r\n const shippingTime = shippingTimeProperty && shippingTimeProperty.Value && shippingTimeProperty.Value.StringValue;\r\n // avoid duplicate vendor names\r\n vendorList.push({ name: vendorName, time: shippingTime, productList: [] });\r\n }\r\n });\r\n // to store dobbies products, we need to check first vendor products\r\n const vendorsProductList: number[] = [];\r\n // set respective products indexes along with vendor name\r\n vendorList.map((vendorName: IVendorProducts, index: number) => {\r\n vendorsProducts &&\r\n vendorsProducts.map((product: SimpleProduct, pindex: number) => {\r\n // returns products having vendor name matched with vendorList created above\r\n product.ExtensionProperties &&\r\n product.ExtensionProperties.map(extensionProperty => {\r\n const key = extensionProperty.Key && extensionProperty.Key.trim().toLowerCase();\r\n const value = extensionProperty.Value && extensionProperty.Value.StringValue;\r\n if (key === 'vendorname' && value === vendorName.name) {\r\n vendorList[index].productList.push(product.RecordId);\r\n vendorsProductList.push(product.RecordId);\r\n }\r\n });\r\n });\r\n });\r\n // Filter shipped salesLines\r\n const shippedSalesLines = salesLines.filter(salesLine => {\r\n const deliveryType = salesLine.data.deliveryType.trim().toLowerCase();\r\n return deliveryType === 'ship';\r\n });\r\n // DOBBIES product list\r\n const dobbiesProducts: number[] = [];\r\n hybridProducts.map(hybridProduct => {\r\n const recordID = hybridProduct.RecordId;\r\n // exclude vendor products to add in dobbies' list\r\n const isVendorProduct = vendorsProductList.find(vendorProductId => {\r\n return recordID === vendorProductId;\r\n });\r\n if (isVendorProduct === undefined) {\r\n // exclude pickup products from dobbies to store only shipped items against it\r\n const isShipped = shippedSalesLines.find(salesLine => {\r\n const productID = salesLine.data.product && salesLine.data.product.RecordId;\r\n return recordID === productID;\r\n });\r\n if (isShipped) {\r\n dobbiesProducts.push(hybridProduct.RecordId);\r\n }\r\n }\r\n });\r\n if (dobbiesProducts.length !== 0) {\r\n // add dobbies shipped items at the end of array\r\n const dobbiesProductObj: IVendorProducts = { name: dobbiesLabel, time: undefined, productList: dobbiesProducts };\r\n vendorList.push(dobbiesProductObj);\r\n }\r\n return vendorList;\r\n }\r\n return [];\r\n};\r\nexport const OrderConfirmationOrderSummary: React.FC = ({\r\n orderSummaryProps,\r\n heading,\r\n subtotal,\r\n shipping,\r\n tax,\r\n totalAmount,\r\n earnedPoints\r\n}) => (\r\n \r\n {heading}\r\n {subtotal}\r\n {shipping}\r\n {tax}\r\n {totalAmount}\r\n {earnedPoints}\r\n \r\n);\r\n\r\n// Get vendor attributes using data action and hybrids products with information\r\nconst _getProductsVendorInfo = async (\r\n actionContext: IActionContext,\r\n products: SimpleProduct[] | undefined,\r\n salesLines: ISalesLine[],\r\n dobbiesLabel: string,\r\n notAvailableText: string,\r\n SetVendorProducts: React.Dispatch>,\r\n SetVendorInfo: React.Dispatch>,\r\n vendorsProducts: SimpleProduct[],\r\n vendorsInfo: IVendorProducts[]\r\n) => {\r\n const callerContext = actionContext;\r\n const {\r\n requestContext: {\r\n apiSettings: { channelId, catalogId }\r\n }\r\n } = actionContext;\r\n if (products) {\r\n const _hybridProducts: SimpleProduct[] = products;\r\n const vendorProducts: SimpleProduct[] = [];\r\n const searchCriteriaInput: ProductSearchCriteria = {};\r\n searchCriteriaInput.Context = { ChannelId: channelId, CatalogId: catalogId };\r\n const productIds: number[] = [];\r\n products.map(product => {\r\n productIds.push(product.RecordId);\r\n });\r\n searchCriteriaInput.Ids = productIds;\r\n searchCriteriaInput.IncludeAttributes = true;\r\n const productsData = await searchByCriteriaAsync({ callerContext, queryResultSettings: {} }, searchCriteriaInput);\r\n productsData.map((product: ProductSearchResult, index: number) => {\r\n const attributes = product.AttributeValues;\r\n const isvendorShippedAttribute =\r\n attributes &&\r\n attributes.find(attribute => {\r\n const attributeName = attribute.Name && attribute.Name.trim().toLowerCase();\r\n return attributeName === 'isvendershipproduct';\r\n });\r\n const isVendorShiped =\r\n isvendorShippedAttribute &&\r\n isvendorShippedAttribute.TextValue &&\r\n isvendorShippedAttribute.TextValue.trim().toLowerCase() === 'yes';\r\n const extensionProperties: CommerceProperty[] = [];\r\n if (isVendorShiped) {\r\n const selectedAttributes =\r\n attributes &&\r\n attributes.filter(attribute => {\r\n const attributeName = attribute.Name && attribute.Name.trim().toLowerCase();\r\n const isVendorNameAvailable = attribute.TextValue; // if vendor name is not undefined\r\n return (\r\n attributeName &&\r\n isVendorNameAvailable &&\r\n (attributeName === 'vendorname' || attributeName === 'estimatedshippingtime')\r\n );\r\n });\r\n if (selectedAttributes && selectedAttributes.length > 0) {\r\n selectedAttributes &&\r\n selectedAttributes.map(selectedAttribute => {\r\n const commercePropertyValue: CommercePropertyValue = { StringValue: selectedAttribute.TextValue };\r\n const commerceProperty: CommerceProperty = { Key: selectedAttribute.Name, Value: commercePropertyValue };\r\n extensionProperties.push(commerceProperty);\r\n // hybrid all products\r\n _hybridProducts[index].ExtensionProperties = extensionProperties;\r\n // no duplicate vendor products\r\n const isDuplicate =\r\n vendorProducts &&\r\n vendorProducts.find(vendorProduct => {\r\n return vendorProduct.RecordId === product.RecordId;\r\n });\r\n // if product is vendorshipped, store it in array\r\n !isDuplicate && vendorProducts.push(_hybridProducts[index]);\r\n });\r\n } else {\r\n // When product is vendor shipped but vendor info is not available\r\n const vendorname: CommerceProperty = { Key: 'vendorname', Value: { StringValue: notAvailableText } };\r\n const estimatedShippingTime: CommerceProperty = {\r\n Key: 'estimatedshippingtime',\r\n Value: { StringValue: notAvailableText }\r\n };\r\n extensionProperties.push(vendorname);\r\n extensionProperties.push(estimatedShippingTime);\r\n // hybrid all products\r\n _hybridProducts[index].ExtensionProperties = extensionProperties;\r\n // no duplicate vendor products, merge product with same vendor\r\n const isDuplicate =\r\n vendorProducts &&\r\n vendorProducts.find(vendorProduct => {\r\n return vendorProduct.RecordId === product.RecordId;\r\n });\r\n // if product is vendorshipped, store it in array\r\n !isDuplicate && vendorProducts.push(_hybridProducts[index]);\r\n }\r\n }\r\n });\r\n\r\n if (!vendorsProducts || vendorsProducts.length === 0) {\r\n SetVendorProducts(vendorProducts);\r\n }\r\n const _vendorsInfo = _hybridProducts && _getVendorInfo(_hybridProducts, vendorProducts, salesLines, dobbiesLabel);\r\n if (!vendorsInfo || vendorsInfo.length === 0) {\r\n SetVendorInfo(_vendorsInfo);\r\n }\r\n }\r\n};\r\n/* VSI Customizatoin - END */\r\n\r\nexport default OrderConfirmationView;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { IGroup, IGroupDelivery, IOrderInformation } from '@msdyn365-commerce-modules/order-management/src/common';\r\nimport { IOrderConfirmationViewProps } from '@msdyn365-commerce-modules/order-management/src/modules/order-confirmation/./order-confirmation';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IHelp,\r\n IOrderSummary,\r\n IPaymentMethods\r\n} from '@msdyn365-commerce-modules/order-management/src/modules/order-confirmation/../../common';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport get from 'lodash/get';\r\nimport { IOrderConfirmationProps } from '../definition-extensions/order-confirmation.ext.props.autogenerated';\r\n\r\n/* VSI Customization - START - 23/11/20 */\r\nexport interface ISalesInfoProps {\r\n itemCount: React.ReactElement;\r\n grossAmount: React.ReactElement;\r\n}\r\nexport interface IOrderDate {\r\n dateLabel: string;\r\n orderCreatedDate: string;\r\n}\r\nexport interface IOrderSummaryProduct {\r\n products: SimpleProduct[] | undefined;\r\n formattedPrice: string | undefined;\r\n clubPlusText: string;\r\n clubPlusTrialText: string;\r\n}\r\n/* VSI Customization - END */\r\n\r\nexport const OrderConfirmationOrderInfomation: React.FC = props => {\r\n const { orderInformationProps, channelReferenceId, itemCount, grossAmount, dateLabel, orderCreatedDate } = props;\r\n\r\n return (\r\n \r\n {/* VSI Customization - START - 23/11/20 */}\r\n \r\n \r\n \r\n {dateLabel}\r\n \r\n \r\n {orderCreatedDate}\r\n \r\n \r\n {itemCount}\r\n {grossAmount}\r\n \r\n {/* VSI Customization - END - 27/11/20 */}\r\n {channelReferenceId}\r\n \r\n );\r\n};\r\n\r\n/* VSI Customization - START - 23/11/20 - Removed OrderConfirmationSalesLine FC - END */\r\n\r\nexport const OrderConfirmationGroupDelivery: React.FC = ({ deliveryProps, heading, address }) => (\r\n \r\n {heading}\r\n {address}\r\n \r\n);\r\n\r\nexport const OrderConfirmationGroup: React.FC = props => {\r\n const { groupProps, delivery } = props;\r\n return (\r\n \r\n {delivery && }\r\n {/* VSI Customization - START - 23/11/20 - Displayed sales line in OrderConfirmationGroups function and removed from here - VSI Customization - END */}\r\n \r\n );\r\n};\r\n/* VSI Customization - START - 23/11/20 */\r\n// Converted functional component to simple function to pass order confirmation props to it\r\nconst OrderConfirmationGroups = (props: IOrderConfirmationViewProps & IOrderConfirmationProps<{}>) => (\r\n <>\r\n {props.groups && (\r\n \r\n {props.groups.groups.map((group, index) => {\r\n const { salesLines, salesLinesProps } = group;\r\n return (\r\n <>\r\n {salesLines && (\r\n \r\n {index === 0 && }\r\n {props.slots.consentHelpText && props.slots.consentHelpText}\r\n \r\n )}\r\n {renderLinks(props)}\r\n \r\n );\r\n })}\r\n \r\n )}\r\n \r\n);\r\n\r\nexport const OrderConfirmationOrderSummary: React.FC = ({\r\n orderSummaryProps,\r\n heading,\r\n shipping,\r\n totalAmount,\r\n earnedPoints,\r\n formattedPrice,\r\n clubPlusTrialText,\r\n clubPlusText\r\n}) => (\r\n \r\n {heading}\r\n
\r\n {formattedPrice === 'ÂŁ0.00' || formattedPrice === 'ÂŁ0.01' ? clubPlusTrialText : clubPlusText}\r\n {formattedPrice}\r\n
\r\n {shipping}\r\n {totalAmount}\r\n {earnedPoints}\r\n
\r\n);\r\n\r\nexport const OrderConfirmationPayment: React.FC = ({ paymentMethodsProps, title, methods }) => (\r\n \r\n {/* VSI-Customization -- START\r\n Payment not required on order-confirmation page as per design\r\n */}\r\n {title}\r\n {methods}\r\n {/* VSI-Customization -- END */}\r\n \r\n);\r\n\r\nexport const OrderConfirmationHelp: React.FC = ({ helpProps, needHelpLabel, helpLineNumberLabel, contactNumber }) => (\r\n \r\n {needHelpLabel}\r\n {helpLineNumberLabel}\r\n {contactNumber}\r\n \r\n);\r\n/* VSI Customization - START - 23/11/20 */\r\nconst _getCountandPrice = (props: IOrderConfirmationViewProps & IOrderConfirmationProps<{}>): ISalesInfoProps => {\r\n const {\r\n data: { orderHydration },\r\n resources: { itemLabel, itemsLabel, orderTotalLabelText }\r\n } = props;\r\n const salesOrder = orderHydration && orderHydration.result && orderHydration.result.salesOrder;\r\n // items count\r\n let itemsCount = 0;\r\n salesOrder &&\r\n salesOrder.SalesLines &&\r\n salesOrder.SalesLines.map(salesLine => {\r\n itemsCount = salesLine.Quantity ? itemsCount + salesLine.Quantity : itemsCount;\r\n });\r\n // format price\r\n const grossAmount = salesOrder && salesOrder.GrossAmount;\r\n const totalAmount = grossAmount && props.context.cultureFormatter.formatCurrency(grossAmount.toString(), props.context.request.channel?.Currency);\r\n return {\r\n itemCount: (\r\n \r\n \r\n {itemsCount}\r\n \r\n \r\n {itemsCount === 1 ? itemLabel : itemsLabel}\r\n \r\n \r\n ),\r\n grossAmount: (\r\n \r\n \r\n {orderTotalLabelText}\r\n \r\n \r\n {totalAmount}\r\n \r\n \r\n )\r\n };\r\n};\r\n\r\n/* VSI Customization - END */\r\n\r\nconst renderLinks = (props: IOrderConfirmationViewProps & IOrderConfirmationProps<{}>) => {\r\n const {\r\n config: { shopNowLink, myAccount },\r\n data: { orderHydration }\r\n } = props;\r\n let showShopNowLink = true;\r\n const products = orderHydration && orderHydration.result && orderHydration.result.products;\r\n const boltonAttr = props.data.accountInformation?.result?.Attributes?.find(\r\n attr => attr.Name?.toLowerCase() === 'IsBoltonMember'.toLowerCase());\r\n if (boltonAttr && boltonAttr.AttributeValue?.StringValue === 'Yes' || (products && products.length && (products[0].RecordId === props.app.config.ClubBoltOnTierId || products[0].RecordId === props.app.config.ClubBoltOnTierIdSecond))) {\r\n showShopNowLink = false;\r\n }\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst OrderConfirmationView: React.FC> = props => {\r\n const {\r\n moduleProps,\r\n heading,\r\n alert,\r\n loading,\r\n orderInfomation,\r\n orderSummary,\r\n payment,\r\n help,\r\n groups,\r\n slots: { helpCentreBlock },\r\n data: { orderHydration },\r\n resources: { orderPlacedOnLabel, clubPlusText, clubPlusTrialText }\r\n } = props;\r\n /* VSI Customization - START - 23/11/20 */\r\n const salesOrderInfo = _getCountandPrice(props);\r\n const salesOrder = orderHydration && orderHydration.result && orderHydration.result.salesOrder;\r\n const products = orderHydration && orderHydration.result && orderHydration.result.products;\r\n const [boltonProductTitle, setBoltonProductTitle] = React.useState('');\r\n const createdDateTime = salesOrder && salesOrder.SalesLines && salesOrder.SalesLines[0] && salesOrder.SalesLines[0].SalesDate;\r\n const locale = get(props, 'context.request.locale') || 'en-US';\r\n const price = props.data.orderHydration.result?.products?.[0].Price;\r\n let formattedPrice;\r\n const orderCreatedDate = (createdDateTime && new Date(createdDateTime).toLocaleDateString(locale)) || '';\r\n\r\n if (price === 0) {\r\n formattedPrice = '£0.00';\r\n } else {\r\n formattedPrice = price && props.context.cultureFormatter.formatCurrency(price, props.context.request.channel?.Currency);\r\n }\r\n //setCookies for half n hour After upgrade loyalty\r\n let isLoyaltyInProgress: string = props.context.request.user.customerAccountNumber!;\r\n if (isLoyaltyInProgress && !props.context.request.cookies.get(isLoyaltyInProgress).value) {\r\n props.context.request.cookies.set(isLoyaltyInProgress, true, { maxAge: 3600 });\r\n }\r\n const created = {\r\n dateLabel: orderPlacedOnLabel,\r\n orderCreatedDate: orderCreatedDate\r\n };\r\n\r\n React.useEffect(() => {\r\n const boltonAttr = props.data.accountInformation?.result?.Attributes?.find(\r\n attr => attr.Name?.toLowerCase() === 'IsBoltonMember'.toLowerCase());\r\n if ((boltonAttr && boltonAttr.AttributeValue?.StringValue === 'Yes') || (products && products.length && (products[0].RecordId === props.app.config.ClubBoltOnTierId || products[0].RecordId === props.app.config.ClubBoltOnTierIdSecond))) {\r\n const ocHeading = document.getElementsByClassName('order-confirmation__heading');\r\n if (ocHeading && ocHeading.length) {\r\n const ps = ocHeading[0].getElementsByTagName('p');\r\n if (ps && ps.length) {\r\n ps[0].innerHTML = props.config.boltonsThankyouSubHeading ? props.config.boltonsThankyouSubHeading : 'You’re now supercharged! Your Double Up benefits will begin on 1st October 2024';\r\n } \r\n }\r\n\r\n const detailMsgs = document.getElementsByClassName('club-plus-oc-detail-msg');\r\n if (detailMsgs && detailMsgs.length) {\r\n detailMsgs[0].innerHTML = props.config.boltonsDetailMsg ? props.config.boltonsDetailMsg : 'An additional two drink credits will be automatically added to your membership card on the 1st of each month throughout the offer period. See full terms and conditions here: https://www.dobbies.com/club-terms-and-conditions';\r\n }\r\n\r\n const descHeading = document.getElementsByClassName('ms-order-confirmation__group-delivery-heading');\r\n if (descHeading && descHeading.length) {\r\n descHeading[0].innerHTML = props.config.boltonsDetailMsgHeading ? props.config.boltonsDetailMsgHeading : 'How do I redeem my extra hot drinks';\r\n }\r\n // Update Order Summary Product Title\r\n }\r\n }, [boltonProductTitle])\r\n\r\n React.useEffect(() => {\r\n // setTimeout(() => {\r\n const boltonAttr = props.data.accountInformation?.result?.Attributes?.find(\r\n attr => attr.Name?.toLowerCase() === 'IsBoltonMember'.toLowerCase());\r\n if (boltonAttr && boltonAttr.AttributeValue?.StringValue === 'Yes' || (products && products.length && (products[0].RecordId === props.app.config.ClubBoltOnTierId || products[0].RecordId === props.app.config.ClubBoltOnTierIdSecond))) {\r\n // const ocHeading = document.getElementsByClassName('order-confirmation__heading');\r\n // if (ocHeading && ocHeading.length) {\r\n // const ps = ocHeading[0].getElementsByTagName('p');\r\n // if (ps && ps.length) {\r\n // ps[0].innerHTML = props.config.boltonsThankyouSubHeading ? props.config.boltonsThankyouSubHeading : 'You’re now supercharged! Your Double Up benefits will begin on 1st October 2024';\r\n // } \r\n // }\r\n \r\n // const detailMsgs = document.getElementsByClassName('club-plus-oc-detail-msg');\r\n // if (detailMsgs && detailMsgs.length) {\r\n // detailMsgs[0].innerHTML = props.config.boltonsDetailMsg ? props.config.boltonsDetailMsg : 'An additional two drink credits will be automatically added to your membership card on the 1st of each month throughout the offer period. See full terms and conditions here: https://www.dobbies.com/club-terms-and-conditions';\r\n // }\r\n \r\n // const descHeading = document.getElementsByClassName('ms-order-confirmation__group-delivery-heading');\r\n // if (descHeading && descHeading.length) {\r\n // descHeading[0].innerHTML = props.config.boltonsDetailMsgHeading ? props.config.boltonsDetailMsgHeading : 'How do I redeem my extra hot drinks';\r\n // }\r\n\r\n if (products && products.length) {\r\n if (products[0].Name && boltonProductTitle !== products[0].Name) {\r\n setBoltonProductTitle(products[0]?.Name);\r\n }\r\n }\r\n // Update Order Summary Product Title\r\n }\r\n // }, 500);\r\n }, []);\r\n\r\n\r\n /* VSI Customization - END */\r\n return (\r\n \r\n
\r\n
{orderInfomation && heading}
\r\n
\r\n {alert}\r\n {loading}\r\n {/* VSI Customization - START - 23/11/20 */}\r\n {orderInfomation && }\r\n {groups && OrderConfirmationGroups(props)}\r\n {/* VSI Customization - END */}\r\n
\r\n
\r\n {orderSummary && (\r\n \r\n )}\r\n {payment && }\r\n {/* VSI Customization - START - 23/11/20 */}\r\n {orderInfomation && (\r\n \r\n {helpCentreBlock}\r\n \r\n )}\r\n {/* VSI Customization - END */}\r\n {help && }\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default OrderConfirmationView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['order-confirmation'] = {\n c: () => require('@msdyn365-commerce-modules/order-management/dist/lib/modules/order-confirmation/order-confirmation'),\n $type: 'contentModule',\n da: [{name:'accountInformation', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer', runOn: 0},{name:'channelDeliveryOptionConfig', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-channel-delivery-option-configuration', runOn: 0},{name:'featureState', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state', runOn: 0},{name:'loyaltyCard', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-loyalty-card', runOn: 1},{name:'orderHydration', path:'@msdyn365-commerce-modules/order-management/dist/lib/actions/get-sales-order-confirmation-with-hydrations', runOn: 0},{name:'tenderTypes', path:'@msdyn365-commerce-modules/order-management/dist/lib/actions/get-tender-types', runOn: 0}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'order-confirmation',\n p: 'order-management',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/order-management/dist/lib/modules/order-confirmation'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/order-management/dist/lib/actions/get-sales-order-confirmation-with-hydrations';\n let dataAction = require('@msdyn365-commerce-modules/order-management/dist/lib/actions/get-sales-order-confirmation-with-hydrations');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/order-management/dist/lib/actions/get-tender-types';\n let dataAction = require('@msdyn365-commerce-modules/order-management/dist/lib/actions/get-tender-types');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-channel-delivery-option-configuration';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-channel-delivery-option-configuration');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-loyalty-card';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-loyalty-card');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|themes|dobbies|views|order-confirmation'] = {\n c: () => require('partner/themes/dobbies/views/order-confirmation.view.tsx'),\n cn: '__local__-__local__-order-confirmation'\n };\nviewDictionary['__local__|__local__|themes|dobbiesclub|views|order-confirmation'] = {\n c: () => require('partner/themes/dobbiesclub/views/order-confirmation.view.tsx'),\n cn: '__local__-__local__-order-confirmation'\n };\nviewDictionary['@msdyn365-commerce-modules|order-management|modules|order-confirmation|order-confirmation'] = {\n c: () => require('@msdyn365-commerce-modules/order-management/dist/lib/modules/order-confirmation/order-confirmation.view.js'),\n cn: '@msdyn365-commerce-modules-order-management-order-confirmation'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n ICommerceApiSettings,\n ICreateActionContext\n} from '@msdyn365-commerce/core';\nimport { ProductDeliveryOptions, SalesOrder, SimpleProduct, TransactionType } from '@msdyn365-commerce/retail-proxy';\nimport { getDeliveryOptionsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\nimport {\n getSalesOrderDetailsBySalesIdAsync,\n getSalesOrderDetailsByTransactionIdAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/SalesOrdersDataActions.g';\nimport {\n ArrayExtensions,\n buildCacheKey,\n getSimpleProducts,\n ObjectExtensions,\n ProductInput,\n QueryResultSettingsProxy\n} from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Sales order response interface.\n */\ninterface ISalesOrderWithHydrations {\n salesOrder: SalesOrder;\n products: SimpleProduct[];\n productDeliveryOptions?: ProductDeliveryOptions[];\n}\n\n/**\n * OrderTypes Types of orders.\n */\nexport enum orderTypes {\n salesOrder = 'salesOrder',\n transaction = 'transaction'\n}\n\n/**\n * Calls the Retail API and returns the sales order.\n * @param orderType - OrderType.\n * @param orderId - Unique OrderId for each order.\n * @returns Sales Order.\n */\nconst getSalesOrder = (orderType: string = '', orderId: string = '') => async (\n context: IActionContext\n): Promise => {\n // Local (1) searches the retail server database, and remote (2) searches\n // on the headquarters side. All (3) and none (0) are not supported.\n const localSearch = 1;\n return orderType === orderTypes.salesOrder\n ? getSalesOrderDetailsBySalesIdAsync({ callerContext: context }, orderId)\n : getSalesOrderDetailsByTransactionIdAsync({ callerContext: context }, orderId, localSearch);\n};\n\n/**\n * Calls the Retail API and returns the products.\n * @param productIds - The product ids of the product to retrieve.\n * @param channelId - The channel id for the products.\n * @returns Simple product data.\n */\nconst getProducts = (productIds: (string | number)[] = [], channelId?: number) => async (\n context: IActionContext\n): Promise => {\n const productInputs = productIds.map(\n productId => new ProductInput(productId, context.requestContext.apiSettings, channelId, undefined, context.requestContext)\n );\n return getSimpleProducts(productInputs, context);\n};\n\n/**\n * Action input.\n */\nexport class GetSalesOrderConfirmationWithHydrationsInput implements IActionInput {\n public orderType: string;\n\n public orderId: string;\n\n private readonly apiSettings: ICommerceApiSettings;\n\n constructor(orderType: string, orderId: string, apiSettings: ICommerceApiSettings) {\n this.orderType = orderType;\n this.orderId = orderId;\n this.apiSettings = apiSettings;\n }\n\n /**\n * Get cache key.\n * @returns String.\n */\n public getCacheKey = () => buildCacheKey('SalesOrderConfirmationWithHydrations', this.apiSettings);\n\n /**\n * Get cache object.\n * @returns String.\n */\n public getCacheObjectType = () => `SalesOrderConfirmationWithHydrations-${this.orderType}-${this.orderId}`;\n\n /**\n * Get cache data type.\n * @returns String.\n */\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * Creates the input required to make the retail api call.\n * @param inputData - Actioncontext data.\n * @returns Sales Order Input.\n */\nconst createSalesOrderConfrimationWithHydrationsInput = (inputData: ICreateActionContext) => {\n const { salesId = '', transactionId = '' } = inputData.requestContext.query || {};\n if (salesId) {\n return new GetSalesOrderConfirmationWithHydrationsInput(orderTypes.salesOrder, salesId, inputData.requestContext.apiSettings);\n } else if (transactionId) {\n return new GetSalesOrderConfirmationWithHydrationsInput(\n orderTypes.transaction,\n transactionId,\n inputData.requestContext.apiSettings\n );\n }\n throw new Error('createSalesOrderConfrimationWithHydrationsInput - No salesId or transactionId provided.');\n};\n\n/**\n * Get sales order with hydrations action.\n * @param input - Input for data action.\n * @param context - Action context.\n * @returns Sales order response.\n */\nexport async function getSalesOrderConfirmationWithHydrationsAction(\n input: GetSalesOrderConfirmationWithHydrationsInput,\n context: IActionContext\n): Promise {\n if (!context) {\n throw new Error('getSalesOrderConfirmationWithHydrationsAction - Action context cannot be null/undefined');\n }\n\n const { orderType, orderId } = input;\n\n if (!orderType || !orderId) {\n context.trace('[getSalesOrderConfirmationWithHydrationsAction] No orderType or orderId provided.');\n return {};\n }\n\n const salesOrder = await getSalesOrder(orderType, orderId)(context);\n\n if (!salesOrder) {\n context.trace('[getSalesOrderWithHydrationsAction] No salesOrder found.');\n return {};\n }\n\n // If it is salesInvoice, return salesOrder and empty products\n if (salesOrder.TransactionTypeValue === TransactionType.SalesInvoice) {\n return {\n salesOrder,\n products: []\n };\n }\n\n if (!ArrayExtensions.hasElements(salesOrder.SalesLines)) {\n context.trace('[getSalesOrderWithHydrationsAction] No salesLine found.');\n return {};\n }\n\n const productIds = salesOrder.SalesLines.map(salesLine => salesLine.ProductId ?? '');\n\n if (!ArrayExtensions.hasElements(productIds)) {\n context.trace('[getSalesOrderWithHydrationsAction] No products in saleLines found.');\n return {};\n }\n\n const products = await getProducts(productIds, salesOrder.ChannelId)(context);\n\n if (!ArrayExtensions.hasElements(products)) {\n context.trace('[getSalesOrderWithHydrationsAction] No simple products found.');\n return {};\n }\n\n const validProducts = products.filter(product => !ObjectExtensions.isNullOrUndefined(product.RecordId));\n const filterPickup = 4;\n const deliveryOptions = await getDeliveryOptionsAsync(\n { callerContext: context, queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context) },\n validProducts.map(product => product.RecordId),\n {},\n filterPickup\n )\n .then(result => {\n return result;\n })\n .catch((error: Error) => {\n context.trace(error.message);\n context.telemetry.exception(error);\n context.telemetry.debug('[getDeliveryOptionsForCartLineItems]Error executing action');\n throw new Error('[getDeliveryOptionsForCartLineItems]Error executing action');\n });\n\n return {\n salesOrder,\n products,\n deliveryOptions\n };\n}\n\n/**\n * Get sales order with hydrations action.\n * @param id - Unique Id for data action.\n * @param context - Action context.\n * @param input - Input for data action.\n * @returns Sales order response.\n */\nexport const getSalesOrderConfirmationWithHydrationsActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/order-management/get-sales-order-confirmation-with-hydrations',\n action: >getSalesOrderConfirmationWithHydrationsAction,\n input: createSalesOrderConfrimationWithHydrationsInput\n});\n\nexport default getSalesOrderConfirmationWithHydrationsActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { getTenderTypesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport { TenderType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { QueryResultSettingsProxy } from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Action input.\n */\nexport class GetTenderTypesInput implements IActionInput {\n public getCacheKey = () => 'TenderTypes';\n\n public getCacheObjectType = () => 'TenderTypes';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * CreateInput method for the getTenderTypes method.\n * @param inputData -- The input data passed to the createInput method.\n * @returns - Input for data action.\n */\nexport const createTenderTyperInput = (inputData: ICreateActionContext>): IActionInput => {\n return new GetTenderTypesInput();\n};\n\n/**\n * Get tender type action.\n * @param input - Input data.\n * @param context - Action context.\n * @returns - TenderType\n */\nexport async function getTenderTypeAction(input: GetTenderTypesInput, context: IActionContext): Promise {\n const tenderType = await getTenderTypesAsync({\n callerContext: context,\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context)\n });\n\n return tenderType;\n}\n\n/**\n * Get Tender Types Data Action.\n */\nexport const getTenderTypeActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/order-management/get-tender-types',\n action: getTenderTypeAction as IAction,\n input: createTenderTyperInput\n});\n\nexport default getTenderTypeActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IGetHelpInput, IHelp } from '../../..';\n\nexport const getOrderConfirmationHelp = ({\n needHelpLabel,\n helpLineNumberLabel,\n contactNumber,\n helpLineContactAriaLabel,\n telemetryContent\n}: IGetHelpInput): IHelp => {\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n return {\n helpProps: { className: 'ms-order-confirmation__help' },\n needHelpLabel:

{needHelpLabel}

,\n helpLineNumberLabel: {helpLineNumberLabel},\n contactNumber: (\n \n {contactNumber}\n \n )\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport * as React from 'react';\n\nimport { IGetOrderSummaryInput, IOrderSummary, IPriceContext } from '../../../common';\n\ninterface ISummaryLineProps {\n priceContext?: IPriceContext;\n name: string;\n label: string;\n value?: number;\n}\n\nconst OrderSummaryLine: React.SFC = ({ name, label, value = 0, priceContext }) => (\n

\n {label}\n {priceContext ? (\n \n ) : (\n {value}\n )}\n

\n);\n\nexport const getOrderConfirmationOrderSummary = ({\n order,\n priceContext,\n earnedPoints,\n resource: {\n orderSummaryHeading,\n orderSummaryItemsTotalLabel,\n orderSummaryShippingFeeLabel,\n orderSummaryTaxLabel,\n orderSummaryGrandTotalLabel,\n pointsEarnedLabel\n },\n canShip,\n isTaxIncludedInPrice,\n isShowTaxBreakUp\n}: IGetOrderSummaryInput): IOrderSummary => {\n const subTotal = isTaxIncludedInPrice && isShowTaxBreakUp ? order.SubtotalAmountWithoutTax : order.SubtotalAmount;\n const taxOnShippingCharge = order.TaxOnShippingCharge !== undefined ? order.TaxOnShippingCharge : 0;\n const shippingChargeAmount = order.ShippingChargeAmount !== undefined ? order.ShippingChargeAmount : 0;\n\n // isTaxIncludedInPrice isShowTaxBreakup useProperties\n // False False/True otherChargeAmount\n // True True otherChargeAmount\n // True false otherChargeAmount+TaxOnNonShippingCharges\n const shippingCharge =\n isTaxIncludedInPrice && !isShowTaxBreakUp ? shippingChargeAmount + taxOnShippingCharge : order.ShippingChargeAmount;\n return {\n orderSummaryProps: { className: 'ms-order-confirmation__order-summary' },\n heading:

{orderSummaryHeading}

,\n subtotal: ,\n shipping: canShip ? (\n \n ) : (\n ''\n ),\n tax: isShowTaxBreakUp ? (\n \n ) : (\n ''\n ),\n totalAmount: (\n \n ),\n earnedPoints: earnedPoints ? : undefined\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { RetailOperation, TenderLine } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport * as React from 'react';\n\nimport { IPaymentMethods, IPaymentMethodsInput } from '../../../common';\n\nexport const getOrderConfirmationPaymentMethods = ({\n priceContext,\n tenderLines,\n tenderIdOperationIdMap,\n resource: {\n paymentMethodsTitle,\n creditCardEndingLabel,\n giftCardEndingLabel,\n amountCoveredLabel,\n loyaltyCardUsedLabel,\n cashUsedLabel,\n customerAccountUsedLabel\n }\n}: IPaymentMethodsInput): IPaymentMethods => {\n const getLastFourDigit = (digits = '') => digits.substr(-4);\n\n const getCard = (tenderLine: TenderLine, showAmount: boolean = false) => {\n const cardLastFourDigit = getLastFourDigit(tenderLine.MaskedCardNumber);\n\n // @ts-expect-error\n const isValidCardNumber = cardLastFourDigit && !isNaN(cardLastFourDigit);\n const amount = (tenderLine.AuthorizedAmount || 0) > 0 ? tenderLine.AuthorizedAmount : tenderLine.Amount;\n const showAmountCovered = !!(showAmount && amount && amount > 0);\n\n return (\n
\n

\n {`${tenderLine.CardTypeId} ${isValidCardNumber ? `${creditCardEndingLabel} ${cardLastFourDigit}` : ''}`}\n

\n {showAmountCovered && (\n

\n {amountCoveredLabel}\n \n

\n )}\n
\n );\n };\n\n const getGiftCertificate = (tenderLine: TenderLine) => (\n
\n

\n {giftCardEndingLabel}\n {` `}\n {getLastFourDigit(tenderLine.GiftCardId)}\n

\n

\n {amountCoveredLabel}\n \n

\n
\n );\n\n const getLoyalty = (tenderLine: TenderLine) => (\n
\n

\n {loyaltyCardUsedLabel}\n {` `}\n {tenderLine.LoyaltyCardId}\n

\n

\n {amountCoveredLabel}\n \n

\n
\n );\n\n const getCash = (tenderLine: TenderLine) => (\n
\n

{cashUsedLabel}

\n

\n {amountCoveredLabel}\n \n

\n
\n );\n\n /**\n * Get customer account payment information.\n * @param tenderLine - The customer account payment tender line.\n * @returns The customer account payment HTML.\n */\n const getCustomerAccountPayment = (tenderLine: TenderLine) => (\n
\n

\n {customerAccountUsedLabel}\n {` `}\n {tenderLine.CustomerId}\n

\n

\n {amountCoveredLabel}\n \n

\n
\n );\n\n return {\n paymentMethodsProps: { className: 'ms-order-confirmation__payment-methods' },\n title:
{paymentMethodsTitle}
,\n methods: tenderLines.reduce((lines: React.ReactNode[], tenderLine) => {\n if (!tenderLine.TenderTypeId) {\n return lines;\n }\n switch (tenderIdOperationIdMap[tenderLine.TenderTypeId]) {\n case RetailOperation.PayCard:\n lines.push(getCard(tenderLine, tenderLines.length > 1));\n break;\n case RetailOperation.PayGiftCertificate:\n lines.push(getGiftCertificate(tenderLine));\n break;\n case RetailOperation.PayLoyalty:\n lines.push(getLoyalty(tenderLine));\n break;\n case RetailOperation.PayCash:\n lines.push(getCash(tenderLine));\n break;\n case RetailOperation.PayCustomerAccount:\n lines.push(getCustomerAccountPayment(tenderLine));\n break;\n default:\n\n // Do nothing\n }\n return lines;\n }, [])\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport {\n ChannelDeliveryOptionConfiguration,\n ProductDeliveryOptions,\n SalesLine,\n SalesOrder,\n SimpleProduct,\n TransactionType\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport get from 'lodash/get';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { IGetOrderSummaryInput, IHelp, IOrderSummary, IPaymentMethods, IPaymentMethodsInput } from '../../common';\nimport { getGroups, IGroups } from '../../common/get-groups';\nimport { getOrderInformation, getOrderInformationInput, IOrderInformation } from '../../common/get-order-information';\nimport { ISalesLine } from '../../common/get-sales-line';\nimport { getSalesLines, getSalesLinesInput } from '../../common/get-sales-lines';\nimport { Label } from '../../common/label';\nimport { getTenderIdOperationIdMap, IPriceContext } from '../../common/utilities';\nimport { getOrderConfirmationHelp } from './components/get-help';\nimport { getOrderConfirmationOrderSummary } from './components/get-order-summary';\nimport { getOrderConfirmationPaymentMethods } from './components/get-payment-methods';\nimport { IOrderConfirmationData } from './order-confirmation.data';\nimport { IOrderConfirmationProps } from './order-confirmation.props.autogenerated';\n\nexport interface IOrderConfirmationViewProps extends IOrderConfirmationProps {\n moduleProps: IModuleProps;\n salesOrder?: SalesOrder;\n footerProps?: INodeProps;\n alert?: React.ReactNode;\n loading?: React.ReactNode;\n heading: React.ReactNode;\n backToShoppingLink?: React.ReactNode;\n orderInfomation?: IOrderInformation;\n salesLines?: ISalesLine[];\n groups?: IGroups;\n orderSummary?: IOrderSummary;\n payment?: IPaymentMethods;\n help?: IHelp;\n}\n\n/**\n *\n * OrderConfirmation component.\n * @extends {React.PureComponent>}\n */\nclass OrderConfirmation extends React.PureComponent> {\n private readonly moduleName: string = 'ms-order-confirmation';\n\n private readonly telemetryContent?: ITelemetryContent;\n\n private readonly backToShoppingAttributes?: Msdyn365.IDictionary;\n\n constructor(props: IOrderConfirmationProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.BackToShopping);\n this.backToShoppingAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n }\n\n @computed get isCurrentChannel(): boolean {\n if (!this.order) {\n return false;\n }\n return this.order.ChannelId === get(this.props, 'context.request.apiSettings.channelId');\n }\n\n @computed get isDataReady(): boolean {\n return get(this.props, 'data.orderHydration.status') === 'SUCCESS';\n }\n\n @computed get hasError(): boolean {\n return get(this.props, 'data.orderHydration.status') === 'FAILED';\n }\n\n @computed get order(): SalesOrder | undefined {\n return get(this.props, 'data.orderHydration.result.salesOrder');\n }\n\n @computed get products(): SimpleProduct[] {\n return get(this.props, 'data.orderHydration.result.products') || [];\n }\n\n @computed get deliveryOptions(): ProductDeliveryOptions[] {\n return get(this.props, 'data.orderHydration.result.deliveryOptions') || [];\n }\n\n @computed public get customerName(): Readonly {\n const customer = this.props.data.accountInformation?.result;\n if (Msdyn365.isOboRequest(this.props.context.request)) {\n // For OBO scenario, display full customer name because multiple customers may have the same first name.\n return customer ? customer.Name : undefined;\n } else {\n return customer ? customer.FirstName || customer.Name : undefined;\n }\n }\n\n @computed get priceContext(): IPriceContext {\n const {\n id,\n typeName,\n context,\n telemetry,\n resources: { freePriceText }\n } = this.props;\n return {\n id,\n typeName,\n context,\n telemetry,\n freePriceText\n };\n }\n\n @computed get earnedPoints(): number {\n const loyaltyCard = this.props.data.loyaltyCard.result;\n if (loyaltyCard && loyaltyCard.RewardPoints && this.order) {\n const pointPrograms = new Set(loyaltyCard.RewardPoints.map(point => point.RewardPointId));\n const rewardLines = this.order.LoyaltyRewardPointLines || [];\n let total = 0;\n rewardLines.forEach(line => {\n if ((line.RewardPointAmountQuantity || 0) > 0 && pointPrograms.has(line.RewardPointId)) {\n total += line.RewardPointAmountQuantity!;\n }\n });\n return total;\n }\n return 0;\n }\n\n @computed get orderSummaryProps(): IGetOrderSummaryInput | undefined {\n if (!this.order) {\n return;\n }\n const { request } = this.props.context;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = this.props?.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(item => item.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n const pickupDeliveryModeCode = request && request.channel && request.channel.PickupDeliveryModeCode;\n const emailDeliveryModeCode = request && request.channel && request.channel.EmailDeliveryModeCode;\n const orderDetailsLines = this.order?.SalesLines;\n const canShip = orderDetailsLines?.some(orderDetailsLine =>\n orderDetailsLine.DeliveryMode && orderDetailsLine.DeliveryMode !== ''\n ? orderDetailsLine.DeliveryMode !==\n this.getDeliveryMode(\n orderDetailsLine,\n retailMultiplePickUpOptionEnabled,\n channelDeliveryOptionConfig?.result,\n pickupDeliveryModeCode\n ) && orderDetailsLine.DeliveryMode !== emailDeliveryModeCode\n : orderDetailsLine\n );\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\n const isShowOrHideTaxEnabled = request.app.config.isEnableShowOrHideSalesTaxECommerceEnabled === true;\n\n const {\n resources: {\n orderSummaryHeading,\n orderSummaryItemsTotalLabel,\n orderSummaryShippingFeeLabel,\n orderSummaryTaxLabel,\n orderSummaryGrandTotalLabel,\n pointsEarnedLabel\n }\n } = this.props;\n return {\n order: this.order,\n earnedPoints: this.earnedPoints,\n priceContext: this.priceContext,\n resource: {\n orderSummaryHeading,\n orderSummaryItemsTotalLabel,\n orderSummaryShippingFeeLabel,\n orderSummaryTaxLabel,\n pointsEarnedLabel,\n orderSummaryGrandTotalLabel\n },\n canShip,\n isTaxIncludedInPrice: this.order.IsTaxIncludedInPrice,\n isShowTaxBreakUp: isShowOrHideTaxEnabled\n };\n }\n\n @computed get paymentMethodsProps(): IPaymentMethodsInput | undefined {\n const tenderTypes = this.props.data.tenderTypes.result;\n if (!this.order || !this.order.TenderLines || !tenderTypes) {\n return;\n }\n\n const locale = get(this.props, 'context.request.locale') || 'en-US';\n\n const {\n resources: {\n paymentMethodsTitle,\n creditCardEndingLabel,\n giftCardEndingLabel,\n amountCoveredLabel,\n cashUsedLabel,\n loyaltyCardUsedLabel,\n customerAccountUsedLabel\n }\n } = this.props;\n\n return {\n priceContext: this.priceContext,\n tenderLines: this.order.TenderLines,\n tenderIdOperationIdMap: getTenderIdOperationIdMap(tenderTypes),\n locale,\n resource: {\n paymentMethodsTitle,\n creditCardEndingLabel,\n giftCardEndingLabel,\n amountCoveredLabel,\n cashUsedLabel,\n loyaltyCardUsedLabel,\n customerAccountUsedLabel\n }\n };\n }\n\n public render(): JSX.Element {\n const {\n resources: {\n noSalesOrderText,\n genericErrorMessage,\n needHelpLabel,\n helpLineNumberLabel,\n loadingLabel,\n backToShopping,\n orderItemLabel,\n orderItemsLabel,\n pickupItemsHeader,\n pickingItemsLabel,\n shippingAddressTitle,\n shippingItemToYouLabel,\n shippingItemToOBOCustomerLabel,\n helpLineContactAriaLabel,\n emailItemsHeader,\n emailingItemsLabel\n },\n config: { heading, contactNumber, shouldShowQrCode, showTimeslot }\n } = this.props;\n\n const moduleProps = { moduleProps: this.props, className: classname('ms-order-confirmation', this.props.config.className) };\n const backToShoppingUrl = Msdyn365.getUrlSync('home', this.props.context.actionContext) || '';\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = this.props?.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(item => item.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n\n let viewProps: IOrderConfirmationViewProps = {\n ...this.props,\n moduleProps,\n heading: heading && heading.text && (\n \n ),\n backToShoppingLink: backToShoppingUrl && (\n \n ),\n footerProps: { className: 'ms-order-confirmation__footer' }\n };\n\n if (this.hasError) {\n viewProps = {\n ...viewProps,\n alert: