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,QACfzB,GAAIlB,EAAMkB,GACV2L,SAAU7M,EAAM6M,SAChBvM,UAAW,wCACb,KAGND,EAAAA,cAACS,EAAAA,OAAM,CACHwK,MAAOtL,EAAMkgB,gBACb5f,UAAW,mCACXU,QAAS8d,EAAgB,aACbe,EAAOC,KAAI,aACXE,GAEXhgB,EAAMkgB,uBArL/B9d,KAAKsN,SAAUC,EAAAA,EAAAA,kBAAiB,QAASvN,KAAKpC,MAAMsP,iBAAmB6C,EAAAA,kBAAkBgO,gBACzF/d,KAAKV,MAAQ,CACT0e,gBAAgB,EAChB3C,oBAAqB,GACrBvW,MAAO,GACPwW,UAAU,GAIXxN,SACH,OACI7P,EAAAA,cAAA,WACIA,EAAAA,cAAA,OAAKC,UAAU,0BAA0B8B,KAAKpC,MAAMqgB,sBACnDje,KAAKkc,YAAYlc,KAAKpC,MAAMue,qBAAsBnc,KAAKpC,MAAMwe,yBAA0Bpc,KAAKpC,MAAM6d,MACnGxd,EAAAA,cAAA,KAAGC,UAAW8B,KAAKV,MAAMwF,MAAQ,mBAAqB,GAAE,YAAY,YAAYoF,KAAK,QAAO,aAAalK,KAAKV,MAAMwF,OAC/G9E,KAAKV,MAAMwF,OAEf9E,KAAKsd,wBAAwBtd,KAAKpC,SA8KnD","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/coc-order-history/components/coc-order-history-filter.tsx?2899","webpack://Msdyn365.Commerce.Online/./src/modules/coc-order-history/actions/get-order-shipment-history.ts?8d95","webpack://Msdyn365.Commerce.Online/./src/modules/coc-order-history/components/get-sales-order.tsx?9706","webpack://Msdyn365.Commerce.Online/./src/modules/coc-order-history/components/table-view/components/coc-order-history-table-header-component.tsx?727a","webpack://Msdyn365.Commerce.Online/./src/modules/coc-order-history/components/table-view/components/coc-order-history-table-row-component.tsx?dd0d","webpack://Msdyn365.Commerce.Online/./src/modules/coc-order-history/components/table-view/coc-order-history-table.tsx?fdbb","webpack://Msdyn365.Commerce.Online/./src/modules/coc-order-history/coc-order-history.tsx?ad4f","webpack://Msdyn365.Commerce.Online/./src/modules/coc-order-history/coc-order-history.view.tsx?d14b","webpack://Msdyn365.Commerce.Online/./src/themes/b2b/views/components/cartlineitem.component.tsx?432c","webpack://Msdyn365.Commerce.Online/./src/themes/b2b/views/components/promocode.component.tsx?d99d"],"sourcesContent":["/*--------------------------------------------------------------\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 { IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\r\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\r\nimport { EnumExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Button, Popover } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nexport interface IOrderHistoryFilterResources {\r\n orderHistoryFilterYourOrderHistory: string;\r\n orderHistoryFilterOrganizationWide: string;\r\n}\r\n\r\nexport interface IOrderHistoryFilterData {\r\n customerInformation: Customer;\r\n}\r\n\r\nexport interface IOrderHistoryFilterProps extends IComponentProps {\r\n className: string;\r\n\r\n resources: IOrderHistoryFilterResources;\r\n\r\n currentState: OrderHistoryFilterState;\r\n onFilterStateChanged(state: OrderHistoryFilterState): void;\r\n}\r\n\r\nexport enum OrderHistoryFilterState {\r\n CurrentUser,\r\n OrganizationWide\r\n}\r\n\r\nconst getOrderHistoryFilterStateResources = (filterState: OrderHistoryFilterState, resources: IOrderHistoryFilterResources): string => {\r\n switch (filterState) {\r\n case OrderHistoryFilterState.CurrentUser:\r\n return resources.orderHistoryFilterYourOrderHistory;\r\n case OrderHistoryFilterState.OrganizationWide:\r\n return resources.orderHistoryFilterOrganizationWide;\r\n default:\r\n throw new Error('Failed to retrieve resource description for unknown order history filter state.');\r\n }\r\n};\r\n\r\n/**\r\n * On Click functionality.\r\n * @param onStateClick -Filter state function.\r\n * @param filterState -Order history filter state.\r\n * @returns On state click functionality.\r\n */\r\nconst onClickHandler = (onStateClick: (filterState: OrderHistoryFilterState) => void, filterState: OrderHistoryFilterState) => () => {\r\n onStateClick(filterState);\r\n};\r\n\r\nconst renderFilterStateItem = (\r\n filterState: OrderHistoryFilterState,\r\n resources: IOrderHistoryFilterResources,\r\n className: string,\r\n onStateClick: (filterState: OrderHistoryFilterState) => void\r\n): React.ReactNode => {\r\n const stateStringRepresentation = OrderHistoryFilterState[filterState];\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\n/**\r\n * On Toggle Popover functionality.\r\n * @param setPopoverState -Set popover state function.\r\n * @param isPopoverState -Boolean value.\r\n * @returns Set toggle popover state functionality.\r\n */\r\nconst togglePopoverHandler = (setPopoverState: React.Dispatch>, isPopoverState: boolean) => () => {\r\n setPopoverState(!isPopoverState);\r\n};\r\n\r\nconst OrderHistoryFilter: React.FC = (props: IOrderHistoryFilterProps) => {\r\n // Current version of filter doesn't include functionality for non b2b users.\r\n if (!props.data.customerInformation.IsB2bAdmin && !props.data.customerInformation.IsB2b) {\r\n return
;\r\n }\r\n\r\n const popoverRef = React.createRef();\r\n const [popoverState, setPopoverState] = React.useState(false);\r\n\r\n const [filterState, setFilterState] = React.useState(props.currentState);\r\n\r\n const onFilterStateClick = (clickedState: OrderHistoryFilterState) => {\r\n setFilterState(clickedState);\r\n setPopoverState(false);\r\n props.onFilterStateChanged(clickedState);\r\n };\r\n\r\n return (\r\n
\r\n \r\n {getOrderHistoryFilterStateResources(filterState, props.resources)}\r\n \r\n \r\n {EnumExtensions.getEnumValues(OrderHistoryFilterState).map(state => {\r\n return renderFilterStateItem(state, props.resources, props.className, onFilterStateClick);\r\n })}\r\n \r\n
\r\n );\r\n};\r\n\r\nexport const OrderHistoryFilterComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\r\n // @ts-expect-error\r\n IOrderHistoryFilterProps\r\n>('OrderHistoryFilterComponent', { component: OrderHistoryFilter });\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 CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n ICommerceApiSettings\r\n} from '@msdyn365-commerce/core';\r\nimport { IQueryResultSettings } from '@msdyn365-commerce/retail-proxy';\r\nimport { getOrderShipmentsHistoryAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CustomersDataActions.g';\r\nimport { OrderShipments, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport {\r\n buildCacheKey,\r\n getOrganizationWideOrderHistory,\r\n GetOrganizationWideOrderHistoryInput,\r\n getSimpleProducts,\r\n ProductInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nimport { OrderHistoryFilterState } from '../components/coc-order-history-filter';\r\n\r\n/**\r\n * IPaging Interface.\r\n */\r\nexport interface IPaging {\r\n top: number;\r\n skip: number;\r\n}\r\n\r\n/**\r\n * IOrderHistory Interface.\r\n */\r\nexport interface IOrderHistory {\r\n salesOrders: OrderShipments[];\r\n products: SimpleProduct[];\r\n nextPageToken?: string;\r\n}\r\n\r\n/**\r\n * IOrderHistoryResult Interface.\r\n */\r\nexport interface IOrderHistoryResult {\r\n salesOrders: OrderShipments[];\r\n nextPageToken?: string;\r\n}\r\n\r\n/**\r\n * Calls the Retail API and returns the products.\r\n * @param paging - Paging interface.\r\n * @param nextPageToken - Next Page Link.\r\n * @returns Collection of OrderShipments.\r\n */\r\nconst getOrderShipmentHistory = (paging: IPaging, nextPageToken?: string) => async (ctx: IActionContext): Promise => {\r\n const orderHistoryResults = getOrderShipmentsHistoryAsync(\r\n {\r\n callerContext: ctx,\r\n bypassCache: 'get',\r\n queryResultSettings: {\r\n Paging: {\r\n Top: paging.top,\r\n NextPageToken: nextPageToken\r\n }\r\n }\r\n },\r\n '',\r\n nextPageToken\r\n );\r\n\r\n const orderHistoryResponse = await orderHistoryResults;\r\n const nextLinkUrl = orderHistoryResults.metadata?.others?.nextLink;\r\n const nextPageLink = nextLinkUrl !== undefined ? new URL(nextLinkUrl).searchParams.get('nextPageToken') : undefined;\r\n const nextPage = nextPageLink !== null ? nextPageLink : undefined;\r\n return {\r\n salesOrders: orderHistoryResponse,\r\n nextPageToken: nextPage\r\n };\r\n};\r\n\r\n/**\r\n * Calls the Retail API and returns the products.\r\n * @param paging - Paging props.\r\n * @returns Collections of order shipments.\r\n */\r\nconst getOrganizationWideOrderShipmentHistory = (paging: IPaging) => async (context: IActionContext): Promise => {\r\n const queryResultSetting: IQueryResultSettings = {\r\n Paging: {\r\n Top: paging.top,\r\n Skip: paging.skip\r\n }\r\n };\r\n\r\n return getOrganizationWideOrderHistory(new GetOrganizationWideOrderHistoryInput(queryResultSetting), context);\r\n};\r\n\r\n/**\r\n * Calls the Retail API and returns the products.\r\n * @param productIds - Collection of products id.\r\n * @param channelId - ChannelId number.\r\n * @returns Collections of simple products.\r\n */\r\nconst getProducts = (productIds: number[] = [], channelId?: number) => (ctx: IActionContext): Promise => {\r\n const productInputs = productIds.map(productId => new ProductInput(productId, ctx.requestContext.apiSettings, channelId));\r\n return getSimpleProducts(productInputs, ctx);\r\n};\r\n\r\n/**\r\n * Action input.\r\n */\r\nexport class GetSalesOrderHistoryWithHydrationsInput implements IActionInput {\r\n public paging: IPaging;\r\n\r\n public filterState: OrderHistoryFilterState;\r\n\r\n public nextPageToken?: string;\r\n\r\n private readonly apiSettings: ICommerceApiSettings;\r\n\r\n constructor(paging: IPaging, apiSettings: ICommerceApiSettings, filterState?: OrderHistoryFilterState, nextPageLink?: string) {\r\n this.apiSettings = apiSettings;\r\n this.paging = paging;\r\n this.filterState = filterState || OrderHistoryFilterState.CurrentUser;\r\n this.nextPageToken = nextPageLink;\r\n }\r\n\r\n public getCacheKey = () => buildCacheKey('OrderHistory', this.apiSettings);\r\n\r\n public getCacheObjectType = () => 'OrderHistory';\r\n\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\n/**\r\n * Splits product ids from the given orders into lists by their channel id.\r\n * @param {OrderShipments[]} salesOrders Orders with the products.\r\n * @param {number} currentChannelId Channel id to use by default if no channel id is provided for a product.\r\n * @returns {{ [x: number]: number[] }} A dictionary where the key is a channel id,\r\n * and the value is a list of product ids in which all items correspond to the key channel id.\r\n * @remark The list of product ids is always non-empty.\r\n */\r\nconst splitProductsByChannelId = (salesOrders: OrderShipments[], currentChannelId: number): { [x: number]: number[] } => {\r\n const productIdsByChannel: { [x: number]: number[] } = {};\r\n\r\n salesOrders.forEach(salesOrder =>\r\n salesOrder?.SalesLines?.forEach(line => {\r\n const orderProductId = line.ProductId || 0;\r\n const orderChannelId = salesOrder.ChannelId || currentChannelId;\r\n if (!productIdsByChannel[orderChannelId]) {\r\n productIdsByChannel[orderChannelId] = [];\r\n }\r\n productIdsByChannel[orderChannelId].push(orderProductId);\r\n })\r\n );\r\n\r\n return productIdsByChannel;\r\n};\r\n\r\n/**\r\n * Get sales order with hydrations action.\r\n * @param input - GetOrderHistory hydration input.\r\n * @param context - Channel context.\r\n * @returns - Order History props.\r\n */\r\nexport async function getSalesOrderHistoryWithHydrationsAction(\r\n input: GetSalesOrderHistoryWithHydrationsInput,\r\n context: IActionContext\r\n): Promise {\r\n if (!context) {\r\n throw new Error('getSalesOrderWithHydrationsAction - Action context cannot be null/undefined');\r\n }\r\n const channelId = context.requestContext.apiSettings.channelId;\r\n let salesOrders: OrderShipments[] = [];\r\n let nextPage: string | undefined = '';\r\n let orderHistoryResponse: IOrderHistoryResult;\r\n\r\n switch (input.filterState) {\r\n case OrderHistoryFilterState.CurrentUser:\r\n orderHistoryResponse = await getOrderShipmentHistory(input.paging, input.nextPageToken)(context);\r\n salesOrders = orderHistoryResponse.salesOrders;\r\n nextPage = orderHistoryResponse.nextPageToken;\r\n break;\r\n case OrderHistoryFilterState.OrganizationWide:\r\n salesOrders = await getOrganizationWideOrderShipmentHistory(input.paging)(context);\r\n break;\r\n default:\r\n throw new Error('getSalesOrderWithHydrationsAction - Invalid OrderHistoryFilterState passed');\r\n }\r\n\r\n if (!salesOrders || salesOrders.length === 0) {\r\n return {\r\n salesOrders: [],\r\n products: [],\r\n nextPageToken: nextPage\r\n };\r\n }\r\n\r\n // Splits the data by channel ids so that the products from different channels can be processed separately.\r\n const productIdsByChannelId = splitProductsByChannelId(salesOrders, channelId);\r\n\r\n // Promise that retrieves information about the products for each channel id.\r\n // Note, the list of product ids should not be empty\r\n // as it will generate an empty request which will force the promise to fail.\r\n const getProductsPromise = Object.entries(productIdsByChannelId).map(([entryChannelId, entryProductIdsList]) => {\r\n const getProductsCall = getProducts(entryProductIdsList, Number(entryChannelId));\r\n return getProductsCall(context);\r\n });\r\n\r\n return Promise.all(getProductsPromise)\r\n .then(\r\n (productList): IOrderHistory => {\r\n const products = productList.reduce((memo, list) => {\r\n return [...memo, ...list];\r\n }, []);\r\n return {\r\n salesOrders,\r\n products,\r\n nextPageToken: nextPage\r\n };\r\n }\r\n )\r\n .catch(error => {\r\n context.telemetry.exception(error);\r\n context.telemetry.debug('Failed to get products');\r\n throw error;\r\n });\r\n}\r\n\r\nexport const getSalesOrderHistoryWithHydrationsActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/order-management/order-history/get-order-shipment-history',\r\n action: >getSalesOrderHistoryWithHydrationsAction\r\n});\r\n\r\nexport default getSalesOrderHistoryWithHydrationsActionDataAction;\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 { getUrlSync, IActionContext } from '@msdyn365-commerce/core';\r\nimport {\r\n ChannelDeliveryOptionConfiguration,\r\n ChannelIdentity,\r\n format,\r\n OrderShipments,\r\n OrgUnitLocation,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport { ObjectExtensions } 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 TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport { Observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { ExpandButtonState, SalesLineState } from '@msdyn365-commerce-modules/order-management';\r\nimport { getGroups, IGroups } from '@msdyn365-commerce-modules/order-management';\r\nimport { getOrderInformation, getOrderInformationInput, IOrderInformation } from '@msdyn365-commerce-modules/order-management';\r\nimport { ISalesLine } from '@msdyn365-commerce-modules/order-management';\r\nimport { getSalesLines, getSalesLinesInput, IGetSalesLinesInput } from '@msdyn365-commerce-modules/order-management';\r\nimport { ICocOrderHistoryData } from '../coc-order-history.data';\r\nimport { ICocOrderHistoryProps } from '../coc-order-history.props.autogenerated';\r\n\r\nexport interface ISalesOrderProps extends ICocOrderHistoryProps {\r\n salesOrder: OrderShipments;\r\n products: SimpleProduct[];\r\n channelIdentities?: ChannelIdentity[];\r\n orgUnitLocations?: OrgUnitLocation[];\r\n showChannelInfo?: boolean;\r\n telemetryContent?: ITelemetryContent;\r\n retailMultiplePickUpOptionEnabled?: boolean;\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n salesLinesLimit?: number;\r\n}\r\n\r\nexport interface ISalesOrder {\r\n salesOrderProps: INodeProps;\r\n orderInfomation: IOrderInformation;\r\n groups?: IGroups;\r\n orderDetailsLink: React.ReactNode;\r\n expandProductsButton?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * Retrieves the url for order details page.\r\n * @param actionContext - Core action context.\r\n * @param salesOrder - Order information.\r\n * @returns Url to order details.\r\n */\r\nexport const getOrderDetailsPageUrl = (actionContext: IActionContext, salesOrder: OrderShipments): string => {\r\n const orderDetailsUrl = getUrlSync('orderDetails', actionContext) || '';\r\n const separator = orderDetailsUrl.includes('?') ? '&' : '?';\r\n if (salesOrder.SalesId) {\r\n // Redirect with sales order sales id\r\n return `${orderDetailsUrl}${separator}salesId=${salesOrder.SalesId}`;\r\n }\r\n\r\n // Redirect with sales order transaction id\r\n return `${orderDetailsUrl}${separator}transactionId=${salesOrder.TransactionId!}`;\r\n};\r\n\r\n/**\r\n * Updates product states to show all products.\r\n * @param expandButtonState - Expand button state.\r\n * @param productStates - Product states.\r\n * @returns Callback method.\r\n */\r\nconst onExpandProductsCallback = (expandButtonState: ExpandButtonState, productStates: SalesLineState[]) => () => {\r\n for (const productState of productStates) {\r\n productState.isHidden = false;\r\n }\r\n expandButtonState.extraProductsCount = 0;\r\n};\r\n\r\nexport const getSalesOrder = (input: ISalesOrderProps): ISalesOrder => {\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n telemetry,\r\n products,\r\n salesOrder,\r\n showChannelInfo,\r\n channelIdentities,\r\n orgUnitLocations,\r\n telemetryContent,\r\n resources: { freePriceText, detailsAriaLabel, detailsLabel, orderItemLabel, orderItemsLabel },\r\n context: { actionContext },\r\n retailMultiplePickUpOptionEnabled,\r\n channelDeliveryOptionConfig\r\n } = input;\r\n\r\n const moduleName = 'ms-order-history';\r\n\r\n const priceContext = {\r\n id,\r\n typeName,\r\n context,\r\n telemetry,\r\n freePriceText\r\n };\r\n\r\n const salesOrderProps = { className: 'ms-order-history__sales-order', key: salesOrder.SalesId || salesOrder.TransactionId };\r\n\r\n const orderInfomationInput = getOrderInformationInput(\r\n input,\r\n moduleName,\r\n salesOrder,\r\n priceContext,\r\n channelIdentities,\r\n orgUnitLocations,\r\n undefined,\r\n undefined,\r\n showChannelInfo\r\n );\r\n const orderInfomation = getOrderInformation(orderInfomationInput);\r\n\r\n const salesLinesInput =\r\n products &&\r\n getSalesLinesInput(\r\n input,\r\n moduleName,\r\n salesOrder,\r\n products,\r\n priceContext,\r\n undefined,\r\n undefined,\r\n undefined,\r\n retailMultiplePickUpOptionEnabled,\r\n channelDeliveryOptionConfig\r\n );\r\n\r\n let salesLines: ISalesLine[] | undefined;\r\n let expandProductsButton: React.ReactNode;\r\n if (salesLinesInput) {\r\n const getSalesLinesInputProps: IGetSalesLinesInput = { ...salesLinesInput, imageOnly: true };\r\n if (!ObjectExtensions.isNullOrUndefined(input.salesLinesLimit)) {\r\n const extraProductsCount = getSalesLinesInputProps.salesLines.length - input.salesLinesLimit;\r\n getSalesLinesInputProps.salesLineStates = getSalesLinesInputProps.salesLines.map(\r\n (salesLine, index) => new SalesLineState(`${salesLine.LineId ?? ''}-${index}`, index >= input.salesLinesLimit!)\r\n );\r\n if (extraProductsCount > 0) {\r\n const expandButtonState = new ExpandButtonState(extraProductsCount);\r\n expandProductsButton = (\r\n <>\r\n \r\n {() => {\r\n const text = format(\r\n input.resources.orderHistoryExpandProductsButtonText,\r\n expandButtonState.extraProductsCount\r\n );\r\n return (\r\n expandButtonState.extraProductsCount > 0 && (\r\n \r\n {text}\r\n \r\n )\r\n );\r\n }}\r\n \r\n \r\n );\r\n }\r\n }\r\n salesLines = getSalesLines(getSalesLinesInputProps);\r\n }\r\n\r\n expandProductsButton = (\r\n <>\r\n {expandProductsButton}\r\n
\r\n \r\n );\r\n\r\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.OrderDetails);\r\n const orderDetailsAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\r\n\r\n const groups =\r\n salesLines &&\r\n getGroups({\r\n moduleName,\r\n salesLines,\r\n resources: { orderItemLabel, orderItemsLabel },\r\n retailMultiplePickUpOptionEnabled\r\n });\r\n\r\n const orderDetailsLink = (\r\n \r\n {detailsLabel}\r\n \r\n );\r\n\r\n return {\r\n salesOrderProps,\r\n orderInfomation,\r\n groups,\r\n orderDetailsLink,\r\n expandProductsButton\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 { IComponentProps, ICoreContext } from '@msdyn365-commerce/core';\r\nimport { isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\n/**\r\n * Resources which are used in order history header.\r\n */\r\nexport interface IOrderHistoryTableHeaderResources {\r\n orderHistoryOrderNumberText: string;\r\n orderHistoryCreatedDateText: string;\r\n orderHistoryItemsText: string;\r\n orderHistoryTotalText: string;\r\n orderHistoryOriginText: string;\r\n}\r\n\r\n/**\r\n * Configuration of the component.\r\n */\r\nexport interface IOrderHistoryTableHeaderProps extends IComponentProps {\r\n context: ICoreContext;\r\n className: string;\r\n\r\n resources: IOrderHistoryTableHeaderResources;\r\n\r\n shouldShowChannelInfo: boolean;\r\n}\r\n\r\n/**\r\n * Renders desktop view cells.\r\n * @param props - Configuration of the module.\r\n * @returns List of cells for the header.\r\n */\r\nconst getDesktopHeaderCells = (props: IOrderHistoryTableHeaderProps) => {\r\n const { resources } = props;\r\n\r\n const columnWithNumberClassName = `${props.className}__row__column-with-number`;\r\n\r\n return (\r\n <>\r\n {resources.orderHistoryOrderNumberText}\r\n {resources.orderHistoryCreatedDateText}\r\n {resources.orderHistoryItemsText}\r\n {resources.orderHistoryTotalText}\r\n {props.shouldShowChannelInfo && {resources.orderHistoryOriginText}}\r\n \r\n \r\n );\r\n};\r\n\r\n/**\r\n * Renders mobile view cells.\r\n * @param props - Configuration of the module.\r\n * @returns List of cells for the header.\r\n */\r\nconst getMobileHeaderCells = (props: IOrderHistoryTableHeaderProps) => {\r\n const { resources } = props;\r\n return (\r\n <>\r\n {resources.orderHistoryOrderNumberText}\r\n \r\n \r\n );\r\n};\r\n\r\n/**\r\n * Order history table header component.\r\n * @param props - Configuration of the component.\r\n * @returns React node with the header.\r\n */\r\nexport const OrderHistoryTableHeaderComponent: React.FC = (props: IOrderHistoryTableHeaderProps) => {\r\n const rowClassName = `${props.className}__row`;\r\n\r\n let headerCells: JSX.Element;\r\n const isMobileView = isMobile({ variant: VariantType.Viewport, context: props.context.request }) === 'xs';\r\n if (isMobileView) {\r\n headerCells = getMobileHeaderCells(props);\r\n } else {\r\n headerCells = getDesktopHeaderCells(props);\r\n }\r\n\r\n return (\r\n \r\n {headerCells}\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 MsDyn365, { IComponentProps, ICoreContext, IDateFormatOptions } from '@msdyn365-commerce/core';\r\nimport { ChannelIdentity, format, OrderShipments, OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\r\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Button, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { getOrderChannelAddress, getOrderChannelName } from '@msdyn365-commerce-modules/order-management';\r\nimport { countItems } from '@msdyn365-commerce-modules/order-management';\r\nimport { getOrderDetailsPageUrl } from '../../get-sales-order';\r\n\r\n/**\r\n * Data required to render each order history row.\r\n */\r\nexport interface IOrderHistoryTableRowData {\r\n salesOrder: OrderShipments;\r\n channelIdentities?: ChannelIdentity[];\r\n orgUnitLocations?: OrgUnitLocation[];\r\n}\r\n\r\n/**\r\n * Resources for order history table rows.\r\n */\r\nexport interface IOrderHistoryTableRowResources {\r\n orderHistoryViewDetailsButtonText: string;\r\n orderHistoryViewDetailsButtonAriaLabel: string;\r\n orderHistoryCreatedDateMobileDescriptionText: string;\r\n orderHistoryOrderNumberIsNotAvailable: string;\r\n\r\n onlineStoreChannelNameText: string;\r\n posChannelNameText: string;\r\n}\r\n\r\n/**\r\n * Configuration for the order history rows.\r\n */\r\nexport interface IOrderHistoryTableRowProps extends IComponentProps {\r\n context: ICoreContext;\r\n className: string;\r\n\r\n resources: IOrderHistoryTableRowResources;\r\n\r\n shouldShowChannelInfo: boolean;\r\n}\r\n\r\n/**\r\n * Formats amount.\r\n * @param context - Core context.\r\n * @param amount - Amount to display.\r\n * @param currencyCode - Currency for the amount.\r\n * @returns String value.\r\n */\r\nconst formatAmount = (context: ICoreContext, amount: number | undefined, currencyCode: string | undefined) => {\r\n if (amount === undefined) {\r\n return '';\r\n }\r\n return context.cultureFormatter.formatCurrency(amount, currencyCode);\r\n};\r\n\r\n/**\r\n * Formats date.\r\n * @param context - Core context.\r\n * @param date - Date to display.\r\n * @returns String value.\r\n */\r\nconst formatDate = (context: ICoreContext, date: Date | undefined) => {\r\n if (date === undefined) {\r\n return '';\r\n }\r\n\r\n const dateOptions: IDateFormatOptions = { year: 'numeric', month: 'numeric', day: 'numeric' };\r\n return context.cultureFormatter.formatDate(date, dateOptions);\r\n};\r\n\r\n/**\r\n * Renders rows for desktop view.\r\n * @param props - Configuration for the rows.\r\n * @returns A react node with a list of order history rows for desktop view.\r\n */\r\nexport const OrderHistoryDesktopTableRowCellComponent: React.FC = (props: IOrderHistoryTableRowProps) => {\r\n const {\r\n data: { salesOrder }\r\n } = props;\r\n\r\n const linkToOrderHistoryDetails = getOrderDetailsPageUrl(props.context.actionContext, props.data.salesOrder);\r\n\r\n const defaultCount = 0;\r\n const itemsCount = ArrayExtensions.hasElements(salesOrder.SalesLines) ? countItems(salesOrder.SalesLines) : defaultCount;\r\n const channelName = getOrderChannelName(salesOrder, props.data.channelIdentities);\r\n const channelAddress = getOrderChannelAddress(salesOrder, props.data.orgUnitLocations);\r\n\r\n const columnWithNumberClassName = `${props.className}__column-with-number`;\r\n\r\n let orderNumberCellText = props.resources.orderHistoryOrderNumberIsNotAvailable;\r\n if (!StringExtensions.isNullOrWhitespace(salesOrder.SalesId)) {\r\n orderNumberCellText = salesOrder.SalesId!;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {orderNumberCellText}\r\n \r\n {formatDate(props.context, salesOrder.CreatedDateTime)}\r\n {itemsCount}\r\n {formatAmount(props.context, salesOrder.TotalAmount, salesOrder.CurrencyCode)}\r\n {props.shouldShowChannelInfo && (\r\n \r\n {channelName &&\r\n (channelAddress\r\n ? `${props.resources.posChannelNameText} ${channelName}`\r\n : props.resources.onlineStoreChannelNameText)}\r\n \r\n )}\r\n \r\n \r\n {props.resources.orderHistoryViewDetailsButtonText}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\n/**\r\n * Renders rows for mobile view.\r\n * @param props - Configuration for the rows.\r\n * @returns A react node with a list of order history rows for mobile view.\r\n */\r\nexport const OrderHistoryMobileTableRowCellComponent: React.FC = (props: IOrderHistoryTableRowProps) => {\r\n const {\r\n data: { salesOrder }\r\n } = props;\r\n\r\n const linkToOrderHistoryDetails = getOrderDetailsPageUrl(props.context.actionContext, props.data.salesOrder);\r\n\r\n const onClickViewDetails = React.useCallback(() => {\r\n if (MsDyn365.isBrowser) {\r\n window.location.href = linkToOrderHistoryDetails;\r\n }\r\n }, [linkToOrderHistoryDetails]);\r\n\r\n const orderNumber = StringExtensions.isNullOrWhitespace(salesOrder.SalesId)\r\n ? props.resources.orderHistoryOrderNumberIsNotAvailable\r\n : salesOrder.SalesId!;\r\n\r\n const dateText = format(\r\n props.resources.orderHistoryCreatedDateMobileDescriptionText,\r\n formatDate(props.context, salesOrder.CreatedDateTime)\r\n );\r\n\r\n const cellClassName = `${props.className}__mobile-cell`;\r\n\r\n return (\r\n <>\r\n \r\n \r\n {orderNumber}\r\n {dateText}\r\n
\r\n \r\n \r\n \r\n {props.resources.orderHistoryViewDetailsButtonText}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\n/**\r\n * Renders order history rows.\r\n * @param props - Configuration for the rows.\r\n * @returns A react node with a list of order history rows.\r\n */\r\nexport const OrderHistoryTableRowComponent: React.FC = (props: IOrderHistoryTableRowProps) => {\r\n const isMobileView = isMobile({ variant: VariantType.Viewport, context: props.context.request }) === 'xs';\r\n\r\n return (\r\n \r\n {isMobileView ? (\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/* eslint-disable no-duplicate-imports */\r\nimport { IComponentProps, ICoreContext } from '@msdyn365-commerce/core';\r\nimport { ChannelIdentity, OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\r\nimport React from 'react';\r\n\r\nimport { IOrderHistory } from '../../actions/get-order-shipment-history';\r\nimport { IOrderHistoryTableHeaderResources, OrderHistoryTableHeaderComponent } from './components/coc-order-history-table-header-component';\r\nimport { IOrderHistoryTableRowResources, OrderHistoryTableRowComponent } from './components/coc-order-history-table-row-component';\r\n\r\n/**\r\n * Interface with the data required for order history.\r\n */\r\nexport interface IOrderHistoryTableData {\r\n orderHistory: IOrderHistory;\r\n channelIdentities?: ChannelIdentity[];\r\n orgUnitLocations?: OrgUnitLocation[];\r\n}\r\n\r\n/**\r\n * Resources needed to render order history table.\r\n */\r\nexport interface IOrderHistoryTableResources extends IOrderHistoryTableHeaderResources, IOrderHistoryTableRowResources {}\r\n\r\n/**\r\n * Configuration of order history table.\r\n */\r\nexport interface IOrderHistoryTableProps extends IComponentProps {\r\n context: ICoreContext;\r\n className: string;\r\n\r\n resources: IOrderHistoryTableResources;\r\n\r\n shouldShowChannelInfo: boolean;\r\n}\r\n\r\n/**\r\n * Renders order history table.\r\n * @param props - Configuration for order history table.\r\n * @returns React node with the table.\r\n */\r\nexport const OrderHistoryTableComponent: React.FC = (props: IOrderHistoryTableProps) => {\r\n const rowClassName = `${props.className}__row`;\r\n const headerClassName = `${props.className}__header`;\r\n\r\n return (\r\n \r\n \r\n {props.data.orderHistory.salesOrders.map((salesOrder, index) => {\r\n return (\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/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n IModuleProps,\r\n INodeProps,\r\n IPayLoad,\r\n ITelemetryContent,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classname from 'classnames';\r\nimport { observable } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { Label } from '@msdyn365-commerce-modules/order-management';\r\nimport {\r\n getSalesOrderHistoryWithHydrationsAction,\r\n GetSalesOrderHistoryWithHydrationsInput,\r\n IOrderHistory,\r\n IPaging\r\n} from './actions/get-order-shipment-history';\r\nimport { getSalesOrder, ISalesOrder } from './components/get-sales-order';\r\nimport { OrderHistoryFilterComponent, OrderHistoryFilterState } from './components/coc-order-history-filter';\r\nimport { OrderHistoryTableComponent } from './components/table-view';\r\nimport { ICocOrderHistoryData } from './coc-order-history.data';\r\nimport { ICocOrderHistoryProps } from './coc-order-history.props.autogenerated';\r\n\r\n/**\r\n * Specifies different layouts for order history.\r\n */\r\nexport enum OrderHistoryViewMode {\r\n listView = 0,\r\n detailedView = 1\r\n}\r\n\r\nexport interface IHeader {\r\n headerProps: INodeProps;\r\n heading: React.ReactNode;\r\n orderCountLabel?: React.ReactNode;\r\n extraActions?: React.ReactNode;\r\n}\r\n\r\nexport interface IList {\r\n listProps: INodeProps;\r\n salesOrders: ISalesOrder[];\r\n}\r\n\r\nexport interface IOrderHistoryViewState {\r\n isDataReady: boolean;\r\n hasError: boolean;\r\n isLoading: boolean;\r\n isShowMoreButton: boolean;\r\n errorLoading: boolean;\r\n}\r\n\r\nexport interface IOrderHistoryViewProps extends ICocOrderHistoryProps {\r\n orderHistory: IOrderHistory;\r\n orderHistoryProps: IModuleProps;\r\n alert?: React.ReactNode;\r\n loading?: React.ReactNode;\r\n emptyMessage?: React.ReactNode;\r\n header: IHeader;\r\n backToShoppingLink?: React.ReactNode;\r\n list?: IList;\r\n table?: React.ReactNode;\r\n moreButton?: React.ReactNode;\r\n viewState: IOrderHistoryViewState;\r\n loadingAlert?: React.ReactNode;\r\n}\r\n\r\n/**\r\n *\r\n * OrderHistory component.\r\n * @extends {React.Component>}\r\n */\r\n@observer\r\nclass OrderHistory extends React.Component> {\r\n @observable private orderHistory!: IOrderHistory;\r\n\r\n @observable private viewState!: IOrderHistoryViewState;\r\n\r\n @observable private _viewMode: OrderHistoryViewMode;\r\n\r\n private filterState: OrderHistoryFilterState;\r\n\r\n private pageSize!: number;\r\n\r\n private paging!: IPaging;\r\n\r\n private readonly telemetryContent?: ITelemetryContent;\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n private channelReferenceIds!: string[];\r\n\r\n constructor(props: ICocOrderHistoryProps) {\r\n super(props);\r\n this.initState();\r\n this._viewMode = OrderHistoryViewMode.detailedView;\r\n this.filterState = OrderHistoryFilterState.CurrentUser;\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 }\r\n\r\n public componentDidMount(): void {\r\n if (this.props.context.actionContext.requestContext.user.isAuthenticated) {\r\n this._updateOrderHistory();\r\n } else {\r\n this.viewState.isDataReady = true;\r\n }\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: ICocOrderHistoryProps, nextState: IOrderHistoryViewState): 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 public render(): JSX.Element {\r\n const {\r\n config: { heading, className, showChannelInfo },\r\n resources: {\r\n genericErrorMessage,\r\n noOrderHistoryLable,\r\n moreButtonText,\r\n backToShopping,\r\n orderCountLabel,\r\n ordersCountLabel,\r\n loadingLabel\r\n }\r\n } = this.props;\r\n const { salesOrders, products } = this.orderHistory;\r\n const { isDataReady, hasError, isShowMoreButton, isLoading, errorLoading } = this.viewState;\r\n const backToShoppingUrl = Msdyn365.getUrlSync('home', this.props.context.actionContext) || '';\r\n const channelIdentities = this.props.data.channels.result && this.props.data.channels.result.channelIdentities;\r\n const orgUnitLocations = this.props.data.orgUnitLocations.result && this.props.data.orgUnitLocations.result.orgUnitLocations;\r\n\r\n let viewProps: IOrderHistoryViewProps = {\r\n ...this.props,\r\n orderHistory: this.orderHistory,\r\n viewState: this.viewState,\r\n orderHistoryProps: {\r\n moduleProps: this.props,\r\n className: classname('ms-order-history', className)\r\n },\r\n header: {\r\n headerProps: { className: 'ms-order-history__header' },\r\n heading: heading && heading.text && (\r\n \r\n ),\r\n extraActions: this.renderExtraActions()\r\n },\r\n backToShoppingLink: backToShoppingUrl && (\r\n \r\n )\r\n };\r\n\r\n if (hasError) {\r\n viewProps = {\r\n ...viewProps,\r\n alert: