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IACd,UAAW,IACX,aAAc,KAIf,SAASsnC,EAAeC,GACvB,IAAIx9B,EAAKy9B,EAAsBD,GAC/B,OAAOE,EAAoB19B,GAE5B,SAASy9B,EAAsBD,GAC9B,IAAIE,EAAoBC,EAAE1nC,EAAKunC,GAAM,CACpC,IAAIjiC,EAAI,IAAIoe,MAAM,uBAAyB6jB,EAAM,KAEjD,MADAjiC,EAAEqiC,KAAO,mBACHriC,EAEP,OAAOtF,EAAIunC,GAEZD,EAAehmB,KAAO,WACrB,OAAOpD,OAAOoD,KAAKthB,IAEpBsnC,EAAe31B,QAAU61B,EACzBI,EAAOC,QAAUP,EACjBA,EAAev9B,GAAK","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/aaa_b2b_order_detail/aaa_b2b_order_detail.tsx?c415","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_b2b_order_detail/aaa_b2b_order_detail.view.tsx?adde","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_b2b_order_history_detail/aaa_b2b_order_history_detail.tsx?9a16","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_b2b_order_history_detail/aaa_b2b_order_history_detail.view.tsx?cece","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_b2c_order_history_detail/aaa_b2c_order_history_detail.tsx?025d","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_b2c_order_history_detail/aaa_b2c_order_history_detail.view.tsx?75e8","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_cart/components/aaa_cart-pick-up-in-store.tsx?8394","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_cart/components/cart-line-Item.tsx?e6e3","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_cart/components/aaa_cart-line-items.tsx?82e7","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_cart/components/aaa_cart-line-groups.tsx?cb5a","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_cart/utils/get-promotion-in-aaa_cart.ts?1c2e","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_cart/aaa_cart.tsx?aaef","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_cart/components/aaa_cart-line-items-promotion.tsx?b000","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_cart/aaa_cart.view.tsx?a7d8","webpack://Msdyn365.Commerce.Online/./src/modules/order-requestlines-template/components/toaster.tsx?4aa2","webpack://Msdyn365.Commerce.Online/./src/modules/order-requestlines-template/order-requestlines-template.tsx?afd4","webpack://Msdyn365.Commerce.Online/./src/modules/order-requestlines-template/order-requestlines-template.view.tsx?3d07","webpack://Msdyn365.Commerce.Online/./node_modules/moment/locale/ sync ^\\.\\/.*$?b2df"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\n\r\nimport { IAaaB2BOrderDetailData } from './aaa_b2b_order_detail.data';\r\nimport { IAaa_b2b_order_detailProps } from './aaa_b2b_order_detail.props.autogenerated';\r\nimport { getRequestOrderAsync, updateRequestOrderAsync } from '../../dataActions/DataActionExtension.g';\r\nimport { FullProductInput, getFullProducts, getProductDetailsCriteriaFromActionInput } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { addCartLinesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\nimport { getCartState } from '@msdyn365-commerce/global-state';\r\nimport moment from 'moment';\r\nimport { Button } from '@msdyn365-commerce-modules/utilities';\r\nimport { reaction } from 'mobx';\r\n\r\nexport interface IAaa_b2b_order_detailViewProps extends IAaa_b2b_order_detailProps {\r\n requestOrderDetail: any;\r\n isLoading: boolean;\r\n addItemToCart: any;\r\n toasterInfo: any;\r\n removePopUp: any;\r\n _renderPopUp?: any;\r\n _togglePopUp?: any;\r\n}\r\n\r\n/**\r\n *\r\n * Aaa_b2b_order_detail component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass Aaa_b2b_order_detail extends React.PureComponent, any> {\r\n constructor(props: any) {\r\n super(props);\r\n this.state = {\r\n requestOrderDetail: {},\r\n toasterInfo: { visible: false },\r\n removePopUp: { visible: false },\r\n cart: undefined,\r\n isLoading: true\r\n };\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n reaction(\r\n () => this.props.data.cart.result?.cart,\r\n async () => {\r\n if (this.props.data.cart.result?.cart) {\r\n const cart: any = this.props.data.cart.result?.cart;\r\n const params = new URLSearchParams(this.props.context.request.url.requestUrl.search);\r\n var requestOrderId: string | null = '';\r\n var lineNum: string | null = '';\r\n if (params.has('requestOrderId') && params.has('lineNum')) {\r\n // check url has recordId...\r\n requestOrderId = params.get('requestOrderId');\r\n lineNum = params.get('lineNum');\r\n }\r\n await this.getRequestOrder(requestOrderId, lineNum, cart);\r\n this.setState({ cart: cart });\r\n }\r\n }\r\n );\r\n }\r\n\r\n public getRequestOrder = async (requestOrderId: any, lineNum: any, cart: any) => {\r\n const response: any = await getRequestOrderAsync(\r\n {\r\n callerContext: this.props.context.actionContext,\r\n\r\n queryResultSettings: {}\r\n },\r\n requestOrderId\r\n );\r\n\r\n if (response.RequestOrder.length > 0) {\r\n const productInputs: any = [];\r\n response.RequestOrder.map((requestOrder: any) => {\r\n if (requestOrder.ProductId) {\r\n productInputs.push(\r\n new FullProductInput(\r\n requestOrder.ProductId,\r\n this.props.context.actionContext.requestContext.apiSettings,\r\n getProductDetailsCriteriaFromActionInput(this.props.context.actionContext)\r\n )\r\n );\r\n }\r\n });\r\n if (productInputs.length > 0) {\r\n return getFullProducts(productInputs, this.props.context.actionContext).then(async products => {\r\n if (products) {\r\n // mapping data....\r\n const requestOrders = response.RequestOrder.filter((order: any) => {\r\n return order.RequestOrderId === requestOrderId && order.LineNum.toString() === lineNum;\r\n });\r\n requestOrders.map((order: any) => {\r\n const product: any = products.find((p: any) => {\r\n return order.ProductId === p.ProductDetails.RecordId;\r\n });\r\n let matchedCartProducts = [];\r\n if (product && order.ProductId && cart) {\r\n const requestOrderDetail: any = {\r\n imageUrl: order.HighResImageURL,\r\n productName: order.ProductName,\r\n stockistInfo: {\r\n name: order.b2CCustomerName,\r\n phoneNumber: order.B2CPhone,\r\n email: order.B2CEmailId\r\n },\r\n statusName: order.StatusName,\r\n snapShotId: order.Snapshotid,\r\n orderNumber: order.RequestOrderId,\r\n orderDate: order.DateTime ? moment(order.DateTime).format('DD/MM/YYYY') : '-',\r\n rings: [],\r\n totalPrice: order.B2CPrice.toLocaleString(),\r\n b2cPrice: order.B2CPrice,\r\n quantity: order.Quantity,\r\n product: product,\r\n lineNum: lineNum\r\n };\r\n const requestOrderLines = JSON.parse(order.RequestOrderLines);\r\n for (const ring of requestOrderLines) {\r\n const ringSizePi = parseFloat(ring.RingSize.split('mm')[0]) / 3.14159265;\r\n const ringInfo = {\r\n name: ring.DetailName,\r\n alloy: ring.Alloy1,\r\n engravingFont: ring.EngravingText ? ring.EngravingFont : '-',\r\n sizeLabel: ring.RingSizeLabel,\r\n sizeValue:\r\n Math.round(\r\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\r\n (ringSizePi + Number.EPSILON) * 100\r\n ) / 100,\r\n engravingCopy: ring.EngravingText ? ring.EngravingText : '-',\r\n specifications: ring.DiamondCount\r\n ? `${ring.DiamondCount} Diamonds, ${ring.RingWidth} Wide, ${ring.RingHeight} thick`\r\n : `${ring.RingWidth} Wide, ${ring.RingHeight} thick`,\r\n price: ring.B2CPrice.toLocaleString()\r\n };\r\n requestOrderDetail.rings.push(ringInfo);\r\n }\r\n matchedCartProducts = cart.CartLines.filter((cartLine: any) => {\r\n return order.ProductId === cartLine.ProductId;\r\n });\r\n requestOrderDetail.orderExistInCart = matchedCartProducts.some((p: any) => {\r\n let requestOrderId = '';\r\n let lineId = null;\r\n let snapShotId = '';\r\n if (p.ExtensionProperties.length > 0) {\r\n p.ExtensionProperties.forEach((e: any) => {\r\n if (e.Key === 'AAA_REQUESTORDERID') {\r\n requestOrderId = e.Value.StringValue;\r\n }\r\n if (e.Key === 'AAA_REQUESTORDERLINENUM') {\r\n lineId = e.Value.DecimalValue;\r\n }\r\n if (e.Key === 'AAA_SNAPSHOTID') {\r\n snapShotId = e.Value.StringValue;\r\n }\r\n });\r\n }\r\n\r\n return (\r\n requestOrderDetail.orderNumber === requestOrderId &&\r\n requestOrderDetail.snapShotId === snapShotId &&\r\n Number(requestOrderDetail.lineNum) === lineId\r\n );\r\n });\r\n if (!requestOrderDetail.orderExistInCart) {\r\n // generate order reference...\r\n const weekday = ['S', 'M', 'T', 'W', 'T', 'F', 'S'];\r\n\r\n const d = new Date();\r\n const day = weekday[d.getDay()];\r\n const year = new Date()\r\n .getFullYear()\r\n .toString()\r\n .substr(-2);\r\n const oneDigitRandomNumber = Math.floor(1 + Math.random() * 9);\r\n const fourDigitRandomNumber = Math.floor(1000 + Math.random() * 9000);\r\n // eslint-disable-next-line radix\r\n let priceInFloat = parseInt(order.B2BPrice).toString();\r\n priceInFloat = priceInFloat.padStart(4, '0');\r\n requestOrderDetail.referenceNumber = `${day}${year}-${oneDigitRandomNumber}${priceInFloat}-${fourDigitRandomNumber}`;\r\n } else {\r\n const matchedCartItem = matchedCartProducts.find((p: any) => {\r\n let requestOrderId = '';\r\n let lineId = null;\r\n let snapShotId = '';\r\n if (p.ExtensionProperties.length > 0) {\r\n p.ExtensionProperties.forEach((e: any) => {\r\n if (e.Key === 'AAA_REQUESTORDERID') {\r\n requestOrderId = e.Value.StringValue;\r\n }\r\n if (e.Key === 'AAA_REQUESTORDERLINENUM') {\r\n lineId = e.Value.DecimalValue;\r\n }\r\n if (e.Key === 'AAA_SNAPSHOTID') {\r\n snapShotId = e.Value.StringValue;\r\n }\r\n });\r\n }\r\n return (\r\n requestOrderId === requestOrderDetail.orderNumber &&\r\n lineId === Number(requestOrderDetail.lineNum) &&\r\n snapShotId === requestOrderDetail.snapShotId\r\n );\r\n });\r\n if (matchedCartItem && matchedCartItem.ExtensionProperties.length > 0) {\r\n const matchedCartReferenceNumber = matchedCartItem.ExtensionProperties.find((e: any) => {\r\n return e.Key === 'AAA_REFERENCENUMBER' && e.Value.StringValue;\r\n });\r\n if (matchedCartReferenceNumber) {\r\n requestOrderDetail.referenceNumber = matchedCartReferenceNumber.Value.StringValue;\r\n }\r\n }\r\n }\r\n this.setState({ requestOrderDetail, isLoading: false });\r\n }\r\n });\r\n }\r\n });\r\n }\r\n }\r\n };\r\n\r\n private readonly _addItemToCart = (requestOrderLine: any) => {\r\n const { context } = this.props;\r\n // const { cart } = data;\r\n const product = requestOrderLine.product.ProductDetails;\r\n if (context) {\r\n if (this.state.cart) {\r\n const addCartLines = {\r\n CatalogId: context.request.apiSettings.catalogId,\r\n Description: product.Description,\r\n EntryMethodTypeValue: 3,\r\n ItemId: product.ItemId,\r\n ProductId: product.RecordId,\r\n Quantity: requestOrderLine.quantity,\r\n IsPriceKeyedIn: true,\r\n TrackingId: '',\r\n UnitOfMeasureSymbol: product.DefaultUnitOfMeasure,\r\n IsGiftCardLine: false,\r\n Price: requestOrderLine.b2cPrice,\r\n ExtensionProperties: [\r\n {\r\n Key: 'AAA_SNAPSHOTID',\r\n Value: {\r\n StringValue: requestOrderLine.snapShotId\r\n }\r\n },\r\n {\r\n Key: 'AAA_REQUESTORDERID',\r\n Value: {\r\n StringValue: requestOrderLine.orderNumber\r\n }\r\n },\r\n {\r\n Key: 'AAA_REQUESTORDERLINENUM',\r\n Value: {\r\n DecimalValue: Number(requestOrderLine.lineNum)\r\n }\r\n },\r\n {\r\n Key: 'AAA_REFERENCENUMBER',\r\n Value: {\r\n StringValue: requestOrderLine.referenceNumber\r\n }\r\n }\r\n ]\r\n };\r\n if (!requestOrderLine.snapShotId) {\r\n addCartLines.IsPriceKeyedIn = false;\r\n }\r\n addCartLinesAsync(\r\n { callerContext: context.actionContext, queryResultSettings: {} },\r\n this.state.cart.Id,\r\n [addCartLines],\r\n this.state.cart.Version\r\n )\r\n .then(async response => {\r\n this.toggleSnackBar('success', 'Item Added to Cart...');\r\n const cartState = await getCartState(this.props.context.actionContext);\r\n await cartState.refreshCart({});\r\n // redirect to manage orders..\r\n this.moveToManageOrderPage();\r\n })\r\n .catch(err => {\r\n this.toggleSnackBar('error', 'Add Cart failed');\r\n });\r\n }\r\n }\r\n };\r\n private moveToManageOrderPage = () => {\r\n const request = this.props.context.request;\r\n let orderDetailUrl = request.url.requestUrl.origin;\r\n if (request.sitePath) {\r\n orderDetailUrl = orderDetailUrl + request.sitePath;\r\n }\r\n if (request) {\r\n window.location.href = `${orderDetailUrl}${this.props.config.redirectToManageOrdersUrl}`;\r\n }\r\n };\r\n public toggleSnackBar = (type: string, message: string) => {\r\n const toasterInfo = { visible: true, type: type, message: message };\r\n this.setState({ toasterInfo });\r\n // After 3 seconds, remove the show class from DIV\r\n setTimeout(() => {\r\n const toasterInfo = { visible: false, type: '', message: '' };\r\n this.setState({ toasterInfo });\r\n }, 3000);\r\n };\r\n public removeOrderRequestLine = async () => {\r\n if (!this.state.requestOrderDetail.orderNumber) {\r\n return;\r\n }\r\n await updateRequestOrderAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n this.state.requestOrderDetail.orderNumber,\r\n Number(this.state.requestOrderDetail.lineNum),\r\n 2\r\n )\r\n .then(response => {\r\n this.toggleSnackBar('success', 'Removed Item from Order Request Lines...');\r\n this.togglePopUp(false);\r\n // redirect to manage orders..\r\n this.moveToManageOrderPage();\r\n })\r\n .catch(err => {\r\n this.toggleSnackBar('error', 'Remove Item failed');\r\n });\r\n };\r\n private _renderPopUp = () => {\r\n const orderConfirmPopHeader: string = this.props.config.cancelPopUpHeading ? this.props.config.cancelPopUpHeading : '';\r\n const orderConfirmPopContent: string = this.props.config.cancelPopUpContent ? this.props.config.cancelPopUpContent : ``;\r\n return (\r\n \r\n \r\n
\r\n

{orderConfirmPopHeader}

\r\n {\r\n this.togglePopUp(false);\r\n }}\r\n style={{\r\n position: 'absolute',\r\n top: '20px',\r\n right: '30px',\r\n transition: 'all 200ms',\r\n fontSize: '30px',\r\n fontWeight: 'bold',\r\n textDecoration: 'none',\r\n cursor: 'pointer',\r\n color: '#333'\r\n }}\r\n >\r\n ×\r\n \r\n
\r\n
{orderConfirmPopContent}
\r\n
\r\n this.removeOrderRequestLine()}\r\n >\r\n {'YES,REMOVE'}\r\n \r\n this.togglePopUp(false)}\r\n >\r\n {'NO'}\r\n \r\n
\r\n \r\n \r\n );\r\n };\r\n private togglePopUp = (visible: boolean) => {\r\n const removePopUpVisible: any = visible;\r\n this.setState({ removePopUp: { visible: removePopUpVisible } });\r\n };\r\n public render(): JSX.Element | null {\r\n const viewProps: IAaa_b2b_order_detailViewProps = {\r\n ...(this.props as IAaa_b2b_order_detailProps),\r\n requestOrderDetail: this.state.requestOrderDetail,\r\n addItemToCart: this._addItemToCart,\r\n toasterInfo: this.state.toasterInfo,\r\n removePopUp: this.state.removePopUp,\r\n _renderPopUp: this._renderPopUp,\r\n _togglePopUp: this.togglePopUp,\r\n isLoading: this.state.isLoading\r\n };\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n}\r\n\r\nexport default Aaa_b2b_order_detail;\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 * as React from 'react';\r\nimport { IAaa_b2b_order_detailViewProps } from './aaa_b2b_order_detail';\r\nimport { IImageSettings, Image } from '@msdyn365-commerce/core';\r\nimport { Button } from '@msdyn365-commerce-modules/utilities';\r\nimport Toaster from '../order-requestlines-template/components/toaster';\r\nimport { getProductUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nexport default (props: IAaa_b2b_order_detailViewProps) => {\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=100&h=100&m=6', w: 100, h: 100 },\r\n lg: { q: 'w=100&h=100&m=6', w: 100, h: 100 },\r\n xl: { q: 'w=100&h=100&m=6', w: 100, h: 100 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n };\r\n const rounded = (ringSize?: number) => {\r\n if (ringSize) {\r\n return ringSize.toFixed(2);\r\n }\r\n return '';\r\n };\r\n const getProductLink = (line: any) => {\r\n const productUrl = getProductUrlSync(line.product.ProductDetails, props.context.actionContext, undefined);\r\n return (\r\n productUrl +\r\n (productUrl.indexOf('?') === -1\r\n ? `?requestOrderId=${line.orderNumber}&lineId=${line.lineNum}`\r\n : `&requestOrderId=${line.orderNumber}&lineId=${line.lineNum}`)\r\n );\r\n };\r\n return (\r\n <>\r\n {!props.isLoading ? (\r\n
\r\n {props.removePopUp && props.removePopUp.visible && props._renderPopUp()}\r\n
\r\n <>\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {props.requestOrderDetail.productName}{' '}\r\n \r\n props.addItemToCart(props.requestOrderDetail)}\r\n >\r\n {'Add To Cart'}\r\n \r\n \r\n {' '}\r\n \r\n {'Customise'}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n Customer\r\n \r\n {props.requestOrderDetail.stockistInfo.name}\r\n
\r\n {props.requestOrderDetail.stockistInfo.phoneNumber}\r\n
\r\n {props.requestOrderDetail.stockistInfo.email}\r\n
\r\n
\r\n
\r\n {props.requestOrderDetail.rings &&\r\n props.requestOrderDetail.rings.map((ring: any) => {\r\n return (\r\n <>\r\n
\r\n \r\n {ring.name}\r\n {ring.alloy}\r\n \r\n \r\n {'Engraving Font'}\r\n {ring.engravingFont}\r\n \r\n
\r\n \r\n \r\n {'Size'}\r\n \r\n Size {ring.sizeLabel} ( Ø {rounded(ring.sizeValue)}mm)\r\n \r\n \r\n \r\n {'Engraving Copy'}\r\n {ring.engravingCopy}\r\n \r\n
\r\n
\r\n \r\n {'Specification'}\r\n {ring.specifications}\r\n \r\n \r\n {'Reference Number'}\r\n \r\n {props.requestOrderDetail.referenceNumber}\r\n \r\n \r\n \r\n {''}\r\n \r\n ${ring.price}\r\n \r\n \r\n
\r\n \r\n );\r\n })}\r\n
\r\n Total incl. GST$\r\n {props.requestOrderDetail.totalPrice}\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n ) : !props.isLoading ? (\r\n
\r\n
\r\n

{'You currently do not have any order detail to view.'}

\r\n
\r\n
\r\n ) : (\r\n
Loading...
\r\n )}\r\n {props.toasterInfo && props.toasterInfo.visible && (\r\n \r\n )}\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 * as React from 'react';\r\n\r\nimport { IAaaB2BOrderHistoryDetailData } from './aaa_b2b_order_history_detail.data';\r\nimport { IAaa_b2b_order_history_detailProps } from './aaa_b2b_order_history_detail.props.autogenerated';\r\nimport { getOrderHistoryAsync } from '../../dataActions/DataActionExtension.g';\r\n\r\nexport interface IAaa_b2b_order_history_detailViewProps extends IAaa_b2b_order_history_detailProps {\r\n requestOrderDetail: any;\r\n isLoading: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * Aaa_b2b_order_detail component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass Aaa_b2b_order_history_detail extends React.PureComponent, any> {\r\n constructor(props: any) {\r\n super(props);\r\n this.state = {\r\n requestOrderDetail: {},\r\n toasterInfo: { visible: false },\r\n removePopUp: { visible: false },\r\n cart: undefined,\r\n isLoading: true\r\n };\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n const params = new URLSearchParams(this.props.context.request.url.requestUrl.search);\r\n var salesId: string | null = '';\r\n var lineNum: string | null = '';\r\n if (params.has('salesId') && params.has('lineNum')) {\r\n // check url has recordId...\r\n salesId = params.get('salesId');\r\n lineNum = params.get('lineNum');\r\n }\r\n await this.getRequestOrder(salesId, lineNum);\r\n }\r\n\r\n public getRequestOrder = async (salesId: any, lineNum: any) => {\r\n const response: any = await getOrderHistoryAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n 0,\r\n 0,\r\n { IncludeTotalCount: false, SalesId: salesId, LineNumber: Number(lineNum) }\r\n );\r\n if (response && response.Results.length > 0) {\r\n this.setState({ requestOrderDetail: response.Results[0], isLoading: false });\r\n }\r\n };\r\n public render(): JSX.Element | null {\r\n const viewProps: IAaa_b2b_order_history_detailViewProps = {\r\n ...(this.props as IAaa_b2b_order_history_detailProps),\r\n requestOrderDetail: this.state.requestOrderDetail,\r\n isLoading: this.state.isLoading\r\n };\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n}\r\n\r\nexport default Aaa_b2b_order_history_detail;\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 * as React from 'react';\r\nimport { IAaa_b2b_order_history_detailViewProps } from './aaa_b2b_order_history_detail';\r\nimport { IImageSettings, Image } from '@msdyn365-commerce/core';\r\nimport moment from 'moment';\r\n\r\nexport default (props: IAaa_b2b_order_history_detailViewProps) => {\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=100&h=100&m=6', w: 100, h: 100 },\r\n lg: { q: 'w=100&h=100&m=6', w: 100, h: 100 },\r\n xl: { q: 'w=100&h=100&m=6', w: 100, h: 100 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n };\r\n const numberWithCommas = (x: number) => {\r\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\r\n };\r\n return (\r\n <>\r\n {!props.isLoading ? (\r\n
\r\n
\r\n <>\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {props.requestOrderDetail.ProductName}{' '}\r\n
\r\n
\r\n \r\n Customer\r\n \r\n {props.requestOrderDetail.B2CCustomerName ? props.requestOrderDetail.B2CCustomerName : '-'}\r\n
\r\n {props.requestOrderDetail.B2CPhone ? props.requestOrderDetail.B2CPhone : '-'}\r\n
\r\n {props.requestOrderDetail.B2CEmail ? props.requestOrderDetail.B2CEmail : '-'}\r\n
\r\n
\r\n \r\n Status\r\n \r\n {props.requestOrderDetail.LineStatusValue === 1 && 'Open Order'}\r\n {props.requestOrderDetail.LineStatusValue === 2 && 'Delivered'}\r\n {props.requestOrderDetail.LineStatusValue === 3 && 'Invoiced'}\r\n {props.requestOrderDetail.LineStatusValue === 4 && 'Cancelled'}\r\n {props.requestOrderDetail.LineStatusValue === 0 && 'None'}\r\n \r\n Snapshot ID\r\n {props.requestOrderDetail.BMASnapShotID}\r\n Order Number\r\n \r\n {props.requestOrderDetail.RequestOrderId ? props.requestOrderDetail.RequestOrderId : '-'}\r\n \r\n \r\n \r\n Sales Order\r\n {props.requestOrderDetail.SalesId}\r\n Invoice Number\r\n \r\n {props.requestOrderDetail.InvoiceId ? props.requestOrderDetail.InvoiceId : '-'}\r\n \r\n Invoice Date\r\n \r\n {props.requestOrderDetail.InvoiceDate\r\n ? moment(props.requestOrderDetail.InvoiceDate).format('DD/MM/YYYY')\r\n : '-'}\r\n \r\n \r\n \r\n Order Date\r\n \r\n {props.requestOrderDetail.OrderDate\r\n ? moment(props.requestOrderDetail.OrderDate).format('DD/MM/YYYY')\r\n : '-'}\r\n \r\n \r\n
\r\n <>\r\n \r\n \r\n {props.requestOrderDetail.DetailName}\r\n {props.requestOrderDetail.Alloy1}\r\n \r\n \r\n {'Engraving Font'}\r\n \r\n {props.requestOrderDetail.EngravingText && props.requestOrderDetail.EngravingFont\r\n ? props.requestOrderDetail.EngravingFont\r\n : '-'}\r\n \r\n \r\n \r\n {'ETA'}\r\n \r\n {props.requestOrderDetail.RequestedReceivedDate\r\n ? moment(props.requestOrderDetail.RequestedReceivedDate).format('DD/MM/YYYY')\r\n : '-'}\r\n \r\n \r\n
\r\n \r\n \r\n {'Size'}\r\n \r\n Size {props.requestOrderDetail.RingSizeLabel} ( Ø{' '}\r\n {props.requestOrderDetail.RingInsideDiameter})\r\n \r\n \r\n \r\n {'Engraving Copy'}\r\n \r\n {props.requestOrderDetail.EngravingText ? props.requestOrderDetail.EngravingText : '-'}\r\n \r\n \r\n \r\n {'Comments'}\r\n \r\n {props.requestOrderDetail.ItemNotes ? props.requestOrderDetail.ItemNotes : '-'}\r\n \r\n \r\n
\r\n
\r\n \r\n {'Specification'}\r\n \r\n {props.requestOrderDetail.DiamondCount\r\n ? `${props.requestOrderDetail.DiamondCount} Diamonds, ${props.requestOrderDetail.RingWidth} Wide, ${props.requestOrderDetail.RingHeight} thick`\r\n : `${props.requestOrderDetail.RingWidth} Wide, ${props.requestOrderDetail.RingHeight} thick`}\r\n \r\n \r\n \r\n {'Reference Number'}\r\n \r\n {props.requestOrderDetail.ReferenceNumber\r\n ? props.requestOrderDetail.ReferenceNumber\r\n : '-'}\r\n \r\n \r\n \r\n {''}\r\n \r\n ${numberWithCommas(props.requestOrderDetail.B2CPrice)}\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n ) : !props.isLoading ? (\r\n
\r\n
\r\n

{'You currently do not have any order history detail to view.'}

\r\n
\r\n
\r\n ) : (\r\n
Loading...
\r\n )}\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 * as React from 'react';\r\n\r\nimport { IAaaB2COrderHistoryDetailData } from './aaa_b2c_order_history_detail.data';\r\nimport { IAaa_b2c_order_history_detailProps } from './aaa_b2c_order_history_detail.props.autogenerated';\r\nimport { getRequestOrderHistoryB2CAsync } from '../../dataActions/DataActionExtension.g';\r\nimport moment from 'moment';\r\n\r\nexport interface IAaa_b2c_order_history_detailViewProps extends IAaa_b2c_order_history_detailProps {\r\n requestOrderDetail: any;\r\n isLoading: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * Aaa_b2c_order_history_detail component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass Aaa_b2c_order_history_detail extends React.PureComponent, any> {\r\n constructor(props: any) {\r\n super(props);\r\n this.state = {\r\n requestOrderDetail: {},\r\n isLoading: true\r\n };\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n const params = new URLSearchParams(this.props.context.request.url.requestUrl.search);\r\n var requestOrderId: string | null = '';\r\n var lineNum: string | null = '';\r\n if (params.has('requestOrderId') && params.has('lineNum')) {\r\n // check url has recordId...\r\n requestOrderId = params.get('requestOrderId');\r\n lineNum = params.get('lineNum');\r\n }\r\n await this.getRequestOrder(requestOrderId, lineNum);\r\n }\r\n\r\n public getRequestOrder = async (requestOrderId: any, lineNum: any) => {\r\n const response: any = await getRequestOrderHistoryB2CAsync(\r\n {\r\n callerContext: this.props.context.actionContext,\r\n\r\n queryResultSettings: {}\r\n },\r\n requestOrderId\r\n );\r\n\r\n if (response.RequestOrder.length > 0) {\r\n // mapping data....\r\n const requestOrders = response.RequestOrder.filter((order: any) => {\r\n return order.RequestOrderId === requestOrderId && order.LineNum.toString() === lineNum;\r\n });\r\n requestOrders.map((order: any) => {\r\n const requestOrderDetail: any = {\r\n imageUrl: order.HighResImageURL,\r\n productName: order.ProductName,\r\n stockistInfo: { name: order.b2BCUSTOMERNAME, phoneNumber: order.B2BPhone, email: order.B2BEmailId },\r\n statusName: order.StatusName,\r\n snapShotId: order.Snapshotid,\r\n orderNumber: order.RequestOrderId,\r\n orderDate: order.DateTime ? moment(order.DateTime).format('DD/MM/YYYY') : '-',\r\n rings: [],\r\n totalPrice: order.B2CPrice.toLocaleString()\r\n };\r\n const requestOrderLines = JSON.parse(order.RequestOrderLines);\r\n for (const ring of requestOrderLines) {\r\n const ringSizePi = parseFloat(ring.RingSize.split('mm')[0]) / 3.14159265;\r\n const ringInfo = {\r\n name: ring.DetailName,\r\n alloy: ring.Alloy1,\r\n engravingFont: ring.EngravingText ? ring.EngravingFont : '-',\r\n sizeLabel: ring.RingSizeLabel,\r\n sizeValue:\r\n Math.round(\r\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\r\n (ringSizePi + Number.EPSILON) * 100\r\n ) / 100,\r\n engravingCopy: ring.EngravingText ? ring.EngravingText : '-',\r\n specifications: ring.DiamondCount\r\n ? `${ring.DiamondCount} Diamonds, ${ring.RingWidth} Wide, ${ring.RingHeight} thick`\r\n : `${ring.RingWidth} Wide, ${ring.RingHeight} thick`,\r\n price: ring.B2CPrice.toLocaleString()\r\n };\r\n requestOrderDetail.rings.push(ringInfo);\r\n }\r\n this.setState({ requestOrderDetail, isLoading: false });\r\n });\r\n }\r\n };\r\n\r\n public render(): JSX.Element | null {\r\n const viewProps: IAaa_b2c_order_history_detailViewProps = {\r\n ...(this.props as IAaa_b2c_order_history_detailProps),\r\n requestOrderDetail: this.state.requestOrderDetail,\r\n isLoading: this.state.isLoading\r\n };\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n}\r\n\r\nexport default Aaa_b2c_order_history_detail;\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 * as React from 'react';\r\nimport { IAaa_b2c_order_history_detailViewProps } from './aaa_b2c_order_history_detail';\r\nimport { IImageSettings, Image } from '@msdyn365-commerce/core';\r\n\r\nexport default (props: IAaa_b2c_order_history_detailViewProps) => {\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=100&h=100&m=6', w: 100, h: 100 },\r\n lg: { q: 'w=100&h=100&m=6', w: 100, h: 100 },\r\n xl: { q: 'w=100&h=100&m=6', w: 100, h: 100 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n };\r\n const rounded = (ringSize?: number) => {\r\n if (ringSize) {\r\n return ringSize.toFixed(2);\r\n }\r\n return '';\r\n };\r\n return (\r\n <>\r\n {!props.isLoading ? (\r\n
\r\n
\r\n <>\r\n
\r\n
\r\n \r\n
\r\n
\r\n
{props.requestOrderDetail.productName}
\r\n
\r\n \r\n Stockist\r\n \r\n {props.requestOrderDetail.stockistInfo.name}\r\n
\r\n {props.requestOrderDetail.stockistInfo.phoneNumber}\r\n
\r\n {props.requestOrderDetail.stockistInfo.email}\r\n
\r\n
\r\n \r\n Status\r\n {props.requestOrderDetail.statusName}\r\n Snapshot Id\r\n {props.requestOrderDetail.snapShotId}\r\n Order Number\r\n {props.requestOrderDetail.orderNumber}\r\n \r\n \r\n Order Date\r\n {props.requestOrderDetail.orderDate}\r\n \r\n
\r\n {props.requestOrderDetail.rings &&\r\n props.requestOrderDetail.rings.map((ring: any) => {\r\n return (\r\n <>\r\n
\r\n \r\n {ring.name}\r\n {ring.alloy}\r\n \r\n \r\n {'Engraving Font'}\r\n {ring.engravingFont}\r\n \r\n
\r\n \r\n \r\n {'Size'}\r\n \r\n Size {ring.sizeLabel} ( Ø {rounded(ring.sizeValue)}mm)\r\n \r\n \r\n \r\n {'Engraving Copy'}\r\n {ring.engravingCopy}\r\n \r\n
\r\n
\r\n \r\n {'Specification'}\r\n {ring.specifications}\r\n \r\n \r\n {''}\r\n \r\n ${ring.price}\r\n \r\n \r\n
\r\n \r\n );\r\n })}\r\n
\r\n Total incl. GST$\r\n {props.requestOrderDetail.totalPrice}\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n ) : !props.isLoading ? (\r\n
\r\n
\r\n

{'You currently do not have any order history detail to view.'}

\r\n
\r\n
\r\n ) : (\r\n
Loading...
\r\n )}\r\n \r\n );\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { CartLine, OrgUnitLocation, ProductDeliveryOptions, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\r\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface IPickUpInStoreViewProps {\r\n callbacks: {\r\n toggleBopis(isBopisSelected: boolean): void;\r\n };\r\n defaultComponent?: React.ReactNode;\r\n orgUnitName?: string;\r\n isBopisSelected: boolean;\r\n ContainerProps: INodeProps;\r\n deliveryOption?: string;\r\n}\r\n\r\nexport interface IPickUpInStoreProps {\r\n cartline: CartLine;\r\n product: SimpleProduct;\r\n shipitText: string;\r\n pickUpInStoreText: string;\r\n changeStoreText: string;\r\n cartState: ICartState | undefined;\r\n storeSelectorStateManager: IStoreSelectorStateManager | undefined;\r\n orgUnitLocations?: OrgUnitLocation[] | undefined;\r\n deliveryOptions?: ProductDeliveryOptions;\r\n pickupDeliveryModeCode?: string;\r\n storeSelectorModuleId?: string;\r\n locationChangedHandler(): void;\r\n}\r\n\r\nexport const PickUpInStore = (props: IPickUpInStoreProps): IPickUpInStoreViewProps | undefined => {\r\n const _onLocationChangedCallback = async (\r\n orgUnitLocation: OrgUnitLocation,\r\n cartState: ICartState | undefined,\r\n cartline: CartLine,\r\n deliveryMode?: string\r\n ) => {\r\n if (!cartState) {\r\n return Promise.resolve();\r\n }\r\n return cartState\r\n .updateCartLinePickupLocation({ cartLineId: cartline.LineId!, location: orgUnitLocation, deliveryMode })\r\n .then(result => {\r\n if (result.status === 'SUCCESS') {\r\n props.locationChangedHandler();\r\n }\r\n })\r\n .catch(error => {});\r\n };\r\n\r\n const _toggleBOPIS = (isBopisSelected: boolean) => {\r\n const { storeSelectorStateManager, product, cartline, cartState, storeSelectorModuleId } = props;\r\n\r\n if (isBopisSelected) {\r\n if (!storeSelectorStateManager) {\r\n return;\r\n }\r\n storeSelectorStateManager\r\n .openDialog({\r\n id: storeSelectorModuleId,\r\n product,\r\n alreadySelectedLocation: {\r\n OrgUnitNumber: cartline.FulfillmentStoreId\r\n },\r\n deliveryOptions: props.deliveryOptions,\r\n onLocationSelected: async (orgUnitLocation, deliveryMode: string | undefined) => {\r\n return _onLocationChangedCallback(orgUnitLocation, cartState, cartline, deliveryMode);\r\n }\r\n })\r\n .catch(error => {});\r\n } else {\r\n if (!cartState) {\r\n return;\r\n }\r\n cartline.DeliveryMode = '';\r\n cartline.FulfillmentStoreId = '';\r\n cartline.ShippingAddress = {};\r\n cartState\r\n .clearCartLinePickupLocation({ cartLineId: cartline.LineId! })\r\n .then(result => {\r\n if (result.status === 'SUCCESS') {\r\n props.locationChangedHandler();\r\n }\r\n })\r\n .catch(error => {});\r\n }\r\n };\r\n\r\n const _getOrgUnitName = (fulfillmentStoreId: string | undefined, orgUnitLocations: OrgUnitLocation[] | undefined) => {\r\n if (!orgUnitLocations || !fulfillmentStoreId || orgUnitLocations.length === 0) {\r\n return '';\r\n }\r\n\r\n const foundLocation = orgUnitLocations.find(orgUnitLocation => {\r\n return orgUnitLocation.OrgUnitNumber === fulfillmentStoreId;\r\n });\r\n\r\n if (foundLocation) {\r\n return foundLocation.OrgUnitName;\r\n }\r\n return fulfillmentStoreId;\r\n };\r\n\r\n const _renderShippingMethod = (\r\n cartLine: CartLine,\r\n shipItText: string,\r\n pickupInStoretext: string,\r\n changeStoreText: string,\r\n orgUnitLocations: OrgUnitLocation[] | undefined\r\n ): JSX.Element => {\r\n const orgUnitName = _getOrgUnitName(cartLine.FulfillmentStoreId, orgUnitLocations);\r\n const bopisSelected = !!cartLine.FulfillmentStoreId;\r\n\r\n const toggleBOPIS = (isBopisSelected: boolean) => {\r\n return () => {\r\n _toggleBOPIS(isBopisSelected);\r\n };\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n {cartLine.FulfillmentStoreId ? (\r\n
\r\n {orgUnitName}\r\n \r\n
\r\n ) : null}\r\n \r\n );\r\n };\r\n\r\n const _getDeliveryOption = (pickupStore: IPickUpInStoreProps, deliveryOptions: ProductDeliveryOptions) => {\r\n const delivery = deliveryOptions?.DeliveryOptions?.find(option => option.Code === pickupStore.pickupDeliveryModeCode);\r\n return delivery?.Description;\r\n };\r\n\r\n // If no delivery options present on the product, or none of the delivery options\r\n // match the PickupDeliveryModeCode, that means the item cannot be used for BOPIS\r\n if (\r\n !props.deliveryOptions ||\r\n !props.deliveryOptions.DeliveryOptions ||\r\n !props.pickupDeliveryModeCode ||\r\n !props.deliveryOptions.DeliveryOptions.find(option => option.Code === props.pickupDeliveryModeCode)\r\n ) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n callbacks: {\r\n toggleBopis: _toggleBOPIS\r\n },\r\n defaultComponent: _renderShippingMethod(\r\n props.cartline,\r\n props.shipitText,\r\n props.pickUpInStoreText,\r\n props.changeStoreText,\r\n props.orgUnitLocations\r\n ),\r\n orgUnitName: _getOrgUnitName(props.cartline.FulfillmentStoreId, props.orgUnitLocations),\r\n isBopisSelected: !!props.cartline.FulfillmentStoreId,\r\n deliveryOption: _getDeliveryOption(props, props.deliveryOptions),\r\n ContainerProps: {\r\n className: 'msc-cart-line__bopis-container'\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 * as React from 'react';\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { IImageSettings, Image } from '@msdyn365-commerce/core';\r\n// import Flatpickr from 'react-flatpickr';\r\nimport moment from 'moment';\r\nimport { Button } from '@msdyn365-commerce-modules/utilities';\r\nimport { getProductUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\nclass CartLineItem extends React.PureComponent {\r\n constructor(props: any) {\r\n super(props);\r\n }\r\n\r\n private readonly addProductLink = (product: any, snapShotId: string, lineId: string, actionContext: any) => {\r\n const productUrl = getProductUrlSync(product, actionContext, undefined);\r\n return (\r\n productUrl +\r\n (productUrl.indexOf('?') === -1\r\n ? `?cartLineItemSnapShotId=${snapShotId}&lineId=${lineId}`\r\n : `cartLineItemSnapShotId=${snapShotId}&lineId=${lineId}`)\r\n );\r\n };\r\n\r\n public render(): JSX.Element | null {\r\n const _renderPrice = (props: any, ring: any): JSX.Element | null => {\r\n const { context } = props;\r\n if (ring.price) {\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n };\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=100&h=100&m=6', w: 100, h: 100 },\r\n lg: { q: 'w=100&h=100&m=6', w: 100, h: 100 },\r\n xl: { q: 'w=100&h=100&m=6', w: 100, h: 100 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n };\r\n const rounded = (ringSize?: number) => {\r\n if (ringSize) {\r\n return ringSize.toFixed(2);\r\n }\r\n return '';\r\n };\r\n const props = this.props.allProps;\r\n return (\r\n <>\r\n {this.props.cartLine && this.props.productInfo && !this.props.isLoading ? (\r\n
\r\n
\r\n <>\r\n
\r\n
\r\n props.removeItemClickHandler(this.props.cartLine)}\r\n />\r\n \r\n \r\n {'Edit'}\r\n \r\n
\r\n
\r\n
\r\n {this.props.productInfo.Name}\r\n \r\n Snapshot Id : \r\n {this.props.snapShotId}\r\n \r\n
\r\n
\r\n \r\n Customer\r\n {this.props.customerInfo ? (\r\n \r\n {this.props.customerInfo.b2cCustomerName}\r\n
\r\n {this.props.customerInfo.b2cEmailId}\r\n
\r\n {this.props.customerInfo.b2cPhone}\r\n
\r\n ) : (\r\n \r\n \r\n props.customerInputHandler(\r\n 'name',\r\n this.props.cartLine,\r\n e.target.value,\r\n this.props.index\r\n )\r\n }\r\n value={this.props.customerInfoInput.customerName}\r\n placeholder={'Enter Name'}\r\n />\r\n \r\n props.customerInputHandler(\r\n 'email',\r\n this.props.cartLine,\r\n e.target.value,\r\n this.props.index\r\n )\r\n }\r\n value={this.props.customerInfoInput.customerEmail}\r\n placeholder={'Enter Email'}\r\n />\r\n \r\n props.customerInputHandler(\r\n 'phone',\r\n this.props.cartLine,\r\n e.target.value,\r\n this.props.index\r\n )\r\n }\r\n value={this.props.customerInfoInput.customerPhone}\r\n placeholder={'Enter Phone'}\r\n />\r\n \r\n )}\r\n
\r\n \r\n \r\n Comments\r\n \r\n \r\n \r\n props.commentInputHandler(this.props.cartLine, e.target.value, this.props.index)\r\n }\r\n value={this.props.cartLineComment}\r\n placeholder={'Enter Message'}\r\n />\r\n \r\n \r\n \r\n ETA\r\n \r\n \r\n \r\n \r\n \r\n {'Quantity'}\r\n 1\r\n \r\n
\r\n {this.props.itemInfo.rings &&\r\n this.props.itemInfo.rings.map((ring: any) => {\r\n return (\r\n
\r\n \r\n {ring.ringName}\r\n
\r\n Colors : {ring.ringFinenessColorPolishInfo.length}\r\n
\r\n
\r\n {ring.ringFinenessColorPolishInfo.map((r: any, index: number) => {\r\n return (\r\n
\r\n {r}\r\n
\r\n );\r\n })}\r\n
\r\n
\r\n \r\n {'Size'}\r\n \r\n Size {ring.sizeLabel} ( Ø {rounded(ring.sizeValue)}mm)\r\n \r\n \r\n \r\n {'Specification'}\r\n
{ring.specifications}
\r\n {ring.engraving !== '' && (\r\n
Engraving
\r\n )}\r\n
\r\n \r\n {'Price'}\r\n {_renderPrice(props, ring)}\r\n \r\n
\r\n );\r\n })}\r\n
\r\n Total incl. GST{' '}\r\n {_renderPrice(props, this.props.itemInfo)}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n ) : (\r\n
Loading...
\r\n )}\r\n \r\n );\r\n }\r\n}\r\nexport default CartLineItem;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport {\r\n AddToOrderTemplateComponent,\r\n AddToWishlistComponent,\r\n CartLineItemComponent,\r\n IAddToOrderTemplateDialogResources,\r\n ICartlineResourceString,\r\n IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\r\n IItemAddedToOrderTemplateDialogResources,\r\n IOrderTemplateNameDialogResources,\r\n IWishlistActionSuccessResult\r\n} from '@msdyn365-commerce/components';\r\nimport { IAny, ICoreContext, IGeneric, IGridSettings, IImageSettings, ITelemetry, TelemetryEvent } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport {\r\n AsyncResult,\r\n CartLine,\r\n ChannelDeliveryOptionConfiguration,\r\n CommerceList,\r\n Customer,\r\n LineDataValidationFailure,\r\n OrgUnitLocation,\r\n ProductDeliveryOptions,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport { ProductDimensionType, ReleasedProductType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\r\nimport {\r\n ArrayExtensions,\r\n getInvoiceDetailsPageUrlSync,\r\n getProductUrlSync,\r\n IProductInventoryInformation,\r\n ObjectExtensions,\r\n OrderTemplate\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { getProductByProductId, getProductByProductIdAndWarehouse } from '@msdyn365-commerce-modules/cart';\r\nimport { IPickUpInStoreViewProps, PickUpInStore } from './aaa_cart-pick-up-in-store';\r\nimport CartLineItem from './cart-line-Item';\r\nimport moment from 'moment';\r\n\r\nexport interface ICartLineItemsProps {\r\n cartlines: any;\r\n cartlinesErrors: LineDataValidationFailure[];\r\n cartState: ICartState | undefined;\r\n orgUnitLocations: OrgUnitLocation[] | undefined;\r\n resources: ICartlineResourceString;\r\n productAvailabilites: IProductInventoryInformation[] | undefined;\r\n products: SimpleProduct[] | undefined;\r\n productDeliveryOptions: ProductDeliveryOptions[] | undefined;\r\n pickupDeliveryModeCode?: string;\r\n\r\n /* GridSettings for the product image in cartline */\r\n gridSettings: IGridSettings;\r\n\r\n /* ImageSettings for the product image in cartline */\r\n imageSettings: IImageSettings;\r\n id: string;\r\n typeName: string;\r\n context: ICoreContext>;\r\n telemetry: ITelemetry;\r\n removeButtonText: string;\r\n addToWishlistButtonText: string;\r\n removeFromWishlistButtonText: string;\r\n shipItText: string;\r\n pickitUpText: string;\r\n changeStoreText: string;\r\n outOfStockText: string;\r\n outOfRangeOneText: string;\r\n outOfRangeFormatText: string;\r\n storeSelectorStateManager: IStoreSelectorStateManager | undefined;\r\n isStockCheckEnabled: boolean;\r\n wishlists: CommerceList[] | undefined;\r\n defaultWishlistName: string;\r\n maxCartlineQuantity: number;\r\n includeErrors?: boolean;\r\n showShippingChargesForLineItems?: boolean;\r\n telemetryContent?: ITelemetryContent;\r\n isQuantityLimitsFeatureEnabled: boolean;\r\n storeSelectorModuleId?: string;\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n\r\n addToOrderTemplateDialogResources: IAddToOrderTemplateDialogResources;\r\n createOrderTemplateDialogResources: IOrderTemplateNameDialogResources;\r\n itemAddedToOrderTemplateDialogResources: IItemAddedToOrderTemplateDialogResources;\r\n duplicateItemsWhenAddingToOrderTemplateDialogResources: IDuplicateItemsWhenAddingToOrderTemplateDialogResources;\r\n\r\n addToOrderTemplateButtonText: string;\r\n addToOrderTemplateButtonTooltip: string;\r\n addToOrderTemplateMessage: string;\r\n addItemToOrderTemplateError: string;\r\n orderTemplates: OrderTemplate[] | undefined;\r\n customerInformation: Customer | undefined;\r\n shouldIgnoreWarehouse: boolean | undefined;\r\n productAvailability?: AsyncResult;\r\n\r\n removeItemClickHandler(cartlineToRemove: CartLine): void;\r\n moveToWishlistSuccessHandler(result: IWishlistActionSuccessResult, cartlineId: CartLine): void;\r\n updateCartLinesQuantitySuccessHandler(cartline: CartLine, quantity: number, lineIndex?: number): boolean;\r\n commentInputHandler(cartline: CartLine, comment: string, lineIndex: number): void;\r\n customerInputHandler(field: string, cartline: CartLine, comment: string, lineIndex: number): void;\r\n requestDateInputHandler(cartline: CartLine, date: string, lineIndex: number): void;\r\n locationChangedHandler(): void;\r\n config?: any;\r\n cartLinesExtraInfo: any;\r\n}\r\n\r\nexport interface ICartlinesViewProps {\r\n cartline: React.ReactNode;\r\n cartLineItemSection: React.ReactNode;\r\n pickUpInStore?: IPickUpInStoreViewProps;\r\n remove: React.ReactNode;\r\n addToWishlist: React.ReactNode | undefined;\r\n addToOrderTemplate: React.ReactNode | undefined;\r\n\r\n error?: string;\r\n cartlineId?: string;\r\n hasError?: boolean;\r\n data?: {\r\n product?: SimpleProduct;\r\n cartline: CartLine;\r\n };\r\n}\r\n\r\nconst _getCartItemAvailableQuantity = (\r\n isStockCheckEnabled: boolean,\r\n productAvailability: IProductInventoryInformation | undefined\r\n): number => {\r\n if (\r\n !isStockCheckEnabled ||\r\n !productAvailability ||\r\n !productAvailability.ProductAvailableQuantity ||\r\n !productAvailability.IsProductAvailable ||\r\n !productAvailability.ProductAvailableQuantity.AvailableQuantity\r\n ) {\r\n return 0;\r\n }\r\n\r\n return productAvailability.ProductAvailableQuantity.AvailableQuantity;\r\n};\r\n\r\nconst _getCartItemMaxQuantity = (\r\n maxQuantityByConfig: number,\r\n isStockCheckEnabled: boolean,\r\n availableQuantityInStock: number,\r\n isQuantityLimitsFeatureEnabled: boolean,\r\n maxByQuantityLimitsFeature: number\r\n) => {\r\n if (isQuantityLimitsFeatureEnabled) {\r\n let maxByQuantityLimitsFeatureResult = maxByQuantityLimitsFeature;\r\n\r\n // If max by feature in not defined when feature is on then we suggest that there no max by feature\r\n // and consider available qty if stock check enabled and max from config in site settings.\r\n if (!maxByQuantityLimitsFeature) {\r\n maxByQuantityLimitsFeatureResult = maxQuantityByConfig || 10;\r\n }\r\n\r\n return isStockCheckEnabled\r\n ? maxByQuantityLimitsFeatureResult < availableQuantityInStock\r\n ? maxByQuantityLimitsFeatureResult\r\n : availableQuantityInStock\r\n : maxByQuantityLimitsFeatureResult;\r\n }\r\n if (isStockCheckEnabled) {\r\n return availableQuantityInStock < maxQuantityByConfig ? availableQuantityInStock : maxQuantityByConfig;\r\n }\r\n return maxQuantityByConfig;\r\n};\r\n\r\nconst _getErrorMessage = (\r\n availableQuantityInStock: number,\r\n currentQuantity: number,\r\n props: ICartLineItemsProps,\r\n lineIndex: number,\r\n isServiceItem: boolean,\r\n cartLine: CartLine\r\n): string | undefined => {\r\n const finalErrorMessages: string[] = [];\r\n\r\n const isLoadingDeliveryOptions = props.productAvailability?.status === 'LOADING';\r\n if (isLoadingDeliveryOptions) {\r\n return undefined;\r\n }\r\n\r\n let foundProductAvailability;\r\n if (props.productAvailabilites && ArrayExtensions.hasElements(props.productAvailabilites)) {\r\n foundProductAvailability = props.productAvailabilites.find(productAvailability => {\r\n if (props.shouldIgnoreWarehouse) {\r\n return productAvailability.ProductAvailableQuantity.ProductId === cartLine.ProductId;\r\n }\r\n return (\r\n productAvailability.ProductAvailableQuantity.ProductId === cartLine.ProductId &&\r\n productAvailability.InventLocationId === cartLine.WarehouseId\r\n );\r\n });\r\n if (foundProductAvailability === undefined) {\r\n return undefined;\r\n }\r\n }\r\n\r\n if (props.includeErrors && props.isStockCheckEnabled && !isServiceItem) {\r\n if (availableQuantityInStock <= 0) {\r\n finalErrorMessages.push(props.outOfStockText);\r\n } else if (availableQuantityInStock < currentQuantity) {\r\n if (availableQuantityInStock === 1) {\r\n finalErrorMessages.push(props.outOfRangeOneText);\r\n } else {\r\n finalErrorMessages.push(props.outOfRangeFormatText.replace('{numLeft}', availableQuantityInStock.toString()));\r\n }\r\n }\r\n }\r\n\r\n // Server-side validation\r\n props.cartlinesErrors\r\n .filter(i => i.LineIndex === lineIndex)\r\n .forEach(i => {\r\n if (i.DataValidationFailure?.ErrorContext) {\r\n finalErrorMessages.push(i.DataValidationFailure.ErrorContext);\r\n }\r\n });\r\n\r\n if (finalErrorMessages.length > 0) {\r\n return finalErrorMessages.join(' ');\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\n/**\r\n * On Remove Click functionality.\r\n * @param removeItemClickHandler -Remove item click function.\r\n * @param cartline -CartLine.\r\n * @returns Remove change value.\r\n */\r\nconst onRemoveClickFunction = (removeItemClickHandler: (cartlineToRemove: CartLine) => void, cartline: CartLine) => () => {\r\n removeItemClickHandler(cartline);\r\n};\r\n\r\nconst getCartLineComment = (properties: any) => {\r\n if (properties.length > 0) {\r\n const commentProperty = properties.find((e: any) => {\r\n return e.Key === 'AAA_RetailItemNotes' && e.Value && e.Value.StringValue;\r\n });\r\n if (commentProperty && commentProperty.Value && commentProperty.Value.StringValue) {\r\n return commentProperty.Value.StringValue;\r\n } else {\r\n return '';\r\n }\r\n } else {\r\n return '';\r\n }\r\n};\r\nconst getCustomerInfoInput = (properties: any) => {\r\n const customerInfo = {\r\n customerName: '',\r\n customerEmail: '',\r\n customerPhone: ''\r\n };\r\n if (properties.length > 0) {\r\n const nameProperty = properties.find((e: any) => {\r\n return e.Key === 'AAA_B2CCUSTOMERNAME' && e.Value && e.Value.StringValue;\r\n });\r\n if (nameProperty && nameProperty.Value && nameProperty.Value.StringValue) {\r\n customerInfo.customerName = nameProperty.Value.StringValue;\r\n }\r\n const emailProperty = properties.find((e: any) => {\r\n return e.Key === 'AAA_B2CEMAIL' && e.Value && e.Value.StringValue;\r\n });\r\n if (emailProperty && emailProperty.Value && emailProperty.Value.StringValue) {\r\n customerInfo.customerEmail = emailProperty.Value.StringValue;\r\n }\r\n const phoneProperty = properties.find((e: any) => {\r\n return e.Key === 'AAA_B2CPHONE' && e.Value && e.Value.StringValue;\r\n });\r\n if (phoneProperty && phoneProperty.Value && phoneProperty.Value.StringValue) {\r\n customerInfo.customerPhone = phoneProperty.Value.StringValue;\r\n }\r\n }\r\n return customerInfo;\r\n};\r\nconst getCartLineRequestDate = (properties: any, minRequiredDateDays: number) => {\r\n if (properties.length > 0) {\r\n const commentProperty = properties.find((e: any) => {\r\n return e.Key === 'AAA_REQUIREDDATE' && e.Value && e.Value.StringValue;\r\n });\r\n if (commentProperty && commentProperty.Value && commentProperty.Value.StringValue) {\r\n return moment(new Date(commentProperty.Value.StringValue)).format('YYYY-MM-DD');\r\n } else {\r\n properties.push({\r\n Key: 'AAA_REQUIREDDATE',\r\n Value: {\r\n StringValue: new Date(getMinCartLineRequestDate(minRequiredDateDays)).toISOString()\r\n }\r\n });\r\n return getMinCartLineRequestDate(minRequiredDateDays);\r\n }\r\n } else {\r\n return '';\r\n }\r\n};\r\nconst getMinCartLineRequestDate = (minRequiredDateDays: number) => {\r\n const currentDateString = moment(new Date()).format('DD-MM-YYYY');\r\n let days = 21;\r\n if (minRequiredDateDays === undefined) {\r\n days = 21;\r\n } else if (isNaN(minRequiredDateDays) || minRequiredDateDays < 0) {\r\n days = 0;\r\n } else {\r\n days = minRequiredDateDays;\r\n }\r\n const newDate = moment(currentDateString, 'DD-MM-YYYY').add('days', days);\r\n return moment(newDate).format('YYYY-MM-DD');\r\n};\r\n\r\n// eslint-disable-next-line complexity -- Auto-suppressed.\r\nconst _assembleNode = (\r\n cartline: any,\r\n product: SimpleProduct | undefined,\r\n props: ICartLineItemsProps,\r\n index: number,\r\n foundProductAvailability?: IProductInventoryInformation,\r\n foundProductDeliveryOptions?: ProductDeliveryOptions,\r\n cartLineImage?: string,\r\n cartLineCustomerInfo?: any,\r\n snapShotId?: string,\r\n itemInfo?: any,\r\n isLoading?: boolean\r\n): ICartlinesViewProps => {\r\n const {\r\n imageSettings,\r\n gridSettings,\r\n id,\r\n typeName,\r\n context,\r\n resources,\r\n removeButtonText,\r\n removeItemClickHandler,\r\n moveToWishlistSuccessHandler,\r\n addToOrderTemplateButtonText,\r\n addToOrderTemplateButtonTooltip,\r\n addToOrderTemplateDialogResources,\r\n createOrderTemplateDialogResources,\r\n itemAddedToOrderTemplateDialogResources,\r\n duplicateItemsWhenAddingToOrderTemplateDialogResources,\r\n addToWishlistButtonText,\r\n removeFromWishlistButtonText,\r\n orderTemplates,\r\n customerInformation,\r\n wishlists,\r\n defaultWishlistName,\r\n storeSelectorModuleId,\r\n config\r\n } = props;\r\n\r\n const isAuthenticated = context.request.user.isAuthenticated;\r\n const nameOfWishlist = wishlists && wishlists.length > 0 && wishlists[0].Name ? wishlists[0].Name : defaultWishlistName;\r\n const availableQuantityInStock = _getCartItemAvailableQuantity(props.isStockCheckEnabled, foundProductAvailability);\r\n\r\n const maxQuantity =\r\n product &&\r\n _getCartItemMaxQuantity(\r\n props.maxCartlineQuantity,\r\n props.isStockCheckEnabled,\r\n availableQuantityInStock,\r\n props.isQuantityLimitsFeatureEnabled,\r\n product?.Behavior?.MaximumQuantity || 0\r\n );\r\n\r\n // Check if the product is service or not by product type\r\n const isServiceItem = product?.ItemTypeValue === ReleasedProductType.Service;\r\n\r\n const errorMessage = ObjectExtensions.isNullOrUndefined(maxQuantity)\r\n ? undefined\r\n : _getErrorMessage(availableQuantityInStock, cartline.Quantity!, props, index, isServiceItem, cartline);\r\n\r\n const onRemoveClickHandler = onRemoveClickFunction(removeItemClickHandler, cartline);\r\n\r\n const payload = getPayloadObject(TelemetryEvent.RemoveFromCart, props.telemetryContent!, removeButtonText, '');\r\n const attributes = getTelemetryAttributes(props.telemetryContent!, payload);\r\n\r\n const inventoryLbl = foundProductAvailability?.StockLevelLabel;\r\n const inventoryCode = foundProductAvailability\r\n ? `ms-cart-line__inventory-code-${foundProductAvailability.StockLevelCode?.toLowerCase()}`\r\n : undefined;\r\n const productDimension = 4;\r\n const customPriceDimensionType = productDimension as ProductDimensionType.Style;\r\n const isCustomPriceSelected =\r\n product?.Dimensions?.find(dimension => dimension.DimensionTypeValue === customPriceDimensionType)?.DimensionValue?.Value ===\r\n 'Custom';\r\n const productImageUrl = cartLineImage ? cartLineImage : product ? product.PrimaryImageUrl : '';\r\n const cartLineComment = getCartLineComment(cartline.ExtensionProperties);\r\n const customerInfoInput = getCustomerInfoInput(cartline.ExtensionProperties);\r\n let days = 21;\r\n if (config.minRequiredDateDays === undefined) {\r\n days = 21;\r\n } else if (isNaN(config.minRequiredDateDays) || config.minRequiredDateDays < 0) {\r\n days = 0;\r\n } else {\r\n days = config.minRequiredDateDays;\r\n }\r\n const cartLineRequestDate = getCartLineRequestDate(cartline.ExtensionProperties, days);\r\n return {\r\n data: {\r\n product,\r\n cartline\r\n },\r\n cartlineId: cartline.LineId,\r\n error: errorMessage,\r\n hasError: !isServiceItem && props.isStockCheckEnabled ? cartline.Quantity! > (maxQuantity ?? 0) : false,\r\n cartline: (\r\n \r\n ),\r\n cartLineItemSection: (\r\n <>\r\n \r\n \r\n ),\r\n pickUpInStore:\r\n product && props.config.isPickUpInStoreAllow\r\n ? PickUpInStore({\r\n storeSelectorModuleId,\r\n cartState: props.cartState,\r\n cartline,\r\n product,\r\n shipitText: props.shipItText,\r\n pickUpInStoreText: props.pickitUpText,\r\n changeStoreText: props.changeStoreText,\r\n storeSelectorStateManager: props.storeSelectorStateManager,\r\n orgUnitLocations: props.orgUnitLocations,\r\n deliveryOptions: foundProductDeliveryOptions,\r\n pickupDeliveryModeCode:\r\n cartline.DeliveryMode !== (undefined || '') ? cartline.DeliveryMode : props.pickupDeliveryModeCode,\r\n locationChangedHandler: props.locationChangedHandler\r\n })\r\n : undefined,\r\n remove: (\r\n \r\n ),\r\n addToWishlist:\r\n props.config.isAddToWishlistAllow && isAuthenticated && product && !isCustomPriceSelected ? (\r\n \r\n ) : (\r\n undefined\r\n ),\r\n addToOrderTemplate:\r\n props.config.isAddToOrderTemplateAllow && isAuthenticated && orderTemplates && product ? (\r\n \r\n ) : (\r\n undefined\r\n )\r\n };\r\n};\r\n\r\nexport const assembleCartlines = (\r\n cartlines: CartLine[],\r\n products: SimpleProduct[] | undefined,\r\n props: ICartLineItemsProps\r\n): ICartlinesViewProps[] | null => {\r\n const reactNodes: ICartlinesViewProps[] = [];\r\n\r\n cartlines.map((cartline, index) => {\r\n let product;\r\n if (props.isQuantityLimitsFeatureEnabled) {\r\n // When feature is enabled the same products could have different quantity limits in Behavior so we need\r\n // to check productId and WarehouseId for identification.\r\n product = getProductByProductIdAndWarehouse(cartline.ProductId, products, cartline.WarehouseId, props.cartState);\r\n } else {\r\n product = getProductByProductId(cartline.ProductId, products);\r\n }\r\n let foundProductAvailability;\r\n if (props.productAvailabilites && ArrayExtensions.hasElements(props.productAvailabilites)) {\r\n foundProductAvailability = props.productAvailabilites.find(productAvailability => {\r\n if (props.shouldIgnoreWarehouse) {\r\n return productAvailability.ProductAvailableQuantity?.ProductId === cartline.ProductId;\r\n }\r\n return (\r\n productAvailability.ProductAvailableQuantity?.ProductId === cartline.ProductId &&\r\n productAvailability.InventLocationId === cartline.WarehouseId\r\n );\r\n });\r\n }\r\n let foundProductDeliveryOption;\r\n if (props.productDeliveryOptions && props.productDeliveryOptions.length > 0) {\r\n foundProductDeliveryOption = props.productDeliveryOptions.find(deliveryOption => {\r\n return deliveryOption && deliveryOption.ProductId === cartline.ProductId;\r\n });\r\n }\r\n const cartLineExtraInfo = props.cartLinesExtraInfo.find((item: any) => {\r\n return item.lineId === cartline.LineId;\r\n });\r\n const cartLineImageUrl = cartLineExtraInfo && cartLineExtraInfo.ImageUrl ? cartLineExtraInfo.ImageUrl : '';\r\n const customerInfo = cartLineExtraInfo && cartLineExtraInfo.CustomerInfo ? cartLineExtraInfo.CustomerInfo : '';\r\n const snapShotId = cartLineExtraInfo && cartLineExtraInfo.SnapShotId ? cartLineExtraInfo.SnapShotId : '';\r\n const itemInfo = cartLineExtraInfo && cartLineExtraInfo.ItemInfo ? cartLineExtraInfo.ItemInfo : '';\r\n let isLoading = true;\r\n if (product && itemInfo && cartline) {\r\n itemInfo.rings.map((ring: any) => {\r\n ring.price = {};\r\n ring.price.AdjustedPrice = ring.priceAmount;\r\n ring.price.BasePrice = ring.priceAmount;\r\n ring.price.CustomerContextualPrice = ring.priceAmount;\r\n ring.price.TradeAgreementPrice = ring.priceAmount;\r\n return ring;\r\n });\r\n itemInfo.price = {\r\n AdjustedPrice: cartline.Price,\r\n BasePrice: cartline.Price,\r\n CustomerContextualPrice: cartline.Price,\r\n TradeAgreementPrice: cartline.Price\r\n };\r\n isLoading = false;\r\n }\r\n\r\n reactNodes.push(\r\n _assembleNode(\r\n cartline,\r\n product,\r\n props,\r\n index,\r\n foundProductAvailability,\r\n foundProductDeliveryOption,\r\n cartLineImageUrl,\r\n customerInfo,\r\n snapShotId,\r\n itemInfo,\r\n isLoading\r\n )\r\n );\r\n });\r\n\r\n return reactNodes;\r\n};\r\n\r\n/**\r\n * CartLineItems component.\r\n * @param props\r\n */\r\nexport const CartLineItems = (props: ICartLineItemsProps) => {\r\n const { products, cartlines } = props;\r\n return assembleCartlines(cartlines, products, props);\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { CartLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport groupBy from 'lodash/groupBy';\r\n\r\nimport { assembleCartlines, ICartLineItemsProps, ICartlinesViewProps } from './aaa_cart-line-items';\r\n\r\nconst _assembleGroupCartlines = (\r\n cartlines: CartLine[],\r\n products: SimpleProduct[] | undefined,\r\n props: ICartLineItemsProps\r\n): ICartlinesViewProps[][] | null => {\r\n const reactNodes: ICartlinesViewProps[][] = [];\r\n if (!products || products.length === 0) {\r\n props.context.telemetry.error('Products content is empty, module wont render');\r\n return null;\r\n }\r\n\r\n const getGroupByStorePickup = (items: CartLine[]) => groupBy(items, item => item.FulfillmentStoreId);\r\n const getGroupByDelivery = (items: CartLine[]) => groupBy(items, item => item.DeliveryMode);\r\n const groupDelivery = getGroupByDelivery(cartlines);\r\n const cartLinesGroup: CartLine[] = [];\r\n\r\n // 1) Group by store and pick up mode\r\n Object.entries(groupDelivery).forEach(([deliveryType, groupByDeliveryType]) => {\r\n // @ts-ignore\r\n groupDelivery[deliveryType] = getGroupByStorePickup(groupByDeliveryType);\r\n cartLinesGroup.push(getGroupByStorePickup(groupByDeliveryType));\r\n });\r\n\r\n // 2) Create cartlines group\r\n Object.keys(cartLinesGroup).forEach(key => {\r\n const cartLines = cartLinesGroup[key];\r\n Object.keys(cartLines).forEach(index => {\r\n const cartLine = cartLines[index];\r\n const carLineViewProps = assembleCartlines(cartLine, products, props);\r\n if (carLineViewProps !== null) {\r\n reactNodes.push(carLineViewProps);\r\n }\r\n });\r\n });\r\n\r\n return reactNodes;\r\n};\r\n\r\n/**\r\n * CartLine Group component.\r\n * @param props\r\n */\r\nexport const CartLineGroupItems = (props: ICartLineItemsProps) => {\r\n const { products, cartlines } = props;\r\n return _assembleGroupCartlines(cartlines, products, props);\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { CartPromotionLine } from '@msdyn365-commerce/retail-proxy';\r\nimport { getPromotionOptionsForCartLineItems, PromotionOptionsForCartLineItems } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\n/**\r\n * IPromotionData entity interface.\r\n */\r\nexport interface IPromotionData {\r\n promotionOptions?: CartPromotionLine[];\r\n}\r\n\r\n/**\r\n * Calls the Retail API and returns a promotion data.\r\n * @param ctx\r\n */\r\nexport async function getPromotionData(ctx: IActionContext): Promise {\r\n const promotionData: IPromotionData = {};\r\n\r\n await getPromotionOptionsForCartLineItems(new PromotionOptionsForCartLineItems(ctx.requestContext.apiSettings), ctx)\r\n .then(promotionOptions => {\r\n if (promotionOptions) {\r\n promotionData.promotionOptions = promotionOptions;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n return {};\r\n });\r\n\r\n return promotionData;\r\n}\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport {\r\n IAddToOrderTemplateDialogResources,\r\n IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\r\n IItemAddedToOrderTemplateDialogResources,\r\n ILinesAddedToOrderTemplateDialogResources,\r\n IOrderTemplateNameDialogResources,\r\n IWishlistActionSuccessResult,\r\n PromoCodeComponent,\r\n SaveCartToOrderTemplateComponent\r\n} from '@msdyn365-commerce/components';\r\nimport MsDyn365, { getUrlSync, IImageSettings } from '@msdyn365-commerce/core';\r\nimport { getCartState, getCheckoutState, ICartActionResult, ICartState, ICheckoutState } from '@msdyn365-commerce/global-state';\r\nimport {\r\n AsyncResult,\r\n CartLine,\r\n ChannelDeliveryOptionConfiguration,\r\n // ChannelDeliveryOptionConfiguration,\r\n CustomerBalances,\r\n FilterDeliveryModeOption,\r\n LineDataValidationFailure,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n Address,\r\n DeliveryPreferenceType,\r\n LineDeliverySpecification,\r\n ReleasedProductType\r\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { cartLineQuantityUpdatedAsync, validateCartAsync } from '@msdyn365-commerce-modules/cart-utilities';\r\nimport { IInvoiceSummaryLines, InvoiceSummary } from '@msdyn365-commerce-modules/invoice-payment-summary';\r\nimport { getBMAStockistAsync, getRequestOrderAsync } from '../../dataActions/DataActionExtension.g';\r\nimport { IOrderSummaryLines, OrderSummary } from '@msdyn365-commerce-modules/order-summary-utilities';\r\nimport {\r\n ActiveCartProductsInput,\r\n ArrayExtensions,\r\n getActiveCartProductsAction,\r\n getFallbackImageUrl,\r\n ObjectExtensions,\r\n QueryResultSettingsProxy\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n copyAsync,\r\n getDeliveryOptionsAsync,\r\n updateCartLinesAsync,\r\n updateLineDeliverySpecificationsAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\nimport {\r\n Alert,\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n INodeProps,\r\n IPayLoad,\r\n ITelemetryContent,\r\n TelemetryConstant,\r\n Waiting\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed, reaction } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport React from 'react';\r\n\r\nimport { IAaaCartData } from './aaa_cart.data';\r\nimport { IAaa_cartProps, IAaa_cartResources } from './aaa_cart.props.autogenerated';\r\nimport { CartLineGroupItems } from './components/aaa_cart-line-groups';\r\nimport { CartLineItems, ICartlinesViewProps } from './components/aaa_cart-line-items';\r\nimport { cartPromotions, ICartLineItemViewProps } from './components/aaa_cart-line-items-promotion';\r\nimport { getPromotionData, IPromotionData } from './utils/get-promotion-in-aaa_cart';\r\nimport axios from 'axios';\r\nimport moment from 'moment';\r\nimport placeOrder from '../aaa_checkout/methods/place-order';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport AlertComponent from '../aaa_checkout/components/alert';\r\n\r\nexport interface ICartViewProps extends IAaa_cartProps {\r\n className: string;\r\n title?: React.ReactNode;\r\n CartlinesWrapper: INodeProps;\r\n cartlines?: ICartlinesViewProps[];\r\n cartLinesGroup?: ICartlinesViewProps[][];\r\n cart: ICartState | undefined;\r\n orderSummaryHeading: React.ReactNode;\r\n orderSummaryLineitems?: IOrderSummaryLines;\r\n invoiceSummaryLineitems?: IInvoiceSummaryLines;\r\n OrderSummaryWrapper: INodeProps;\r\n OrderSummaryItems: INodeProps;\r\n OrderSummaryErrors?: IOrderSummaryErrors;\r\n checkoutAsGuestButton: React.ReactNode;\r\n checkoutAsSignInUserButton: React.ReactNode;\r\n placeOrder: React.ReactNode;\r\n storeSelector?: React.ReactNode;\r\n backToShoppingButton: React.ReactNode;\r\n waitingComponent: React.ReactNode;\r\n promotionOptions?: ICartLineItemViewProps;\r\n promoCode: React.ReactNode;\r\n cartLoadingStatus: string;\r\n cartDataResult: boolean;\r\n multiplePickUpEnabled?: boolean;\r\n createTemplateFromCartButton: React.ReactNode;\r\n alert?: React.ReactNode;\r\n telemetryContent?: ITelemetryContent;\r\n removeItemClickHandler(cartlineToRemove: CartLine): void;\r\n moveToWishlistSuccessHandler(result: IWishlistActionSuccessResult, cartlineId: CartLine): void;\r\n}\r\n\r\nexport interface IOrderSummaryErrors {\r\n Wrapper: INodeProps;\r\n\r\n header: React.ReactNode;\r\n errors: React.ReactNode[];\r\n}\r\n\r\ninterface ICartComponentState {\r\n showPromotionDialog: boolean;\r\n cartlinesErrors: LineDataValidationFailure[];\r\n promotionData: IPromotionData;\r\n products: SimpleProduct[];\r\n isCartValid: boolean;\r\n cartLinesExtraInfo: any;\r\n errorMessage: any;\r\n}\r\n\r\n/**\r\n *\r\n * Cart component.\r\n * @extends {React.PureComponent>}\r\n */\r\n@observer\r\nclass Cart extends React.Component> {\r\n public state: ICartComponentState = {\r\n cartlinesErrors: [],\r\n showPromotionDialog: false,\r\n promotionData: {},\r\n products: [],\r\n isCartValid: true,\r\n cartLinesExtraInfo: [],\r\n errorMessage: ''\r\n };\r\n\r\n @computed public get isPaymentVerificationRedirection(): boolean {\r\n const { requestFormData, query } = this.props.context.request;\r\n return !!(requestFormData || (query && query.pv === '1'));\r\n }\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n private isQuantityLimitsFeatureEnabled: boolean = false;\r\n\r\n private _isMounted: boolean = false;\r\n\r\n private readonly promotionPopupId: string = 'cart-promotion-popup';\r\n\r\n private retailMultiplePickUpOptionEnabled?: boolean = false;\r\n\r\n private channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n\r\n constructor(props: IAaa_cartProps) {\r\n super(props);\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n this.payLoad = getPayloadObject('click', this.telemetryContent, '');\r\n this.promotionLinkClick = this.promotionLinkClick.bind(this);\r\n this.promotionCloseButtonclick = this.promotionCloseButtonclick.bind(this);\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n this._isMounted = true;\r\n const {\r\n config,\r\n context: { actionContext }\r\n } = this.props;\r\n\r\n this.isQuantityLimitsFeatureEnabled = await this._getOrderQuantityLimitsFeatureFlag();\r\n if (this.isQuantityLimitsFeatureEnabled) {\r\n await this._validateCart();\r\n }\r\n\r\n try {\r\n const products = await this.props.data.products;\r\n if (this._isMounted) {\r\n this.setState({ products });\r\n }\r\n } catch (error) {\r\n this.props.telemetry.warning(error);\r\n this.props.telemetry.debug('Unable to get cart');\r\n }\r\n\r\n if (config.showAvailablePromotions) {\r\n if (this._isMounted && this.props.data.cart.result?.cart.CartLines) {\r\n this.setState({ promotionData: await getPromotionData(actionContext) });\r\n }\r\n\r\n reaction(\r\n () => this.props.data.cart.result?.cart.CartLines,\r\n async () => {\r\n if (this._isMounted) {\r\n this.setState({ promotionData: await getPromotionData(actionContext) });\r\n }\r\n }\r\n );\r\n }\r\n if (this._isMounted && this.props.data.cart.result?.cart.CartLines) {\r\n const requestOrders: any = await this.getRequestOrderList();\r\n const cartLines: any = this.props.data.cart.result?.cart.CartLines;\r\n const updatedCartLines: any = [];\r\n const jwellerInfo = await getBMAStockistAsync({ callerContext: this.props.context.actionContext, queryResultSettings: {} });\r\n let translationInfo = await axios.get(\r\n `${this.props.app.config.bmaBaseUrl}${this.props.app.config.bmaTranslationMessageEndPoint}`\r\n );\r\n translationInfo = translationInfo.data;\r\n for (const cartLine of cartLines) {\r\n const updateCartItem: any = {\r\n lineId: cartLine.LineId,\r\n ImageUrl: '',\r\n CustomerInfo: {},\r\n SnapShotId: '',\r\n ItemInfo: { price: 0 }\r\n };\r\n if (cartLine.ExtensionProperties && cartLine.ExtensionProperties.length > 0) {\r\n const snapShotProperty = cartLine.ExtensionProperties.find((e: any) => {\r\n return e.Key === 'AAA_SNAPSHOTID' && e.Value && e.Value.StringValue;\r\n });\r\n if (snapShotProperty && snapShotProperty.Value && snapShotProperty.Value.StringValue) {\r\n const bmaImageWithFormatEndPoint = this.props.app.config.bmaImageEndPoint.replace(\r\n '#snapshotId',\r\n snapShotProperty.Value.StringValue\r\n );\r\n const image = await axios.get(`${this.props.app.config.bmaBaseUrl}${bmaImageWithFormatEndPoint}`);\r\n updateCartItem.ImageUrl = image.data[0];\r\n updateCartItem.SnapShotId = snapShotProperty.Value.StringValue;\r\n const bmaReviewEndPoint = this.props.app.config.bmaReviewEndPoint.replace(\r\n '#snapshotId',\r\n snapShotProperty.Value.StringValue\r\n );\r\n const review = await axios.get(`${this.props.app.config.bmaBaseUrl}${bmaReviewEndPoint}`);\r\n\r\n let bmaPriceEndPoint = this.props.app.config.bmaPriceEndPoint.replace(\r\n '#snapshotId',\r\n snapShotProperty.Value.StringValue\r\n );\r\n\r\n bmaPriceEndPoint = bmaPriceEndPoint.replace('#jewellerId', jwellerInfo.BMARetailStockist);\r\n const price = await axios.get(`${this.props.app.config.bmaBaseUrl}${bmaPriceEndPoint}`);\r\n const ringsInfo = price.data.rings;\r\n updateCartItem.ItemInfo.review = review.data;\r\n updateCartItem.ItemInfo.snapShotId = snapShotProperty.Value.StringValue;\r\n updateCartItem.ItemInfo.key = snapShotProperty.Value.StringValue;\r\n updateCartItem.ItemInfo.review = review.data;\r\n updateCartItem.ItemInfo.recId = cartLine.RecordId;\r\n updateCartItem.ItemInfo.fallbackImage = getFallbackImageUrl(\r\n cartLine.ItemId,\r\n this.props.context.actionContext.requestContext.apiSettings\r\n );\r\n updateCartItem.ItemInfo.rings = [];\r\n updateCartItem.ItemInfo.totalPrice = price.data.sum.vk;\r\n for (const ring of ringsInfo) {\r\n const ringReview = updateCartItem.ItemInfo.review.find((r: any) => {\r\n return r.ringId === ring.id;\r\n });\r\n let height = '5mm';\r\n let width = '1.4mm';\r\n if (ringReview.properties && ringReview.properties.profile) {\r\n if (ringReview.properties.profile.width) {\r\n width = `${ringReview.properties.profile.width.value} ${ringReview.properties.profile.width.type}`;\r\n }\r\n if (ringReview.properties.profile.height) {\r\n height = `${ringReview.properties.profile.height.value} ${ringReview.properties.profile.height.type}`;\r\n }\r\n }\r\n let diamondCount = null;\r\n diamondCount =\r\n ringReview.properties.stone.preset.length > 0 &&\r\n ringReview.properties.stone.preset[0].id !== 'none' &&\r\n ringReview.properties.stone.quantity.reduce(function(sum: any, current: any) {\r\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\r\n return sum + current.count;\r\n }, 0);\r\n const ringSizePi = ringReview.properties.ring.size.value / 3.14159265;\r\n const ringFineness = ringReview.properties.disc.fineness.map((fineness: any) => {\r\n return `${translationInfo[fineness.label]}`;\r\n });\r\n const ringColor = ringReview.properties.disc.color.map((color: any) => {\r\n return `${translationInfo[color.label]}`;\r\n });\r\n const ringPolish = ringReview.properties.disc.surface.map((polish: any) => {\r\n return `${translationInfo[polish.label]}`;\r\n });\r\n const ringFinenessColorPolish = ringColor.map((color: any, index: number) => {\r\n return `${ringFineness[index]} ${color} ${ringPolish[index]}`;\r\n });\r\n const ringInfo: any = {\r\n ringId: ring.id,\r\n ringName: ringReview.name,\r\n alloy: `${translationInfo[ringReview.properties.disc.fineness[0].label]}\r\n ${''}${translationInfo[ringReview.properties.disc.color[0].label]}`,\r\n sizeLabel: ringReview.properties.ring.size.label,\r\n sizeValue:\r\n Math.round(\r\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\r\n (ringSizePi + Number.EPSILON) * 100\r\n ) / 100,\r\n specifications: diamondCount\r\n ? `${diamondCount} Diamonds, ${width} Wide, ${height} thick`\r\n : `${width} Wide, ${height} thick`,\r\n engraving: ringReview.properties.eSpot.text.inner,\r\n ringFineness: ringFineness,\r\n ringColor: ringColor,\r\n ringPolish: ringPolish,\r\n ringFinenessColorPolishInfo: ringFinenessColorPolish\r\n };\r\n ringInfo.priceAmount = ring.vk;\r\n updateCartItem.ItemInfo.rings.push(ringInfo);\r\n }\r\n }\r\n const requestOrderIdProperty = cartLine.ExtensionProperties.find((e: any) => {\r\n return e.Key === 'AAA_REQUESTORDERID' && e.Value && e.Value.StringValue;\r\n });\r\n const requestOrderLineNumProperty = cartLine.ExtensionProperties.find((e: any) => {\r\n return e.Key === 'AAA_REQUESTORDERLINENUM' && e.Value && e.Value.DecimalValue;\r\n });\r\n if (\r\n requestOrderIdProperty &&\r\n requestOrderIdProperty.Value &&\r\n requestOrderIdProperty.Value.StringValue &&\r\n requestOrderLineNumProperty &&\r\n requestOrderLineNumProperty.Value &&\r\n requestOrderLineNumProperty.Value.DecimalValue\r\n ) {\r\n const requestOrder = requestOrders.RequestOrder.find((requestOrder: any) => {\r\n return (\r\n requestOrder.RequestOrderId === requestOrderIdProperty.Value.StringValue &&\r\n requestOrderLineNumProperty.Value.DecimalValue === requestOrder.LineNum\r\n );\r\n });\r\n if (requestOrder) {\r\n updateCartItem.CustomerInfo.b2cEmailId = requestOrder.B2CEmailId;\r\n updateCartItem.CustomerInfo.b2cCustomerName = requestOrder.b2CCustomerName;\r\n updateCartItem.CustomerInfo.b2cPhone = requestOrder.B2CPhone;\r\n }\r\n }\r\n if (\r\n updateCartItem.CustomerInfo && // 👈 null and undefined check\r\n Object.keys(updateCartItem.CustomerInfo).length === 0 &&\r\n Object.getPrototypeOf(updateCartItem.CustomerInfo) === Object.prototype\r\n ) {\r\n delete updateCartItem.CustomerInfo;\r\n }\r\n updatedCartLines.push(updateCartItem);\r\n }\r\n }\r\n this.setState({ cartLinesExtraInfo: updatedCartLines });\r\n }\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n this._isMounted = false;\r\n }\r\n private async getRequestOrderList() {\r\n const response: any = await getRequestOrderAsync(\r\n {\r\n callerContext: this.props.context.actionContext,\r\n queryResultSettings: {}\r\n },\r\n ''\r\n );\r\n return response;\r\n }\r\n public shouldComponentUpdate(nextProps: IAaa_cartProps, nextState: ICartComponentState): boolean {\r\n if (this.state === nextState && this.props.data === nextProps.data) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n private _navigateToCheckout(navigatedUrl: string) {\r\n const cart: any = this.props.data.cart.result?.cart;\r\n updateCartLinesAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n cart.Id,\r\n cart.CartLines,\r\n cart.Version\r\n )\r\n .then(cartActionResult => {\r\n window.location.href = navigatedUrl;\r\n })\r\n .catch(() => {\r\n return false;\r\n });\r\n }\r\n\r\n private readonly updateCartLineEmailAddress = async (newGuestCheckoutEmail: string): Promise => {\r\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\r\n\r\n const emailDeliveryCartLines = this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(\r\n cartLine => cartLine.DeliveryMode && cartLine.DeliveryMode !== '' && cartLine.DeliveryMode === emailDeliveryModeCode\r\n );\r\n\r\n let updatedCartVersion: number | undefined;\r\n if (emailDeliveryCartLines && emailDeliveryCartLines.length > 0) {\r\n const lineDeliverySpecifications: LineDeliverySpecification[] = emailDeliveryCartLines.map(line => {\r\n return {\r\n LineId: line.LineId,\r\n DeliverySpecification: {\r\n DeliveryModeId: emailDeliveryModeCode,\r\n DeliveryPreferenceTypeValue: DeliveryPreferenceType.ElectronicDelivery,\r\n ElectronicDeliveryEmailAddress: newGuestCheckoutEmail\r\n }\r\n };\r\n });\r\n\r\n await updateLineDeliverySpecificationsAsync(\r\n { callerContext: this.props.context.actionContext },\r\n (await this.props.data.checkout).checkoutCart.cart.Id,\r\n lineDeliverySpecifications\r\n )\r\n .then(updatedCart => {\r\n updatedCartVersion = updatedCart.Version;\r\n })\r\n .catch(error => {\r\n this.props.context.actionContext.telemetry.exception(error);\r\n throw new Error('[updateLineDeliverySpecificationsAsync] Unable to update electronic delivery email address in cart');\r\n });\r\n }\r\n\r\n return updatedCartVersion;\r\n };\r\n private readonly updateGuestProfile = async (newGuestCheckoutEmail: string): Promise => {\r\n if (this.props.data.checkout.result) {\r\n await this.props.data.checkout.result.updateGuestCheckoutEmail({ newGuestCheckoutEmail });\r\n }\r\n };\r\n private readonly copyCart = async (): Promise => {\r\n const currentCartState = await getCartState(this.props.context.actionContext);\r\n const activeCart = currentCartState.cart;\r\n if (activeCart && Object.keys(activeCart).length > 0) {\r\n const checkoutCart = await copyAsync({ callerContext: this.props.context.actionContext }, activeCart.Id, 2);\r\n if (checkoutCart) {\r\n return Array.isArray(checkoutCart) ? checkoutCart[0] : checkoutCart;\r\n }\r\n } else {\r\n this.props.context.actionContext.trace(\"[get-checkout-cart] Can't create a checkout cart since active cart is empty\");\r\n }\r\n };\r\n private readonly updateEmail = async (): Promise => {\r\n const checkoutState = await getCheckoutState(this.props.context.actionContext);\r\n const customerAccountInformation = this.props.data.customerInformation?.result;\r\n\r\n const hasInvoiceLine = checkoutState?.checkoutCart.hasInvoiceLine;\r\n let updateEmail: string = '';\r\n\r\n // if obo enabled and profile selected, we need to send the order status to obo user not store manager.\r\n if (Msdyn365.isOboRequest(this.props.context.request)) {\r\n updateEmail =\r\n customerAccountInformation && customerAccountInformation.Email !== undefined ? customerAccountInformation.Email : '';\r\n } else {\r\n updateEmail =\r\n (this.props.context &&\r\n this.props.context.request &&\r\n this.props.context.request.user &&\r\n this.props.context.request.user.isAuthenticated &&\r\n this.props.context.request.user.emailAddress) ||\r\n '';\r\n }\r\n\r\n const emailOnCart = checkoutState?.checkoutCart.cart.ReceiptEmail;\r\n const email = hasInvoiceLine\r\n ? this.props.context.request.user.emailAddress ?? ''\r\n : emailOnCart ??\r\n (checkoutState?.isExpressCheckoutApplied && !StringExtensions.isNullOrEmpty(checkoutState.emailAddressFromExpressCheckout)\r\n ? checkoutState.emailAddressFromExpressCheckout\r\n : undefined) ??\r\n updateEmail;\r\n\r\n if (email) {\r\n await this.updateGuestProfile(email);\r\n checkoutState?.updateHasGuestCheckoutEmail({ newHasGuestCheckoutEmail: true });\r\n } else {\r\n checkoutState?.updateHasGuestCheckoutEmail({ newHasGuestCheckoutEmail: false });\r\n }\r\n };\r\n @computed get maxPaymentAmount(): number {\r\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\r\n if (!cart) {\r\n return 0;\r\n }\r\n\r\n // Use customer account after gift card and loyalty.\r\n const amountDue = Math.max(0, (cart.TotalAmount || 0) - this.getLoyaltyAmount - this.getGiftCardAmount);\r\n\r\n // If the user has a mandatory credit limit, then the max amount must not be more than that\r\n if (this.props.data.customerInformation?.result?.MandatoryCreditLimit) {\r\n return Math.min(this.getAvailableCredit(this.props.data.creditBalances?.result), amountDue);\r\n }\r\n return amountDue;\r\n }\r\n private readonly getAvailableCredit = (creditBalances: CustomerBalances | undefined) => {\r\n let availableCredit = 0;\r\n\r\n if (!creditBalances) {\r\n return 0;\r\n }\r\n\r\n if (creditBalances.InvoiceAccountCreditLimit === 0) {\r\n availableCredit = creditBalances.CreditLimit - creditBalances.Balance - creditBalances.PendingBalance;\r\n } else {\r\n availableCredit =\r\n creditBalances.InvoiceAccountCreditLimit -\r\n creditBalances.InvoiceAccountBalance -\r\n creditBalances.InvoiceAccountPendingBalance;\r\n }\r\n\r\n return availableCredit;\r\n };\r\n @computed get getLoyaltyAmount(): number {\r\n const checkoutState = this.props.data.checkout.result;\r\n if (!checkoutState || !checkoutState.loyaltyAmount) {\r\n return 0;\r\n }\r\n return checkoutState.loyaltyAmount;\r\n }\r\n @computed get getGiftCardAmount(): number {\r\n const checkoutState = this.props.data.checkout.result;\r\n if (!checkoutState || !checkoutState.giftCards || checkoutState.giftCards.length === 0) {\r\n return 0;\r\n }\r\n\r\n let giftCardAmount: number = 0;\r\n checkoutState.giftCards.forEach(giftCard => {\r\n giftCardAmount += giftCard.Balance || 0;\r\n });\r\n\r\n return giftCardAmount;\r\n }\r\n private readonly addPayment = async (amount: any): Promise => {\r\n const checkoutState = await getCheckoutState(this.props.context.actionContext);\r\n\r\n if (!checkoutState) {\r\n this.props.context.telemetry.error('checkout state not found');\r\n return;\r\n }\r\n await checkoutState.updateCustomerAccountAmount({ newAmount: amount });\r\n this.props.context.telemetry.information('customer account payment amount updated');\r\n };\r\n\r\n private readonly updateDeliveryOption = async (): Promise => {\r\n await this.loadDeliveryOptions();\r\n };\r\n private readonly getCartLinesForShipping = (): CartLine[] => {\r\n const { request } = this.props.context;\r\n const pickupDeliveryModeCode = request && request.channel && request.channel.PickupDeliveryModeCode;\r\n const emailDeliveryModeCode = request && request.channel && request.channel.EmailDeliveryModeCode;\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n this.retailMultiplePickUpOptionEnabled = this.props.data.featureState?.result?.find(\r\n feature => feature.Name === multiplePickupStoreSwitchName\r\n )?.IsEnabled;\r\n return this.retailMultiplePickUpOptionEnabled\r\n ? ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).filter(cartLine =>\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\r\n ? cartLine.DeliveryMode !==\r\n this.channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(\r\n deliveryMode => deliveryMode === cartLine.DeliveryMode\r\n ) && cartLine.DeliveryMode !== emailDeliveryModeCode\r\n : cartLine\r\n )\r\n : ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).filter(cartLine =>\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\r\n ? cartLine.DeliveryMode !== pickupDeliveryModeCode && cartLine.DeliveryMode !== emailDeliveryModeCode\r\n : cartLine\r\n );\r\n };\r\n private readonly canShip = (): boolean => {\r\n const hasInvoice = this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\r\n return !hasInvoice && this.getCartLinesForShipping().length > 0;\r\n };\r\n private readonly updateCartDeliverySpecification = async (deliveryModeId: string): Promise => {\r\n if (deliveryModeId.trim() === '') {\r\n return;\r\n }\r\n\r\n // const { resources } = this.props;\r\n const checkoutState = this.props.data.checkout.result as ICheckoutState;\r\n const updateCartDeliverySpecificationInput = {\r\n deliveryModeId,\r\n shippingAddress: checkoutState.shippingAddress,\r\n channelDeliveryOptionConfig: this.retailMultiplePickUpOptionEnabled ? this.channelDeliveryOptionConfig : undefined\r\n };\r\n\r\n await checkoutState.checkoutCart\r\n .updateCartDeliverySpecification(updateCartDeliverySpecificationInput)\r\n .then(response => {\r\n if (response.status === 'FAILED') {\r\n // const errorMessage = `${response.errorDetails?.LocalizedMessage}`;\r\n // this.setError(StringExtensions.isNullOrEmpty(errorMessage) ? resources.genericErrorMessage : errorMessage);\r\n }\r\n })\r\n .catch(() => {\r\n // this.setError(resources.genericErrorMessage);\r\n });\r\n };\r\n private readonly getDeliveryOptions = async (shippingAddress: Address): Promise => {\r\n if (!this.props.data.checkout.result) {\r\n return;\r\n }\r\n\r\n const { context } = this.props;\r\n const cartState = this.props.data.checkout.result?.checkoutCart;\r\n const cartId: any = (cartState.cart as any).Id;\r\n\r\n if (context) {\r\n let deliveryOptions: any = [];\r\n let selectedItemId = '';\r\n try {\r\n let originalDeliveryMode: string = '';\r\n const shippingCartLines = this.getCartLinesForShipping();\r\n const hasShippingDeliveryLines = shippingCartLines && shippingCartLines.length > 0 && shippingCartLines[0].DeliveryMode;\r\n if (hasShippingDeliveryLines) {\r\n // First store the delivery mode, so that we can restore the shipping information.\r\n originalDeliveryMode = shippingCartLines[0].DeliveryMode || '';\r\n\r\n // Clear the delivery information on retail server, so GetDeliveryOptions charge calculation works correctly\r\n const cart = cartState.cart;\r\n await cartState.clearCartLinesDeliveryInformation({\r\n cart,\r\n channelDeliveryOptionConfiguration: this.channelDeliveryOptionConfig\r\n });\r\n }\r\n\r\n // TODO: Check if we can move this getDeliveryOptions to checkout state\r\n const deliveryOptionFilter = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\r\n const response = await getDeliveryOptionsAsync(\r\n {\r\n callerContext: context.actionContext,\r\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context.actionContext)\r\n },\r\n cartId,\r\n shippingAddress,\r\n [],\r\n deliveryOptionFilter,\r\n true\r\n );\r\n\r\n if (hasShippingDeliveryLines) {\r\n await this.updateCartDeliverySpecification(originalDeliveryMode);\r\n }\r\n\r\n if (response && response.length > 0) {\r\n deliveryOptions = response;\r\n }\r\n } catch {\r\n // this.setError(resources.genericErrorMessage);\r\n }\r\n\r\n if (deliveryOptions.length === 0) {\r\n // this.setError(resources.deliveryOptionsNotFound);\r\n } else {\r\n selectedItemId = deliveryOptions.length > 0 ? deliveryOptions[0].Code || '' : ''; // By default, select first delivery\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\r\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: true });\r\n return selectedItemId;\r\n }\r\n }\r\n };\r\n private readonly loadDeliveryOptions = async (): Promise => {\r\n const shippingAddress = this.props.data.checkout.result?.shippingAddress;\r\n let selectedItemId = '';\r\n const isSelectDefaultOptionEnabled = true;\r\n if (this.canShip() && shippingAddress) {\r\n if (\r\n !this.props.data.checkout.result?.isPaymentVerificationRedirection ||\r\n isSelectDefaultOptionEnabled ||\r\n this.props.data.checkout.result?.isExpressCheckoutApplied\r\n ) {\r\n selectedItemId = await this.getDeliveryOptions(shippingAddress);\r\n }\r\n if (selectedItemId && (isSelectDefaultOptionEnabled || this.props.data.checkout.result?.isExpressCheckoutApplied)) {\r\n await this.updateCartDeliverySpecification(selectedItemId);\r\n }\r\n }\r\n };\r\n private readonly _getDefaultAddress = (): Address | undefined => {\r\n const customerAddresses = this.props.data.address.result ?? [];\r\n if (customerAddresses) {\r\n const primaryAddress = customerAddresses.find((address: Address) => address.IsPrimary);\r\n return primaryAddress || (customerAddresses.length > 0 ? customerAddresses[0] : undefined);\r\n }\r\n return undefined;\r\n };\r\n private readonly _setShippingAddress = (address: Address): void => {\r\n if (this.props.data.checkout.result) {\r\n const newShippingAddress = { ...address };\r\n void this.props.data.checkout.result.updateShippingAddress({ newShippingAddress });\r\n this.props.data.checkout.result.checkoutCart.updateShippingAddress({ newShippingAddress }).catch(error => {\r\n this.props.telemetry.error(error);\r\n });\r\n }\r\n };\r\n private readonly updateShippingAddress = async (): Promise => {\r\n const checkoutState = await getCheckoutState(this.props.context.actionContext);\r\n let defaultAddress;\r\n\r\n if (checkoutState?.checkoutCart.cart.ShippingAddress) {\r\n defaultAddress = checkoutState.checkoutCart.cart.ShippingAddress;\r\n } else if (this._getDefaultAddress()) {\r\n defaultAddress = this._getDefaultAddress();\r\n } else {\r\n defaultAddress = checkoutState?.isExpressCheckoutApplied ? checkoutState.shippingAddressFromExpressCheckout : undefined;\r\n }\r\n\r\n if (defaultAddress) {\r\n this._setShippingAddress(defaultAddress);\r\n checkoutState?.updateHasShippingAddress({ newHasShippingAddress: true });\r\n }\r\n };\r\n private updateCartLinesAndPlaceOrder() {\r\n const cart: any = this.props.data.cart.result?.cart;\r\n void updateCartLinesAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n cart.Id,\r\n cart.CartLines,\r\n cart.Version\r\n ).then(cartActionResult => {\r\n void this._placeOrder();\r\n });\r\n }\r\n private async updateCheckoutCartLines() {\r\n const cart: any = this.props.data.cart.result?.cart;\r\n const checkoutState = await getCheckoutState(this.props.context.actionContext);\r\n await updateCartLinesAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n checkoutState.checkoutCart.cart.Id,\r\n cart.CartLines,\r\n checkoutState.checkoutCart.cart.Version\r\n );\r\n }\r\n private async _placeOrder() {\r\n const {\r\n resources: {\r\n genericErrorMessage,\r\n invalidCartVersionErrorMessage,\r\n customerCreditLimitExceededErrorMessage,\r\n customerCreditLimitExhaustedErrorMessage\r\n },\r\n context: { actionContext }\r\n } = this.props;\r\n // update checkout cart\r\n await this.updateCheckoutCartLines();\r\n //copy cart\r\n await this.copyCart();\r\n // update email in checkout cart\r\n await this.updateEmail();\r\n // update shipping address in checkout cart\r\n await this.updateShippingAddress();\r\n // update delivery option in checkout cart\r\n await this.updateDeliveryOption();\r\n // update amount in checkout cart\r\n const maxAmount = this.maxPaymentAmount;\r\n await this.addPayment(maxAmount);\r\n const updatedCartVersion = await this.updateCartLineEmailAddress(this.props.data.checkout.result?.guestCheckoutEmail || '');\r\n await placeOrder(\r\n actionContext,\r\n this.props.data.checkout.result,\r\n this.props.data.products.result,\r\n true,\r\n updatedCartVersion,\r\n this.isPaymentVerificationRedirection\r\n ).catch(error => {\r\n let errorMessage = genericErrorMessage;\r\n if (error && error.message && error.message.indexOf('customerCreditLimitExhaustedErrorMessage') > -1) {\r\n errorMessage = customerCreditLimitExhaustedErrorMessage;\r\n }\r\n if (error && error.message && error.message.indexOf('customerCreditLimitExceededErrorMessage') > -1) {\r\n errorMessage = customerCreditLimitExceededErrorMessage;\r\n }\r\n\r\n if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\r\n errorMessage = invalidCartVersionErrorMessage;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\r\n if (\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\r\n error.data?.AdditionalContext &&\r\n !this.isPaymentVerificationRedirection\r\n ) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n errorMessage\r\n });\r\n this.props.telemetry.exception(error);\r\n });\r\n }\r\n public render(): JSX.Element | null {\r\n const {\r\n data: {\r\n cart: { result: cart },\r\n products: { result: products }\r\n },\r\n context: {\r\n request: {\r\n user: { isAuthenticated, signInUrl }\r\n }\r\n },\r\n resources\r\n } = this.props;\r\n\r\n const guestCheckoutUrl = getUrlSync('checkout', this.props.context.actionContext) || '';\r\n const backToShoppingUrl = getUrlSync('home', this.props.context.actionContext) || '';\r\n const checkoutURL = this._getCheckoutURL(isAuthenticated, guestCheckoutUrl, signInUrl || '');\r\n const isCartEmpty = cart && cart.cart.CartLines && cart.cart.CartLines.length === 0;\r\n const cartLines = this._getCartLines();\r\n const hasError = !this.state.isCartValid || (cartLines ? cartLines.some(cartline => cartline.hasError) : false);\r\n const RetailMultiplePickupFeatureState = this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature'\r\n );\r\n const multiplePickUpEnabled = !cart?.hasInvoiceLine && RetailMultiplePickupFeatureState?.IsEnabled;\r\n const cartLinesGroup = multiplePickUpEnabled ? this._getCartLinesGroup() : null;\r\n\r\n this.payLoad.contentAction.etext = TelemetryConstant.Checkout;\r\n const checkoutBySignInAttributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n this.payLoad.contentAction.etext = TelemetryConstant.GuestCheckout;\r\n const checkoutByGuestAttributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n this.payLoad.contentAction.etext = TelemetryConstant.BackToShopping;\r\n const backtoShoppingAttributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n const viewProps = {\r\n ...this.props,\r\n className: classnames('ms-cart'),\r\n title:

{resources.cartTitle}

,\r\n cart: this.props.data.cart.result,\r\n CartlinesWrapper: { className: 'msc-cartline-wraper' },\r\n OrderSummaryWrapper: { className: cart?.hasInvoiceLine ? 'msc-invoice-summary-wrapper' : 'msc-order-summary-wrapper' },\r\n OrderSummaryItems: { className: cart?.hasInvoiceLine ? 'msc-invoice-summary__items' : 'msc-order-summary__items' },\r\n cartlines: cartLines,\r\n cartLinesGroup,\r\n promoCode: this._getPromoCode(),\r\n promotionOptions: this._getPromotions(),\r\n context: this.props.context,\r\n typeName: this.props.typeName,\r\n telemetry: this.props.telemetry,\r\n id: this.props.id,\r\n multiplePickUpEnabled,\r\n removePromoAriaLabelFormat: resources.removePromoAriaLabelFormat,\r\n orderSummaryHeading: ArrayExtensions.hasElements(cart?.cart.CartLines) ? (\r\n cart?.hasInvoiceLine ? (\r\n

{resources.invoiceSummaryTitle}

\r\n ) : (\r\n

{resources.orderSummaryTitle}

\r\n )\r\n ) : null,\r\n orderSummaryLineitems: this._getOrderSummaryLineItems(),\r\n invoiceSummaryLineitems: this._getInvoiceSummaryLineItems(),\r\n checkoutAsSignInUserButton: !isCartEmpty ? (\r\n this._navigateToCheckout(checkoutURL)}\r\n title={resources.checkoutButtonTitle}\r\n {...checkoutBySignInAttributes}\r\n >\r\n {resources.checkoutButtonTitle}\r\n \r\n ) : null,\r\n placeOrder: !isCartEmpty ? (\r\n this.updateCartLinesAndPlaceOrder()}\r\n title={resources.placeOrderButtonTitle}\r\n {...checkoutBySignInAttributes}\r\n >\r\n {resources.placeOrderButtonTitle}\r\n \r\n ) : null,\r\n checkoutAsGuestButton:\r\n !isCartEmpty && !isAuthenticated ? (\r\n this._navigateToCheckout(guestCheckoutUrl)}\r\n title={resources.guestCheckoutButtonTitle}\r\n {...checkoutByGuestAttributes}\r\n >\r\n {resources.guestCheckoutButtonTitle}\r\n \r\n ) : null,\r\n backToShoppingButton: (\r\n this._navigateToCheckout(backToShoppingUrl)}\r\n title={resources.backToShoppingButtonTitle}\r\n >\r\n {resources.backToShoppingButtonTitle}\r\n \r\n ),\r\n createTemplateFromCartButton:\r\n this.props.config.isCreateTemplateFromCartButtonAllow && this._displayAddCartToTemplate() && products ? (\r\n \r\n ) : null,\r\n storeSelector:\r\n this.props.slots.storeSelector && this.props.slots.storeSelector.length > 0 ? this.props.slots.storeSelector[0] : null,\r\n removeItemClickHandler: this._removeItemFromCartHandler,\r\n moveToWishlistSuccessHandler: this._moveToWishlistSuccessHandler,\r\n waitingComponent: ,\r\n cartLoadingStatus: this.props.data.cart.status === 'FAILED' ? this.props.resources.cartLoadingErrorMessage : null,\r\n cartDataResult: this.props.data.cart.result && this.props.data.cart.result.isEmpty,\r\n OrderSummaryErrors: this._getOrderSummaryErrors(cartLines),\r\n telemetryContent: this.telemetryContent,\r\n alert: this.state.errorMessage && \r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n private readonly promotionLinkClick = (event: React.MouseEvent) => {\r\n this.setState({\r\n showPromotionDialog: !this.state.showPromotionDialog\r\n });\r\n };\r\n\r\n private readonly promotionCloseButtonclick = () => {\r\n this._hidePromotionDialog();\r\n };\r\n\r\n private _hidePromotionDialog(): void {\r\n this.setState({\r\n showPromotionDialog: false\r\n });\r\n }\r\n\r\n private _displayAddCartToTemplate(): boolean {\r\n const cart = this.props.data.cart?.result;\r\n if (ObjectExtensions.isNullOrUndefined(cart) || cart.hasInvoiceLine) {\r\n return false;\r\n }\r\n\r\n const RetailB2BEcommerceFeatureState = this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailB2BEcommerceFeature'\r\n );\r\n if (\r\n RetailB2BEcommerceFeatureState?.IsEnabled &&\r\n this.props.data.customerInformation.result?.IsB2b &&\r\n this.props.data.orderTemplates.result &&\r\n ArrayExtensions.hasElements(cart.cart?.CartLines) &&\r\n this.props.data.customerInformation.result\r\n ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private _getPromotions(): React.ReactNode {\r\n return (\r\n this.props.config.showAvailablePromotions &&\r\n cartPromotions({\r\n id: this.promotionPopupId,\r\n showPromotionPopup: this.state.showPromotionDialog,\r\n onSeeAllClick: this.promotionLinkClick,\r\n onCloseButtonClick: this.promotionCloseButtonclick,\r\n promotions: this.state.promotionData.promotionOptions,\r\n resources: {\r\n promotionStringHeading: this.props.resources.promotionStringHeading,\r\n promotionLinkText: this.props.resources.promotionLinkText,\r\n promotionPopupHeading: this.props.resources.promotionPopupHeading,\r\n promotionCloseButtonAriaLabel: this.props.resources.promotionCloseButtonAriaLabel\r\n }\r\n })\r\n );\r\n }\r\n\r\n private _getOrderSummaryErrors(cartLines: ICartlinesViewProps[] | null): IOrderSummaryErrors | undefined {\r\n const allErrors =\r\n (cartLines &&\r\n cartLines\r\n .map((cartline: any, index: number) => {\r\n // Check if the product is service or not by product type\r\n const isServiceItem = cartline.data?.product?.ItemTypeValue === ReleasedProductType.Service;\r\n\r\n if (!isServiceItem && cartline.error) {\r\n const fullError =\r\n cartline.data && cartline.data.product?.Name\r\n ? `${cartline.data.product.Name}: ${cartline.error}`\r\n : cartline.error;\r\n\r\n return (\r\n
\r\n {fullError}\r\n
\r\n );\r\n }\r\n\r\n return null;\r\n })\r\n .filter((line): line is JSX.Element => !!line)) ||\r\n [];\r\n\r\n return {\r\n Wrapper: {\r\n tag: Alert,\r\n className: 'msc-alert',\r\n isOpen: allErrors.length > 0,\r\n color: 'danger',\r\n assertive: true,\r\n 'aria-label': this.props.resources.outOfStockErrorMessageHeader\r\n },\r\n header: (\r\n \r\n ),\r\n errors: allErrors\r\n };\r\n }\r\n\r\n private _getInvoiceSummaryLineItems(): IInvoiceSummaryLines | undefined {\r\n const {\r\n data: {\r\n cart: { result: cart }\r\n },\r\n telemetry,\r\n resources\r\n } = this.props;\r\n\r\n return cart?.hasInvoiceLine\r\n ? InvoiceSummary({\r\n orderTotalLabel: resources.totalAmountLabel,\r\n invoiceLabel: resources.invoiceLabel,\r\n cart: cart.cart,\r\n context: this.props.context,\r\n typeName: this.props.typeName,\r\n telemetry,\r\n id: this.props.id\r\n })\r\n : undefined;\r\n }\r\n\r\n private _getOrderSummaryLineItems(): IOrderSummaryLines | undefined {\r\n const {\r\n data: {\r\n cart: { result: cart },\r\n channelDeliveryOptionConfig\r\n },\r\n telemetry,\r\n resources\r\n } = this.props;\r\n\r\n const channelConfiguration = this.props.context && this.props.context.request && this.props.context.request.channel;\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const featureState = this.props?.data?.featureState;\r\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(item => item.Name === multiplePickupStoreSwitchName)\r\n ?.IsEnabled;\r\n const isShowOrHideTaxEnabled = this.props.context?.request.app.config?.isEnableShowOrHideSalesTaxECommerceEnabled === true;\r\n\r\n return channelConfiguration && ArrayExtensions.hasElements(cart?.cart.CartLines) && !cart?.hasInvoiceLine\r\n ? OrderSummary({\r\n cart: cart!.cart,\r\n subTotalLabel: resources.itemsWithCountLabel,\r\n shippingLabel: resources.estimatedShippingLabel,\r\n otherChargeLabel: resources.otherCharges,\r\n taxLabel: resources.estimatedTaxLabel,\r\n orderTotalLabel: resources.orderTotal,\r\n totalDiscountsLabel: resources.totalDiscountsLabel,\r\n context: this.props.context,\r\n typeName: this.props.typeName,\r\n id: this.props.id,\r\n toBeCalculatedText: resources.yetToBeCalculatedText,\r\n freeText: resources.priceFree,\r\n channelConfiguration,\r\n retailMultiplePickUpOptionEnabled,\r\n channelDeliveryOptionConfig: channelDeliveryOptionConfig?.result,\r\n isShowTaxBreakup: isShowOrHideTaxEnabled,\r\n telemetry\r\n })\r\n : undefined;\r\n }\r\n\r\n private _getPromoCode(): React.ReactNode {\r\n const {\r\n data: {\r\n cart: { result: cart }\r\n },\r\n resources\r\n } = this.props;\r\n\r\n return (\r\n cart &&\r\n this.props.config.isPromoCodeSectionAllow && (\r\n \r\n )\r\n );\r\n }\r\n\r\n private _generateAddToOrderTemplateDialogResources(resources: IAaa_cartResources): IAddToOrderTemplateDialogResources {\r\n return {\r\n addToOrderTemplateHeader: resources.addToOrderTemplateHeader,\r\n\r\n noOrderTemplatesMessage: resources.noOrderTemplatesMessage,\r\n noOrderTemplatesDescription: resources.noOrderTemplatesDescription,\r\n\r\n createAnOrderTemplateButtonText: resources.createAnOrderTemplateButtonText,\r\n createNewOrderTemplateButtonText: resources.createNewOrderTemplateButtonText,\r\n cancelOrderTemplateCreationButtonText: resources.cancelOrderTemplateCreationButtonText,\r\n\r\n selectTemplatesText: resources.selectTemplatesText,\r\n addToTemplateButtonText: resources.addToTemplateButtonText,\r\n lineItemsText: resources.lineItemsText\r\n };\r\n }\r\n\r\n private _generateItemAddedToOrderTemplateDialogResources(resources: IAaa_cartResources): IItemAddedToOrderTemplateDialogResources {\r\n return {\r\n viewOrderTemplateButtonText: resources.viewOrderTemplateButtonText,\r\n continueShoppingButtonText: resources.continueShoppingButtonText,\r\n itemAddedToOrderTemplateHeaderItemOneText: resources.itemAddedToOrderTemplateHeaderItemOneText,\r\n itemAddedToOrderTemplateHeaderItemFormatText: resources.itemAddedToOrderTemplateHeaderItemFormatText,\r\n itemAddedToOrderTemplateHeaderMessageText: resources.itemAddedToOrderTemplateHeaderMessageText,\r\n freePriceText: resources.freePriceText,\r\n originalPriceText: resources.originalPriceText,\r\n currentPriceText: resources.currentPriceText\r\n };\r\n }\r\n\r\n private _generateLinesAddedToOrderTemplateDialogResources(resources: IAaa_cartResources): ILinesAddedToOrderTemplateDialogResources {\r\n return {\r\n viewOrderTemplateButtonText: resources.viewOrderTemplateButtonText,\r\n continueShoppingButtonText: resources.continueShoppingButtonText,\r\n linesAddedToOrderTemplateHeaderItemsOneText: resources.linesAddedToOrderTemplateHeaderItemsOneText,\r\n linesAddedToOrderTemplateHeaderItemsFormatText: resources.linesAddedToOrderTemplateHeaderItemsFormatText,\r\n linesAddedToOrderTemplateHeaderLinesOneText: resources.linesAddedToOrderTemplateHeaderLinesOneText,\r\n linesAddedToOrderTemplateHeaderLinesFormatText: resources.linesAddedToOrderTemplateHeaderLinesFormatText,\r\n linesAddedToOrderTemplateHeaderMessageText: resources.linesAddedToOrderTemplateHeaderMessageText,\r\n linesAddedToOrderTemplateCustomPriceAlertMessageText: resources.linesAddedToOrderTemplateCustomPriceAlertMessageText\r\n };\r\n }\r\n\r\n private _generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(\r\n resources: IAaa_cartResources\r\n ): IDuplicateItemsWhenAddingToOrderTemplateDialogResources {\r\n return {\r\n duplicatedProductsHeader: resources.duplicatedProductsHeader,\r\n duplicatedProductsDescription: resources.duplicatedProductsDescription,\r\n updateQuantityButtonText: resources.updateQuantityButtonText,\r\n cancelDuplicateItemsButtonText: resources.cancelDuplicateItemsButtonText\r\n };\r\n }\r\n\r\n private _generateOrderTemplateNameDialogResources(resources: IAaa_cartResources): IOrderTemplateNameDialogResources {\r\n return {\r\n orderTemplateHeaderLabel: resources.createOrderTemplateHeader,\r\n orderTemplateTitleLabel: resources.orderTemplateTitle,\r\n orderTemplateNameAriaLabel: resources.orderTemplateNameAriaLabel,\r\n orderTemplateDescription: resources.createOrderTemplateDescription,\r\n\r\n defaultOrderTemplateName: resources.defaultOrderTemplateName,\r\n\r\n orderTemplateButtonLabel: resources.createOrderTemplateButtonText,\r\n orderTemplateCancelButtonLabel: resources.cancelNewOrderTemplateCreationButtonText\r\n };\r\n }\r\n\r\n private _getCartLines(): ICartlinesViewProps[] | null {\r\n const {\r\n data: {\r\n cart: { result: cart },\r\n wishlists: { result: wishlists },\r\n orderTemplates: { result: orderTemplates },\r\n customerInformation: { result: customerInformation }\r\n },\r\n context: {\r\n request: { channel: { PickupDeliveryModeCode } = { PickupDeliveryModeCode: undefined } }\r\n },\r\n config,\r\n telemetry,\r\n resources,\r\n modules\r\n } = this.props;\r\n\r\n const imageSettings = this._getImageSettings(config.imageSettings);\r\n\r\n const cartlinesErrors: LineDataValidationFailure[] = this.state.cartlinesErrors;\r\n let storeSelectorId: string = '';\r\n if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\r\n storeSelectorId = modules.storeSelector[0].id;\r\n }\r\n return ArrayExtensions.hasElements(cart?.cart.CartLines)\r\n ? CartLineItems({\r\n cartLinesExtraInfo: this.state.cartLinesExtraInfo,\r\n cartlines: cart!.cart.CartLines,\r\n storeSelectorModuleId: storeSelectorId,\r\n cartlinesErrors,\r\n products: this.state.products,\r\n productAvailabilites: this.props.data.productAvailabilites.result,\r\n productDeliveryOptions: this.props.data.deliveryOptions.result,\r\n imageSettings,\r\n isStockCheckEnabled: this.props.context.app.config.enableStockCheck || false,\r\n maxCartlineQuantity: this.props.context.app.config.maxQuantityForCartLineItem,\r\n shouldIgnoreWarehouse: this.props.context.app.config.warehouseAggregation === 'multiple',\r\n gridSettings: this.props.context.request.gridSettings!,\r\n context: this.props.context,\r\n typeName: this.props.typeName,\r\n id: this.props.id,\r\n resources: {\r\n sizeString: resources.productDimensionTypeSize,\r\n colorString: resources.productDimensionTypeColor,\r\n configString: resources.productDimensionTypeConfiguration,\r\n styleString: resources.productDimensionTypeStyle,\r\n amountString: resources.productDimensionTypeAmount,\r\n quantityDisplayString: resources.quantityDisplayText,\r\n inputQuantityAriaLabel: resources.inputQuantityAriaLabel,\r\n decrementButtonAriaLabel: resources.decrementButtonAriaLabel,\r\n incrementButtonAriaLabel: resources.incrementButtonAriaLabel,\r\n discountStringText: resources.discountStringText,\r\n originalPriceText: resources.originalPriceText,\r\n currentPriceText: resources.currentPriceText,\r\n shippingChargesText: resources.shippingCharges,\r\n priceEditorResources: {\r\n ...resources\r\n }\r\n },\r\n telemetry,\r\n addToWishlistButtonText: resources.addToWishlistButtonText,\r\n removeFromWishlistButtonText: resources.removeFromWishlistButtonText,\r\n removeButtonText: resources.removeCartButtonText,\r\n shipItText: resources.shipInsteadDisplayText,\r\n pickitUpText: resources.pickItUpDisplayText,\r\n changeStoreText: resources.changeStoreDisplayText,\r\n storeSelectorStateManager: this.props.data.storeSelectorStateManager.result,\r\n outOfStockText: resources.outOfStockErrorMessage,\r\n outOfRangeOneText: resources.errorMessageOutOfRangeOneLeft,\r\n outOfRangeFormatText: resources.errorMessageOutOfRangeFormat,\r\n cartState: this.props.data.cart.result,\r\n orgUnitLocations: this.props.data.orgUnitLocations.result,\r\n removeItemClickHandler: this._removeItemFromCartHandler,\r\n moveToWishlistSuccessHandler: this._moveToWishlistSuccessHandler,\r\n updateCartLinesQuantitySuccessHandler: this._updateCartlineQuantity,\r\n commentInputHandler: this._updateCommentInput,\r\n customerInputHandler: this._updateCustomerInput,\r\n requestDateInputHandler: this._updateRequestDateInput,\r\n locationChangedHandler: this._fulfillmentStoreIdUpdated,\r\n wishlists,\r\n defaultWishlistName: resources.defaultWishlistName,\r\n pickupDeliveryModeCode: PickupDeliveryModeCode,\r\n includeErrors: config.showOutOfStockErrors,\r\n showShippingChargesForLineItems: config.showShippingChargesForLineItems,\r\n telemetryContent: this.telemetryContent,\r\n isQuantityLimitsFeatureEnabled: this.isQuantityLimitsFeatureEnabled,\r\n\r\n addToOrderTemplateDialogResources: this._generateAddToOrderTemplateDialogResources(resources),\r\n createOrderTemplateDialogResources: this._generateOrderTemplateNameDialogResources(resources),\r\n itemAddedToOrderTemplateDialogResources: this._generateItemAddedToOrderTemplateDialogResources(resources),\r\n duplicateItemsWhenAddingToOrderTemplateDialogResources: this._generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(\r\n resources\r\n ),\r\n\r\n addToOrderTemplateButtonText: resources.addToOrderTemplateButtonText,\r\n addToOrderTemplateButtonTooltip: resources.addToOrderTemplateButtonTooltip,\r\n addToOrderTemplateMessage: resources.addToOrderTemplateMessage,\r\n addItemToOrderTemplateError: resources.addItemToOrderTemplateError,\r\n orderTemplates,\r\n customerInformation,\r\n productAvailability: this.props.data.productAvailabilites,\r\n config: this.props.config\r\n })\r\n : null;\r\n }\r\n\r\n private _getCheckoutURL(isAuthenticated: boolean, guestCheckoutUrl: string, signInUrl: string): string {\r\n if (isAuthenticated) {\r\n return guestCheckoutUrl;\r\n }\r\n\r\n const absoluteUrlRegExp = new RegExp('^(?:[a-z]+:)?//', 'i');\r\n const isAbsoluteUrl = absoluteUrlRegExp.test(guestCheckoutUrl);\r\n let returnURL = guestCheckoutUrl;\r\n if (MsDyn365.isBrowser && !isAbsoluteUrl) {\r\n returnURL = `${window.location.origin}${guestCheckoutUrl}`;\r\n }\r\n\r\n return `${signInUrl}${!signInUrl.includes('?') ? '?' : '&'}ru=${returnURL}`;\r\n }\r\n\r\n private readonly _getImageSettings = (imageSettings: IImageSettings | undefined): IImageSettings => {\r\n return (\r\n imageSettings || {\r\n viewports: {\r\n xs: { q: 'w=80&h=94&m=6', w: 0, h: 0 },\r\n sm: { q: 'w=148&h=174&m=6', w: 0, h: 0 },\r\n lg: { q: 'w=148&h=174&m=6', w: 0, h: 0 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n }\r\n );\r\n };\r\n\r\n private readonly _removeItemFromCartHandler = (cartlineToRemove: CartLine) => {\r\n if (this.props.data.cart.result) {\r\n const input = {\r\n cartLineIds: [cartlineToRemove.LineId!.toString()]\r\n };\r\n Promise.all([\r\n this.props.data.checkout.result?.checkoutCart.removeCartLines(input),\r\n this.props.data.cart.result.removeCartLines(input)\r\n ])\r\n .then(() => {\r\n this._validateCart().catch(error => {\r\n this.props.telemetry.warning(error);\r\n this.props.telemetry.debug('Unable to validate Cart');\r\n });\r\n })\r\n .catch(error => {\r\n this.props.telemetry.warning(error);\r\n this.props.telemetry.debug('Unable to Remove Cart Line');\r\n });\r\n }\r\n };\r\n\r\n private readonly _moveToWishlistSuccessHandler = (result: IWishlistActionSuccessResult, cartline?: CartLine) => {\r\n if (result.status === 'ADDED' && cartline) {\r\n this._removeItemFromCartHandler(cartline);\r\n }\r\n };\r\n\r\n private readonly _updateCartlineQuantity = (cartlineToUpdate: CartLine, quantity: number, lineIndex?: number): boolean => {\r\n cartLineQuantityUpdatedAsync(\r\n this.isQuantityLimitsFeatureEnabled,\r\n this.props.data.cart.result,\r\n this.props.telemetry,\r\n this.state.products,\r\n cartlineToUpdate,\r\n quantity\r\n )\r\n .then((cartActionResult: ICartActionResult | undefined): boolean => {\r\n if (cartActionResult?.status === 'SUCCESS') {\r\n this._validateCart().catch(error => {\r\n this.props.telemetry.warning((error as Error).message);\r\n this.props.telemetry.debug('Unable to validate Cart');\r\n });\r\n\r\n return true;\r\n }\r\n\r\n if (!ObjectExtensions.isNullOrUndefined(cartActionResult)) {\r\n // Show update line error message.\r\n const lineUpdateFailure: LineDataValidationFailure = {\r\n LineIndex: ObjectExtensions.isNullOrUndefined(lineIndex) ? 0 : lineIndex,\r\n DataValidationFailure: {\r\n ErrorContext: ArrayExtensions.hasElements(cartActionResult.validationResults)\r\n ? cartActionResult.validationResults[0].ErrorContext\r\n : '',\r\n LocalizedMessage: cartActionResult.errorDetails?.LocalizedMessage\r\n }\r\n };\r\n\r\n this.setState((previousState: Readonly) => {\r\n const currentErrors: LineDataValidationFailure[] = previousState.cartlinesErrors.filter(\r\n error => error.LineIndex !== lineIndex\r\n );\r\n currentErrors.push(lineUpdateFailure);\r\n return { cartlinesErrors: currentErrors };\r\n });\r\n }\r\n\r\n return false;\r\n })\r\n .catch(() => {\r\n return false;\r\n });\r\n\r\n return false;\r\n };\r\n\r\n private readonly _updateCommentInput = (cartlineToUpdate: any, comment: string, lineIndex: number): void => {\r\n const cartLines: any = this.props.data.cart.result;\r\n const index = cartlineToUpdate.ExtensionProperties.findIndex((e: any) => {\r\n return e.Key === 'AAA_RetailItemNotes';\r\n });\r\n if (index > -1) {\r\n cartlineToUpdate.ExtensionProperties[index] = {\r\n Key: 'AAA_RetailItemNotes',\r\n Value: {\r\n StringValue: comment\r\n }\r\n };\r\n } else {\r\n cartlineToUpdate.ExtensionProperties.push({\r\n Key: 'AAA_RetailItemNotes',\r\n Value: {\r\n StringValue: comment\r\n }\r\n });\r\n }\r\n\r\n cartLines[lineIndex] = cartlineToUpdate;\r\n this.setState({});\r\n };\r\n private readonly _updateCustomerInput = (field: string, cartlineToUpdate: any, value: string, lineIndex: number): void => {\r\n const cartLines: any = this.props.data.cart.result;\r\n\r\n let key = '';\r\n let updatedValue = value;\r\n if (field === 'name') {\r\n key = 'AAA_B2CCUSTOMERNAME';\r\n }\r\n if (field === 'email') {\r\n key = 'AAA_B2CEMAIL';\r\n }\r\n if (field === 'phone') {\r\n key = 'AAA_B2CPHONE';\r\n const isnum = /^[0-9]+$/.test(value);\r\n if (!value || isnum) {\r\n updatedValue = value;\r\n } else {\r\n const index = cartlineToUpdate.ExtensionProperties.findIndex((e: any) => {\r\n return e.Key === key;\r\n });\r\n if (index > -1) {\r\n updatedValue = cartlineToUpdate.ExtensionProperties[index].Value.StringValue;\r\n } else {\r\n updatedValue = '';\r\n }\r\n }\r\n }\r\n const index = cartlineToUpdate.ExtensionProperties.findIndex((e: any) => {\r\n return e.Key === key;\r\n });\r\n if (index > -1) {\r\n cartlineToUpdate.ExtensionProperties[index] = {\r\n Key: key,\r\n Value: {\r\n StringValue: updatedValue\r\n }\r\n };\r\n } else {\r\n cartlineToUpdate.ExtensionProperties.push({\r\n Key: key,\r\n Value: {\r\n StringValue: updatedValue\r\n }\r\n });\r\n }\r\n cartLines[lineIndex] = cartlineToUpdate;\r\n this.setState({});\r\n };\r\n\r\n private readonly _updateRequestDateInput = (cartlineToUpdate: any, date: string, lineIndex: number): void => {\r\n const cartLines: any = this.props.data.cart.result;\r\n const index = cartlineToUpdate.ExtensionProperties.findIndex((e: any) => {\r\n return e.Key === 'AAA_REQUIREDDATE';\r\n });\r\n const currentDateString = moment(new Date()).format('DD-MM-YYYY');\r\n let days = 21;\r\n if (this.props.config.minRequiredDateDays === undefined) {\r\n days = 21;\r\n } else if (isNaN(this.props.config.minRequiredDateDays) || this.props.config.minRequiredDateDays < 0) {\r\n days = 0;\r\n } else {\r\n days = this.props.config.minRequiredDateDays;\r\n }\r\n const newDate = moment(currentDateString, 'DD-MM-YYYY').add('days', days);\r\n const minDateToMap = moment(newDate).format('YYYY-MM-DD');\r\n let dateValue = date && moment(date).format('YYYY-MM-DD');\r\n dateValue = date ? `${dateValue}T00:00:00Z` : `${minDateToMap}T00:00:00Z`;\r\n if (index > -1) {\r\n cartlineToUpdate.ExtensionProperties[index] = {\r\n Key: 'AAA_REQUIREDDATE',\r\n Value: {\r\n StringValue: dateValue\r\n }\r\n };\r\n } else {\r\n cartlineToUpdate.ExtensionProperties.push({\r\n Key: 'AAA_REQUIREDDATE',\r\n Value: {\r\n StringValue: dateValue\r\n }\r\n });\r\n }\r\n\r\n cartLines[lineIndex] = cartlineToUpdate;\r\n this.setState({});\r\n };\r\n\r\n private readonly _fulfillmentStoreIdUpdated = () => {\r\n if (this.isQuantityLimitsFeatureEnabled) {\r\n getActiveCartProductsAction(new ActiveCartProductsInput(), this.props.context.actionContext)\r\n .then(products => {\r\n this.setState({ products });\r\n })\r\n .then(async () => this._validateCart())\r\n .catch((error: Error) => {\r\n this.props.telemetry.warning(error.message);\r\n this.props.telemetry.debug('Unable to validate Cart');\r\n });\r\n }\r\n };\r\n\r\n private async _validateCart(): Promise {\r\n const {\r\n data: { cart },\r\n telemetry,\r\n context\r\n } = this.props;\r\n\r\n const validationResults: LineDataValidationFailure[] | undefined = await validateCartAsync(\r\n this.isQuantityLimitsFeatureEnabled,\r\n cart,\r\n telemetry,\r\n context,\r\n true\r\n );\r\n\r\n if (validationResults) {\r\n const isValid = !ArrayExtensions.hasElements(validationResults);\r\n this.setState({\r\n cartlinesErrors: validationResults,\r\n isCartValid: isValid\r\n });\r\n } else {\r\n this.setState({ isCartValid: true });\r\n }\r\n\r\n return AsyncResult.resolve();\r\n }\r\n\r\n private async _getOrderQuantityLimitsFeatureFlag(): Promise {\r\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\r\n return false;\r\n }\r\n\r\n try {\r\n const featureStatuses = await this.props.data.featureState;\r\n const isQuantityLimitsFeatureEnabledInHq =\r\n featureStatuses.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\r\n )?.IsEnabled || false;\r\n if (!isQuantityLimitsFeatureEnabledInHq) {\r\n return false;\r\n }\r\n } catch (error) {\r\n this.props.telemetry.warning(error);\r\n this.props.telemetry.debug('Unable to get feature states');\r\n return false;\r\n }\r\n\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\r\n return true;\r\n }\r\n try {\r\n const customerInfo = await this.props.data.customerInformation;\r\n return (\r\n !!customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b))\r\n );\r\n } catch (error) {\r\n this.props.telemetry.warning(error);\r\n this.props.telemetry.debug('Unable to get customer info');\r\n return false;\r\n }\r\n }\r\n\r\n private _getCartLinesGroup(): ICartlinesViewProps[][] | null {\r\n const {\r\n data: {\r\n cart: { result: cart },\r\n wishlists: { result: wishlists },\r\n orderTemplates: { result: orderTemplates },\r\n customerInformation: { result: customerInformation }\r\n },\r\n context: {\r\n request: { channel: { PickupDeliveryModeCode } = { PickupDeliveryModeCode: undefined } }\r\n },\r\n config,\r\n telemetry,\r\n resources,\r\n modules\r\n } = this.props;\r\n\r\n const imageSettings = this._getImageSettings(config.imageSettings);\r\n const cartlinesErrors: LineDataValidationFailure[] = this.state.cartlinesErrors;\r\n let storeSelectorId: string = '';\r\n if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\r\n storeSelectorId = modules.storeSelector[0].id;\r\n }\r\n\r\n return this.props.data.products &&\r\n this.props.data.products.result &&\r\n cart &&\r\n cart.cart.CartLines &&\r\n cart.cart.CartLines.length > 0 &&\r\n this.props.data.channelDeliveryOptionConfig?.result\r\n ? CartLineGroupItems({\r\n cartLinesExtraInfo: this.state.cartLinesExtraInfo,\r\n cartlines: cart.cart.CartLines,\r\n storeSelectorModuleId: storeSelectorId,\r\n cartlinesErrors,\r\n products: this.props.data.products.result,\r\n productAvailabilites: this.props.data.productAvailabilites.result,\r\n productDeliveryOptions: this.props.data.deliveryOptions.result,\r\n imageSettings,\r\n isStockCheckEnabled: this.props.context.app.config.enableStockCheck || false,\r\n maxCartlineQuantity: this.props.context.app.config.maxQuantityForCartLineItem,\r\n gridSettings: this.props.context.request.gridSettings!,\r\n context: this.props.context,\r\n typeName: this.props.typeName,\r\n id: this.props.id,\r\n resources: {\r\n sizeString: resources.productDimensionTypeSize,\r\n colorString: resources.productDimensionTypeColor,\r\n configString: resources.productDimensionTypeConfiguration,\r\n styleString: resources.productDimensionTypeStyle,\r\n amountString: resources.productDimensionTypeAmount,\r\n quantityDisplayString: resources.quantityDisplayText,\r\n inputQuantityAriaLabel: resources.inputQuantityAriaLabel,\r\n decrementButtonAriaLabel: resources.decrementButtonAriaLabel,\r\n incrementButtonAriaLabel: resources.incrementButtonAriaLabel,\r\n discountStringText: resources.discountStringText,\r\n originalPriceText: resources.originalPriceText,\r\n currentPriceText: resources.currentPriceText,\r\n shippingChargesText: resources.shippingCharges,\r\n priceEditorResources: {\r\n ...resources\r\n }\r\n },\r\n telemetry,\r\n addToWishlistButtonText: resources.addToWishlistButtonText,\r\n removeFromWishlistButtonText: resources.removeFromWishlistButtonText,\r\n removeButtonText: resources.removeCartButtonText,\r\n shipItText: resources.shipInsteadDisplayText,\r\n pickitUpText: resources.pickItUpDisplayText,\r\n changeStoreText: resources.changeStoreDisplayText,\r\n storeSelectorStateManager: this.props.data.storeSelectorStateManager.result,\r\n outOfStockText: resources.outOfStockErrorMessage,\r\n outOfRangeOneText: resources.errorMessageOutOfRangeOneLeft,\r\n outOfRangeFormatText: resources.errorMessageOutOfRangeFormat,\r\n cartState: this.props.data.cart.result,\r\n orgUnitLocations: this.props.data.orgUnitLocations.result,\r\n removeItemClickHandler: this._removeItemFromCartHandler,\r\n moveToWishlistSuccessHandler: this._moveToWishlistSuccessHandler,\r\n updateCartLinesQuantitySuccessHandler: this._updateCartlineQuantity,\r\n commentInputHandler: this._updateCommentInput,\r\n customerInputHandler: this._updateCustomerInput,\r\n requestDateInputHandler: this._updateRequestDateInput,\r\n locationChangedHandler: this._fulfillmentStoreIdUpdated,\r\n wishlists,\r\n defaultWishlistName: resources.defaultWishlistName,\r\n pickupDeliveryModeCode: PickupDeliveryModeCode,\r\n includeErrors: config.showOutOfStockErrors,\r\n showShippingChargesForLineItems: config.showShippingChargesForLineItems,\r\n telemetryContent: this.telemetryContent,\r\n isQuantityLimitsFeatureEnabled: this.isQuantityLimitsFeatureEnabled,\r\n\r\n addToOrderTemplateDialogResources: this._generateAddToOrderTemplateDialogResources(resources),\r\n createOrderTemplateDialogResources: this._generateOrderTemplateNameDialogResources(resources),\r\n itemAddedToOrderTemplateDialogResources: this._generateItemAddedToOrderTemplateDialogResources(resources),\r\n duplicateItemsWhenAddingToOrderTemplateDialogResources: this._generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(\r\n resources\r\n ),\r\n\r\n addToOrderTemplateButtonText: resources.addToOrderTemplateButtonText,\r\n addToOrderTemplateButtonTooltip: resources.addToOrderTemplateButtonTooltip,\r\n addToOrderTemplateMessage: resources.addToOrderTemplateMessage,\r\n addItemToOrderTemplateError: resources.addItemToOrderTemplateError,\r\n orderTemplates,\r\n customerInformation,\r\n channelDeliveryOptionConfig: this.props.data.channelDeliveryOptionConfig?.result,\r\n shouldIgnoreWarehouse: this.props.context.app.config.warehouseAggregation === 'multiple',\r\n productAvailability: this.props.data.productAvailabilites,\r\n config: config\r\n })\r\n : null;\r\n }\r\n\r\n // private loadBmaImages = async (snapShotId: any) => {\r\n // const bmaImageEndPoint = this.props.app.config.bmaImageEndPoint.replace('#snapshotId', snapShotId);\r\n // const response = await fetch(`${this.props.app.config.bmaBaseUrl}${bmaImageEndPoint}`);\r\n // const images = await response.json();\r\n // return images[0];\r\n // };\r\n}\r\n\r\nexport default Cart;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { CartPromotionLine } from '@msdyn365-commerce/retail-proxy';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { INodeProps, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nexport interface ICartLineItemPromotion {\r\n id: string;\r\n showPromotionPopup: boolean;\r\n promotions: CartPromotionLine[] | undefined;\r\n resources: ICartLineItemPromotionResourceString;\r\n onSeeAllClick(event: React.MouseEvent): void;\r\n onCloseButtonClick(): void;\r\n}\r\n\r\nexport interface ICartLineItemViewProps {\r\n promotionMessageWrapper: INodeProps;\r\n promotionMessage: React.ReactNode;\r\n promotionSeeAllLink: React.ReactElement;\r\n promotionDialog: React.ReactNode;\r\n}\r\n\r\nexport interface ICartLineItemPromotionResourceString {\r\n promotionLinkText: string;\r\n promotionStringHeading: string;\r\n promotionPopupHeading: string;\r\n promotionCloseButtonAriaLabel: string;\r\n}\r\n\r\nexport const cartPromotions = (props: ICartLineItemPromotion): ICartLineItemViewProps | undefined => {\r\n const {\r\n id,\r\n showPromotionPopup,\r\n promotions,\r\n resources: { promotionLinkText, promotionPopupHeading },\r\n onCloseButtonClick,\r\n onSeeAllClick\r\n } = props;\r\n\r\n if (!ArrayExtensions.hasElements(promotions)) {\r\n return;\r\n }\r\n\r\n const titleId = `${id}_title`;\r\n const className = 'msc-cart__promotion';\r\n return {\r\n promotionMessageWrapper: {\r\n className: 'msc-cart__promotion'\r\n },\r\n promotionMessage: (\r\n <>\r\n \r\n {props.resources.promotionStringHeading}\r\n \r\n ),\r\n promotionSeeAllLink: (\r\n \r\n {' '}\r\n {promotionLinkText}{' '}\r\n \r\n ),\r\n promotionDialog: (\r\n \r\n \r\n
\r\n {promotionPopupHeading}\r\n
\r\n
\r\n \r\n
    \r\n {promotions.map(_promotion => {\r\n return (\r\n
  • \r\n {_promotion.Promotion?.OfferName}{' '}\r\n
  • \r\n );\r\n })}\r\n
\r\n
\r\n \r\n
\r\n )\r\n };\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n// @ts-ignore\r\nimport { ICartLineItemViewProps, ICartlinesViewProps, ICartResources, IOrderSummaryErrors } from '@msdyn365-commerce-modules/cart';\r\nimport { IInvoiceSummaryLines } from '@msdyn365-commerce-modules/invoice-payment-summary';\r\nimport { IOrderSummaryLines } from '@msdyn365-commerce-modules/order-summary-utilities';\r\n// @ts-ignore\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n // Button,\r\n // getPayloadObject,\r\n // getTelemetryAttributes,\r\n INodeProps,\r\n ITelemetryContent,\r\n Node\r\n // TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IAaa_cartProps, IAaa_cartProps as ICartExtensionProps, IAaa_cartResources } from './aaa_cart.props.autogenerated';\r\nimport { ICartViewProps } from './aaa_cart';\r\n/**\r\n * Toggle Bopis Function.\r\n * @param cartLine -CartLine.\r\n * @param isBopisSelected -Boolean.\r\n * @returns Toggle Bopis.\r\n */\r\n// const toggleBopisHandler = (cartLine: ICartlinesViewProps, isBopisSelected: boolean) => () => {\r\n// cartLine.pickUpInStore?.callbacks.toggleBopis(!isBopisSelected);\r\n// };\r\n\r\n/**\r\n * Change Store Function.\r\n * @param cartLine -CartLine.\r\n * @returns Toggle Bopis.\r\n */\r\n// const onChangeStoreHandler = (cartLine: ICartlinesViewProps) => () => {\r\n// cartLine.pickUpInStore?.callbacks.toggleBopis(true);\r\n// };\r\n\r\n/**\r\n * Render Bopis block.\r\n * @param cartLine - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param storeSelector - Store selector element.\r\n * @param telemetryContent - The telemetry object.\r\n * @param emailDeliveryModeCode - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\n// const renderBopisBlock = (\r\n// cartLine: ICartlinesViewProps,\r\n// resources: ICartResources,\r\n// storeSelector: React.ReactNode | undefined,\r\n// telemetryContent?: ITelemetryContent,\r\n// emailDeliveryModeCode?: string\r\n// ): JSX.Element | null => {\r\n// // If it is electronic item cart line, then return null for BOPISBlock.\r\n// if (!cartLine.pickUpInStore || !storeSelector || cartLine.data?.cartline.DeliveryMode === emailDeliveryModeCode) {\r\n// return null;\r\n// }\r\n//\r\n// const {\r\n// shipInsteadDisplayText,\r\n// shipToAddressDisplayText,\r\n// pickItUpDisplayText,\r\n// pickUpAtStoreWithLocationText,\r\n// changeStoreDisplayText\r\n// } = resources;\r\n//\r\n// const isBopisSelected = cartLine.pickUpInStore.isBopisSelected;\r\n//\r\n// const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\r\n// const puckUpinStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n//\r\n// return (\r\n// \r\n//
\r\n// {isBopisSelected ? (\r\n// {pickUpAtStoreWithLocationText}\r\n// ) : (\r\n// {shipToAddressDisplayText}\r\n// )}\r\n//
\r\n// {isBopisSelected && (\r\n//
\r\n// {cartLine.pickUpInStore.orgUnitName}\r\n// \r\n//
\r\n// )}\r\n// \r\n// {isBopisSelected ? shipInsteadDisplayText : pickItUpDisplayText}\r\n// \r\n//
\r\n// );\r\n// };\r\n\r\n/**\r\n * Render Bopis block.\r\n * @param cartLine - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param storeSelector - Store selector element.\r\n * @param telemetryContent - The telemetry object.\r\n * @param emailDeliveryModeCode - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\n// const renderGroupBopisBlock = (\r\n// cartLine: ICartlinesViewProps,\r\n// resources: ICartResources,\r\n// storeSelector: React.ReactNode | undefined,\r\n// telemetryContent?: ITelemetryContent,\r\n// emailDeliveryModeCode?: string\r\n// ): JSX.Element | null => {\r\n// // If it is electronic item cart line, then return null for GroupBOPISBlock.\r\n// if (!cartLine.pickUpInStore || !storeSelector || cartLine.data?.cartline.DeliveryMode === emailDeliveryModeCode) {\r\n// return null;\r\n// }\r\n//\r\n// const { changeStoreDisplayText, shipInsteadDisplayText, pickItUpDisplayText } = resources;\r\n//\r\n// const isBopisSelected = cartLine.pickUpInStore.isBopisSelected;\r\n//\r\n// const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\r\n// const puckUpinStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n//\r\n// return (\r\n// <>\r\n// {isBopisSelected ? (\r\n// \r\n// ) : null}\r\n// \r\n// {isBopisSelected ? shipInsteadDisplayText : pickItUpDisplayText}\r\n// \r\n// \r\n// );\r\n// };\r\n\r\n/**\r\n * Render Cart Lines.\r\n * @param cartLine - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param storeSelector - Store selector element.\r\n * @param telemetryContent - The telemetry object.\r\n * @param isMultiplePickUp - FLag to check if there multiple pickups.\r\n * @param emailDeliveryModeCode - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\n// const renderCartLine = (\r\n// cartLine: ICartlinesViewProps,\r\n// resources: ICartResources,\r\n// storeSelector: React.ReactNode | undefined,\r\n// telemetryContent?: ITelemetryContent,\r\n// isMultiplePickUp?: boolean,\r\n// emailDeliveryModeCode?: string\r\n// ): JSX.Element => {\r\n// if (cartLine.error === resources.outOfStockErrorMessage) {\r\n// return (\r\n// \r\n// {cartLine.addToWishlist}\r\n// {cartLine.remove}\r\n// \r\n// );\r\n// }\r\n//\r\n// if (isMultiplePickUp) {\r\n// return (\r\n// \r\n// {renderGroupBopisBlock(cartLine, resources, storeSelector, telemetryContent, emailDeliveryModeCode)}\r\n// {cartLine.addToOrderTemplate}\r\n// {cartLine.addToWishlist}\r\n// {cartLine.remove}\r\n// \r\n// );\r\n// }\r\n//\r\n// if (cartLine.addToOrderTemplate) {\r\n// return (\r\n// \r\n// {cartLine.addToOrderTemplate}\r\n// {cartLine.addToWishlist}\r\n// {cartLine.remove}\r\n// \r\n// );\r\n// }\r\n//\r\n// return (\r\n// \r\n// {cartLine.addToWishlist}\r\n// {cartLine.remove}\r\n// \r\n// );\r\n// };\r\n\r\n/**\r\n * Render Cart Lines.\r\n * @param cartLines - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param storeSelector - Store selector element.\r\n * @param telemetryContent? - The telemetry object.\r\n * @param isMultiplePickUp? - Flag to check if there multiple pickups.\r\n * @param emailDeliveryModeCode? - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartlinesInternal = (\r\n cartLines: ICartlinesViewProps[],\r\n resources: IAaa_cartResources,\r\n storeSelector: React.ReactNode | undefined,\r\n telemetryContent?: ITelemetryContent | undefined,\r\n isMultiplePickUp?: boolean | undefined,\r\n emailDeliveryModeCode?: string | undefined\r\n): JSX.Element[] | JSX.Element => {\r\n return cartLines.map((cartLine: any, index) => {\r\n const itemIndex = index;\r\n return (\r\n
\r\n {cartLine.cartLineItemSection}\r\n {/**/}\r\n {/* {isMultiplePickUp*/}\r\n {/* ? null*/}\r\n {/* : renderBopisBlock(cartLine, resources, storeSelector, telemetryContent, emailDeliveryModeCode)}*/}\r\n {/* {renderCartLine(cartLine, resources, storeSelector, telemetryContent, isMultiplePickUp, emailDeliveryModeCode)}*/}\r\n {/**/}\r\n
\r\n );\r\n });\r\n};\r\n\r\n/**\r\n * Render Cart Lines.\r\n * @param props - The cart line props.\r\n * @param cartLines - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param storeSelector - Store selector element.\r\n * @param waitingComponent - Waiting component element.\r\n * @param cartLoadingStatus - Cart loading status string.\r\n * @param isCartDataResult - Flag to check if there is cart data.\r\n * @param telemetryContent? - The telemetry object.\r\n * @param isMultiplePickUp? - Flag to check if there multiple pickups.\r\n * @param emailDeliveryModeCode? - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartlines = (\r\n props: ICartViewProps & IAaa_cartProps<{}>,\r\n cartLines: ICartlinesViewProps[] | undefined,\r\n resources: IAaa_cartResources,\r\n storeSelector: React.ReactNode | undefined,\r\n waitingComponent: React.ReactNode,\r\n cartLoadingStatus: string,\r\n isCartDataResult: boolean,\r\n telemetryContent?: ITelemetryContent | undefined,\r\n isMultiplePickUp?: boolean | undefined,\r\n emailDeliveryModeCode?: string | undefined\r\n): JSX.Element[] | JSX.Element => {\r\n if (cartLoadingStatus) {\r\n return <>{cartLoadingStatus};\r\n }\r\n\r\n // Props.CartlinesWrapper is only required on cart lines and when multiple pickup mode is disabled. This is also required to handle the empty cart styling.\r\n // Else, empty cart multiple pickup mode is disabled falls under the other cart line wrapper which is creating issue with Empty cart scenario.\r\n if (cartLines) {\r\n return props.multiplePickUpEnabled ? (\r\n renderCartlinesInternal(cartLines, resources, storeSelector, telemetryContent, isMultiplePickUp, emailDeliveryModeCode)\r\n ) : (\r\n \r\n {renderCartlinesInternal(cartLines, resources, storeSelector, telemetryContent, isMultiplePickUp, emailDeliveryModeCode)}\r\n \r\n );\r\n }\r\n\r\n return isCartDataResult ? (\r\n
\r\n
{props.slots.emptyCart}
\r\n
\r\n ) : (\r\n <>{waitingComponent}\r\n );\r\n};\r\n\r\n/**\r\n * Render Cart Lines group title.\r\n * @param cartLine - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param count - Count of products.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartLinesGroupTitle = (cartLine: ICartlinesViewProps, resources: IAaa_cartResources, count: number) => {\r\n const isBopisSelected = cartLine.pickUpInStore?.isBopisSelected;\r\n const { itemLabel, itemsLabel } = resources;\r\n const itemCountOne: number = 1;\r\n const suffix = count > itemCountOne ? itemsLabel : itemLabel;\r\n const countTitle = `(${count} ${suffix})`;\r\n return (\r\n <>\r\n \r\n {isBopisSelected ? (\r\n

\r\n {cartLine.pickUpInStore?.deliveryOption}\r\n {', '}\r\n {cartLine.pickUpInStore?.orgUnitName}\r\n

\r\n ) : null}\r\n

{countTitle}

\r\n
\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Cart Lines group title.\r\n * @param cartLine - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param count - Count of products.\r\n * @param emailDeliveryModeCode? - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartLinesGroupHeader = (\r\n cartLine: ICartlinesViewProps,\r\n resources: IAaa_cartResources,\r\n count: number,\r\n emailDeliveryModeCode?: string | undefined\r\n) => {\r\n const isBopisSelected = cartLine.pickUpInStore?.isBopisSelected;\r\n const { pickUpText, shippingText, emailshippingText } = resources;\r\n let groupTitle: string;\r\n\r\n groupTitle = isBopisSelected ? pickUpText : shippingText;\r\n groupTitle = cartLine.data && cartLine.data.cartline.DeliveryMode === emailDeliveryModeCode ? emailshippingText : groupTitle;\r\n\r\n return (\r\n <>\r\n
\r\n {/*

*/}\r\n {/*

{groupTitle}

*/}\r\n {renderCartLinesGroupTitle(cartLine, resources, count)}\r\n
\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Returns count of products.\r\n * @param cartLine - The cart line view props.\r\n * @returns Number of products.\r\n */\r\nconst countItems = (cartLine: ICartlinesViewProps[]): number => {\r\n let countItem = 0;\r\n const defaultItemCount = 0;\r\n countItem = cartLine.reduce((count, item) => {\r\n return count + (item.data?.cartline.Quantity ?? defaultItemCount);\r\n }, defaultItemCount);\r\n return countItem;\r\n};\r\n\r\n/**\r\n * Render Cart Lines group.\r\n * @param props - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartLinesGroup = (props: ICartViewProps & IAaa_cartProps<{}>, resources: IAaa_cartResources): JSX.Element | undefined => {\r\n if (props.cartLinesGroup && ArrayExtensions.hasElements(props.cartLinesGroup)) {\r\n return (\r\n
\r\n {props.cartLinesGroup.map((cartlines: any) => {\r\n return (\r\n
\r\n {renderCartLinesGroupHeader(\r\n cartlines[0],\r\n resources,\r\n countItems(cartlines),\r\n props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode\r\n )}\r\n {renderCartlines(\r\n props,\r\n cartlines,\r\n props.resources,\r\n props.storeSelector,\r\n props.waitingComponent,\r\n props.cartLoadingStatus,\r\n props.cartDataResult,\r\n props.telemetryContent,\r\n props.multiplePickUpEnabled,\r\n props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode\r\n )}\r\n
\r\n );\r\n })}\r\n
\r\n );\r\n }\r\n return props.cartDataResult ? (\r\n
\r\n
{props.slots.emptyCart}
\r\n
\r\n ) : (\r\n <>{props.waitingComponent}\r\n );\r\n};\r\n\r\n/**\r\n * Render error block.\r\n * @param errorData - Error component.\r\n * @returns JSX Element.\r\n */\r\nconst renderErrorBlock = (errorData: IOrderSummaryErrors | undefined): JSX.Element | null => {\r\n if (!errorData || !ArrayExtensions.hasElements(errorData.errors)) {\r\n return null;\r\n }\r\n return (\r\n \r\n {errorData.header}\r\n {errorData.errors}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render invoice summary.\r\n * @param invoiceSummaryLines - Invoice summary component.\r\n * @param orderSummaryItems - Order summary component.\r\n * @param props - The module props.\r\n * @returns JSX Element.\r\n */\r\nconst renderInvoiceSummarylines = (\r\n invoiceSummaryLines: IInvoiceSummaryLines | undefined,\r\n orderSummaryItems: INodeProps,\r\n props: ICartViewProps\r\n): JSX.Element | null => {\r\n if (!invoiceSummaryLines) {\r\n props.context.telemetry.error('InvoiceSummary content is empty, module wont render');\r\n return null;\r\n }\r\n return (\r\n \r\n {invoiceSummaryLines.invoices}\r\n {invoiceSummaryLines.giftCard}\r\n {invoiceSummaryLines.loyalty}\r\n {invoiceSummaryLines.orderTotal}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render order summary.\r\n * @param orderSummaryLines - Order summary component.\r\n * @param orderSummaryItems - Order summary items component.\r\n * @param props - The module props.\r\n * @returns JSX Element.\r\n */\r\nconst renderOrderSummarylines = (\r\n orderSummaryLines: IOrderSummaryLines | undefined,\r\n orderSummaryItems: INodeProps,\r\n props: ICartViewProps\r\n): JSX.Element | null => {\r\n if (!orderSummaryLines) {\r\n props.context.telemetry.error('OrderSummary content is empty, module wont render');\r\n return null;\r\n }\r\n return (\r\n \r\n {orderSummaryLines.subtotal}\r\n {orderSummaryLines.totalDiscounts ? orderSummaryLines.totalDiscounts : null}\r\n {/*{orderSummaryLines.shipping}*/}\r\n {orderSummaryLines.otherCharge}\r\n {orderSummaryLines.tax}\r\n {orderSummaryLines.orderTotal}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render error block.\r\n * @param promotions - The module view props.\r\n * @returns JSX Element.\r\n */\r\nconst renderPromotions = (promotions: ICartLineItemViewProps): JSX.Element | undefined => {\r\n return (\r\n <>\r\n \r\n {promotions.promotionMessage}\r\n {promotions.promotionSeeAllLink}\r\n {promotions.promotionDialog}\r\n \r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render order summary checkout.\r\n * @param props - The module view props.\r\n * @returns JSX Element.\r\n */\r\nconst renderOrderSummaryCheckout = (props: ICartViewProps): JSX.Element | undefined => {\r\n return (\r\n \r\n {props.cart?.hasInvoiceLine ? null : props.promoCode}\r\n \r\n {/*{props.checkoutAsSignInUserButton}*/}\r\n {props.placeOrder}\r\n {/*{props.checkoutAsGuestButton}*/}\r\n \r\n {props.createTemplateFromCartButton}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render order summary checkout button.\r\n * @param props - The module view props.\r\n * @returns JSX Element.\r\n */\r\nconst renderOrderSummaryCheckoutButton = (props: ICartViewProps): JSX.Element | undefined => {\r\n return (\r\n \r\n {props.checkoutAsSignInUserButton}\r\n {props.checkoutAsGuestButton}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render cart view.\r\n * @param props - The module view props.\r\n * @returns JSX Element.\r\n */\r\nconst CartView: React.FC> = (props: ICartViewProps & ICartExtensionProps<{}>) => {\r\n const totalItemCountOne: number = 1;\r\n const updatedTitle = (\r\n

\r\n {props.resources.cartTitle}\r\n \r\n {` (${Number(props.cart?.totalItemsInCart)} ${props.cart?.totalItemsInCart !== totalItemCountOne ? 'items' : 'item'})`}\r\n \r\n

\r\n );\r\n return (\r\n
\r\n {updatedTitle}\r\n {props.alert}\r\n
{props.orderSummaryLineitems?.orderTotal}
\r\n {renderOrderSummaryCheckoutButton(props)}\r\n {!props.cart?.hasInvoiceLine && props.promotionOptions && renderPromotions(props.promotionOptions)}\r\n {props.multiplePickUpEnabled\r\n ? renderCartLinesGroup(props, props.resources)\r\n : renderCartlines(\r\n props,\r\n props.cartlines,\r\n props.resources,\r\n props.storeSelector,\r\n props.waitingComponent,\r\n props.cartLoadingStatus,\r\n props.cartDataResult\r\n )}\r\n\r\n {props.orderSummaryHeading && (\r\n \r\n \r\n {props.orderSummaryHeading}\r\n {props.cart?.hasInvoiceLine\r\n ? renderInvoiceSummarylines(props.invoiceSummaryLineitems, props.OrderSummaryItems, props)\r\n : renderOrderSummarylines(props.orderSummaryLineitems, props.OrderSummaryItems, props)}\r\n {renderErrorBlock(props.OrderSummaryErrors)}\r\n \r\n {renderOrderSummaryCheckout(props)}\r\n \r\n )}\r\n {props.storeSelector}\r\n
\r\n );\r\n};\r\n\r\nexport default CartView;\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 * as React from 'react';\r\nconst Toaster = (props: any) => {\r\n return (\r\n <>\r\n \r\n {props.message}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default Toaster;\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 * as React from 'react';\r\n\r\nimport { IOrderRequestlinesTemplateData } from './order-requestlines-template.data';\r\nimport { IOrderRequestlinesTemplateProps } from './order-requestlines-template.props.autogenerated';\r\nimport { getRequestOrderAsync, updateRequestOrderAsync } from '../../dataActions/DataActionExtension.g';\r\nimport {\r\n FullProductInput,\r\n getFallbackImageUrl,\r\n getFullProducts,\r\n getProductDetailsCriteriaFromActionInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport { addCartLinesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\nimport { Button } from '@msdyn365-commerce-modules/utilities';\r\n\r\nimport { getCartState } from '@msdyn365-commerce/global-state';\r\nimport { reaction } from 'mobx';\r\n\r\nexport interface IOrderRequestlinesTemplateViewProps extends IOrderRequestlinesTemplateProps {\r\n requestOrderLines: [];\r\n currentPageItems: [];\r\n headers: [];\r\n removeOrderRequestLine: any;\r\n addItemToCart: any;\r\n toasterInfo: any;\r\n removePopUp: any;\r\n _renderPopUp?: any;\r\n _togglePopUp?: any;\r\n totalItemPerPage: number;\r\n activePage: number;\r\n pageCount: number;\r\n handlePageItemsChange: any;\r\n handleMouseEnterEvent: any;\r\n handleMouseOutEvent: any;\r\n mouseOverIndex: number;\r\n handleOnChangeInput: any;\r\n searchItems: any;\r\n resetItems: any;\r\n searchString: string;\r\n searchPageItems: [];\r\n isLoading: boolean;\r\n getOrderDetailPageUrl: any;\r\n}\r\nexport interface IOrderRequestlinesTemplateState {\r\n requestOrderLines: [];\r\n currentPageItems: [];\r\n headers: any;\r\n customerInfo: { AccountNumber: '' };\r\n products: [];\r\n toasterInfo: {};\r\n removePopUp: { visible: false };\r\n totalItemPerPage: number;\r\n activePage: number;\r\n pageCount: number;\r\n mouseOverIndex: number;\r\n searchString: string;\r\n searchPageItems: [];\r\n cart: any;\r\n isLoading: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * OrderRequestlinesTemplate component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass OrderRequestlinesTemplate extends React.Component<\r\n IOrderRequestlinesTemplateProps,\r\n IOrderRequestlinesTemplateState\r\n> {\r\n // private cart: any;\r\n private selectedLine: any;\r\n constructor(props: any) {\r\n super(props);\r\n this.state = {\r\n requestOrderLines: [],\r\n currentPageItems: [],\r\n headers: ['Customer', 'Phone', 'Email', 'Order Number', 'Created Date', 'Total Price', 'Snapshot ID', 'Actions'],\r\n customerInfo: { AccountNumber: '' },\r\n products: [],\r\n toasterInfo: { visible: false },\r\n removePopUp: { visible: false },\r\n totalItemPerPage: this.props.config.totalItemPerPage ? this.props.config.totalItemPerPage : 0,\r\n activePage: 1,\r\n pageCount: 0,\r\n mouseOverIndex: 0,\r\n searchString: '',\r\n searchPageItems: [],\r\n cart: undefined,\r\n isLoading: true\r\n };\r\n }\r\n public async componentDidMount(): Promise {\r\n reaction(\r\n () => this.props.data.cart.result?.cart,\r\n async () => {\r\n if (this.props.data.cart.result?.cart) {\r\n const cart: any = this.props.data.cart.result?.cart;\r\n console.log('cart', cart);\r\n const customerInfo = this.props.data.customerInformation.result;\r\n await this.getRequestOrderList(customerInfo, cart);\r\n this.setState({ cart: cart });\r\n }\r\n }\r\n );\r\n }\r\n\r\n public getRequestOrderList = async (customerInfo: any, cart: any) => {\r\n const response: any = await getRequestOrderAsync({ callerContext: this.props.context.actionContext, queryResultSettings: {} }, '');\r\n\r\n if (response.RequestOrder) {\r\n const productInputs: any = [];\r\n response.RequestOrder.map((requestOrder: any) => {\r\n if (requestOrder.ProductId) {\r\n productInputs.push(\r\n new FullProductInput(\r\n requestOrder.ProductId,\r\n this.props.context.actionContext.requestContext.apiSettings,\r\n getProductDetailsCriteriaFromActionInput(this.props.context.actionContext)\r\n )\r\n );\r\n }\r\n });\r\n if (productInputs.length > 0) {\r\n return getFullProducts(productInputs, this.props.context.actionContext).then(async products => {\r\n if (products) {\r\n this.mappedRequestOrder(response.RequestOrder, products, customerInfo, cart);\r\n } else {\r\n this.setState({ requestOrderLines: [], customerInfo: customerInfo, products: [], isLoading: false });\r\n }\r\n });\r\n } else {\r\n this.setState({ requestOrderLines: [], customerInfo: customerInfo, products: [], isLoading: false });\r\n }\r\n }\r\n };\r\n private getOrderDetailPageUrl = (requestId: string, lineNum: number) => {\r\n const request = this.props.context.request;\r\n let orderDetailUrl = request.url.requestUrl.origin;\r\n if (request.sitePath) {\r\n orderDetailUrl = orderDetailUrl + request.sitePath;\r\n }\r\n if (requestId && request) {\r\n return `${orderDetailUrl}${this.props.config.redirectToOrderDetailUrl}?requestOrderId=${requestId}&lineNum=${lineNum}`;\r\n }\r\n return '';\r\n };\r\n public mappedRequestOrder(requestOrders: any, products: any, customerInfo: any, cart: any) {\r\n const mappedProducts: any = [];\r\n for (const requestOrder of requestOrders) {\r\n if (requestOrder.RequestOrderId) {\r\n const product: any = products.find((p: any) => {\r\n return requestOrder.ProductId === p.ProductDetails.RecordId;\r\n });\r\n if (product && requestOrder.ProductId) {\r\n // disable actions for existing cartline...\r\n let matchedCartProducts = [];\r\n if (cart) {\r\n matchedCartProducts = cart.CartLines.filter((cartLine: any) => {\r\n return requestOrder.ProductId === cartLine.ProductId;\r\n });\r\n requestOrder.orderExistInCart = matchedCartProducts.some((p: any) => {\r\n let requestOrderId = '';\r\n let lineId = null;\r\n let snapShotId = '';\r\n if (p.ExtensionProperties.length > 0) {\r\n p.ExtensionProperties.forEach((e: any) => {\r\n if (e.Key === 'AAA_REQUESTORDERID') {\r\n requestOrderId = e.Value.StringValue;\r\n }\r\n if (e.Key === 'AAA_REQUESTORDERLINENUM') {\r\n lineId = e.Value.DecimalValue;\r\n }\r\n if (e.Key === 'AAA_SNAPSHOTID') {\r\n snapShotId = e.Value.StringValue;\r\n }\r\n });\r\n }\r\n\r\n return (\r\n requestOrder.RequestOrderId === requestOrderId &&\r\n requestOrder.Snapshotid === snapShotId &&\r\n requestOrder.LineNum === lineId\r\n );\r\n });\r\n }\r\n if (matchedCartProducts.length === 0) {\r\n requestOrder.orderExistInCart = false;\r\n }\r\n\r\n if (requestOrder.Snapshotid) {\r\n const bmaImageWithFormatEndPoint = this.props.app.config.bmaImageWithFormatEndPoint.replace(\r\n '#snapshotId',\r\n requestOrder.Snapshotid\r\n );\r\n requestOrder.imageUrl = `${this.props.app.config.bmaBaseUrl}${bmaImageWithFormatEndPoint}`;\r\n } else {\r\n const fallbackImage = getFallbackImageUrl(\r\n product.ProductDetails.ItemId,\r\n this.props.context.actionContext.requestContext.apiSettings\r\n );\r\n requestOrder.imageUrl = product.ProductDetails.PrimaryImageUrl;\r\n requestOrder.fallbackImage = fallbackImage;\r\n }\r\n requestOrder.product = { ...product };\r\n const productPrice = { ...product.ProductPrice };\r\n productPrice.AdjustedPrice = requestOrder.B2CPrice;\r\n productPrice.BasePrice = requestOrder.B2CPrice;\r\n productPrice.CustomerContextualPrice = requestOrder.B2CPrice;\r\n productPrice.TradeAgreementPrice = requestOrder.B2CPrice;\r\n requestOrder.productPrice = productPrice;\r\n mappedProducts.push(requestOrder);\r\n }\r\n }\r\n }\r\n // if manage orders length > 0 set active 1 per page 5,\r\n // divided mangage orders / per page 50/5=10 pagaes\r\n // if active is 1 page pick 0 to active -1 and push into cureent page items\r\n const currentPageItems = this.currentPageItems(this.state.activePage, this.state.totalItemPerPage, mappedProducts);\r\n this.setState({\r\n requestOrderLines: mappedProducts,\r\n customerInfo: customerInfo,\r\n products: products,\r\n currentPageItems: currentPageItems,\r\n isLoading: false,\r\n pageCount:\r\n mappedProducts.length <= this.state.totalItemPerPage ? 1 : Math.ceil(mappedProducts.length / this.state.totalItemPerPage)\r\n });\r\n }\r\n private handleMouseEnterEvent = (index: number) => {\r\n this.setState({ mouseOverIndex: index });\r\n };\r\n private handleMouseOutEvent = () => {\r\n this.setState({ mouseOverIndex: 0 });\r\n };\r\n private handlePageItemsChange = (totalItemPerPage: any, activePage: number) => {\r\n let pageCount: number;\r\n let currentPageItems: any;\r\n if (this.state.searchPageItems.length > 0) {\r\n pageCount =\r\n this.state.searchPageItems.length <= totalItemPerPage ? 1 : Math.ceil(this.state.searchPageItems.length / totalItemPerPage);\r\n currentPageItems = this.currentPageItems(activePage, totalItemPerPage, this.state.searchPageItems);\r\n } else {\r\n pageCount =\r\n this.state.requestOrderLines.length <= totalItemPerPage\r\n ? 1\r\n : Math.ceil(this.state.requestOrderLines.length / totalItemPerPage);\r\n currentPageItems = this.currentPageItems(activePage, totalItemPerPage, this.state.requestOrderLines);\r\n }\r\n this.setState({ pageCount, totalItemPerPage, activePage, currentPageItems });\r\n };\r\n private currentPageItems = (activePage: number, totalItemPerPage: number, requestOrderLines: any) => {\r\n const getEndOrderIndexInPage = activePage * totalItemPerPage - 1;\r\n let getStartOrderIndexInPage = getEndOrderIndexInPage - totalItemPerPage + 1;\r\n const currentPageItems: any = [];\r\n if (getEndOrderIndexInPage && getEndOrderIndexInPage) {\r\n for (getStartOrderIndexInPage; getStartOrderIndexInPage <= getEndOrderIndexInPage; getStartOrderIndexInPage++) {\r\n if (requestOrderLines[getStartOrderIndexInPage]) {\r\n currentPageItems.push(requestOrderLines[getStartOrderIndexInPage]);\r\n }\r\n }\r\n }\r\n return currentPageItems;\r\n };\r\n public removeOrderRequestLine = async () => {\r\n if (!this.selectedLine.RequestOrderId) {\r\n return;\r\n }\r\n const customerInfo = this.props.data.customerInformation.result;\r\n if (customerInfo) {\r\n await updateRequestOrderAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n this.selectedLine.RequestOrderId,\r\n this.selectedLine.LineNum,\r\n 2\r\n ).then(response => {\r\n this.toggleSnackBar('success', 'Removed Item from Order Request Lines...');\r\n let requestOrderLines: any = this.state.requestOrderLines;\r\n requestOrderLines = requestOrderLines.filter((line: any) => {\r\n return !(line.RequestOrderId === this.selectedLine.RequestOrderId && line.LineNum === this.selectedLine.LineNum);\r\n });\r\n this.togglePopUp(false);\r\n let currentPageItems = this.state.currentPageItems;\r\n let activePage = this.state.activePage;\r\n let pageCount = this.state.pageCount;\r\n if (requestOrderLines.length === 0) {\r\n this.setState({ requestOrderLines, currentPageItems: [], activePage: 1, pageCount: 0 });\r\n } else {\r\n currentPageItems = this.currentPageItems(activePage, this.state.totalItemPerPage, requestOrderLines);\r\n pageCount =\r\n requestOrderLines.length <= this.state.totalItemPerPage\r\n ? 1\r\n : Math.ceil(requestOrderLines.length / this.state.totalItemPerPage);\r\n if (currentPageItems.length === 0) {\r\n if (pageCount > this.state.activePage) {\r\n activePage = activePage + 1;\r\n currentPageItems = this.currentPageItems(activePage, this.state.totalItemPerPage, requestOrderLines);\r\n this.setState({ requestOrderLines, currentPageItems, pageCount });\r\n } else {\r\n activePage = activePage - 1;\r\n currentPageItems = this.currentPageItems(activePage, this.state.totalItemPerPage, requestOrderLines);\r\n this.setState({ requestOrderLines, currentPageItems, pageCount, activePage });\r\n }\r\n } else {\r\n this.setState({ requestOrderLines, currentPageItems, pageCount });\r\n }\r\n }\r\n });\r\n }\r\n };\r\n\r\n private readonly _addItemToCart = (requestOrderLine: any) => {\r\n const { context } = this.props;\r\n // const { cart } = data;\r\n const product = requestOrderLine.product.ProductDetails;\r\n if (context) {\r\n if (this.state.cart) {\r\n // generate order reference...\r\n const weekday = ['S', 'M', 'T', 'W', 'T', 'F', 'S'];\r\n\r\n const d = new Date();\r\n const day = weekday[d.getDay()];\r\n const year = new Date()\r\n .getFullYear()\r\n .toString()\r\n .substr(-2);\r\n const oneDigitRandomNumber = Math.floor(1 + Math.random() * 9);\r\n const fourDigitRandomNumber = Math.floor(1000 + Math.random() * 9000);\r\n // eslint-disable-next-line radix\r\n let priceInFloat = parseInt(requestOrderLine.B2BPrice).toString();\r\n priceInFloat = priceInFloat.padStart(4, '0');\r\n const referenceNumber = `${day}${year}-${oneDigitRandomNumber}${priceInFloat}-${fourDigitRandomNumber}`;\r\n const addCartLines = {\r\n CatalogId: context.request.apiSettings.catalogId,\r\n Description: product.Description,\r\n EntryMethodTypeValue: 3,\r\n ItemId: product.ItemId,\r\n ProductId: product.RecordId,\r\n Quantity: requestOrderLine.Quantity,\r\n IsPriceKeyedIn: true,\r\n TrackingId: '',\r\n UnitOfMeasureSymbol: product.DefaultUnitOfMeasure,\r\n IsGiftCardLine: false,\r\n Price: requestOrderLine.B2CPrice,\r\n ExtensionProperties: [\r\n {\r\n Key: 'AAA_SNAPSHOTID',\r\n Value: {\r\n StringValue: requestOrderLine.Snapshotid\r\n }\r\n },\r\n {\r\n Key: 'AAA_REQUESTORDERID',\r\n Value: {\r\n StringValue: requestOrderLine.RequestOrderId\r\n }\r\n },\r\n {\r\n Key: 'AAA_REQUESTORDERLINENUM',\r\n Value: {\r\n DecimalValue: requestOrderLine.LineNum\r\n }\r\n },\r\n {\r\n Key: 'AAA_REFERENCENUMBER',\r\n Value: {\r\n StringValue: referenceNumber\r\n }\r\n }\r\n ]\r\n };\r\n if (!requestOrderLine.Snapshotid) {\r\n addCartLines.IsPriceKeyedIn = false;\r\n }\r\n addCartLinesAsync(\r\n { callerContext: context.actionContext, queryResultSettings: {} },\r\n this.state.cart.Id,\r\n [addCartLines],\r\n this.state.cart.Version\r\n )\r\n .then(async response => {\r\n this.toggleSnackBar('success', 'Item Added to Cart...');\r\n this.setState({ cart: response });\r\n const cartState = await getCartState(this.props.context.actionContext);\r\n await cartState.refreshCart({});\r\n this.mappedRequestOrder(this.state.requestOrderLines, this.state.products, this.state.customerInfo, response);\r\n })\r\n .catch(err => {\r\n this.toggleSnackBar('error', 'Add Cart failed');\r\n });\r\n }\r\n }\r\n };\r\n private _renderPopUp = () => {\r\n const orderConfirmPopHeader: string = this.props.config.cancelPopUpHeading ? this.props.config.cancelPopUpHeading : '';\r\n const orderConfirmPopContent: string = this.props.config.cancelPopUpContent ? this.props.config.cancelPopUpContent : ``;\r\n return (\r\n \r\n \r\n
\r\n

{orderConfirmPopHeader}

\r\n {\r\n this.togglePopUp(false);\r\n }}\r\n style={{\r\n position: 'absolute',\r\n top: '20px',\r\n right: '30px',\r\n transition: 'all 200ms',\r\n fontSize: '30px',\r\n fontWeight: 'bold',\r\n textDecoration: 'none',\r\n cursor: 'pointer',\r\n color: '#333'\r\n }}\r\n >\r\n ×\r\n \r\n
\r\n
{orderConfirmPopContent}
\r\n
\r\n this.removeOrderRequestLine()}\r\n >\r\n {'YES,REMOVE'}\r\n \r\n this.togglePopUp(false)}\r\n >\r\n {'NO'}\r\n \r\n
\r\n \r\n \r\n );\r\n };\r\n private togglePopUp = (visible: boolean, line?: any) => {\r\n const removePopUpVisible: any = visible;\r\n if (removePopUpVisible) {\r\n this.selectedLine = line;\r\n } else {\r\n this.selectedLine = '';\r\n }\r\n this.setState({ removePopUp: { visible: removePopUpVisible } });\r\n };\r\n public toggleSnackBar = (type: string, message: string) => {\r\n const toasterInfo = { visible: true, type: type, message: message };\r\n this.setState({ toasterInfo });\r\n // After 3 seconds, remove the show class from DIV\r\n setTimeout(() => {\r\n const toasterInfo = { visible: false, type: '', message: '' };\r\n this.setState({ toasterInfo });\r\n }, 3000);\r\n };\r\n private handleOnChangeInput = (searchString: string) => {\r\n this.setState({ searchString: searchString.toLowerCase() });\r\n };\r\n private searchItems = () => {\r\n if (this.state.searchString) {\r\n const searchPageItems: any = this.state.requestOrderLines.filter((f: any) => {\r\n return f.b2CCustomerName.toLowerCase().includes(this.state.searchString);\r\n });\r\n console.log(searchPageItems);\r\n const currentPageItems = this.currentPageItems(1, this.state.totalItemPerPage, searchPageItems);\r\n this.setState({\r\n activePage: 1,\r\n searchPageItems,\r\n currentPageItems: currentPageItems,\r\n pageCount:\r\n searchPageItems.length <= this.state.totalItemPerPage\r\n ? 1\r\n : Math.ceil(searchPageItems.length / this.state.totalItemPerPage)\r\n });\r\n }\r\n };\r\n private resetItems = () => {\r\n const currentPageItems = this.currentPageItems(1, this.state.totalItemPerPage, this.state.requestOrderLines);\r\n this.setState({\r\n searchPageItems: [],\r\n searchString: '',\r\n currentPageItems,\r\n activePage: this.state.activePage,\r\n pageCount:\r\n this.state.requestOrderLines.length <= this.state.totalItemPerPage\r\n ? 1\r\n : Math.ceil(this.state.requestOrderLines.length / this.state.totalItemPerPage)\r\n });\r\n };\r\n public render(): JSX.Element | null {\r\n if (!this.state.customerInfo) {\r\n return null;\r\n }\r\n\r\n const viewProps: IOrderRequestlinesTemplateViewProps = {\r\n ...(this.props as IOrderRequestlinesTemplateProps),\r\n requestOrderLines: this.state.requestOrderLines,\r\n toasterInfo: this.state.toasterInfo,\r\n removePopUp: this.state.removePopUp,\r\n addItemToCart: this._addItemToCart,\r\n headers: this.state.headers,\r\n removeOrderRequestLine: this.removeOrderRequestLine,\r\n _renderPopUp: this._renderPopUp,\r\n _togglePopUp: this.togglePopUp,\r\n activePage: this.state.activePage,\r\n totalItemPerPage: this.state.totalItemPerPage,\r\n currentPageItems: this.state.currentPageItems,\r\n pageCount: this.state.pageCount,\r\n handlePageItemsChange: this.handlePageItemsChange,\r\n handleMouseEnterEvent: this.handleMouseEnterEvent,\r\n handleMouseOutEvent: this.handleMouseOutEvent,\r\n mouseOverIndex: this.state.mouseOverIndex,\r\n handleOnChangeInput: this.handleOnChangeInput,\r\n searchItems: this.searchItems,\r\n resetItems: this.resetItems,\r\n searchString: this.state.searchString,\r\n searchPageItems: this.state.searchPageItems,\r\n isLoading: this.state.isLoading,\r\n getOrderDetailPageUrl: this.getOrderDetailPageUrl\r\n };\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n}\r\n\r\nexport default OrderRequestlinesTemplate;\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 * as React from 'react';\r\nimport { IOrderRequestlinesTemplateViewProps } from './order-requestlines-template';\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { Button } from '@msdyn365-commerce-modules/utilities';\r\nimport Toaster from './components/toaster';\r\nimport { getProductUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { IImageSettings, Image } from '@msdyn365-commerce/core';\r\nimport moment from 'moment';\r\n\r\nexport default (props: IOrderRequestlinesTemplateViewProps) => {\r\n const _renderPrice = (props: any, price: any): JSX.Element | null => {\r\n const { context } = props;\r\n if (price) {\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n };\r\n\r\n const getProductLink = (line: any) => {\r\n const productUrl = getProductUrlSync(line.product.ProductDetails, props.context.actionContext, undefined);\r\n return (\r\n productUrl +\r\n (productUrl.indexOf('?') === -1\r\n ? `?requestOrderId=${line.RequestOrderId}&lineId=${line.LineNum}`\r\n : `&requestOrderId=${line.RequestOrderId}&lineId=${line.LineNum}`)\r\n );\r\n };\r\n\r\n const style: any = {\r\n pagination: {\r\n marginRight: '70px',\r\n marginBottom: '20px'\r\n },\r\n a: {\r\n color: 'black',\r\n float: 'left',\r\n padding: '8px 16px',\r\n textDecoration: 'none',\r\n transition: 'background-color .3s',\r\n border: '1px solid #ddd',\r\n cursor: 'pointer'\r\n },\r\n active: {\r\n backgroundColor: '#031C36',\r\n color: 'white',\r\n border: '1px solid #031C36'\r\n },\r\n hover: {\r\n backgroundColor: '#ddd'\r\n },\r\n disabled: {\r\n backgroundColor: '#eeeeee',\r\n cursor: 'not-allowed'\r\n },\r\n searchInput: {\r\n height: '37px',\r\n width: '300px',\r\n marginRight: '10px'\r\n }\r\n };\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=100&h=100&m=6', w: 100, h: 100 },\r\n lg: { q: 'w=100&h=100&m=6', w: 100, h: 100 },\r\n xl: { q: 'w=100&h=100&m=6', w: 100, h: 100 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n };\r\n return (\r\n <>\r\n {props.requestOrderLines.length > 0 && !props.isLoading && (\r\n
\r\n props.handleOnChangeInput(event.target.value)}\r\n />\r\n props.searchItems()}\r\n >\r\n {'Search'}\r\n \r\n \r\n

\r\n {props.searchString\r\n ? `${props.searchPageItems.length} / ${props.requestOrderLines.length}`\r\n : props.requestOrderLines.length}{' '}\r\n Items Available\r\n

\r\n
\r\n )}\r\n {props.toasterInfo && props.toasterInfo.visible && (\r\n \r\n )}\r\n {props.removePopUp && props.removePopUp.visible && props._renderPopUp()}\r\n
\r\n \r\n {props.currentPageItems.length > 0 && (\r\n \r\n ;\r\n })}\r\n \r\n )}\r\n {props.currentPageItems.map((line: any, index: number) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n
\r\n {props.headers.map((h: string, index: number) => {\r\n return {h}
\r\n \r\n {line.b2CCustomerName}{line.B2CPhone ? line.B2CPhone : '-'}{line.B2CEmailId ? line.B2CEmailId : '-'}{line.RequestOrderId}{line.DateTime ? moment(line.DateTime).format('DD/MM/YYYY') : '-'}{_renderPrice(props, line.productPrice)}{line.Snapshotid ? line.Snapshotid : '-'}\r\n \r\n props.addItemToCart(line)}\r\n title={line.orderExistInCart ? 'Item is already in cart' : ''}\r\n />\r\n props._togglePopUp(true, line)}\r\n title={line.orderExistInCart ? 'Item is already in cart' : ''}\r\n />\r\n \r\n \r\n {line.Snapshotid && (\r\n <>\r\n \r\n \r\n \r\n \r\n {' '}\r\n \r\n {'Customise'}\r\n \r\n \r\n \r\n )}\r\n
\r\n
\r\n {props.currentPageItems.length > 0 && (\r\n
\r\n \r\n {' '}\r\n \r\n props.activePage !== 1 ? props.handlePageItemsChange(props.totalItemPerPage, props.activePage - 1) : {}\r\n }\r\n >\r\n «\r\n \r\n \r\n {props.pageCount &&\r\n [...Array(props.pageCount)].map((p: number, index: number) => {\r\n return (\r\n 0 && props.mouseOverIndex === index + 1 ? style.hover : null)\r\n }}\r\n key={index + 1}\r\n onMouseEnter={() => props.handleMouseEnterEvent(index + 1)}\r\n onMouseLeave={() => props.handleMouseOutEvent()}\r\n onClick={() => props.handlePageItemsChange(props.totalItemPerPage, index + 1)}\r\n >\r\n {index + 1}\r\n \r\n );\r\n })}\r\n \r\n {' '}\r\n \r\n props.activePage !== props.pageCount\r\n ? props.handlePageItemsChange(props.totalItemPerPage, props.activePage + 1)\r\n : {}\r\n }\r\n >\r\n »\r\n \r\n \r\n
\r\n )}\r\n {props.isLoading &&
Loading...
}\r\n {!props.isLoading && (props.requestOrderLines.length === 0 || props.currentPageItems.length === 0) && (\r\n
\r\n
\r\n

{'You currently do not have any manage orders to view.'}

\r\n
\r\n
\r\n )}\r\n \r\n );\r\n};\r\n","var map = {\n\t\"./af\": 673,\n\t\"./af.js\": 673,\n\t\"./ar\": 674,\n\t\"./ar-dz\": 675,\n\t\"./ar-dz.js\": 675,\n\t\"./ar-kw\": 676,\n\t\"./ar-kw.js\": 676,\n\t\"./ar-ly\": 677,\n\t\"./ar-ly.js\": 677,\n\t\"./ar-ma\": 678,\n\t\"./ar-ma.js\": 678,\n\t\"./ar-ps\": 679,\n\t\"./ar-ps.js\": 679,\n\t\"./ar-sa\": 680,\n\t\"./ar-sa.js\": 680,\n\t\"./ar-tn\": 681,\n\t\"./ar-tn.js\": 681,\n\t\"./ar.js\": 674,\n\t\"./az\": 682,\n\t\"./az.js\": 682,\n\t\"./be\": 683,\n\t\"./be.js\": 683,\n\t\"./bg\": 684,\n\t\"./bg.js\": 684,\n\t\"./bm\": 685,\n\t\"./bm.js\": 685,\n\t\"./bn\": 686,\n\t\"./bn-bd\": 687,\n\t\"./bn-bd.js\": 687,\n\t\"./bn.js\": 686,\n\t\"./bo\": 688,\n\t\"./bo.js\": 688,\n\t\"./br\": 689,\n\t\"./br.js\": 689,\n\t\"./bs\": 690,\n\t\"./bs.js\": 690,\n\t\"./ca\": 691,\n\t\"./ca.js\": 691,\n\t\"./cs\": 692,\n\t\"./cs.js\": 692,\n\t\"./cv\": 693,\n\t\"./cv.js\": 693,\n\t\"./cy\": 694,\n\t\"./cy.js\": 694,\n\t\"./da\": 695,\n\t\"./da.js\": 695,\n\t\"./de\": 696,\n\t\"./de-at\": 697,\n\t\"./de-at.js\": 697,\n\t\"./de-ch\": 698,\n\t\"./de-ch.js\": 698,\n\t\"./de.js\": 696,\n\t\"./dv\": 699,\n\t\"./dv.js\": 699,\n\t\"./el\": 700,\n\t\"./el.js\": 700,\n\t\"./en-au\": 701,\n\t\"./en-au.js\": 701,\n\t\"./en-ca\": 702,\n\t\"./en-ca.js\": 702,\n\t\"./en-gb\": 703,\n\t\"./en-gb.js\": 703,\n\t\"./en-ie\": 704,\n\t\"./en-ie.js\": 704,\n\t\"./en-il\": 705,\n\t\"./en-il.js\": 705,\n\t\"./en-in\": 706,\n\t\"./en-in.js\": 706,\n\t\"./en-nz\": 707,\n\t\"./en-nz.js\": 707,\n\t\"./en-sg\": 708,\n\t\"./en-sg.js\": 708,\n\t\"./eo\": 709,\n\t\"./eo.js\": 709,\n\t\"./es\": 710,\n\t\"./es-do\": 711,\n\t\"./es-do.js\": 711,\n\t\"./es-mx\": 712,\n\t\"./es-mx.js\": 712,\n\t\"./es-us\": 713,\n\t\"./es-us.js\": 713,\n\t\"./es.js\": 710,\n\t\"./et\": 714,\n\t\"./et.js\": 714,\n\t\"./eu\": 715,\n\t\"./eu.js\": 715,\n\t\"./fa\": 716,\n\t\"./fa.js\": 716,\n\t\"./fi\": 717,\n\t\"./fi.js\": 717,\n\t\"./fil\": 718,\n\t\"./fil.js\": 718,\n\t\"./fo\": 719,\n\t\"./fo.js\": 719,\n\t\"./fr\": 720,\n\t\"./fr-ca\": 721,\n\t\"./fr-ca.js\": 721,\n\t\"./fr-ch\": 722,\n\t\"./fr-ch.js\": 722,\n\t\"./fr.js\": 720,\n\t\"./fy\": 723,\n\t\"./fy.js\": 723,\n\t\"./ga\": 724,\n\t\"./ga.js\": 724,\n\t\"./gd\": 725,\n\t\"./gd.js\": 725,\n\t\"./gl\": 726,\n\t\"./gl.js\": 726,\n\t\"./gom-deva\": 727,\n\t\"./gom-deva.js\": 727,\n\t\"./gom-latn\": 728,\n\t\"./gom-latn.js\": 728,\n\t\"./gu\": 729,\n\t\"./gu.js\": 729,\n\t\"./he\": 730,\n\t\"./he.js\": 730,\n\t\"./hi\": 731,\n\t\"./hi.js\": 731,\n\t\"./hr\": 732,\n\t\"./hr.js\": 732,\n\t\"./hu\": 733,\n\t\"./hu.js\": 733,\n\t\"./hy-am\": 734,\n\t\"./hy-am.js\": 734,\n\t\"./id\": 735,\n\t\"./id.js\": 735,\n\t\"./is\": 736,\n\t\"./is.js\": 736,\n\t\"./it\": 737,\n\t\"./it-ch\": 738,\n\t\"./it-ch.js\": 738,\n\t\"./it.js\": 737,\n\t\"./ja\": 739,\n\t\"./ja.js\": 739,\n\t\"./jv\": 740,\n\t\"./jv.js\": 740,\n\t\"./ka\": 741,\n\t\"./ka.js\": 741,\n\t\"./kk\": 742,\n\t\"./kk.js\": 742,\n\t\"./km\": 743,\n\t\"./km.js\": 743,\n\t\"./kn\": 744,\n\t\"./kn.js\": 744,\n\t\"./ko\": 745,\n\t\"./ko.js\": 745,\n\t\"./ku\": 746,\n\t\"./ku-kmr\": 747,\n\t\"./ku-kmr.js\": 747,\n\t\"./ku.js\": 746,\n\t\"./ky\": 748,\n\t\"./ky.js\": 748,\n\t\"./lb\": 749,\n\t\"./lb.js\": 749,\n\t\"./lo\": 750,\n\t\"./lo.js\": 750,\n\t\"./lt\": 751,\n\t\"./lt.js\": 751,\n\t\"./lv\": 752,\n\t\"./lv.js\": 752,\n\t\"./me\": 753,\n\t\"./me.js\": 753,\n\t\"./mi\": 754,\n\t\"./mi.js\": 754,\n\t\"./mk\": 755,\n\t\"./mk.js\": 755,\n\t\"./ml\": 756,\n\t\"./ml.js\": 756,\n\t\"./mn\": 757,\n\t\"./mn.js\": 757,\n\t\"./mr\": 758,\n\t\"./mr.js\": 758,\n\t\"./ms\": 759,\n\t\"./ms-my\": 760,\n\t\"./ms-my.js\": 760,\n\t\"./ms.js\": 759,\n\t\"./mt\": 761,\n\t\"./mt.js\": 761,\n\t\"./my\": 762,\n\t\"./my.js\": 762,\n\t\"./nb\": 763,\n\t\"./nb.js\": 763,\n\t\"./ne\": 764,\n\t\"./ne.js\": 764,\n\t\"./nl\": 765,\n\t\"./nl-be\": 766,\n\t\"./nl-be.js\": 766,\n\t\"./nl.js\": 765,\n\t\"./nn\": 767,\n\t\"./nn.js\": 767,\n\t\"./oc-lnc\": 768,\n\t\"./oc-lnc.js\": 768,\n\t\"./pa-in\": 769,\n\t\"./pa-in.js\": 769,\n\t\"./pl\": 770,\n\t\"./pl.js\": 770,\n\t\"./pt\": 771,\n\t\"./pt-br\": 772,\n\t\"./pt-br.js\": 772,\n\t\"./pt.js\": 771,\n\t\"./ro\": 773,\n\t\"./ro.js\": 773,\n\t\"./ru\": 774,\n\t\"./ru.js\": 774,\n\t\"./sd\": 775,\n\t\"./sd.js\": 775,\n\t\"./se\": 776,\n\t\"./se.js\": 776,\n\t\"./si\": 777,\n\t\"./si.js\": 777,\n\t\"./sk\": 778,\n\t\"./sk.js\": 778,\n\t\"./sl\": 779,\n\t\"./sl.js\": 779,\n\t\"./sq\": 780,\n\t\"./sq.js\": 780,\n\t\"./sr\": 781,\n\t\"./sr-cyrl\": 782,\n\t\"./sr-cyrl.js\": 782,\n\t\"./sr.js\": 781,\n\t\"./ss\": 783,\n\t\"./ss.js\": 783,\n\t\"./sv\": 784,\n\t\"./sv.js\": 784,\n\t\"./sw\": 785,\n\t\"./sw.js\": 785,\n\t\"./ta\": 786,\n\t\"./ta.js\": 786,\n\t\"./te\": 787,\n\t\"./te.js\": 787,\n\t\"./tet\": 788,\n\t\"./tet.js\": 788,\n\t\"./tg\": 789,\n\t\"./tg.js\": 789,\n\t\"./th\": 790,\n\t\"./th.js\": 790,\n\t\"./tk\": 791,\n\t\"./tk.js\": 791,\n\t\"./tl-ph\": 792,\n\t\"./tl-ph.js\": 792,\n\t\"./tlh\": 793,\n\t\"./tlh.js\": 793,\n\t\"./tr\": 794,\n\t\"./tr.js\": 794,\n\t\"./tzl\": 795,\n\t\"./tzl.js\": 795,\n\t\"./tzm\": 796,\n\t\"./tzm-latn\": 797,\n\t\"./tzm-latn.js\": 797,\n\t\"./tzm.js\": 796,\n\t\"./ug-cn\": 798,\n\t\"./ug-cn.js\": 798,\n\t\"./uk\": 799,\n\t\"./uk.js\": 799,\n\t\"./ur\": 800,\n\t\"./ur.js\": 800,\n\t\"./uz\": 801,\n\t\"./uz-latn\": 802,\n\t\"./uz-latn.js\": 802,\n\t\"./uz.js\": 801,\n\t\"./vi\": 803,\n\t\"./vi.js\": 803,\n\t\"./x-pseudo\": 804,\n\t\"./x-pseudo.js\": 804,\n\t\"./yo\": 805,\n\t\"./yo.js\": 805,\n\t\"./zh-cn\": 806,\n\t\"./zh-cn.js\": 806,\n\t\"./zh-hk\": 807,\n\t\"./zh-hk.js\": 807,\n\t\"./zh-mo\": 808,\n\t\"./zh-mo.js\": 808,\n\t\"./zh-tw\": 809,\n\t\"./zh-tw.js\": 809\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 1140;"],"names":["Aaa_b2b_order_detail","React","constructor","props","super","getRequestOrder","async","requestOrderId","lineNum","cart","response","getRequestOrderAsync","callerContext","this","context","actionContext","queryResultSettings","RequestOrder","length","productInputs","map","requestOrder","ProductId","push","FullProductInput","requestContext","apiSettings","getProductDetailsCriteriaFromActionInput","getFullProducts","then","products","filter","order","RequestOrderId","LineNum","toString","product","find","p","ProductDetails","RecordId","matchedCartProducts","requestOrderDetail","imageUrl","HighResImageURL","productName","ProductName","stockistInfo","name","b2CCustomerName","phoneNumber","B2CPhone","email","B2CEmailId","statusName","StatusName","snapShotId","Snapshotid","orderNumber","orderDate","DateTime","moment","format","rings","totalPrice","B2CPrice","toLocaleString","b2cPrice","quantity","Quantity","requestOrderLines","JSON","parse","RequestOrderLines","ring","ringSizePi","parseFloat","RingSize","split","ringInfo","DetailName","alloy","Alloy1","engravingFont","EngravingText","EngravingFont","sizeLabel","RingSizeLabel","sizeValue","Math","round","Number","EPSILON","engravingCopy","specifications","DiamondCount","RingWidth","RingHeight","price","CartLines","cartLine","orderExistInCart","some","lineId","ExtensionProperties","forEach","e","Key","Value","StringValue","DecimalValue","matchedCartItem","matchedCartReferenceNumber","referenceNumber","day","Date","getDay","year","getFullYear","substr","oneDigitRandomNumber","floor","random","fourDigitRandomNumber","priceInFloat","parseInt","B2BPrice","padStart","setState","isLoading","_addItemToCart","requestOrderLine","state","addCartLines","CatalogId","request","catalogId","Description","EntryMethodTypeValue","ItemId","IsPriceKeyedIn","TrackingId","UnitOfMeasureSymbol","DefaultUnitOfMeasure","IsGiftCardLine","Price","addCartLinesAsync","Id","Version","toggleSnackBar","cartState","getCartState","refreshCart","moveToManageOrderPage","catch","err","orderDetailUrl","url","requestUrl","origin","sitePath","window","location","href","config","redirectToManageOrdersUrl","type","message","toasterInfo","visible","setTimeout","removeOrderRequestLine","updateRequestOrderAsync","togglePopUp","_renderPopUp","orderConfirmPopHeader","cancelPopUpHeading","orderConfirmPopContent","cancelPopUpContent","id","style","position","top","left","right","visibility","opacity","zIndex","marginLeft","marginRight","background","border","width","transition","boxShadow","borderBottom","padding","textAlign","onClick","fontSize","fontWeight","textDecoration","cursor","color","maxHeight","overflow","Button","className","title","marginBottom","removePopUpVisible","removePopUp","undefined","reaction","_this$props$data$cart","data","result","_this$props$data$cart2","_this$props$data$cart3","params","URLSearchParams","search","has","get","render","viewProps","_objectSpread","addItemToCart","_togglePopUp","renderView","Image","altText","src","fallBackSrc","fallbackImage","gridSettings","imageSettings","viewports","xs","q","w","h","lg","xl","lazyload","cropFocalRegion","loadFailureBehavior","disabled","line","productUrl","getProductUrlSync","indexOf","getProductLink","key","ringSize","toFixed","Toaster","Aaa_b2b_order_history_detail","salesId","getOrderHistoryAsync","IncludeTotalCount","SalesId","LineNumber","Results","ImageURL","B2CCustomerName","B2CEmail","LineStatusValue","BMASnapShotID","InvoiceId","InvoiceDate","OrderDate","RequestedReceivedDate","RingInsideDiameter","ItemNotes","ReferenceNumber","replace","Aaa_b2c_order_history_detail","getRequestOrderHistoryB2CAsync","b2BCUSTOMERNAME","B2BPhone","B2BEmailId","PickUpInStore","_toggleBOPIS","isBopisSelected","storeSelectorStateManager","cartline","storeSelectorModuleId","openDialog","alreadySelectedLocation","OrgUnitNumber","FulfillmentStoreId","deliveryOptions","onLocationSelected","orgUnitLocation","deliveryMode","updateCartLinePickupLocation","cartLineId","LineId","status","locationChangedHandler","error","Promise","resolve","_onLocationChangedCallback","DeliveryMode","ShippingAddress","clearCartLinePickupLocation","_getOrgUnitName","fulfillmentStoreId","orgUnitLocations","foundLocation","OrgUnitName","DeliveryOptions","pickupDeliveryModeCode","option","Code","callbacks","toggleBopis","defaultComponent","_renderShippingMethod","shipItText","pickupInStoretext","changeStoreText","orgUnitName","bopisSelected","toggleBOPIS","onChange","value","checked","shipitText","pickUpInStoreText","deliveryOption","_getDeliveryOption","pickupStore","_deliveryOptions$Deli","delivery","ContainerProps","CartLineItem","addProductLink","_renderPrice","PriceComponent","typeName","freePriceText","originalPriceText","currentPriceText","allProps","productInfo","removeItemClickHandler","Name","cartLineImageUrl","paddingTop","customerInfo","b2cCustomerName","b2cEmailId","b2cPhone","customerInputHandler","target","index","customerInfoInput","customerName","placeholder","customerEmail","customerPhone","margin","commentInputHandler","cartLineComment","cartLineRequestDate","itemInfo","ringId","ringName","ringFinenessColorPolishInfo","r","engraving","getMinCartLineRequestDate","minRequiredDateDays","currentDateString","days","isNaN","newDate","add","_assembleNode","foundProductAvailability","foundProductDeliveryOptions","cartLineImage","cartLineCustomerInfo","_product$Behavior","_foundProductAvailabi","_product$Dimensions","_props$cartState","resources","removeButtonText","moveToWishlistSuccessHandler","addToOrderTemplateButtonText","addToOrderTemplateButtonTooltip","addToOrderTemplateDialogResources","createOrderTemplateDialogResources","itemAddedToOrderTemplateDialogResources","duplicateItemsWhenAddingToOrderTemplateDialogResources","addToWishlistButtonText","removeFromWishlistButtonText","orderTemplates","customerInformation","wishlists","defaultWishlistName","isAuthenticated","user","nameOfWishlist","availableQuantityInStock","isStockCheckEnabled","productAvailability","ProductAvailableQuantity","IsProductAvailable","AvailableQuantity","_getCartItemAvailableQuantity","maxQuantity","_getCartItemMaxQuantity","maxQuantityByConfig","isQuantityLimitsFeatureEnabled","maxByQuantityLimitsFeature","maxByQuantityLimitsFeatureResult","maxCartlineQuantity","Behavior","MaximumQuantity","isServiceItem","ItemTypeValue","ReleasedProductType","Service","errorMessage","ObjectExtensions","isNullOrUndefined","_getErrorMessage","currentQuantity","lineIndex","_props$productAvailab","finalErrorMessages","productAvailabilites","ArrayExtensions","hasElements","shouldIgnoreWarehouse","InventLocationId","WarehouseId","includeErrors","outOfStockText","outOfRangeOneText","outOfRangeFormatText","cartlinesErrors","i","LineIndex","_i$DataValidationFail","DataValidationFailure","ErrorContext","join","onRemoveClickHandler","onRemoveClickFunction","payload","getPayloadObject","TelemetryEvent","RemoveFromCart","telemetryContent","attributes","getTelemetryAttributes","inventoryLbl","StockLevelLabel","inventoryCode","StockLevelCode","toLowerCase","isCustomPriceSelected","Dimensions","dimension","DimensionTypeValue","DimensionValue","productImageUrl","PrimaryImageUrl","properties","commentProperty","getCartLineComment","nameProperty","emailProperty","phoneProperty","getCustomerInfoInput","getCartLineRequestDate","toISOString","cartlineId","hasError","CartLineItemComponent","isOutOfStock","getInvoiceDetailsPageUrlSync","isQuantityEditable","quantityOnChange","updateCartLinesQuantitySuccessHandler","primaryImageUrl","inventoryInformationLabel","inventoryLabelClassName","isCartStateReady","showShippingChargesForLineItems","channelDeliveryOptionConfig","cartLineItemSection","pickUpInStore","isPickUpInStoreAllow","pickitUpText","remove","Object","assign","addToWishlist","isAddToWishlistAllow","AddToWishlistComponent","showButtonText","showStatusMessage","showRemoveButton","showButtonTooltip","ariaRole","onSuccess","addToOrderTemplate","isAddToOrderTemplateAllow","AddToOrderTemplateComponent","classnames","shouldShowButtonFailedTooltip","disableButton","app","disableTooltip","assembleCartlines","cartlines","reactNodes","foundProductDeliveryOption","getProductByProductIdAndWarehouse","getProductByProductId","_productAvailability$2","_productAvailability$","productDeliveryOptions","cartLineExtraInfo","cartLinesExtraInfo","item","ImageUrl","CustomerInfo","SnapShotId","ItemInfo","AdjustedPrice","priceAmount","BasePrice","CustomerContextualPrice","TradeAgreementPrice","CartLineGroupItems","_assembleGroupCartlines","telemetry","getGroupByStorePickup","items","groupBy","groupDelivery","cartLinesGroup","entries","_ref","deliveryType","groupByDeliveryType","keys","cartLines","carLineViewProps","getPromotionData","ctx","promotionData","getPromotionOptionsForCartLineItems","PromotionOptionsForCartLineItems","promotionOptions","exception","Cart","showPromotionDialog","isCartValid","_isMounted","promotionPopupId","retailMultiplePickUpOptionEnabled","updateCartLineEmailAddress","_this$props$context$r","_this$props$data$chec","emailDeliveryModeCode","channel","EmailDeliveryModeCode","emailDeliveryCartLines","checkout","checkoutCart","updatedCartVersion","lineDeliverySpecifications","DeliverySpecification","DeliveryModeId","DeliveryPreferenceTypeValue","DeliveryPreferenceType","ElectronicDelivery","ElectronicDeliveryEmailAddress","newGuestCheckoutEmail","updateLineDeliverySpecificationsAsync","updatedCart","Error","updateGuestProfile","updateGuestCheckoutEmail","copyCart","activeCart","copyAsync","Array","isArray","trace","updateEmail","_this$props$data$cust","_this$props$context$r2","checkoutState","getCheckoutState","customerAccountInformation","hasInvoiceLine","Msdyn365","Email","emailAddress","emailOnCart","ReceiptEmail","isExpressCheckoutApplied","StringExtensions","isNullOrEmpty","emailAddressFromExpressCheckout","updateHasGuestCheckoutEmail","newHasGuestCheckoutEmail","getAvailableCredit","creditBalances","availableCredit","InvoiceAccountCreditLimit","CreditLimit","Balance","PendingBalance","InvoiceAccountBalance","InvoiceAccountPendingBalance","addPayment","updateCustomerAccountAmount","newAmount","amount","information","updateDeliveryOption","loadDeliveryOptions","getCartLinesForShipping","_this$props$data$feat","PickupDeliveryModeCode","featureState","feature","IsEnabled","_this$channelDelivery","PickupDeliveryModeCodes","canShip","_this$props$data$chec2","updateCartDeliverySpecification","deliveryModeId","trim","updateCartDeliverySpecificationInput","shippingAddress","getDeliveryOptions","_this$props$data$chec3","cartId","selectedItemId","originalDeliveryMode","shippingCartLines","hasShippingDeliveryLines","clearCartLinesDeliveryInformation","channelDeliveryOptionConfiguration","deliveryOptionFilter","FilterDeliveryModeOption","FilterOutNonCarrierDeliveryMode","getDeliveryOptionsAsync","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","_unused","_this$props$data$chec4","updateHasCartDeliveryMode","newHasCartDeliveryMode","_this$props$data$chec5","_this$props$data$chec6","isPaymentVerificationRedirection","_getDefaultAddress","_this$props$data$addr","customerAddresses","address","IsPrimary","_setShippingAddress","newShippingAddress","updateShippingAddress","defaultAddress","shippingAddressFromExpressCheckout","updateHasShippingAddress","newHasShippingAddress","promotionLinkClick","event","promotionCloseButtonclick","_hidePromotionDialog","_getImageSettings","sm","_removeItemFromCartHandler","cartlineToRemove","_this$props$data$chec9","input","cartLineIds","all","removeCartLines","_validateCart","warning","debug","_moveToWishlistSuccessHandler","_updateCartlineQuantity","cartlineToUpdate","cartLineQuantityUpdatedAsync","cartActionResult","_cartActionResult$err","lineUpdateFailure","validationResults","LocalizedMessage","errorDetails","previousState","currentErrors","_updateCommentInput","comment","findIndex","_updateCustomerInput","field","updatedValue","isnum","test","_updateRequestDateInput","date","minDateToMap","dateValue","_fulfillmentStoreIdUpdated","getActiveCartProductsAction","ActiveCartProductsInput","getTelemetryObject","telemetryPageName","friendlyName","payLoad","bind","requestFormData","query","pv","_getOrderQuantityLimitsFeatureFlag","showAvailablePromotions","_this$props$data$cart4","requestOrders","getRequestOrderList","updatedCartLines","jwellerInfo","getBMAStockistAsync","translationInfo","axios","bmaBaseUrl","bmaTranslationMessageEndPoint","updateCartItem","snapShotProperty","bmaImageWithFormatEndPoint","bmaImageEndPoint","image","bmaReviewEndPoint","review","bmaPriceEndPoint","BMARetailStockist","ringsInfo","recId","getFallbackImageUrl","sum","vk","ringReview","height","profile","diamondCount","stone","preset","reduce","current","count","size","ringFineness","disc","fineness","label","ringColor","ringPolish","surface","polish","ringFinenessColorPolish","eSpot","text","inner","requestOrderIdProperty","requestOrderLineNumProperty","getPrototypeOf","prototype","componentWillUnmount","shouldComponentUpdate","nextProps","nextState","_navigateToCheckout","navigatedUrl","_this$props$data$cart5","updateCartLinesAsync","_this$props$data$cust2","amountDue","max","TotalAmount","getLoyaltyAmount","getGiftCardAmount","_this$props$data$cred","MandatoryCreditLimit","min","loyaltyAmount","giftCards","giftCardAmount","giftCard","updateCartLinesAndPlaceOrder","_this$props$data$cart6","_placeOrder","_this$props$data$cart7","_this$props$data$chec10","genericErrorMessage","invalidCartVersionErrorMessage","customerCreditLimitExceededErrorMessage","customerCreditLimitExhaustedErrorMessage","updateCheckoutCartLines","maxAmount","maxPaymentAmount","guestCheckoutEmail","placeOrder","_this$props$data$chec11","_error$data","shouldEnableSinglePaymentAuthorizationCheckout","AdditionalContext","_this$props$data$feat2","signInUrl","guestCheckoutUrl","getUrlSync","backToShoppingUrl","checkoutURL","_getCheckoutURL","isCartEmpty","_getCartLines","RetailMultiplePickupFeatureState","multiplePickUpEnabled","_getCartLinesGroup","contentAction","etext","TelemetryConstant","Checkout","checkoutBySignInAttributes","GuestCheckout","checkoutByGuestAttributes","BackToShopping","backtoShoppingAttributes","cartTitle","CartlinesWrapper","OrderSummaryWrapper","OrderSummaryItems","promoCode","_getPromoCode","_getPromotions","removePromoAriaLabelFormat","orderSummaryHeading","invoiceSummaryTitle","orderSummaryTitle","orderSummaryLineitems","_getOrderSummaryLineItems","invoiceSummaryLineitems","_getInvoiceSummaryLineItems","checkoutAsSignInUserButton","checkoutButtonTitle","placeOrderButtonTitle","checkoutAsGuestButton","guestCheckoutButtonTitle","backToShoppingButton","backToShoppingButtonTitle","createTemplateFromCartButton","isCreateTemplateFromCartButtonAllow","_displayAddCartToTemplate","SaveCartToOrderTemplateComponent","_generateAddToOrderTemplateDialogResources","_generateOrderTemplateNameDialogResources","linesAddedToOrderTemplateDialogResources","_generateLinesAddedToOrderTemplateDialogResources","createOrderTemplateFromCartButton","createOrderTemplateFromCartButtonTooltip","storeSelector","slots","waitingComponent","Waiting","cartLoadingStatus","cartLoadingErrorMessage","cartDataResult","isEmpty","OrderSummaryErrors","_getOrderSummaryErrors","alert","AlertComponent","_this$props$data$cart8","_this$props$data$feat3","_this$props$data$cust3","_cart$cart","RetailB2BEcommerceFeatureState","IsB2b","showPromotionPopup","promotions","promotionLinkText","promotionPopupHeading","onCloseButtonClick","onSeeAllClick","titleId","promotionMessageWrapper","promotionMessage","promotionStringHeading","promotionSeeAllLink","tabIndex","role","promotionDialog","Modal","isOpen","toggle","ModalHeader","ModalBody","_promotion","_promotion$Promotion","Promotion","OfferName","ModalFooter","cartPromotions","promotionCloseButtonAriaLabel","allErrors","_cartline$data","_cartline$data$produc","fullError","Wrapper","tag","Alert","assertive","outOfStockErrorMessageHeader","header","errors","InvoiceSummary","orderTotalLabel","totalAmountLabel","invoiceLabel","_this$props","_featureState$result","_this$props$context","channelConfiguration","isShowOrHideTaxEnabled","isEnableShowOrHideSalesTaxECommerceEnabled","OrderSummary","subTotalLabel","itemsWithCountLabel","shippingLabel","estimatedShippingLabel","otherChargeLabel","otherCharges","taxLabel","estimatedTaxLabel","orderTotal","totalDiscountsLabel","toBeCalculatedText","yetToBeCalculatedText","freeText","priceFree","isShowTaxBreakup","isPromoCodeSectionAllow","PromoCodeComponent","promoCodeHeadingText","promoPlaceholderText","promoCodeApplyButtonText","appliedPromoCodeHeadingText","collapseTimeOut","removePromoText","invalidPromoCodeErrorText","failedToAddPromoCodeErrorText","failedToRemovePromoCodeErrorText","duplicatePromoCodeErrorText","duplicatePromotionErrorText","addToOrderTemplateHeader","noOrderTemplatesMessage","noOrderTemplatesDescription","createAnOrderTemplateButtonText","createNewOrderTemplateButtonText","cancelOrderTemplateCreationButtonText","selectTemplatesText","addToTemplateButtonText","lineItemsText","_generateItemAddedToOrderTemplateDialogResources","viewOrderTemplateButtonText","continueShoppingButtonText","itemAddedToOrderTemplateHeaderItemOneText","itemAddedToOrderTemplateHeaderItemFormatText","itemAddedToOrderTemplateHeaderMessageText","linesAddedToOrderTemplateHeaderItemsOneText","linesAddedToOrderTemplateHeaderItemsFormatText","linesAddedToOrderTemplateHeaderLinesOneText","linesAddedToOrderTemplateHeaderLinesFormatText","linesAddedToOrderTemplateHeaderMessageText","linesAddedToOrderTemplateCustomPriceAlertMessageText","_generateDuplicateItemsWhenAddingToOrderTemplateDialogResources","duplicatedProductsHeader","duplicatedProductsDescription","updateQuantityButtonText","cancelDuplicateItemsButtonText","orderTemplateHeaderLabel","createOrderTemplateHeader","orderTemplateTitleLabel","orderTemplateTitle","orderTemplateNameAriaLabel","orderTemplateDescription","createOrderTemplateDescription","defaultOrderTemplateName","orderTemplateButtonLabel","createOrderTemplateButtonText","orderTemplateCancelButtonLabel","cancelNewOrderTemplateCreationButtonText","modules","storeSelectorId","CartLineItems","enableStockCheck","maxQuantityForCartLineItem","warehouseAggregation","sizeString","productDimensionTypeSize","colorString","productDimensionTypeColor","configString","productDimensionTypeConfiguration","styleString","productDimensionTypeStyle","amountString","productDimensionTypeAmount","quantityDisplayString","quantityDisplayText","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","discountStringText","shippingChargesText","shippingCharges","priceEditorResources","removeCartButtonText","shipInsteadDisplayText","pickItUpDisplayText","changeStoreDisplayText","outOfStockErrorMessage","errorMessageOutOfRangeOneLeft","errorMessageOutOfRangeFormat","requestDateInputHandler","showOutOfStockErrors","addToOrderTemplateMessage","addItemToOrderTemplateError","isAbsoluteUrl","RegExp","returnURL","MsDyn365","isBrowser","includes","validateCartAsync","isValid","AsyncResult","_this$props$context2","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","_featureStatuses$find","featureStatuses","_this$props$data$chan","_this$props$data$chan2","__decorate","computed","observer","renderCartlinesInternal","isMultiplePickUp","itemIndex","renderCartlines","isCartDataResult","Node","emptyCart","renderCartLinesGroupHeader","_cartLine$pickUpInSto4","pickUpText","shippingText","emailshippingText","groupTitle","renderCartLinesGroupTitle","_cartLine$pickUpInSto","_cartLine$pickUpInSto2","_cartLine$pickUpInSto3","itemLabel","itemsLabel","countTitle","_props$cart2","_props$cart3","_props$orderSummaryLi","_props$cart4","_props$cart5","updatedTitle","totalItemsInCart","renderModuleAttributes","renderOrderSummaryCheckoutButton","renderCartLinesGroup","_props$context$action","_props$context$action2","countItem","_item$data$cartline$Q","_item$data","countItems","renderInvoiceSummarylines","invoiceSummaryLines","orderSummaryItems","invoices","loyalty","renderOrderSummarylines","orderSummaryLines","subtotal","totalDiscounts","otherCharge","tax","errorData","_props$cart","renderOrderSummaryCheckout","minWidth","backgroundColor","borderRadius","bottom","animation","OrderRequestlinesTemplate","mappedRequestOrder","getOrderDetailPageUrl","requestId","redirectToOrderDetailUrl","handleMouseEnterEvent","mouseOverIndex","handleMouseOutEvent","handlePageItemsChange","totalItemPerPage","activePage","pageCount","currentPageItems","searchPageItems","ceil","getEndOrderIndexInPage","getStartOrderIndexInPage","selectedLine","handleOnChangeInput","searchString","searchItems","f","console","log","resetItems","headers","AccountNumber","mappedProducts","productPrice","ProductPrice","pagination","a","float","active","hover","searchInput","defaultImageSettings","display","pointerEvents","disabledWrapper","onMouseEnter","onMouseLeave","webpackContext","req","webpackContextResolve","__webpack_require__","o","code","module","exports"],"sourceRoot":""}