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A6BhJ,OAAAC,OAAA,GAAKwN,IACnDE,GAAQtZ,EAAAA,cAAC8b,EAAqBnQ,OAAAC,OAAA,GAAK0N,aC7HhD8U,EAAOC,QAAUruB,cCAjBouB,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 // @ts-ignore\r\n const salePrice = props.data.cartLine.NetAmount + props.data.cartLine.TaxAmount;\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 const orderno_no = get(channelReferenceId, 'props.children[0].props.children[1].props.children');\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 Order number: {orderno_no}\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: { clubPlusText, clubPlusTrialText } // orderPlacedOnLabel\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: 'Order date:',// 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: