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S,GAAU7V,EAE5C,OACIF,EAAAA,cAAC+N,EAAAA,OAAMX,OAAAC,OAAA,GAAKyJ,GACPlT,EACAmS","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/account-customer-balance/account-customer-balance.tsx?8d5a","webpack://Msdyn365.Commerce.Online/./src/modules/account-customer-balance/components/account-actions.tsx?e021","webpack://Msdyn365.Commerce.Online/./src/modules/account-customer-balance/components/account-statement-request-modal.tsx?18c0","webpack://Msdyn365.Commerce.Online/./src/modules/account-customer-balance/components/index.tsx?fba9","webpack://Msdyn365.Commerce.Online/./src/modules/account-welcome-tile/account-welcome-tile.tsx?2115","webpack://Msdyn365.Commerce.Online/./src/modules/account-welcome-tile/account-welcome-tile.view.tsx?e5e3","webpack://Msdyn365.Commerce.Online/./src/modules/b2b-requests-status/components/b2b-requests-table.tsx?06fc","webpack://Msdyn365.Commerce.Online/./src/modules/b2b-requests-status/b2b-requests-status.tsx?c1aa","webpack://Msdyn365.Commerce.Online/./src/modules/b2b-requests-status/b2b-requests-status.view.tsx?6b7c","webpack://Msdyn365.Commerce.Online/./src/modules/b2b-requests-tile/components/account-b2b-requests-tile-links.tsx?d6f5","webpack://Msdyn365.Commerce.Online/./src/modules/b2b-requests-tile/b2b-requests-tile.tsx?9498","webpack://Msdyn365.Commerce.Online/./src/modules/b2b-requests-tile/b2b-requests-tile.view.tsx?3f4e"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { BusinessPartnerUsersDataActions } from '@msdyn365-commerce/retail-proxy';\nimport {\n AccountStatementRequest,\n BusinessPartnerOperationDeliveryType,\n CustomerBalances\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { getTelemetryObject, Heading, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { get } from 'lodash';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { IAccountCustomerBalanceData } from './account-customer-balance.data';\nimport { HeadingTag, IAccountCustomerBalanceProps } from './account-customer-balance.props.autogenerated';\nimport {\n AccountLabels,\n AccountValues,\n ActionBar,\n AdminRequestStatementButton,\n AvailableCreditComponent,\n BackButton,\n BalanceOwedComponent,\n CreditExcessComponent,\n RequestStatementModal\n} from './components';\n\nexport interface IAccountCustomerBalanceViewProps extends IAccountCustomerBalanceProps {\n heading: string;\n homeButton: React.ReactNode;\n accountSectionHeading: React.ReactNode;\n accountLabels: React.ReactNode;\n accountValues: React.ReactNode;\n creditSummarySectionHeading: React.ReactNode;\n creditSummaryLabels?: React.ReactNode;\n creditSummaryValues?: React.ReactNode;\n actions: React.ReactNode;\n requestStatementModal: React.ReactNode;\n availableCredit?: React.ReactNode;\n balanceOwed?: React.ReactNode;\n creditExcess?: React.ReactNode;\n}\n\nexport interface IAccountCustomerBalanceState {\n isStatementRequestModalOpen: boolean;\n statementRequestFromDateString: string;\n statementRequestToDateString: string;\n isStatementRequestAdminDropdownOpen: boolean;\n statementRequestFullOrg: boolean;\n statementRequestMaxDateString?: string;\n}\n\n/**\n *\n * AccountCustomerBalance component.\n * @extends {React.PureComponent>}\n */\nclass AccountCustomerBalance extends React.PureComponent<\n IAccountCustomerBalanceProps,\n IAccountCustomerBalanceState\n> {\n private readonly telemetryContent?: ITelemetryContent;\n\n @computed get canSubmitStatementRequest(): boolean {\n return this.state.statementRequestFromDateString !== '' && this.state.statementRequestToDateString !== '';\n }\n\n constructor(props: IAccountCustomerBalanceProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.state = {\n isStatementRequestModalOpen: false,\n statementRequestFromDateString: '',\n statementRequestToDateString: '',\n isStatementRequestAdminDropdownOpen: false,\n statementRequestFullOrg: false,\n statementRequestMaxDateString: new Date().toISOString().split('T')[0]\n };\n }\n\n public render(): JSX.Element | null {\n const customer = get(this.props, 'data.customerInformation.result');\n const account: CustomerBalances = get(this.props, 'data.balance.result');\n if ([customer, account].includes(undefined)) {\n this.props.context.telemetry.error('Customer data is unavailable, module will not render');\n return null;\n }\n\n const { config, resources, context } = this.props;\n const { heading } = config;\n const {\n creditSummarySectionHeading,\n accountSectionHeading,\n backToShoppingText,\n customerSincePrefix,\n availableCreditLabel,\n balanceOwedLabel,\n creditExcessLabel,\n requestStatementButtonLabel,\n modalHeaderLabel,\n sendToEmailLabel,\n fromDateLabel,\n toDateLabel,\n submitRequestLabel,\n cancelLabel,\n myAccountStatementLabel,\n fullOrganizationLabel,\n modalAriaLabel\n } = resources;\n\n const {\n isStatementRequestModalOpen,\n statementRequestFromDateString,\n statementRequestToDateString,\n statementRequestMaxDateString\n } = this.state;\n\n const accountNumber = customer.AccountNumber;\n const createdOn = this._formatJoinDate(new Date(customer.CreatedDateTime));\n const name = `${customer.FirstName} ${customer.LastName}`;\n let customerCredit = 0;\n let customerAccountBalance = 0;\n let excess = 0;\n\n if (account.InvoiceAccountCreditLimit === 0) {\n customerCredit = account.CreditLimit - account.Balance;\n customerAccountBalance = account.Balance;\n excess = account.Balance - account.CreditLimit;\n } else {\n customerCredit = account.InvoiceAccountCreditLimit - account.InvoiceAccountBalance;\n customerAccountBalance = account.InvoiceAccountBalance;\n excess = account.InvoiceAccountBalance - account.InvoiceAccountCreditLimit;\n }\n\n const creditExcess = excess > 0 ? this._formatCurrency(excess) : null;\n const availableCredit = this._formatCurrency(customerCredit);\n const balanceOwed = this._formatCurrency(customerAccountBalance);\n const backLink = Msdyn365.getUrlSync('home', context.actionContext) || '';\n const emailAddress = customer.Email;\n const isB2BUser = customer.IsB2b;\n const isB2BAdmin = isB2BUser && customer.IsB2bAdmin;\n\n const actionBar = isB2BAdmin ? (\n \n ) : (\n isB2BUser && (\n \n )\n );\n\n const viewProps = {\n ...this.props,\n heading: ,\n accountSectionHeading: (\n \n ),\n accountLabels: (\n \n ),\n accountValues: ,\n creditSummarySectionHeading: (\n \n ),\n availableCredit: ,\n balanceOwed: ,\n creditExcess: ,\n homeButton: ,\n actions: actionBar,\n requestStatementModal: isB2BUser && (\n \n )\n };\n\n return this.props.renderView(viewProps);\n }\n\n private _formatCurrency(currency: number): string {\n const currencyCode = get(this.props, 'context.request.channel.Currency');\n const formatCurrency = get(this.props, 'context.cultureFormatter.formatCurrency');\n\n return `${formatCurrency(currency.toFixed(2), currencyCode)}`;\n }\n\n private _formatJoinDate(date: Date): string {\n const i14nDate = new Intl.DateTimeFormat(this.props.context.actionContext.requestContext.locale, {\n month: 'long',\n day: 'numeric',\n year: 'numeric'\n });\n\n return i14nDate.format(date);\n }\n\n private readonly _showRequestStatementModal = (): void => {\n if (!this.state.isStatementRequestModalOpen) {\n this.setState({\n isStatementRequestModalOpen: true\n });\n }\n };\n\n private readonly _toggleModal = (): void => {\n this.setState({\n isStatementRequestModalOpen: false\n });\n };\n\n private readonly _toggleDropdown = (): void => {\n this.setState({\n isStatementRequestAdminDropdownOpen: !this.state.isStatementRequestAdminDropdownOpen\n });\n };\n\n private readonly _updateFromDate = (newFromDate: string) => {\n this.setState({\n statementRequestFromDateString: newFromDate\n });\n };\n\n private readonly _updateToDate = (newToDate: string) => {\n this.setState({\n statementRequestToDateString: newToDate\n });\n };\n\n private readonly _adminShowRequestStatementModal = (isFullOrg: boolean) => {\n this.setState({\n statementRequestFullOrg: isFullOrg,\n isStatementRequestAdminDropdownOpen: false\n });\n\n this._showRequestStatementModal();\n };\n\n private readonly _requestStatement = () => {\n const customer = this.props.data.customerInformation.result!;\n const B2BUserId = this.props.data.b2bUserInformation?.result?.B2BUserId || '';\n\n const statementRequest: AccountStatementRequest = {\n FromDate: new Date(this.state.statementRequestFromDateString),\n ToDate: new Date(this.state.statementRequestToDateString),\n IsForFullOrganization: this.state.statementRequestFullOrg,\n RequestedUserId: B2BUserId,\n RequestingUserEmail: customer.Email,\n DeliveryTypeValue: BusinessPartnerOperationDeliveryType.Email\n };\n\n const context = { callerContext: this.props.context.actionContext };\n\n BusinessPartnerUsersDataActions.requestAccountStatementAsync(context, B2BUserId, statementRequest);\n\n this.setState({\n isStatementRequestModalOpen: false\n });\n };\n}\n\nexport default AccountCustomerBalance;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Random } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Popover } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\ninterface IAccountCustomerBalanceActions {\n className?: string;\n requestStatementButtonLabel: string;\n onRequestStatement(): void;\n}\n\ninterface IAdminRequestStatementProps {\n className?: string;\n requestStatementButtonLabel: string;\n myUserAccountLabel: string;\n fullOrganizationLabel: string;\n isDropdownShowing: boolean;\n buttonReference?: React.RefObject;\n onToggleDropdown(): void;\n onRequestStatement(isFullOrg: boolean): void;\n}\n\nexport const ActionBar: React.FC = ({ className, onRequestStatement, requestStatementButtonLabel }) => {\n return (\n
\n \n
\n );\n};\n\nexport const AdminRequestStatementButton: React.FC = ({\n className,\n onRequestStatement,\n requestStatementButtonLabel,\n onToggleDropdown,\n myUserAccountLabel,\n fullOrganizationLabel,\n isDropdownShowing,\n buttonReference\n}) => {\n const onSelectCustomerAccount = React.useCallback(() => {\n onRequestStatement(false);\n }, [onRequestStatement]);\n\n const onSelectFullOrg = React.useCallback(() => {\n onRequestStatement(true);\n }, [onRequestStatement]);\n\n const popoverReference = buttonReference !== undefined ? buttonReference : React.createRef();\n const requestStatementDropdownString = `request-statement-dropdown-id-${Random.Guid.generateGuid()}`;\n return (\n
\n \n {requestStatementButtonLabel}\n \n \n \n {myUserAccountLabel}\n \n \n \n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\n/**\n * The interface for the props for the account statement request modal.\n */\ninterface IAccountStatementRequestModalProps {\n email: string;\n isModalOpen: boolean;\n fromDateString: string;\n toDateString: string;\n canSubmitRequest: boolean;\n modalHeaderLabel: string;\n sendToEmailLabel: string;\n fromDateLabel: string;\n toDateLabel: string;\n submitRequestLabel: string;\n cancelLabel: string;\n className: string;\n selectedUser: string;\n selectedUserLabel: string;\n toggle(): void;\n onChangeFromDate(newFromDate: string): void;\n onChangeToDate(newToDate: string): void;\n onSubmitRequest(): void;\n modalAriaLabel?: string;\n maxDateString?: string;\n}\n\nexport const RequestStatementModal: React.FC = ({\n className,\n email,\n isModalOpen,\n toggle,\n fromDateString,\n toDateString,\n onChangeFromDate,\n onChangeToDate,\n canSubmitRequest,\n modalHeaderLabel,\n sendToEmailLabel,\n fromDateLabel,\n toDateLabel,\n submitRequestLabel,\n cancelLabel,\n onSubmitRequest,\n selectedUser,\n selectedUserLabel,\n modalAriaLabel,\n maxDateString\n}) => {\n const onChangeFromDateEvent = React.useCallback(\n (event: React.ChangeEvent) => {\n const value = event.target.value;\n\n onChangeFromDate(value);\n },\n [onChangeFromDate]\n );\n\n const onChangeToDateEvent = React.useCallback(\n (event: React.ChangeEvent) => {\n const value = event.target.value;\n\n onChangeToDate(value);\n },\n [onChangeToDate]\n );\n\n /**\n * If the onBlur is called on the fromDate and the date has been changed, reset focus on it.\n * @param event - The event that is triggering onBlur.\n */\n const onBlurFromDate = React.useCallback(\n (event: React.ChangeEvent) => {\n if (ObjectExtensions.isFunction(event.target.focus) && event.target.value !== fromDateString) {\n event.target.focus();\n }\n },\n [fromDateString]\n );\n\n /**\n * If the onBlur is called on the toDate and the date has been changed, reset focus on it.\n * @param event - The event that is triggering onBlur.\n */\n const onBlurToDate = React.useCallback(\n (event: React.ChangeEvent) => {\n if (ObjectExtensions.isFunction(event.target.focus) && event.target.value !== toDateString) {\n event.target.focus();\n }\n },\n [toDateString]\n );\n\n return (\n \n {modalHeaderLabel}\n \n \n
\n
\n {email}\n
\n {selectedUser && (\n
\n {selectedUserLabel}\n {selectedUser}\n
\n )}\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n \n \n {submitRequestLabel}\n \n {` `}\n \n \n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { AdminRequestStatementButton } from './account-actions';\nimport { RequestStatementModal } from './account-statement-request-modal';\n\nexport * from './account-actions';\nexport * from './account-statement-request-modal';\n\ninterface IAccountLabel {\n name: string;\n accountNumber: string;\n createdOn: string;\n customerSincePrefix: string;\n}\n\ninterface IAccountValues {\n availableCredit: string;\n availableCreditLabel: string;\n}\n\n/**\n * Prop for Available credit component.\n */\ninterface ICreditSummaryAvailableCredit {\n availableCreditLabel: string;\n availableCredit: string;\n}\n\n/**\n * Prop for Balanced owed component.\n */\ninterface ICreditSummaryBalanceOwed {\n balanceOwedLabel: string;\n balanceOwed: string;\n}\n\n/**\n * Prop for credit excess component.\n */\ninterface ICreditSummaryCreditExcess {\n creditExcessLabel: string | null;\n creditExcess: string | null;\n}\n\ninterface ICreditSummaryLabel {\n availableCredit: string;\n balanceOwed: string;\n creditExcess: string | null;\n}\n\ninterface ICreditSummaryValues {\n availableCredit: string;\n balanceOwed: string;\n creditExcess: string | null;\n}\n\ninterface IBackButton {\n link: string;\n label: string;\n telemetryContent?: ITelemetryContent;\n}\n\nexport const AccountLabels: React.FC = ({ name, accountNumber, customerSincePrefix, createdOn }) => (\n
\n

{name}

\n
#{accountNumber}
\n
\n {customerSincePrefix} {createdOn}\n
\n
\n);\n\nexport const AccountValues: React.FC = ({ availableCredit, availableCreditLabel }) => (\n
\n
{availableCreditLabel}
\n
{availableCredit}
\n
\n);\n\nexport const CreditSummaryLabels: React.FC = ({ availableCredit, balanceOwed, creditExcess }) => (\n
\n
{availableCredit}
\n
{balanceOwed}
\n
{creditExcess}
\n
\n);\n\nexport const CreditSummaryValues: React.FC = ({ availableCredit, balanceOwed, creditExcess }) => (\n
\n
{availableCredit}
\n
{balanceOwed}
\n {creditExcess &&
{creditExcess}
}\n
\n);\n\n/**\n * Available credit component.\n * @param props - ICreditSummaryAvailableCredit.\n * @param props.availableCreditLabel - Available credit label.\n * @param props.availableCredit - Available credit value.\n * @returns - React Node for available credit component.\n */\nexport const AvailableCreditComponent: React.FC = ({ availableCreditLabel, availableCredit }) => (\n
\n
\n
{availableCreditLabel}
\n
\n
\n
{availableCredit}
\n
\n
\n);\n\n/**\n * Balance Owed Component.\n * @param props - ICreditSummaryBalanceOwed.\n * @param props.balanceOwedLabel - Balance Owed label.\n * @param props.balanceOwed - Balance Owed value.\n * @returns - React Node for balance owed component.\n */\nexport const BalanceOwedComponent: React.FC = ({ balanceOwedLabel, balanceOwed }) => (\n
\n
\n
{balanceOwedLabel}
\n
\n
\n
{balanceOwed}
\n
\n
\n);\n\n/**\n * Credit Excess Component.\n * @param props - ICreditSummaryCreditExcess.\n * @param props.creditExcessLabel - Credit excess label.\n * @param props.creditExcess - Credit excess value.\n * @returns - React Node for credit excess component.\n */\nexport const CreditExcessComponent: React.FC = ({ creditExcessLabel, creditExcess }) => (\n
\n {creditExcess && (\n
\n
{creditExcessLabel}
\n
\n )}\n
\n {creditExcess &&
{creditExcess}
}\n
\n
\n);\nexport const BackButton: React.FC = ({ link, label, telemetryContent }) => {\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.BackToShopping);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n {label}\n \n );\n};\n\nexport { AdminRequestStatementButton, RequestStatementModal };\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAccountWelcomeTileData } from './account-welcome-tile.data';\nimport { IAccountWelcomeTileProps } from './account-welcome-tile.props.autogenerated';\n\nexport interface IAccountWelcomeTileViewProps extends IAccountWelcomeTileProps {\n AccountWelcomeTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n}\n\n/**\n *\n * AccountWelcome component.\n * @extends {React.PureComponent>}\n */\nclass AccountWelcomeTile extends React.PureComponent> {\n public render(): JSX.Element {\n const { config, data } = this.props;\n const { className } = config;\n\n const accountInfo = data.accountInformation.result;\n const heading = {\n ...config.heading,\n ...{\n text: `${config.heading.text} ${accountInfo && accountInfo.FirstName ? accountInfo.FirstName : ''}`\n }\n };\n\n const viewProps = {\n ...this.props,\n className,\n AccountWelcomeTile: {\n moduleProps: this.props,\n className: classnames('ms-account-welcome-tile', config.className)\n },\n heading: heading && (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading.text = event.target.value);\n}\n\nexport default AccountWelcomeTile;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAccountWelcomeTileViewProps } from './account-welcome-tile';\n\nconst AccountWelcomeTileView: React.FC = props => {\n const { AccountWelcomeTile, heading } = props;\n\n return {heading};\n};\n\nexport default AccountWelcomeTileView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { ICoreContext, IDateFormatOptions, IRequestContext } from '@msdyn365-commerce/core';\nimport { BusinessPartnerOperationRequest, BusinessPartnerOperationRequestDetails } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n IDataTableProps,\n IHeadingsProperty,\n ITableItemProps,\n ITableRowProps,\n Table,\n TableDataType\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IB2bRequestsStatusData } from '../b2b-requests-status.data';\nimport { IB2bRequestsStatusProps } from '../b2b-requests-status.props.autogenerated';\n\nexport interface IB2bRequestsTableProps {\n moduleProps: IB2bRequestsStatusProps;\n isMobile: boolean;\n mobileExcludedColumns: string[];\n}\n\nexport interface IB2bRequestsTableResources {\n b2bRequestsTypeCreateProspect: string;\n b2bRequestsTypeAddUser: string;\n b2bRequestsTypeEditUser: string;\n b2bRequestsTypeDeleteUser: string;\n b2bRequestsTypeRequestAccountStatement: string;\n b2bRequestsTypeRequestInvoiceCopy: string;\n b2bRequestsTypeUnknown: string;\n b2bRequestsStatusRequested: string;\n b2bRequestsStatusProcessed: string;\n b2bRequestsStatusError: string;\n b2bRequestsNumberOfItems: string;\n b2bRequestsNumberOfItemsSingular: string;\n b2bRequestsNameDisplay: string;\n b2bRequestsPreviousText: string;\n b2bRequestsNextText: string;\n b2bRequestsUserColumn: string;\n b2bRequestsStatusColumn: string;\n b2bRequestsRequestDateColumn: string;\n b2bRequestsTypeColumn: string;\n b2bRequestsDescriptionColumn: string;\n b2bRequestsAccountStatementDetails: string;\n b2bRequestsInvoiceCopyDetails: string;\n businessUserSelectCheckBoxAriaLabelText?: string;\n sortByAscending?: string;\n sortByDescending?: string;\n}\n\nexport enum RequestsTableColumnHeader {\n Name = 'User',\n Status = 'Status',\n RequestDate = 'Request date',\n Type = 'Request type',\n Description = 'Request detail'\n}\n\nconst getCurrentUrl = (reqContext: IRequestContext): URL => {\n if (MsDyn365.isBrowser) {\n return new URL(window.location.href);\n }\n\n // NOTE: Typing on requestURL is incorrect\n if (reqContext.url.requestUrl.href) {\n return new URL(reqContext.url.requestUrl.href);\n }\n return new URL(reqContext.url.requestUrl.href);\n};\n\nconst getUserName = (request: BusinessPartnerOperationRequest, resources: IB2bRequestsTableResources) => {\n if (StringExtensions.isNullOrEmpty(request.UserFirstName)) {\n if (StringExtensions.isNullOrEmpty(request.UserLastName)) {\n return '';\n }\n\n return request.UserLastName;\n } else if (StringExtensions.isNullOrEmpty(request.UserLastName)) {\n return request.UserFirstName;\n }\n\n return resources.b2bRequestsNameDisplay.replace('{0}', request.UserFirstName!).replace('{1}', request.UserLastName!);\n};\n\nconst formatDate = (context: ICoreContext, date: Date | undefined) => {\n if (date === undefined) {\n return '';\n }\n\n const dateOptions: IDateFormatOptions = { year: 'numeric', month: 'long', day: 'numeric' };\n return context.cultureFormatter.formatDate(date, dateOptions);\n};\n\n/**\n * Gets the value to display for the request details.\n * @param request - The request to parse for the details.\n * @param resources - The resources.\n * @param context - The context.\n * @returns The string to display.\n */\nconst getDetails = (request: BusinessPartnerOperationRequest, resources: IB2bRequestsTableResources, context: ICoreContext) => {\n if (!request.Details) {\n return '';\n }\n\n const requestDetails: BusinessPartnerOperationRequestDetails = request.Details;\n\n const accountStatementStartDateTime = formatDate(context, requestDetails.AccountStatementStartDateTime) || '';\n const accountStatementEndDateTime = formatDate(context, requestDetails.AccountStatementEndDateTime) || '';\n const invoiceId = requestDetails.InvoiceId ?? '';\n\n switch (request.TypeValue) {\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers -- workaround for not being able to use enum value\n case 5:\n if (\n !StringExtensions.isNullOrEmpty(accountStatementStartDateTime) &&\n !StringExtensions.isNullOrEmpty(accountStatementEndDateTime)\n ) {\n return resources.b2bRequestsAccountStatementDetails\n .replace('{0}', accountStatementStartDateTime)\n .replace('{1}', accountStatementEndDateTime);\n }\n\n return '';\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers -- workaround for not being able to use enum value\n case 6:\n if (!StringExtensions.isNullOrEmpty(invoiceId)) {\n return resources.b2bRequestsInvoiceCopyDetails.replace('{0}', invoiceId);\n }\n\n return '';\n default:\n return '';\n }\n};\n\nconst createTableItems = (\n operationRequests: BusinessPartnerOperationRequest[] | undefined,\n props: IB2bRequestsStatusProps\n): ITableRowProps[] => {\n if (!ArrayExtensions.hasElements(operationRequests)) {\n return [];\n }\n\n return operationRequests.map(request => {\n return {\n row: [\n {\n id: props.resources.b2bRequestsTypeColumn,\n type: TableDataType.Text,\n value: getDisplayFriendlyTypeValue(request.TypeValue ?? 0, props.resources)\n } as ITableItemProps,\n {\n id: props.resources.b2bRequestsRequestDateColumn,\n type: TableDataType.Text,\n value: formatDate(props.context, request.CreatedDateTime)\n } as ITableItemProps,\n {\n id: props.resources.b2bRequestsDescriptionColumn,\n type: TableDataType.Text,\n value: getDetails(request, props.resources, props.context)\n } as ITableItemProps,\n {\n id: props.resources.b2bRequestsUserColumn,\n type: TableDataType.Text,\n value: getUserName(request, props.resources)\n } as ITableItemProps,\n {\n id: props.resources.b2bRequestsStatusColumn,\n type: TableDataType.Text,\n value: getDisplayFriendlyStatusValue(request.StatusValue ?? 0, props.resources)\n } as ITableItemProps\n ],\n isSelected: false,\n className: props.config.className\n };\n });\n};\n\nconst getDisplayFriendlyTypeValue = (typeValue: number, resources: IB2bRequestsTableResources): string => {\n switch (typeValue) {\n case 1:\n return resources.b2bRequestsTypeCreateProspect;\n case 2:\n return resources.b2bRequestsTypeAddUser;\n case 3:\n return resources.b2bRequestsTypeDeleteUser;\n case 4:\n return resources.b2bRequestsTypeEditUser;\n case 5:\n return resources.b2bRequestsTypeRequestAccountStatement;\n case 6:\n return resources.b2bRequestsTypeRequestInvoiceCopy;\n default:\n return resources.b2bRequestsTypeUnknown;\n }\n};\n\nconst getDisplayFriendlyStatusValue = (statusValue: number, resources: IB2bRequestsTableResources): string => {\n switch (statusValue) {\n case 1:\n return resources.b2bRequestsStatusProcessed;\n case 2:\n return resources.b2bRequestsStatusError;\n default:\n return resources.b2bRequestsStatusRequested;\n }\n};\n\nconst createTableProps = (tableProps: IB2bRequestsTableProps) => {\n const { context, data, resources } = tableProps.moduleProps;\n\n const tableData = createTableItems(data.operationRequests.result, tableProps.moduleProps);\n const tableHeading =\n (ArrayExtensions.hasElements(tableData) &&\n tableData[0].row\n .filter(item => {\n // Check that this is either not mobile or the column should be displayed when mobile.\n return !tableProps.isMobile || !tableProps.mobileExcludedColumns.includes(item.id);\n })\n .map(item => {\n return {\n name: item.id,\n sortable: true,\n ariaLabel: resources.columnSortAriaLabel\n } as IHeadingsProperty;\n })) ||\n [];\n\n return {\n resources: {},\n headings: tableHeading,\n rows: tableData,\n className: `${tableProps.moduleProps.config.className}__table`,\n editLinkText: '',\n deleteLinkText: '',\n viewLinkText: '',\n enableToModify: false,\n actionLinkText: '',\n showCheckBoxes: false,\n isSortable: true,\n showPagination: true,\n minifyActions: tableProps.isMobile,\n excludedColumns: tableProps.isMobile ? tableProps.mobileExcludedColumns : [],\n paginationProperty: {\n skipCount:\n context.request.query?.skip && !isNaN(Number.parseInt(context.request.query.skip, 10))\n ? Number.parseInt(context.request.query.skip, 10)\n : 0,\n itemPerPage: 10,\n prevText: resources.b2bRequestsPreviousText,\n nextText: resources.b2bRequestsNextText,\n paginationText: '',\n url: (context && getCurrentUrl(context.request).href) || ''\n },\n isSingleSelectOnly: true,\n actions: {\n onDelete: undefined,\n onEdit: undefined,\n onView: undefined\n },\n businessUserSelectCheckBoxAriaLabelText: tableProps.moduleProps.resources.businessUserSelectCheckBoxAriaLabelText,\n sortByAscending: tableProps.moduleProps.resources.sortByAscending,\n sortByDescending: tableProps.moduleProps.resources.sortByDescending\n } as IDataTableProps;\n};\n\nexport const B2bRequestsTable: React.FC = (tableProps: IB2bRequestsTableProps) => {\n return ;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { format, Heading, IModuleProps, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { IB2bRequestsStatusData } from './b2b-requests-status.data';\nimport { IB2bRequestsStatusProps, IHeadingData } from './b2b-requests-status.props.autogenerated';\nimport { B2bRequestsTable } from './components/b2b-requests-table';\n\nexport interface IB2bRequestsStatusViewProps extends IB2bRequestsStatusProps {\n b2bRequestsStatus: IModuleProps;\n heading?: React.ReactNode;\n table: React.ReactNode;\n}\n\n/**\n *\n * B2bRequestsStatus component.\n * @extends {React.PureComponent>}\n */\nclass B2bRequestsStatus extends React.PureComponent> {\n @computed get isMobile(): boolean {\n const size = isMobile({ variant: VariantType.Viewport, context: this.props.context.request });\n return size === 'xs';\n }\n\n public render(): JSX.Element | null {\n const { config, data } = this.props;\n\n if (!data.customerInformation.result?.IsB2b || !data.b2bUserInformation.result?.B2BUserId) {\n return null;\n }\n\n const className = config.className || '';\n\n const viewProps = {\n ...this.props,\n b2bRequestsStatus: {\n moduleProps: this.props,\n className\n },\n heading: this.renderHeader(className, config.heading),\n table: this.renderTable()\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private readonly renderHeader = (className: string, headingData: IHeadingData): React.ReactNode => {\n const itemCount = this.props.data.operationRequests.result?.length ?? 0;\n\n return (\n
\n \n {this.getItemNumberDisplayString(itemCount)}\n
\n );\n };\n\n /**\n * Returns columns that needs to be excluded for mobile view.\n * @returns Array of column names.\n */\n private readonly _retrieveExcludedColumns = (): string[] => {\n const { resources } = this.props;\n return [resources.b2bRequestsRequestDateColumn, resources.b2bRequestsDescriptionColumn, resources.b2bRequestsUserColumn];\n };\n\n private readonly renderTable = (): React.ReactNode => {\n return (\n \n );\n };\n\n private readonly getItemNumberDisplayString = (itemCount: number): string => {\n switch (itemCount) {\n case 0:\n return '';\n case 1:\n return format(this.props.resources.b2bRequestsNumberOfItemsSingular, itemCount);\n default:\n return format(this.props.resources.b2bRequestsNumberOfItems, itemCount);\n }\n };\n}\n\nexport default B2bRequestsStatus;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { IB2bRequestsStatusViewProps } from './b2b-requests-status';\n\nconst B2bRequestsStatusView: React.FC = props => {\n const { b2bRequestsStatus, heading, table } = props;\n return (\n \n {heading}\n {table}\n \n );\n};\n\nexport default B2bRequestsStatusView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../../..';\n\nexport interface IB2bRequestsTileLinksProps {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nconst defaultClassName = 'ms-account-b2b-requests-tile';\n\nexport const B2bRequestsTileLinks: React.FC = ({ links, telemetryContent, onTextChange, requestContext }) => {\n if (!ArrayExtensions.hasElements(links)) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n {ArrayExtensions.hasElements(editableLinks) ? (\n \n ) : null}\n
\n );\n};\n\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!ArrayExtensions.hasElements(linkdata)) {\n return null;\n }\n\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n\n return linkdata.map(link => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return {\n ariaLabel: link.ariaLabel,\n className: `${defaultClassName}__link`,\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n } as Msdyn365.ILinksData;\n });\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IB2bRequestsTileData } from './b2b-requests-tile.data';\nimport { IB2bRequestsTileProps } from './b2b-requests-tile.props.autogenerated';\nimport { B2bRequestsTileLinks } from './components/account-b2b-requests-tile-links';\n\nexport interface IB2bRequestsTileViewProps extends IB2bRequestsTileProps {\n b2bRequestsTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n links?: React.ReactNode;\n}\n\n/**\n *\n * B2bRequestsTile component.\n * @extends {React.PureComponent>}\n */\nclass B2bRequestsTile extends React.PureComponent> {\n private readonly telemetryContent?: ITelemetryContent;\n\n constructor(props: IB2bRequestsTileProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public render(): JSX.Element | null {\n const { config, data } = this.props;\n const { className, heading, links } = config;\n\n const defaultClassName = 'ms-account-b2b-requests-tile';\n\n if (!data.customerInformation.result?.IsB2b) {\n return null;\n }\n\n const viewProps = {\n ...this.props,\n className,\n b2bRequestsTile: {\n moduleProps: this.props,\n className: classnames(defaultClassName, config.className)\n },\n heading: heading && heading.text && (\n \n ),\n links: ArrayExtensions.hasElements(links) && (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading.text = event.target.value);\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.links && this.props.config.links[linkIndex]) {\n this.props.config.links[linkIndex].linkText = event.target.value;\n }\n };\n}\n\nexport default B2bRequestsTile;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IB2bRequestsTileViewProps } from './b2b-requests-tile';\n\nconst B2bRequestsTileView: React.FC = props => {\n const { b2bRequestsTile, heading, links } = props;\n\n return (\n \n {heading}\n {links}\n \n );\n};\n\nexport default B2bRequestsTileView;\n"],"names":["AccountCustomerBalance","React","constructor","props","super","_showRequestStatementModal","this","state","isStatementRequestModalOpen","setState","_toggleModal","_toggleDropdown","isStatementRequestAdminDropdownOpen","_updateFromDate","newFromDate","statementRequestFromDateString","_updateToDate","newToDate","statementRequestToDateString","_adminShowRequestStatementModal","isFullOrg","statementRequestFullOrg","_requestStatement","_this$props$data$b2bU","customer","data","customerInformation","result","B2BUserId","b2bUserInformation","statementRequest","FromDate","Date","ToDate","IsForFullOrganization","RequestedUserId","RequestingUserEmail","Email","DeliveryTypeValue","BusinessPartnerOperationDeliveryType","context","callerContext","actionContext","BusinessPartnerUsersDataActions","telemetryContent","getTelemetryObject","request","telemetryPageName","friendlyName","telemetry","statementRequestMaxDateString","toISOString","split","render","_get","account","includes","undefined","error","config","resources","heading","creditSummarySectionHeading","accountSectionHeading","backToShoppingText","customerSincePrefix","availableCreditLabel","balanceOwedLabel","creditExcessLabel","requestStatementButtonLabel","modalHeaderLabel","sendToEmailLabel","fromDateLabel","toDateLabel","submitRequestLabel","cancelLabel","myAccountStatementLabel","fullOrganizationLabel","modalAriaLabel","accountNumber","AccountNumber","createdOn","_formatJoinDate","CreatedDateTime","name","FirstName","LastName","customerCredit","customerAccountBalance","excess","InvoiceAccountCreditLimit","CreditLimit","Balance","InvoiceAccountBalance","creditExcess","_formatCurrency","availableCredit","balanceOwed","backLink","Msdyn365","emailAddress","isB2BUser","IsB2b","actionBar","IsB2bAdmin","AdminRequestStatementButton","className","onRequestStatement","onToggleDropdown","myUserAccountLabel","isDropdownShowing","ActionBar","viewProps","_objectSpread","Heading","text","tag","accountLabels","AccountLabels","accountValues","AccountValues","AvailableCreditComponent","BalanceOwedComponent","CreditExcessComponent","homeButton","BackButton","label","link","actions","requestStatementModal","RequestStatementModal","email","isModalOpen","toggle","fromDateString","toDateString","onChangeFromDate","onChangeToDate","canSubmitRequest","canSubmitStatementRequest","onSubmitRequest","selectedUser","selectedUserLabel","maxDateString","renderView","currency","currencyCode","formatCurrency","toFixed","date","Intl","DateTimeFormat","requestContext","locale","month","day","year","format","__decorate","computed","_ref","Button","onClick","_ref2","buttonReference","onSelectCustomerAccount","onSelectFullOrg","popoverReference","requestStatementDropdownString","Random","Guid","generateGuid","innerRef","id","Popover","isOpen","placement","target","role","onChangeFromDateEvent","event","value","onChangeToDateEvent","onBlurFromDate","ObjectExtensions","isFunction","focus","onBlurToDate","Modal","horizontalPosition","verticalPosition","autoFocus","fade","ModalHeader","ModalBody","htmlFor","type","onBlur","onChange","max","min","ModalFooter","disabled","_ref5","_ref6","_ref7","_ref8","payLoad","getPayloadObject","TelemetryConstant","BackToShopping","attributes","getTelemetryAttributes","Object","assign","href","AccountWelcomeTile","handleHeadingChange","accountInfo","accountInformation","moduleProps","classnames","editProps","onEdit","Module","RequestsTableColumnHeader","getUserName","StringExtensions","isNullOrEmpty","UserFirstName","UserLastName","b2bRequestsNameDisplay","replace","formatDate","cultureFormatter","getDetails","_requestDetails$Invoi","Details","requestDetails","accountStatementStartDateTime","AccountStatementStartDateTime","accountStatementEndDateTime","AccountStatementEndDateTime","invoiceId","InvoiceId","TypeValue","b2bRequestsAccountStatementDetails","b2bRequestsInvoiceCopyDetails","getDisplayFriendlyTypeValue","typeValue","b2bRequestsTypeCreateProspect","b2bRequestsTypeAddUser","b2bRequestsTypeDeleteUser","b2bRequestsTypeEditUser","b2bRequestsTypeRequestAccountStatement","b2bRequestsTypeRequestInvoiceCopy","b2bRequestsTypeUnknown","getDisplayFriendlyStatusValue","statusValue","b2bRequestsStatusProcessed","b2bRequestsStatusError","b2bRequestsStatusRequested","createTableProps","tableProps","_context$request$quer","tableData","operationRequests","ArrayExtensions","hasElements","map","_request$TypeValue","_request$StatusValue","row","b2bRequestsTypeColumn","TableDataType","Text","b2bRequestsRequestDateColumn","b2bRequestsDescriptionColumn","b2bRequestsUserColumn","b2bRequestsStatusColumn","StatusValue","isSelected","createTableItems","headings","filter","item","isMobile","mobileExcludedColumns","sortable","ariaLabel","columnSortAriaLabel","rows","editLinkText","deleteLinkText","viewLinkText","enableToModify","actionLinkText","showCheckBoxes","isSortable","showPagination","minifyActions","excludedColumns","paginationProperty","skipCount","query","skip","isNaN","Number","parseInt","itemPerPage","prevText","b2bRequestsPreviousText","nextText","b2bRequestsNextText","paginationText","url","reqContext","MsDyn365","isBrowser","URL","window","location","requestUrl","isSingleSelectOnly","onDelete","onView","businessUserSelectCheckBoxAriaLabelText","sortByAscending","sortByDescending","B2bRequestsTable","Table","B2bRequestsStatus","renderHeader","headingData","_this$props$data$oper","_this$props$data$oper2","itemCount","length","getItemNumberDisplayString","_retrieveExcludedColumns","renderTable","b2bRequestsNumberOfItemsSingular","b2bRequestsNumberOfItems","variant","VariantType","Viewport","_data$customerInforma","_data$b2bUserInformat","b2bRequestsStatus","table","defaultClassName","B2bRequestsTileLinks","links","onTextChange","editableLinks","_mapEditableLinks","linkdata","contentAction","etext","linkText","linkUrl","destinationUrl","openInNewTab","additionalProperties","B2bRequestsTile","handleLinkTextChange","linkIndex","b2bRequestsTile"],"sourceRoot":""}