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I,EAASP,EAAQI,EAAYC,EAArD,GACvC,EAOiB/F,EAAAkG,2BAA6B,SAACtI,GAC3C,IAAKA,EAAS5H,SAlNO,qBAmNjB,OAAO,EAGX,IACM2P,EADU3F,EAAKmD,MACEvF,GAEvB,SAAI+H,IAAUzY,EAAAA,gBAAAA,YAA4ByY,EAAOzB,SAASnX,QAAO,SAAAkZ,GAAW,OAAAA,EAAQjQ,SAxN9D,qBAwNsD,KAKhF,EAUiBgK,EAAAoE,SAAW,SACxBpmB,EACA0nB,EACAI,EACAC,GAEA,IACMJ,EADU3F,EAAKmD,MACEnlB,GACvB,QAAK2nB,IAKAA,EAAOzB,UAAuC,IAA3ByB,EAAOzB,SAASzb,OAKjCuX,EAAK6F,mBAAmB7nB,EAAI0nB,EAAQI,EAAYC,GAJ5C/F,EAAKyF,cAAcznB,EAAI0nB,GAKtC,EAMiB1F,EAAA5b,uBAAyB,WACtC,QAAS4b,EAAKhhB,MAAMmnB,aACxB,EAOiBnG,EAAA0E,eAAiB,SAAC1mB,GAG/B,QAFgBgiB,EAAKmD,MACEnlB,EAE3B,EAjQIgiB,EAAKyD,kBAAiB,CAC1B,CAiQJ,OArQ0B2C,EAAAA,EAAAA,IAAA7C,EAAAD,GAMfC,EAAAvC,UAAAvc,sBAAP,SAA6BC,GACzB,OAAIrF,KAAKL,QAAU0F,CAIvB,EAEO6e,EAAAvC,UAAAnc,OAAP,WACY,IAAA7G,EAAOqB,KAAKL,MAAKhB,GACzB,OAAOK,EAAAA,cAACglB,GAAgBO,EAAAA,EAAAA,IAAA,GAAKvkB,KAAKL,MAAK,CAAEgB,YAAaX,KAAK8kB,sBAAsBnmB,KACrF,EAhBEulB,GAAWld,EAAAA,EAAAA,IAAA,CADhBK,EAAAA,IAAQ,uCACH6c,EAqQL,CArQD,CAA0BllB,EAAAA,UAwQ9B","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/absolute-terms-conditions/components/absolute-terms-conditions.check-box.tsx?3776","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-terms-conditions/components/absolute-terms-conditions.error-message.tsx?4e5f","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-terms-conditions/components/absolute-terms-conditions.error-title.tsx?7d69","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-terms-conditions/absolute-terms-conditions.tsx?9580","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-terms-conditions/absolute-terms-conditions.view.tsx?4b6c","webpack://Msdyn365.Commerce.Online/./src/modules/connelly-invoices-list/components/invoice-error-component.tsx?392e","webpack://Msdyn365.Commerce.Online/./src/modules/connelly-invoices-list/components/invoices-filter-component.tsx?7a3c","webpack://Msdyn365.Commerce.Online/./src/modules/connelly-invoices-list/components/invoices-table/components/invoices-table-header-component.tsx?f77b","webpack://Msdyn365.Commerce.Online/./src/modules/connelly-invoices-list/helpers/invoice-status.ts?38e1","webpack://Msdyn365.Commerce.Online/./src/modules/connelly-invoices-list/components/pay-invoice-component.tsx?245b","webpack://Msdyn365.Commerce.Online/./src/modules/connelly-invoices-list/helpers/pay-invoices.ts?87b6","webpack://Msdyn365.Commerce.Online/./src/modules/connelly-invoices-list/components/request-invoice-button.tsx?95c8","webpack://Msdyn365.Commerce.Online/./src/modules/connelly-invoices-list/components/invoices-table/components/invoices-table-row-component.tsx?152f","webpack://Msdyn365.Commerce.Online/./src/modules/connelly-invoices-list/components/invoices-table/invoices-table-component.tsx?82f9","webpack://Msdyn365.Commerce.Online/./src/modules/connelly-invoices-list/components/make-payment-component.tsx?0c69","webpack://Msdyn365.Commerce.Online/./src/modules/connelly-invoices-list/components/request-invoice-modal.tsx?e137","webpack://Msdyn365.Commerce.Online/./src/modules/connelly-invoices-list/helpers/invoice-data.ts?e274","webpack://Msdyn365.Commerce.Online/./src/modules/connelly-invoices-list/connelly-invoices-list.tsx?cb7a","webpack://Msdyn365.Commerce.Online/./src/modules/connelly-invoices-list/connelly-invoices-list.view.tsx?9a51","webpack://Msdyn365.Commerce.Online/../../src/checkout-state-data-action.ts?8344","webpack://Msdyn365.Commerce.Online/../../src/checkout-state.ts?acd8","webpack://Msdyn365.Commerce.Online/../../../src/module-state-manager/module-state.ts?7579","webpack://Msdyn365.Commerce.Online/../../../src/module-state-manager/with-module-state.tsx?61ca"],"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 { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface ICheckoutTermsAndConditionsCheckboxProps {\r\n isChecked: boolean;\r\n ariaLabel?: string;\r\n disabled: boolean;\r\n id?: string;\r\n telemetryContent?: ITelemetryContent;\r\n onChange(event: React.ChangeEvent): void;\r\n}\r\n\r\n/**\r\n * AddPaymentForm SFC.\r\n * @param root0\r\n * @param root0.isChecked\r\n * @param root0.ariaLabel\r\n * @param root0.disabled\r\n * @param root0.telemetryContent\r\n * @param root0.onChange\r\n * @param root0.id\r\n * @extends {React.FC}\r\n */\r\nconst CheckoutTermsAndConditionsCheckbox: React.FC = ({\r\n isChecked,\r\n ariaLabel,\r\n disabled,\r\n telemetryContent,\r\n onChange,\r\n id\r\n}) => {\r\n\r\n const payLoad = getPayloadObject('click', telemetryContent!, '');\r\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n\r\n return (\r\n <>\r\n \r\n \r\n );\r\n};\r\n\r\nexport default CheckoutTermsAndConditionsCheckbox;\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 React from 'react';\r\n\r\nexport interface ICheckoutTermsAndConditionsErrorMessageProps {\r\n message?: string;\r\n}\r\n\r\n/**\r\n * AddPaymentForm SFC.\r\n * @param root0\r\n * @param root0.message\r\n * @extends {React.FC}\r\n */\r\nconst CheckoutTermsAndConditionsErrorMessage: React.FC = ({\r\n message\r\n}) => {\r\n if (!message) {\r\n return null;\r\n }\r\n\r\n return (\r\n

\r\n {message}\r\n

\r\n );\r\n\r\n};\r\n\r\nexport default CheckoutTermsAndConditionsErrorMessage;\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 React from 'react';\r\n\r\nexport interface ICheckoutTermsAndConditionsErrorTitleProps {\r\n title?: string;\r\n}\r\n\r\n/**\r\n * AddPaymentForm SFC.\r\n * @param root0\r\n * @param root0.title\r\n * @extends {React.FC}\r\n */\r\nconst CheckoutTermsAndConditionsErrorTitle: React.FC = ({\r\n title\r\n}) => {\r\n if (!title) {\r\n return null;\r\n }\r\n\r\n return (\r\n

\r\n {title}\r\n

\r\n );\r\n\r\n};\r\n\r\nexport default CheckoutTermsAndConditionsErrorTitle;\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 { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { Button, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classname from 'classnames';\r\nimport { action, computed, observable, reaction, when } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { IAbsoluteTermsConditionsData } from './absolute-terms-conditions.data';\r\nimport {\r\n IAbsoluteTermsConditionsProps\r\n} from './absolute-terms-conditions.props.autogenerated';\r\nimport CheckboxComponent from './components/absolute-terms-conditions.check-box';\r\nimport ErrorMessageComponent from './components/absolute-terms-conditions.error-message';\r\nimport ErrorTitleComponent from './components/absolute-terms-conditions.error-title';\r\n\r\nexport interface ICheckoutTermsAndConditionsModuleProps extends IAbsoluteTermsConditionsProps, IModuleStateProps { }\r\n\r\nexport interface ICheckoutTermsAndConditions {\r\n termsAndConditionAcceptance: INodeProps;\r\n checkBox: React.ReactNode;\r\n description: React.ReactNode;\r\n}\r\n\r\nexport interface ICheckoutTermsAndConditionsError {\r\n error: INodeProps;\r\n title: React.ReactNode;\r\n message: React.ReactNode;\r\n}\r\n\r\nexport interface ICheckoutTermsAndConditionsViewState {\r\n isError: boolean;\r\n isShowSaveButton: boolean;\r\n isShowEditButton: boolean;\r\n isShowCancelButton: boolean;\r\n}\r\n\r\nexport interface ICheckoutTermsAndConditionsViewProps extends IAbsoluteTermsConditionsProps<{}> {\r\n checkoutTermsAndConditions: IModuleProps;\r\n isTermsAccepted: boolean;\r\n errorMessageData: string;\r\n viewState: ICheckoutTermsAndConditionsViewState;\r\n termsAndConditionsContent: ICheckoutTermsAndConditions;\r\n errorMessage?: ICheckoutTermsAndConditionsError;\r\n saveButton?: React.ReactNode;\r\n editButton?: React.ReactNode;\r\n cancelButton?: React.ReactNode;\r\n onChange(event: React.ChangeEvent): void;\r\n onSave(): void;\r\n onEdit(): void;\r\n onCancel(): void;\r\n termsTitle?: React.ReactNode;\r\n termsContent?: string;\r\n}\r\n\r\n/**\r\n *\r\n * CheckoutTermsAndConditions component.\r\n * @extends {React.Component>}\r\n */\r\n// @ts-expect-error\r\n@withModuleState\r\n@observer\r\nclass CheckoutTermsAndConditions extends React.Component {\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n @observable private isTermsAccepted: boolean = true;\r\n\r\n @observable private errorMessage?: string;\r\n\r\n constructor(props: ICheckoutTermsAndConditionsModuleProps) {\r\n super(props);\r\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\r\n }\r\n\r\n @computed get isDataReady(): boolean {\r\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\r\n }\r\n\r\n @computed get isShowButtons(): boolean {\r\n const { showControlButtons } = this.props.config;\r\n return !this.props.moduleState.hasExternalSubmitGroup && (showControlButtons || false);\r\n }\r\n\r\n @computed get isAutoSave(): boolean {\r\n const { showControlButtons } = this.props.config;\r\n return !this.props.moduleState.hasExternalSubmitGroup && !showControlButtons;\r\n }\r\n\r\n @computed get defaultTermsAndConditionAcceptedValue(): boolean {\r\n const { showCheckbox } = this.props.config;\r\n return !showCheckbox;\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n when(\r\n () => this.isDataReady,\r\n async () => {\r\n await this.init();\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.data.checkout.result && this.props.data.checkout.result.isTermsAndConditionAccepted,\r\n async () => {\r\n this.isTermsAccepted = this.props.data.checkout.result?.isTermsAndConditionAccepted || this.defaultTermsAndConditionAcceptedValue;\r\n }\r\n );\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: ICheckoutTermsAndConditionsModuleProps,\r\n nextState: ICheckoutTermsAndConditionsViewState): boolean {\r\n if (this.state === nextState && this.props === nextProps) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n moduleState: { isReady, hasError },\r\n config: { className }\r\n } = this.props;\r\n\r\n const { \r\n termsTitle,\r\n termsContent\r\n } = this.props.config;\r\n\r\n\r\n const TermsTitle = termsTitle && (\r\n \r\n );\r\n\r\n const TermsContent = termsContent && (\r\n ${termsContent}

`}\r\n editProps={{ onEdit: this.handleParagraphChange1, requestContext: this.props.context.request }}\r\n />\r\n );\r\n\r\n const isTermsAndConditionAccepted = this.props.data.checkout.result?.isTermsAndConditionAccepted;\r\n const isError = hasError;\r\n const isShowContent = !isReady;\r\n const isShowSelected = !hasError && isReady;\r\n\r\n const viewProps = {\r\n ...this.props,\r\n ...this.state,\r\n isTermsAccepted: this.isTermsAccepted,\r\n errorMessageData: this.errorMessage,\r\n viewState: {\r\n isError,\r\n isShowSaveButton: isShowContent && this.isShowButtons,\r\n isShowEditButton: isShowSelected && this.isShowButtons,\r\n isShowCancelButton: isShowContent && this.isShowButtons && isTermsAndConditionAccepted\r\n },\r\n checkoutTermsAndConditions: {\r\n moduleProps: this.props,\r\n className: classname('ms-checkout-terms-and-conditions', className)\r\n },\r\n termsAndConditionsContent: this.getTermsAndConditions(),\r\n errorMessage: this.getErrorMessage(),\r\n saveButton: this.getSaveButton(),\r\n editButton: this.getEditButton(),\r\n cancelButton: this.getCancelButton(),\r\n onSave: this.onSubmit,\r\n onEdit: this.onEdit,\r\n onCancel: this.onCancel,\r\n onChange: this.onChange,\r\n termsTitle: TermsTitle,\r\n termsContent: TermsContent,\r\n };\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n public handleTextChange1 = (event: MsDyn365.ContentEditableEvent) => this.props.config.termsTitle!.text = event.target.value;\r\n public handleParagraphChange1 = (event: MsDyn365.ContentEditableEvent) => this.props.config.termsContent! = event.target.value;\r\n\r\n public handleTextChange = (event: MsDyn365.ContentEditableEvent) => this.props.config.description = event.target.value;\r\n\r\n private readonly getTermsAndConditions = (): ICheckoutTermsAndConditions => {\r\n const {\r\n moduleState: { isReady },\r\n config: { showCheckbox, description }\r\n } = this.props;\r\n const isDisabled = isReady && !this.isAutoSave;\r\n const isTermsAndConditionAccepted = this.isTermsAccepted;\r\n const { checkboxAriaLabel } = this.props.resources;\r\n return {\r\n termsAndConditionAcceptance: { className: 'ms-checkout-terms-and-conditions__container' },\r\n checkBox: showCheckbox && ,\r\n description: \r\n };\r\n };\r\n\r\n @action\r\n private readonly init = async (): Promise => {\r\n const {\r\n data,\r\n config: { showCheckbox }\r\n } = this.props;\r\n\r\n const hasInvoiceLine = this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\r\n\r\n // If hasInvoiceLine is true, this is for b2b and isTermsAccepted should be true\r\n if (hasInvoiceLine || data.checkout.result?.isTermsAndConditionAccepted || !showCheckbox) {\r\n await this.updateTermsAndConditionsAcceptance(true);\r\n this.isTermsAccepted = true;\r\n } else if (showCheckbox) {\r\n await this.updateTermsAndConditionsAcceptance(false);\r\n this.isTermsAccepted = false;\r\n }\r\n\r\n this.props.moduleState.init({\r\n onEdit: this.onEdit,\r\n onCancel: this.onCancel,\r\n onSubmit: this.onSubmit,\r\n status: hasInvoiceLine ? 'disabled' : (this.isTermsAccepted ? 'ready' : 'updating')\r\n });\r\n };\r\n\r\n private readonly getErrorMessage = (): ICheckoutTermsAndConditionsError => {\r\n const { errorMessageTitle } = this.props.resources;\r\n return {\r\n error: { tag: 'div', className: 'ms-checkout-terms-and-conditions__error', role: 'alert', 'aria-live': 'assertive' },\r\n title: ,\r\n message: \r\n };\r\n };\r\n\r\n private readonly getCancelButton = (): React.ReactNode => {\r\n const { cancelBtnLabel = 'Cancel', cancelBtnAriaLabel } = this.props.resources;\r\n return (\r\n \r\n {cancelBtnLabel}\r\n \r\n );\r\n };\r\n\r\n private readonly getSaveButton = (): React.ReactNode => {\r\n const { saveBtnLabel = 'Save', saveBtnAriaLabel } = this.props.resources;\r\n return (\r\n \r\n {saveBtnLabel}\r\n \r\n );\r\n };\r\n\r\n private readonly getEditButton = (): React.ReactNode => {\r\n const { editBtnLabel = 'Change', editBtnAriaLabel } = this.props.resources;\r\n return (\r\n \r\n {editBtnLabel}\r\n \r\n );\r\n };\r\n\r\n private readonly onEdit = (): void => {\r\n this.onUpdating();\r\n };\r\n\r\n private readonly onSubmit = async (): Promise => {\r\n if (!this.isTermsAccepted) {\r\n if (this.isAutoSave) {\r\n await this.updateTermsAndConditionsAcceptance(this.isTermsAccepted);\r\n } else {\r\n this.setError(this.props.resources.errorMessage);\r\n this.props.moduleState.setHasError(true);\r\n }\r\n } else {\r\n this.clearError();\r\n await this.updateTermsAndConditionsAcceptance(this.isTermsAccepted);\r\n this.props.moduleState.onReady();\r\n }\r\n };\r\n\r\n private readonly onUpdating = () => {\r\n this.props.moduleState.onUpdating();\r\n };\r\n\r\n private readonly setError = (errorMessage: string): void => {\r\n this.props.telemetry.error(errorMessage);\r\n this.props.moduleState.setHasError(true);\r\n this.props.moduleState.onUpdating();\r\n this.errorMessage = errorMessage;\r\n };\r\n\r\n private readonly onCancel = (): void => {\r\n // Reset to the saved value\r\n if (!this.props.data.checkout.result) {\r\n return;\r\n }\r\n\r\n const isTermsAccepted = this.props.data.checkout.result.isTermsAndConditionAccepted;\r\n if (!isTermsAccepted) {\r\n // It has no saved email, set to status updating and request user to fill the email form\r\n this.props.moduleState.onUpdating();\r\n\r\n } else {\r\n // It has saved email, set to status ready\r\n this.isTermsAccepted = true;\r\n this.props.moduleState.setHasError(false);\r\n this.props.moduleState.onReady();\r\n }\r\n };\r\n\r\n private readonly updateTermsAndConditionsAcceptance = async (isTermsAccepted: boolean): Promise => {\r\n if (this.props.data.checkout.result) {\r\n await this.props.data.checkout.result.updateTermsAndConditionsAcceptance({ newIsTermsAndConditionAccepted: isTermsAccepted });\r\n }\r\n };\r\n\r\n private readonly clearError = (): void => {\r\n this.props.moduleState.setHasError(false);\r\n this.errorMessage = undefined;\r\n };\r\n\r\n private readonly onChange = async (event: React.ChangeEvent) => {\r\n const checked = event.target.checked;\r\n this.isTermsAccepted = checked;\r\n\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout) {\r\n await this.props.data.checkout.result.updateIsTermsAndConditionsChecked({ newIsTermsAndConditionChecked: checked });\r\n }\r\n\r\n if (this.isAutoSave) {\r\n await this.onSubmit();\r\n }\r\n };\r\n\r\n}\r\n\r\nexport default CheckoutTermsAndConditions;\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React, {useState} from 'react';\r\n\r\nimport { ICheckoutTermsAndConditions, ICheckoutTermsAndConditionsError, ICheckoutTermsAndConditionsViewProps } from './absolute-terms-conditions';\r\n\r\nimport { Modal, ModalHeader, ModalBody, Button } from 'reactstrap';\r\n\r\nconst TermsAndCondition: React.FC = ({\r\n termsAndConditionAcceptance,\r\n checkBox,\r\n description\r\n}) => {\r\n\r\n return (\r\n \r\n {checkBox}\r\n {description}\r\n \r\n );\r\n};\r\n\r\nconst ErrorMessage: React.FC = ({\r\n error,\r\n title,\r\n message\r\n}) => {\r\n\r\n return (\r\n \r\n {title}\r\n {message}\r\n \r\n );\r\n};\r\n\r\nconst CheckoutTermsAndConditionsView: React.FC = props => {\r\n const {\r\n checkoutTermsAndConditions,\r\n viewState,\r\n termsAndConditionsContent,\r\n errorMessage,\r\n saveButton,\r\n editButton,\r\n cancelButton,\r\n termsTitle, \r\n termsContent\r\n } = props;\r\n const [modal, setModal] = useState(false);\r\n const toggle = () => setModal(!modal);\r\n\r\n return (\r\n\r\n // TODO: All wrapper div should be provided by viewProps. Once SDK provide the sln, update markup.\r\n \r\n {viewState.isError && errorMessage && }\r\n \r\n \r\n \r\n {termsTitle}\r\n \r\n
\r\n {termsContent}\r\n
\r\n
\r\n
\r\n {viewState.isShowSaveButton && saveButton}\r\n {viewState.isShowEditButton && editButton}\r\n {viewState.isShowCancelButton && cancelButton}\r\n
\r\n );\r\n};\r\n\r\nexport default CheckoutTermsAndConditionsView;\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 { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\r\nimport { Alert, Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nexport interface IInvoiceErrorProps extends IComponentProps {\r\n messageHeader?: string;\r\n errorMessage?: string;\r\n otherError?: string;\r\n showError: boolean;\r\n payInvoiceErrorModalOpen: boolean;\r\n\r\n errorDialogHeader: string;\r\n errorDialogBodyErrorTitle: string;\r\n errorDialogBodyErrorDescription: string;\r\n errorDialogFooterGoToCartButtonText: string;\r\n errorDialogFooterCancelButtonText: string;\r\n cartUrl: string;\r\n\r\n setPayInvoiceErrorModalClose(): void;\r\n}\r\n\r\nexport interface IInvoiceErrorComponent extends IComponent {\r\n}\r\n\r\nexport const InvoiceError: React.FC = ({ messageHeader, errorMessage, otherError, showError, payInvoiceErrorModalOpen, errorDialogHeader, errorDialogBodyErrorTitle, errorDialogBodyErrorDescription,\r\n errorDialogFooterGoToCartButtonText, errorDialogFooterCancelButtonText, cartUrl, setPayInvoiceErrorModalClose }) => {\r\n const errorMessages: (string | undefined)[] = [];\r\n\r\n if (otherError) {\r\n errorMessages.push(otherError);\r\n } else {\r\n errorMessages.push(errorMessage);\r\n }\r\n\r\n const className = 'msc-pay-invoice-error-dialog';\r\n\r\n return (\r\n <>\r\n 0} color='danger' assertive\r\n aria-label={messageHeader} >\r\n \r\n {errorMessages.map((message, index) => {\r\n return (\r\n
\r\n {message}\r\n
\r\n );\r\n })}\r\n \r\n \r\n \r\n \r\n {errorDialogHeader}\r\n \r\n \r\n \r\n
\r\n
\r\n {errorDialogBodyErrorTitle}\r\n
\r\n
\r\n {errorDialogBodyErrorDescription}\r\n
\r\n
\r\n
\r\n \r\n \r\n {errorDialogFooterGoToCartButtonText}\r\n \r\n \r\n {errorDialogFooterCancelButtonText}\r\n \r\n \r\n
\r\n \r\n );\r\n};\r\n\r\n// @ts-expect-error\r\nexport const InvoiceErrorComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n 'InvoiceError',\r\n { component: InvoiceError }\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, msdyn365Commerce } from '@msdyn365-commerce/core';\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\nimport { IInvoiceStatusResources } from '../helpers/invoice-status';\r\n\r\nexport interface IInvoicesFilterResources extends IInvoiceStatusResources {\r\n invoicesFilterShowAll: string;\r\n}\r\n\r\nexport interface IInvoicesFilterProps extends IComponentProps {\r\n className: string;\r\n disabled: boolean;\r\n\r\n resources: IInvoicesFilterResources;\r\n\r\n currentState: InvoicesFilterState;\r\n onFilterStateChanged(state: InvoicesFilterState): void;\r\n}\r\n\r\nexport enum InvoicesFilterState {\r\n ShowAll,\r\n Paid,\r\n PartiallyPaid,\r\n Unpaid\r\n}\r\n\r\nconst getInvoicesFilterStateResources = (filterState: InvoicesFilterState, resources: IInvoicesFilterResources): string => {\r\n switch (filterState) {\r\n case InvoicesFilterState.ShowAll:\r\n return resources.invoicesFilterShowAll;\r\n case InvoicesFilterState.Paid:\r\n return resources.invoiceStatusPaid;\r\n case InvoicesFilterState.PartiallyPaid:\r\n return resources.invoiceStatusPartiallyPaid;\r\n case InvoicesFilterState.Unpaid:\r\n return resources.invoiceStatusUnpaid;\r\n default:\r\n throw new Error('Failed to retrieve resource description for unknown invoices filter state.');\r\n }\r\n};\r\n\r\n/**\r\n * On Click function.\r\n * @param onStateClick -Invoice filter state function.\r\n * @param filterState -Invoice filter state.\r\n * @returns Set Invoice filter state.\r\n */\r\nconst onClickHandler = (onStateClick: (filterState: InvoicesFilterState) => void, filterState: InvoicesFilterState) => () => {\r\n onStateClick(filterState);\r\n};\r\n\r\nconst renderFilterStateItem = (\r\n filterState: InvoicesFilterState,\r\n resources: IInvoicesFilterResources,\r\n className: string,\r\n onStateClick: (filterState: InvoicesFilterState) => void): React.ReactNode => {\r\n\r\n const stateStringRepresentation = InvoicesFilterState[filterState];\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst InvoicesFilter: React.FC = (props: IInvoicesFilterProps) => {\r\n const popoverRef = React.createRef();\r\n const [popoverState, setPopoverState] = React.useState(false);\r\n const togglePopover = React.useCallback(() => {\r\n setPopoverState(!popoverState);\r\n }, [popoverState]);\r\n\r\n const [filterState, setFilterState] = React.useState(props.currentState);\r\n\r\n const onFilterStateClick = (clickedState: InvoicesFilterState) => {\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 {getInvoicesFilterStateResources(filterState, props.resources)}\r\n \r\n \r\n {\r\n EnumExtensions.getEnumValues(InvoicesFilterState).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\n\r\n// @ts-expect-error\r\nexport const InvoicesFilterComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n 'InvoicesFilterComponent',\r\n { component: InvoicesFilter }\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 { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\r\nimport classnames from 'classnames';\r\nimport React from 'react';\r\n\r\nexport interface IInvoicesTableHeaderResources {\r\n invoicesText: string;\r\n invoiceNumberText: string;\r\n invoiceDateMobileText: string;\r\n invoiceDateText: string;\r\n invoiceUsersText: string;\r\n invoiceAmountText: string;\r\n invoiceDueDateText: string;\r\n invoiceAmountDueText: string;\r\n invoiceStatusText: string;\r\n invoiceActionsText: string;\r\n invoiceListSelectAllRadioAriaLabelText: string;\r\n}\r\n\r\nexport interface IInvoicesTableHeaderProps extends IComponentProps {\r\n context: ICoreContext;\r\n className: string;\r\n\r\n isSelectedAll: boolean;\r\n isMobile: boolean;\r\n isAdmin: boolean;\r\n\r\n resources: IInvoicesTableHeaderResources;\r\n\r\n onSelectAll(isSelected: boolean): void;\r\n}\r\n\r\nexport interface IInvoicesTableHeaderComponent extends IComponent {\r\n}\r\n\r\nconst getDesktopHeaderCells = (props: IInvoicesTableHeaderProps, rowClassName: string, switchCheckedState: () => void) => {\r\n const { resources } = props;\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n {resources.invoiceNumberText}\r\n \r\n \r\n {resources.invoiceDateText}\r\n \r\n { props.isAdmin ? \r\n {resources.invoiceUsersText}\r\n : null }\r\n \r\n {resources.invoiceAmountText}\r\n \r\n \r\n {resources.invoiceDueDateText}\r\n \r\n \r\n {resources.invoiceAmountDueText}\r\n \r\n \r\n {resources.invoiceStatusText}\r\n \r\n \r\n {resources.invoiceActionsText}\r\n \r\n \r\n );\r\n};\r\n\r\nconst getMobileHeaderCells = (props: IInvoicesTableHeaderProps, rowClassName: string, switchCheckedState: () => void) => {\r\n const { resources } = props;\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n {resources.invoicesText}\r\n \r\n \r\n {resources.invoiceDateMobileText}\r\n \r\n \r\n {' '}\r\n {/* Actions */}\r\n \r\n );\r\n};\r\n\r\nconst InvoicesTableHeader: React.FC = (props: IInvoicesTableHeaderProps): JSX.Element => {\r\n const rowClassName = `${props.className}__row`;\r\n\r\n const switchCheckedState = () => {\r\n props.onSelectAll(!props.isSelectedAll);\r\n };\r\n\r\n let headerCells: JSX.Element;\r\n if (props.isMobile) {\r\n headerCells = getMobileHeaderCells(props, rowClassName, switchCheckedState);\r\n } else {\r\n headerCells = getDesktopHeaderCells(props, rowClassName, switchCheckedState);\r\n }\r\n\r\n return (\r\n \r\n \r\n {headerCells}\r\n \r\n \r\n );\r\n};\r\n\r\n// @ts-expect-error\r\nexport const InvoicesTableHeaderComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n 'InvoicesTableHeaderComponent',\r\n { component: InvoicesTableHeader }\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 { InvoicePaidStatus } from '@msdyn365-commerce/retail-proxy';\r\n\r\nexport interface IInvoiceStatusResources {\r\n invoiceStatusNone: string;\r\n invoiceStatusUnpaid: string;\r\n invoiceStatusPartiallyPaid: string;\r\n invoiceStatusPaid: string;\r\n}\r\n\r\nexport const getInvoiceStatusText = (resources: IInvoiceStatusResources, invoiceStatus: InvoicePaidStatus | undefined) => {\r\n switch (invoiceStatus) {\r\n\r\n case InvoicePaidStatus.None:\r\n return resources.invoiceStatusNone;\r\n\r\n case InvoicePaidStatus.Unpaid:\r\n return resources.invoiceStatusUnpaid;\r\n\r\n case InvoicePaidStatus.PartiallyPaid:\r\n return resources.invoiceStatusPartiallyPaid;\r\n\r\n case InvoicePaidStatus.Paid:\r\n return resources.invoiceStatusPaid;\r\n default:\r\n return '';\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 { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\r\n//import { Button } from '@msdyn365-commerce-modules/utilities';\r\nimport React, { useState } from 'react';\r\n\r\nimport { IPayableInvoice } from '../helpers/invoice-data';\r\nimport { payInvoices } from '../helpers/pay-invoices';\r\nimport { IInvoiceErrorState } from '../connelly-invoices-list';\r\n\r\nimport { Modal, ModalHeader, ModalBody, Button } from 'reactstrap';\r\n\r\n\r\nexport interface IPayInvoiceData {\r\n invoice: IPayableInvoice;\r\n}\r\n\r\nexport interface IPayInvoiceResources {\r\n payInvoiceButtonText: string;\r\n payInvoiceButtonAriaLabel: string;\r\n}\r\n\r\nexport interface IPayInvoiceProps extends IComponentProps {\r\n context: ICoreContext;\r\n className: string;\r\n reference?: React.RefObject;\r\n resources: IPayInvoiceResources;\r\n\r\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\r\n}\r\n\r\ninterface IPayInvoiceComponent extends IComponent {\r\n}\r\n\r\nconst onClick = async (_event: React.MouseEvent, props: IPayInvoiceProps, setDisabled: (disabled: boolean) => void): Promise => {\r\n setDisabled(true);\r\n\r\n const propagateError = (errorState: IInvoiceErrorState): void => {\r\n if (props.onError) {\r\n props.onError(errorState, props.reference);\r\n }\r\n setDisabled(false);\r\n };\r\n\r\n await payInvoices([props.data.invoice], props.context.actionContext, propagateError);\r\n};\r\n\r\nconst PayInvoiceComponentActions = {\r\n onClick\r\n};\r\n\r\n/**\r\n * On click handler function.\r\n * @param props -Invoice props.\r\n * @param setDisabled -Set disabled.\r\n * @returns Pay invoice component action.\r\n */\r\n// const onClickHandler = (props: IPayInvoiceProps,\r\n// setDisabled: React.Dispatch>) => async (event: React.MouseEvent) => {\r\n// await PayInvoiceComponentActions.onClick(event, props, setDisabled);\r\n// };\r\n\r\n\r\n\r\nconst PayInvoice: React.FC = (props: IPayInvoiceProps): JSX.Element => {\r\n // const [disabled, setDisabled] = useState(false);\r\n\r\n const [modal, setModal] = useState(false);\r\n const toggle = () => setModal(!modal);\r\n\r\n\r\n return (\r\n <>\r\n \r\n \r\n How to make a payment\r\n \r\n
\r\n

To make payments via ACH or WIRE use the bank account and routing information below. \r\n PLEASE NOTE: Separate methods for USA/international dealers and Canadian dealers.

\r\n

To pay by credit card call (425) 775-5416 extension 3.

\r\n

FOR USA AND INTERNATIONAL BASED DEALERS
\r\n Account Name: Connelly Skis LLC
\r\n Account Type: Checking
\r\n Account Number: 01020320675
\r\n Huntington ACH Routing Number: 041215032
\r\n Huntington Wire Routing Number: 044000024
\r\n Route Wires to: Huntington National Bank 7 Easton Oval (EA2W47) Columbus, OH 43219
\r\n If International, Huntington SWIFT Code: HUNTUS33\r\n

\r\n

\r\n FOR CANADA BASED DEALERS
\r\n BANK: Royal Bank of Canada
\r\n LOCATION: Toronto, Ontario, Canada
\r\n SWIFT: ROYCCAT2
\r\n CURRENCY TYPE: CAD
\r\n ACCOUNT NAME: Huntbk Connelly Skis, LLC
\r\n ACCOUNT NUMBER/IBAN: 1000363
\r\n TRANSIT NUMBER: 01596
\r\n FINANCIAL INSTITTUTION NUMBER: 003 \r\n

\r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\n// @ts-expect-error\r\nexport const PayInvoiceComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n 'PayInvoiceComponent',\r\n { component: PayInvoice, ...PayInvoiceComponentActions }\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 { getUrlSync, IActionContext } from '@msdyn365-commerce/core';\r\nimport { getCartState } from '@msdyn365-commerce/global-state';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nimport { IInvoiceErrorState } from '../connelly-invoices-list';\r\nimport { IPayableInvoice } from './invoice-data';\r\n\r\nexport type ICartActionFailureReason = 'EMPTYINPUT' | 'CARTACTIONFAILED';\r\nexport interface IAddInvoicesToCartFailureResult {\r\n failureReason: ICartActionFailureReason;\r\n}\r\n\r\nexport const payInvoices = async (invoices: IPayableInvoice[], actionContext: IActionContext, onError: (errorState: IInvoiceErrorState) => void) => {\r\n const invoicesToAdd: string[] = invoices.filter(invoice => invoice.canBePaid).map(invoice => invoice.id);\r\n\r\n if (!ArrayExtensions.hasElements(invoicesToAdd)) {\r\n onError({ errorMessage: '', errorReason: { failureReason: 'EMPTYINPUT' } }); return;\r\n }\r\n\r\n const cartState = await getCartState(actionContext);\r\n const result = await cartState.addInvoicesToCart({ invoiceIds: invoicesToAdd });\r\n\r\n if (result.status !== 'SUCCESS') {\r\n onError({\r\n errorMessage: '',\r\n errorReason: { failureReason: 'CARTACTIONFAILED' },\r\n otherError: result.errorDetails?.LocalizedMessage,\r\n errorCode: result.errorDetails?.ErrorResourceId\r\n }); return;\r\n }\r\n\r\n const cartUrl = getUrlSync('cart', actionContext);\r\n if (cartUrl) {\r\n window?.location.assign(cartUrl);\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 { Button } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\ninterface IRequestInvoiceButtonProps {\r\n innerReference?: React.RefObject;\r\n className: string;\r\n requestInvoiceButtonLabel: string;\r\n onClicked(): void;\r\n\r\n}\r\n\r\nexport const RequestInvoiceButton: React.FC = ({ className, onClicked, requestInvoiceButtonLabel, innerReference }) => {\r\n return (\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, { IComponent, IComponentProps, ICoreContext, IDateFormatOptions, msdyn365Commerce } from '@msdyn365-commerce/core';\r\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\r\nimport { getInvoiceDetailsPageUrlSync, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Button, format } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport React, { useState } from 'react';\r\n\r\nimport { InvoiceModel } from '../../../helpers/invoice-data';\r\nimport { getInvoiceStatusText, IInvoiceStatusResources } from '../../../helpers/invoice-status';\r\nimport { IInvoiceErrorState } from '../../../connelly-invoices-list';\r\nimport { IPayInvoiceResources, PayInvoiceComponent } from '../../pay-invoice-component';\r\nimport { RequestInvoiceButton } from '../../request-invoice-button';\r\n\r\ninterface IInvoicesTableRowData {\r\n invoice: InvoiceModel;\r\n index: number;\r\n customer: Customer;\r\n}\r\n\r\nexport interface IInvoicesTableRowResources extends IInvoiceStatusResources, IPayInvoiceResources {\r\n invoiceCurrentUser: string;\r\n invoiceViewDetailsButtonText: string;\r\n invoiceViewDetailsButtonAriaLabel: string;\r\n invoiceActionsButtonTextAriaLabel?: string;\r\n invoiceRequestButtonLabel: string;\r\n invoiceListSelectRadioAriaLabelText: string;\r\n}\r\n\r\nexport interface IInvoicesTableRowProps extends IComponentProps {\r\n context: ICoreContext;\r\n className: string;\r\n isMobile: boolean;\r\n invoiceReferences?: React.RefObject;\r\n payInvoiceReferences?: React.RefObject;\r\n resources: IInvoicesTableRowResources;\r\n\r\n onChange(): void;\r\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\r\n onRequestInvoice?(invoice: InvoiceModel, requestInvoiceButtonReference: React.RefObject): void;\r\n}\r\n\r\nexport interface IInvoicesTableRowComponent extends IComponent {\r\n\r\n}\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\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: 'long', day: 'numeric' };\r\n return context.cultureFormatter.formatDate(date, dateOptions);\r\n};\r\n\r\n/**\r\n * Request specific invoice function.\r\n * @param props -Invoice table row props.\r\n * @param requestInvoiceButtonReference -Reference button.\r\n * @returns Call Request Invoice.\r\n */\r\nconst onRequestSpecificInvoice = (props: IInvoicesTableRowProps, requestInvoiceButtonReference: React.RefObject) => () => {\r\n props.onRequestInvoice!(props.data.invoice, requestInvoiceButtonReference);\r\n};\r\n\r\nconst getDesktopRowCells = (props: IInvoicesTableRowProps, onSelectLine: () => void) => {\r\n const { data: { invoice, index, customer } } = props;\r\n\r\n const isCurrentUser = !StringExtensions.isNullOrWhitespace(customer.AccountNumber) && customer.AccountNumber === invoice.customerAccountNumber;\r\n const payInvoiceClassName = `${props.className}__pay-invoice`;\r\n\r\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\r\n const invoiceRowArialabel = format(props.resources.invoiceListSelectRadioAriaLabelText, invoice.id);\r\n const requestInvoiceButtonReference: React.RefObject = React.createRef();\r\n const payInvoiceButtonReference: React.RefObject = React.createRef();\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n {invoice.id}\r\n \r\n \r\n \r\n \r\n {formatDate(props.context, invoice.invoiceDate)}\r\n \r\n \r\n { customer.IsB2bAdmin ? \r\n {invoice.customerName}\r\n { isCurrentUser ? \r\n {props.resources.invoiceCurrentUser}\r\n : null}\r\n : null }\r\n \r\n {formatAmount(props.context, invoice.amount, invoice.currencyCode)}\r\n \r\n \r\n \r\n {formatDate(props.context, invoice.dueDate)}\r\n \r\n \r\n \r\n {formatAmount(props.context, invoice.amountDue, invoice.currencyCode)}\r\n \r\n \r\n \r\n {getInvoiceStatusText(props.resources, invoice.status)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nlet setShowPreviousActions: React.Dispatch> | undefined;\r\n\r\n/**\r\n * On Click view details function.\r\n * @param linkToInvoiceDetails -Link to invoice details.\r\n * @returns Go to invoice details.\r\n */\r\nconst onClickViewDetails = (linkToInvoiceDetails: string) => () => {\r\n if (MsDyn365.isBrowser) {\r\n window.location.href = linkToInvoiceDetails;\r\n }\r\n return;\r\n};\r\n\r\n/**\r\n * Toggle function.\r\n * @param isShowActions -Link to invoice details.\r\n * @param setShowActions -Link to invoice details.\r\n * @returns Go to invoice details.\r\n */\r\nconst toggle = (isShowActions: boolean, setShowActions: React.Dispatch>) => () => {\r\n const shouldShowActions = !isShowActions;\r\n if (shouldShowActions) {\r\n if (setShowPreviousActions) {\r\n setShowPreviousActions(false);\r\n }\r\n setShowActions(shouldShowActions);\r\n setShowPreviousActions = setShowActions;\r\n } else {\r\n setShowPreviousActions = undefined;\r\n setShowActions(shouldShowActions);\r\n }\r\n};\r\n\r\nconst extraActionsPopup = (props: IInvoicesTableRowProps): JSX.Element | null => {\r\n const { resources: { invoiceViewDetailsButtonAriaLabel, invoiceViewDetailsButtonText, invoiceActionsButtonTextAriaLabel }, data: { index } } = props;\r\n\r\n const [showActions, setShowActions] = useState(false);\r\n\r\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\r\n\r\n const className = `${props.className}__extra-actions-cell`;\r\n const actionsContainerClassName = `${className}__actions-container`;\r\n const payInvoiceClassName = `${actionsContainerClassName}__pay-invoice`;\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n }\r\n \r\n );\r\n};\r\n\r\nconst getMobileRowCells = (props: IInvoicesTableRowProps, onSelectLine: () => void) => {\r\n const { data: { invoice } } = props;\r\n\r\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\r\n const invoiceRowArialabel = format(props.resources.invoiceListSelectRadioAriaLabelText, invoice.id);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n {invoice.id}\r\n \r\n
\r\n \r\n {invoice.customerName}\r\n \r\n \r\n \r\n \r\n {formatDate(props.context, invoice.dueDate)}\r\n \r\n
\r\n \r\n {getInvoiceStatusText(props.resources, invoice.status)}\r\n \r\n \r\n \r\n {extraActionsPopup(props)}\r\n \r\n \r\n );\r\n\r\n};\r\n\r\nconst InvoicesTableRow: React.FC = (props: IInvoicesTableRowProps): JSX.Element => {\r\n const { data: { invoice } } = props;\r\n\r\n const onSelectLine = () => {\r\n invoice.isSelected = !invoice.isSelected;\r\n props.onChange();\r\n };\r\n\r\n let rowCells: JSX.Element;\r\n if (props.isMobile) {\r\n rowCells = getMobileRowCells(props, onSelectLine);\r\n } else {\r\n rowCells = getDesktopRowCells(props, onSelectLine);\r\n }\r\n\r\n return (\r\n \r\n {rowCells}\r\n \r\n );\r\n};\r\n\r\n// @ts-expect-error\r\nexport const InvoicesTableRowComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n 'InvoicesTableRowComponent',\r\n { component: InvoicesTableRow }\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 { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\r\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport React, { useState } from 'react';\r\n\r\nimport { InvoiceModel } from '../../helpers/invoice-data';\r\nimport { IInvoiceErrorState } from '../../connelly-invoices-list';\r\nimport { IInvoicesTableHeaderResources, InvoicesTableHeaderComponent } from './components/invoices-table-header-component';\r\nimport { IInvoicesTableRowResources, InvoicesTableRowComponent } from './components/invoices-table-row-component';\r\n\r\ninterface IInvoicesTableData {\r\n invoices: InvoiceModel[];\r\n customer: Customer;\r\n}\r\n\r\nexport interface IInvoicesTableResources extends IInvoicesTableHeaderResources, IInvoicesTableRowResources {\r\n}\r\n\r\nexport interface IInvoicesTableProps extends IComponentProps {\r\n context: ICoreContext;\r\n className: string;\r\n invoiceButtonReferences?: React.RefObject[];\r\n payInvoiceButtonReferences?: React.RefObject[];\r\n resources: IInvoicesTableResources;\r\n\r\n onChange(): void;\r\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\r\n onRequestInvoice(invoice: InvoiceModel, requestInvoiceButtonReference: React.RefObject): void;\r\n}\r\n\r\nexport interface IInvoicesTableComponent extends IComponent {\r\n}\r\n\r\ntype GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\nconst getViewport = (context: ICoreContext): GridSize => {\r\n // Always render in mobile viewport on a mobile device\r\n if (context.request && context.request.device && context.request.device.Type === 'Mobile') {\r\n return 'xs';\r\n }\r\n\r\n if (window?.innerWidth) {\r\n const gridSettings = context.request.gridSettings;\r\n if (gridSettings) {\r\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\r\n return 'xs';\r\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\r\n return 'sm';\r\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\r\n return 'md';\r\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\r\n return 'lg';\r\n }\r\n return 'xl';\r\n\r\n }\r\n }\r\n\r\n return 'xs';\r\n};\r\n\r\nconst isMobileView = (context: ICoreContext) => {\r\n const viewport = getViewport(context);\r\n return viewport === 'xs' || viewport === 'sm';\r\n};\r\n\r\n/**\r\n * On select all function.\r\n * @param props -Invoice table props.\r\n * @returns On change.\r\n */\r\nconst onSelectAllHandler = (props: IInvoicesTableProps) => (isSelected: boolean) => {\r\n props.data.invoices.forEach((invoice) => {\r\n invoice.isSelected = isSelected;\r\n });\r\n props.onChange();\r\n};\r\n\r\nconst InvoicesTable: React.FC = (props: IInvoicesTableProps): JSX.Element => {\r\n const [isMobile, setIsMobile] = useState(isMobileView(props.context));\r\n\r\n const updateViewport = () => {\r\n setIsMobile(isMobileView(props.context));\r\n };\r\n\r\n if (typeof window !== undefined && window.addEventListener) {\r\n window.addEventListener('resize', updateViewport);\r\n }\r\n const rowClassName = `${props.className}__row`;\r\n const headerClassName = `${props.className}__header`;\r\n\r\n\r\n // Nick's attempt at sorting\r\n\r\n \r\n\r\n return (\r\n \r\n invoice.isSelected)}\r\n isMobile={isMobile}\r\n isAdmin={props.data.customer.IsB2bAdmin || false}\r\n onSelectAll={onSelectAllHandler(props)}\r\n resources={props.resources}\r\n data={{}}\r\n />\r\n {\r\n props.data.invoices.map((invoice, index: number) => {\r\n return (\r\n \r\n );\r\n })\r\n }\r\n
\r\n );\r\n};\r\n\r\n// @ts-expect-error\r\nexport const InvoicesTableComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n 'InvoicesTableComponent',\r\n { component: InvoicesTable }\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 { IComponent, IComponentProps, ICoreContext, ITelemetry, msdyn365Commerce } from '@msdyn365-commerce/core';\r\n//import { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport React, { useState } from 'react';\r\n\r\nimport { InvoiceModel } from '../helpers/invoice-data';\r\n//import { payInvoices } from '../helpers/pay-invoices';\r\nimport { IInvoiceErrorState } from '../connelly-invoices-list';\r\n\r\nimport { Modal, ModalHeader, ModalBody, Button } from 'reactstrap';\r\n\r\n\r\ninterface IMakePaymentData {\r\n invoices: InvoiceModel[];\r\n}\r\n\r\nexport interface IMakePaymentResources {\r\n makePaymentButtonText: string;\r\n makePaymentButtonAriaLabel: string;\r\n}\r\n\r\nexport interface IMakePaymentProps extends IComponentProps {\r\n context: ICoreContext;\r\n itemKey?: string;\r\n telemetry: ITelemetry;\r\n moduleId: string;\r\n moduleTypeName: string;\r\n telemetryContent?: ITelemetryContent;\r\n navigationUrl?: string;\r\n buttonReferences?: React.RefObject;\r\n resources: IMakePaymentResources;\r\n\r\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\r\n}\r\n\r\nexport interface IMakePaymentComponent extends IComponent {\r\n}\r\n\r\n// const onClick = async (_event: React.MouseEvent, props: IMakePaymentProps, setDisabled: (disabled: boolean) => void): Promise => {\r\n// setDisabled(true);\r\n\r\n// const propagateError = (errorState: IInvoiceErrorState): void => {\r\n// if (props.onError) {\r\n// props.onError(errorState, props.buttonReferences);\r\n// }\r\n// setDisabled(false);\r\n// };\r\n\r\n// await payInvoices(props.data.invoices, props.context.actionContext, propagateError);\r\n// };\r\n\r\n// const MakePaymentComponentActions = {\r\n// onClick\r\n// };\r\n\r\n/**\r\n * On Click function.\r\n * @param input -Make payment props.\r\n * @param setDisabled -Set Disabled.\r\n * @returns Make payment component on click.\r\n */\r\n// const onClickHandler = (input: IMakePaymentProps,\r\n// setDisabled: React.Dispatch>) => async (event: React.MouseEvent) => {\r\n// await MakePaymentComponentActions.onClick(event, input, setDisabled);\r\n// };\r\n\r\nconst MakePayment: React.FC = (input: IMakePaymentProps): JSX.Element => {\r\n //const { data: { invoices } } = input;\r\n // const hasInvoices = ArrayExtensions.hasElements(invoices.filter(invoice => invoice.canBePaid));\r\n // const [disabled, setDisabled] = useState(false);\r\n\r\n\r\n const [modal, setModal] = useState(false);\r\n const toggle = () => setModal(!modal);\r\n\r\n\r\n \r\n\r\n return (\r\n <>\r\n \r\n \r\n How to make a payment\r\n \r\n
\r\n

To make payments via ACH or WIRE use the bank account and routing information below. \r\n PLEASE NOTE: Separate methods for USA/international dealers and Canadian dealers.

\r\n

To pay by credit card call (425) 775-5416 extension 3.

\r\n

FOR USA AND INTERNATIONAL BASED DEALERS
\r\n Account Name: Connelly Skis LLC
\r\n Account Type: Checking
\r\n Account Number: 01020320675
\r\n Huntington ACH Routing Number: 041215032
\r\n Huntington Wire Routing Number: 044000024
\r\n Route Wires to: Huntington National Bank 7 Easton Oval (EA2W47) Columbus, OH 43219
\r\n If International, Huntington SWIFT Code: HUNTUS33\r\n

\r\n

\r\n FOR CANADA BASED DEALERS
\r\n BANK: Royal Bank of Canada
\r\n LOCATION: Toronto, Ontario, Canada
\r\n SWIFT: ROYCCAT2
\r\n CURRENCY TYPE: CAD
\r\n ACCOUNT NAME: Huntbk Connelly Skis, LLC
\r\n ACCOUNT NUMBER/IBAN: 1000363
\r\n TRANSIT NUMBER: 01596
\r\n FINANCIAL INSTITTUTION NUMBER: 003 \r\n

\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n\r\n};\r\n\r\n// @ts-expect-error\r\nexport const MakePaymentComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n 'MakePayment',\r\n { component: MakePayment }\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 { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\r\n\r\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { InvoiceModel } from '../helpers/invoice-data';\r\nimport { IConnellyInvoicesListResources } from '../connelly-invoices-list.props.autogenerated';\r\n\r\ninterface IRequestInvoiceModalProps {\r\n className: string;\r\n email: string;\r\n isModalOpen: boolean;\r\n submitRequestLabel: string;\r\n modalHeaderLabel: string;\r\n sendToEmailLabel: string;\r\n cancelLabel: string;\r\n searchPlaceholderLabel: string;\r\n invoices: InvoiceModel[];\r\n invoicesFoundString: string;\r\n singleInvoiceFoundString: string;\r\n searchButtonAltText: string;\r\n resources: IConnellyInvoicesListResources;\r\n toggle(): void;\r\n onSubmitRequest(invoiceId: string): void;\r\n}\r\n\r\n/**\r\n * On submit request click function.\r\n * @param selectedInvoiceIndex -Check is busy.\r\n * @param onClosing -On closing function.\r\n * @param filteredInvoices -Invoice modal.\r\n * @param onSubmitRequest -On submit request function.\r\n * @returns Call on submit request.\r\n */\r\nconst onSubmitRequestClick = (selectedInvoiceIndex: number, onClosing: () => void,\r\n filteredInvoices: InvoiceModel[], onSubmitRequest: (invoiceId: string) => void) => () => {\r\n const defaultIndex = 0;\r\n if (selectedInvoiceIndex >= defaultIndex) {\r\n onClosing();\r\n onSubmitRequest(filteredInvoices[selectedInvoiceIndex].id);\r\n }\r\n};\r\n\r\n/**\r\n * On search input change function.\r\n * @param setSearchInput -Set search input.\r\n * @returns Set search input function.\r\n */\r\nconst searchInputChangedHandler = (setSearchInput: React.Dispatch>) => (event: React.ChangeEvent) => {\r\n setSearchInput(event.target.value);\r\n};\r\n\r\n/**\r\n * Search entered handler.\r\n * @param invoices -InvoiceModel.\r\n * @param searchInput -String.\r\n * @param setFilteredInvoices -InvoiceModel action.\r\n * @param filteredInvoices -Filtered Invoices.\r\n * @param setSelectedInvoiceIndex -Selected Invoice Index.\r\n * @param setShouldShowSearchResults -Show search result action.\r\n * @param setInvoiceOptions -Invoice options action.\r\n * @param selectedInvoiceIndex -Selected invoice index.\r\n * @param className -String.\r\n * @returns Set invoice options.\r\n */\r\nconst searchEnteredHandler = (invoices: InvoiceModel[], searchInput: string,\r\n setFilteredInvoices: React.Dispatch>,\r\n filteredInvoices: InvoiceModel[],\r\n setSelectedInvoiceIndex: React.Dispatch>,\r\n setShouldShowSearchResults: React.Dispatch>,\r\n setInvoiceOptions: React.Dispatch>,\r\n selectedInvoiceIndex: number,\r\n className: string) => () => {\r\n let updatedInvoices = filteredInvoices;\r\n if (!StringExtensions.isNullOrEmpty(searchInput)) {\r\n updatedInvoices = invoices.filter((invoice) => invoice.id.toLocaleUpperCase().includes(searchInput.toLocaleUpperCase()));\r\n }\r\n\r\n setFilteredInvoices(updatedInvoices);\r\n\r\n if (ArrayExtensions.hasElements(updatedInvoices)) {\r\n setSelectedInvoiceIndex(0);\r\n } else {\r\n setSelectedInvoiceIndex(-1);\r\n }\r\n setShouldShowSearchResults(true);\r\n\r\n setInvoiceOptions(renderInvoiceOptions(updatedInvoices, setSelectedInvoiceIndex, className, selectedInvoiceIndex));\r\n};\r\n\r\n/**\r\n * On cancel function.\r\n * @param onClosing -Closing function.\r\n * @param toggle -Toggle Function.\r\n * @returns Toggle function.\r\n */\r\nconst onCancelHandler = (onClosing: () => void, toggle: () => void) => () => {\r\n onClosing();\r\n toggle();\r\n};\r\n\r\n/**\r\n * On invoice select.\r\n * @param setSelectedInvoiceIndex -Set Selected Invoice Index.\r\n * @param index -Number.\r\n * @returns Set Selected Invoice Index.\r\n */\r\nconst onInvoiceSelectHandler = (setSelectedInvoiceIndex: (newIndex: number) => void, index: number) => () => {\r\n setSelectedInvoiceIndex(index);\r\n};\r\n\r\nconst renderInvoiceOptions = (filteredInvoices: InvoiceModel[], setSelectedInvoiceIndex: (newIndex: number) => void, className: string, selectedInvoiceIndex: number) => {\r\n return (\r\n
\r\n {filteredInvoices.map((invoice, index) => {\r\n const onInvoiceSelect = onInvoiceSelectHandler(setSelectedInvoiceIndex, index);\r\n\r\n const radioButtonId = `invoice__${invoice.id}`;\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n })}\r\n
\r\n );\r\n};\r\n\r\nexport const RequestInvoiceModal: React.FC = ({ className, email, isModalOpen, toggle, modalHeaderLabel, sendToEmailLabel, submitRequestLabel, cancelLabel, onSubmitRequest, invoices, searchPlaceholderLabel,\r\n invoicesFoundString, singleInvoiceFoundString, searchButtonAltText, resources }) => {\r\n const [selectedInvoiceIndex, setSelectedInvoiceIndex] = React.useState(-1);\r\n const [filteredInvoices, setFilteredInvoices] = React.useState(invoices);\r\n const [searchInput, setSearchInput] = React.useState('');\r\n const [shouldShowSearchResults, setShouldShowSearchResults] = React.useState(false);\r\n const focusDelay = 110;\r\n const invoiceOptionsData = renderInvoiceOptions(filteredInvoices, setSelectedInvoiceIndex, className, selectedInvoiceIndex);\r\n const [invoiceOptions, setInvoiceOptions] = React.useState(invoiceOptionsData);\r\n const focusElement = React.useRef(null);\r\n React.useEffect(() => {\r\n if (isModalOpen && focusElement.current) {\r\n setTimeout(() => {\r\n focusElement.current?.focus();\r\n }, focusDelay);\r\n }\r\n }, [isModalOpen]);\r\n\r\n /**\r\n * Sets the filtered invoices to the ones that were selected on the main screen.\r\n */\r\n const setFilteredInvoicesToSelectedInvoices = () => {\r\n setSelectedInvoiceIndex(-1);\r\n const selectedInvoices = invoices.filter(invoice => invoice.isSelected);\r\n if (ArrayExtensions.hasElements(selectedInvoices)) {\r\n setFilteredInvoices(selectedInvoices);\r\n\r\n // If only one invoice selected, auto select it\r\n if (selectedInvoices.length === 1) {\r\n setSelectedInvoiceIndex(0);\r\n }\r\n\r\n setInvoiceOptions(renderInvoiceOptions(selectedInvoices, setSelectedInvoiceIndex, className, 0));\r\n } else {\r\n setFilteredInvoices(invoices);\r\n setInvoiceOptions(renderInvoiceOptions(invoices, setSelectedInvoiceIndex, className, selectedInvoiceIndex));\r\n }\r\n };\r\n\r\n const searchEntered = searchEnteredHandler(invoices,\r\n searchInput, setFilteredInvoices, filteredInvoices,\r\n setSelectedInvoiceIndex, setShouldShowSearchResults,\r\n setInvoiceOptions, selectedInvoiceIndex, className);\r\n\r\n const onClosing = () => {\r\n setSelectedInvoiceIndex(-1);\r\n setFilteredInvoices(invoices);\r\n setSearchInput('');\r\n setShouldShowSearchResults(false);\r\n };\r\n\r\n /**\r\n * Sets the invoices that are possible to select when the dialog is opened.\r\n */\r\n function onOpened() {\r\n setSearchInput('');\r\n setFilteredInvoicesToSelectedInvoices();\r\n }\r\n\r\n const searchResultString = filteredInvoices.length === 1 ? singleInvoiceFoundString : invoicesFoundString;\r\n const invoicesFoundReplaceIndex = searchResultString.indexOf('{0}');\r\n\r\n return (\r\n \r\n \r\n {modalHeaderLabel}\r\n \r\n \r\n
\r\n \r\n
\r\n {email}\r\n
\r\n
\r\n {shouldShowSearchResults &&\r\n
\r\n \r\n {searchResultString.substring(0, invoicesFoundReplaceIndex)}\r\n \r\n \r\n {filteredInvoices.length}\r\n \r\n \r\n {searchResultString.substring(invoicesFoundReplaceIndex + 3)}\r\n \r\n
}\r\n
\r\n \r\n
\r\n {invoiceOptions}\r\n
\r\n
\r\n
\r\n \r\n \r\n {submitRequestLabel}\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 { InvoicePaidStatus, OrderInvoice } from '@msdyn365-commerce/retail-proxy';\r\n\r\nexport interface IPayableInvoice {\r\n readonly id: string;\r\n readonly canBePaid: boolean;\r\n}\r\n\r\n/**\r\n * Represents invoice data model.\r\n */\r\nexport class InvoiceModel implements IPayableInvoice {\r\n public id: string;\r\n\r\n public invoiceDate?: Date;\r\n\r\n public customerAccountNumber?: string;\r\n\r\n public customerName?: string;\r\n\r\n public amount?: number;\r\n\r\n public dueDate?: Date;\r\n\r\n public amountDue?: number;\r\n\r\n public status?: InvoicePaidStatus;\r\n\r\n public currencyCode?: string;\r\n\r\n public isSelected: boolean;\r\n\r\n public constructor(invoice: OrderInvoice) {\r\n this.id = invoice.Id || '';\r\n this.invoiceDate = invoice.InvoiceDate ? new Date(invoice.InvoiceDate) : undefined;\r\n this.customerAccountNumber = invoice.CustomerAccountNumber;\r\n this.customerName = invoice.CustomerName;\r\n this.amount = invoice.TotalAmount;\r\n this.dueDate = invoice.InvoiceDueDate ? new Date(invoice.InvoiceDueDate) : undefined;\r\n this.amountDue = invoice.AmountBalance;\r\n this.status = invoice.InvoicePaidStatusValue;\r\n this.currencyCode = invoice.CurrencyCode;\r\n\r\n this.isSelected = false;\r\n }\r\n\r\n public get canBePaid(): boolean {\r\n return (this.status !== InvoicePaidStatus.Paid);\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 { getUrlSync } from '@msdyn365-commerce/core';\r\nimport { BusinessPartnerOperationDeliveryType, BusinessPartnerUsersDataActions, InvoicePaidStatus, InvoiceSearchCriteria, IQueryResultSettings, OrderInvoice } from '@msdyn365-commerce/retail-proxy';\r\nimport { getCurrentAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/BusinessPartnersDataActions.g';\r\nimport { ArrayExtensions, getCustomer, GetCustomerInput, getInvoices, GetInvoicesInput, IQueryResultSettingsModuleConfig, QueryResultSettingsProxy, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Button, Heading, IModuleProps } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { InvoiceErrorComponent } from './components/invoice-error-component';\r\nimport { InvoicesFilterComponent, InvoicesFilterState } from './components/invoices-filter-component';\r\nimport { InvoicesTableComponent } from './components/invoices-table/invoices-table-component';\r\nimport { IMakePaymentResources, MakePaymentComponent } from './components/make-payment-component';\r\nimport { RequestInvoiceButton } from './components/request-invoice-button';\r\nimport { RequestInvoiceModal } from './components/request-invoice-modal';\r\nimport { InvoiceModel } from './helpers/invoice-data';\r\nimport { IAddInvoicesToCartFailureResult } from './helpers/pay-invoices';\r\nimport { IConnellyInvoicesListData } from './connelly-invoices-list.data';\r\nimport { IConnellyInvoicesListProps } from './connelly-invoices-list.props.autogenerated';\r\n\r\nexport type InvoicesListStatus = 'LOADING' | 'SUCCESS' | 'FAILED' | 'EMPTY';\r\nexport type InvoiceErrorHost = 'ADDINVOICETOCART';\r\n\r\nexport interface IInvoicesListViewProps extends IConnellyInvoicesListProps {\r\n moduleProps: IModuleProps;\r\n\r\n header: JSX.Element;\r\n filter: JSX.Element;\r\n content?: JSX.Element;\r\n invoiceRequestModal?: JSX.Element;\r\n pagination?: JSX.Element;\r\n}\r\n\r\nexport interface IInvoiceErrorState {\r\n errorHost?: InvoiceErrorHost;\r\n errorReason?: IAddInvoicesToCartFailureResult;\r\n errorMessage: string;\r\n otherError?: string;\r\n errorCode?: string;\r\n}\r\n\r\nexport interface IInvoicesListState {\r\n invoices: InvoiceModel[];\r\n invoicesFilterState: InvoicesFilterState;\r\n errorState: IInvoiceErrorState;\r\n isInvoiceRequestModalOpen: boolean;\r\n isLoading: boolean;\r\n isPageLoaded: boolean;\r\n payInvoiceErrorModalOpen: boolean;\r\n selectedButtonElement?: HTMLButtonElement | null;\r\n}\r\n\r\n/**\r\n * InvoicesList component.\r\n * @extends {React.Component, IInvoicesListState>}\r\n */\r\nclass InvoicesList extends React.Component, IInvoicesListState> {\r\n private readonly _className: string = 'msc-invoices-list';\r\n\r\n private readonly payInvoiceRequestReference: React.RefObject;\r\n\r\n private readonly makePaymentReference: React.RefObject;\r\n\r\n private buttonChildReference: React.RefObject[] = [];\r\n\r\n private buttonChildPayButtonReference: React.RefObject[] = [];\r\n\r\n private readonly _queryResultSettings: IQueryResultSettings;\r\n\r\n constructor(props: IConnellyInvoicesListProps) {\r\n super(props);\r\n\r\n this._queryResultSettings = QueryResultSettingsProxy.fromModuleData(\r\n this.props.context.request, this.props.config as IQueryResultSettingsModuleConfig).QueryResultSettings;\r\n this.payInvoiceRequestReference = React.createRef();\r\n this.makePaymentReference = React.createRef();\r\n this._updateInvoicesState = this._updateInvoicesState.bind(this);\r\n this._onAddToCartFailed = this._onAddToCartFailed.bind(this);\r\n this._onToggleInvoiceRequestModal = this._onToggleInvoiceRequestModal.bind(this);\r\n this._handleFilterStateChange = this._handleFilterStateChange.bind(this);\r\n this._loadMoreInvoices = this._loadMoreInvoices.bind(this);\r\n this._requestInvoice = this._requestInvoice.bind(this);\r\n this._requestSpecificInvoice = this._requestSpecificInvoice.bind(this);\r\n this._setPayInvoiceErrorModalClose = this._setPayInvoiceErrorModalClose.bind(this);\r\n this.state = {\r\n invoices: [],\r\n invoicesFilterState: InvoicesFilterState.ShowAll,\r\n isLoading: true,\r\n isPageLoaded: false,\r\n errorState: { errorMessage: '' },\r\n isInvoiceRequestModalOpen: false,\r\n payInvoiceErrorModalOpen: false,\r\n selectedButtonElement: null\r\n };\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: IConnellyInvoicesListProps,\r\n nextState: IInvoicesListState): 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 | null {\r\n const {\r\n config: { className = '',\r\n heading\r\n },\r\n context: {\r\n request: {\r\n channel\r\n },\r\n cultureFormatter: {\r\n formatCurrency,\r\n\r\n // @ts-expect-error\r\n currencyCode\r\n }\r\n },\r\n data: {\r\n customerBalance\r\n },\r\n resources: {\r\n invoicesListTitle,\r\n invoicesListDescTitle,\r\n invoicesListDescCount\r\n }\r\n } = this.props;\r\n\r\n const totalAmount = customerBalance.result?.OpenInvoiceBalance || 0;\r\n const amountText = `${formatCurrency(totalAmount.toFixed(2), currencyCode)} ${channel?.Currency || 'USD'}`;\r\n\r\n const totalCount = customerBalance.result?.OpenInvoiceCount || 0;\r\n const countText = invoicesListDescCount.replace('{0}', totalCount.toString());\r\n const invoicesListTitleHeading = heading?.text ?? invoicesListTitle;\r\n\r\n const headerClassName = `${this._className}__header`;\r\n\r\n const header = (\r\n
\r\n \r\n
\r\n
\r\n {invoicesListDescTitle}\r\n
\r\n
\r\n {amountText}\r\n
\r\n
\r\n {countText}\r\n
\r\n
\r\n
\r\n );\r\n\r\n const viewProps: IInvoicesListViewProps = {\r\n ...(this.props as IConnellyInvoicesListProps),\r\n moduleProps: {\r\n moduleProps: this.props,\r\n className: classnames(this._className, className)\r\n },\r\n header,\r\n invoiceRequestModal: this._renderInvoiceRequestModal(),\r\n filter: this._renderInvoicesFilter(this._className),\r\n pagination: this._renderPagination()\r\n };\r\n\r\n if (!this.state.isPageLoaded) {\r\n return this.props.renderView(viewProps);\r\n }\r\n\r\n if (ArrayExtensions.hasElements(this.state.invoices)) {\r\n viewProps.content = this._renderListContainer();\r\n } else {\r\n viewProps.content = this._renderEmptyInvoiceLinesPageContent();\r\n }\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n await this.props.data.customer;\r\n const invoicesData = await this.props.data.invoices;\r\n this._initializeWithInvoices(invoicesData);\r\n }\r\n\r\n private _initializeWithInvoices(invoicesData: OrderInvoice[]): void {\r\n const invoices = invoicesData.map((invoice, index) => {\r\n this.buttonChildReference[Number(index)] = React.createRef();\r\n this.buttonChildPayButtonReference[Number(index)] = React.createRef();\r\n return new InvoiceModel(invoice);\r\n\r\n });\r\n this.setState({\r\n invoices,\r\n isLoading: false,\r\n isPageLoaded: true\r\n });\r\n }\r\n\r\n private _addInvoices(invoicesData: OrderInvoice[]): void {\r\n const newInvoices = invoicesData.map(invoice => new InvoiceModel(invoice));\r\n const invoices = this.state.invoices.concat(newInvoices);\r\n this.setState({\r\n invoices,\r\n isLoading: false\r\n });\r\n }\r\n\r\n private _renderEmptyInvoiceLinesPageContent(): JSX.Element {\r\n const containerClass = `${this._className}__empty-lines__container`;\r\n const actionsContainerClass = `${containerClass}__actions`;\r\n return (\r\n
\r\n
\r\n {this.props.resources.invoiceEmptyInvoiceLinesTitle}\r\n
\r\n
\r\n {this.props.resources.invoiceEmptyInvoiceLinesDescription}\r\n
\r\n
\r\n \r\n {this.props.resources.invoiceEmptyInvoiceLinesContinueShoppingButtonText}\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n private _renderListContainer(): JSX.Element {\r\n const containerClass = `${this._className}__container`;\r\n const containerHeaderClass = `${containerClass}__header`;\r\n const containerContentClass = `${containerClass}__content`;\r\n\r\n return (\r\n
\r\n
\r\n {this._renderMakePayment(containerHeaderClass)}\r\n {this._renderInvoiceRequestButton()}\r\n
\r\n
\r\n {this._renderInvoiceErrors()}\r\n
\r\n
\r\n {this._renderInvoicesList(containerContentClass)}\r\n
\r\n
\r\n );\r\n }\r\n\r\n private _updateInvoicesState(): void {\r\n this.setState({\r\n invoices: this.state.invoices\r\n });\r\n }\r\n\r\n private async _getInvoicesSearchCriteria(state: InvoicesFilterState): Promise {\r\n const searchCriteria: InvoiceSearchCriteria = {};\r\n\r\n const context = this.props.context.actionContext;\r\n\r\n const businessPartner = await getCurrentAsync({ callerContext: context });\r\n searchCriteria.BusinessPartnerId = businessPartner.BusinessPartnerId;\r\n\r\n const customer = await getCustomer(new GetCustomerInput(context.requestContext.apiSettings), context);\r\n searchCriteria.CustomerId = customer.AccountNumber;\r\n\r\n switch (state) {\r\n case InvoicesFilterState.ShowAll:\r\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.None];\r\n break;\r\n case InvoicesFilterState.Paid:\r\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.Paid];\r\n break;\r\n case InvoicesFilterState.PartiallyPaid:\r\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.PartiallyPaid];\r\n break;\r\n case InvoicesFilterState.Unpaid:\r\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.Unpaid];\r\n break;\r\n default:\r\n throw new Error('Failed to process unknown invoices filter state.');\r\n }\r\n\r\n return searchCriteria;\r\n }\r\n\r\n private async _handleFilterStateChange(state: InvoicesFilterState): Promise {\r\n this.setState({\r\n invoicesFilterState: state,\r\n isLoading: true\r\n });\r\n\r\n const searchCriteria = await this._getInvoicesSearchCriteria(state);\r\n\r\n if (this._queryResultSettings.Paging) {\r\n this._queryResultSettings.Paging.Skip = 0;\r\n }\r\n\r\n const invoices = await getInvoices(new GetInvoicesInput(searchCriteria, this._queryResultSettings), this.props.context.actionContext);\r\n this._initializeWithInvoices(invoices);\r\n }\r\n\r\n private _renderInvoicesFilter(className: string): JSX.Element {\r\n const filterClassName = `${className}__filter`;\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _renderInvoicesList(className: string): JSX.Element {\r\n const tableClassName = `${className}__table`;\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _onAddToCartFailed(newErrorState: IInvoiceErrorState, reference?: React.RefObject): void {\r\n const errorState = { ...newErrorState };\r\n errorState.errorHost = 'ADDINVOICETOCART';\r\n errorState.errorMessage = newErrorState.errorReason?.failureReason === 'EMPTYINPUT' ? this.props.resources.invoiceErrorInvoiceIdNotExist : this.props.resources.invoiceErrorFailedAddInvoiceToCart;\r\n\r\n const shouldShowAdditionalInfoInPopup = errorState.errorCode === 'Microsoft_Dynamics_Commerce_Runtime_InvoiceLineNotAllowedWithItemLines';\r\n this.setState({ errorState, payInvoiceErrorModalOpen: shouldShowAdditionalInfoInPopup, selectedButtonElement: reference?.current });\r\n }\r\n\r\n private _renderMakePayment(className: string): JSX.Element {\r\n const id = `${className}__make-payment`;\r\n const makePaymentResources: IMakePaymentResources = {\r\n makePaymentButtonText: this.props.resources.makePaymentButtonText,\r\n makePaymentButtonAriaLabel: this.props.resources.makePaymentButtonAriaLabel\r\n };\r\n\r\n const selectedInvoices = this._getSelectedInvoices();\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _setPayInvoiceErrorModalClose(): void {\r\n this.setState({\r\n payInvoiceErrorModalOpen: false\r\n });\r\n this.state.selectedButtonElement?.focus();\r\n }\r\n\r\n private _renderInvoiceErrors(): JSX.Element {\r\n const {\r\n resources: { payInvoiceErrorDialogHeader, payInvoiceErrorDialogBodyErrorTitle, payInvoiceErrorDialogBodyErrorDescription,\r\n payInvoiceErrorDialogFooterGoToCartButtonText, payInvoiceErrorDialogFooterCancelButtonText }\r\n } = this.props;\r\n\r\n const cartUrl = getUrlSync('cart', this.props.context.actionContext) || '';\r\n\r\n const errorClassName = `${this._className}__errors`;\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _renderPagination(): JSX.Element | undefined {\r\n const { data, resources } = this.props;\r\n const invoices = data?.invoices?.result;\r\n if (!invoices || invoices.length < this._queryResultSettings.Paging!.Top!) {\r\n return undefined;\r\n }\r\n\r\n return (\r\n \r\n {resources.invoicesLoadMore}\r\n \r\n );\r\n }\r\n\r\n private async _loadMoreInvoices(): Promise {\r\n this.setState({ isLoading: true });\r\n const searchCriteria = await this._getInvoicesSearchCriteria(this.state.invoicesFilterState);\r\n if (this._queryResultSettings.Paging) {\r\n this._queryResultSettings.Paging.Skip! += this._queryResultSettings.Paging.Top!;\r\n }\r\n const newInvoices = await getInvoices(new GetInvoicesInput(searchCriteria, this._queryResultSettings), this.props.context.actionContext);\r\n this._addInvoices(newInvoices);\r\n }\r\n\r\n private _renderInvoiceRequestModal(): JSX.Element {\r\n const customer = this.props.data.customer.result;\r\n const { invoiceRequestModalCancelLabel, invoiceRequestModalSubmitLabel, invoiceRequestModalHeaderLabel, invoiceRequestModalSendToEmailLabel, invoiceRequestModalSearch,\r\n invoiceRequestModalInvoiceSearchDisplay, invoiceRequestModalSingleInvoiceSearchDisplay, invoiceRequestModalSearchButton } = this.props.resources;\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _onToggleInvoiceRequestModal(): void {\r\n\r\n this.setState({\r\n isInvoiceRequestModalOpen: !this.state.isInvoiceRequestModalOpen\r\n });\r\n if (this.state.isInvoiceRequestModalOpen) {\r\n this.state.selectedButtonElement?.focus();\r\n }\r\n }\r\n\r\n /**\r\n * Request specific invoice function.\r\n */\r\n private readonly _onToggleInvoiceRequestParentModal = () => {\r\n this.setState({\r\n selectedButtonElement: this.payInvoiceRequestReference.current\r\n }, () => {\r\n this._onToggleInvoiceRequestModal();\r\n });\r\n };\r\n\r\n private _renderInvoiceRequestButton(): JSX.Element | null {\r\n const { invoiceRequestButtonLabel } = this.props.resources;\r\n const customer = this.props.data.customer.result;\r\n\r\n if (StringExtensions.isNullOrWhitespace(customer?.Email)) {\r\n return null;\r\n }\r\n\r\n return ();\r\n }\r\n\r\n private _requestInvoice(invoiceId: string): void {\r\n const context = { callerContext: this.props.context.actionContext };\r\n const b2bUserId: string = this.props.data.b2bUserInformation?.result?.B2BUserId || '';\r\n\r\n BusinessPartnerUsersDataActions.requestInvoiceCopyAsync(context, b2bUserId, invoiceId, BusinessPartnerOperationDeliveryType.Email);\r\n\r\n this._onToggleInvoiceRequestModal();\r\n }\r\n\r\n private _getSelectedInvoices(): InvoiceModel[] {\r\n let selectedInvoices = this.state.invoices.filter(invoice => invoice.isSelected);\r\n if (!ArrayExtensions.hasElements(selectedInvoices)) {\r\n selectedInvoices = this.state.invoices;\r\n }\r\n\r\n return selectedInvoices;\r\n }\r\n\r\n private _requestSpecificInvoice(specificInvoice: InvoiceModel, requestInvoiceButtonReference: React.RefObject): void {\r\n this.state.invoices.forEach((invoice: InvoiceModel) => {\r\n if (invoice === specificInvoice) {\r\n invoice.isSelected = true;\r\n } else {\r\n invoice.isSelected = false;\r\n }\r\n });\r\n this.setState({\r\n selectedButtonElement: requestInvoiceButtonReference.current\r\n });\r\n this._onToggleInvoiceRequestModal();\r\n }\r\n}\r\n\r\nexport default InvoicesList;\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 { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IInvoicesListViewProps } from './connelly-invoices-list';\r\n\r\nexport const InvoiceListView: React.FC = props => {\r\n const { header, filter, content, invoiceRequestModal, pagination } = props;\r\n\r\n return (\r\n \r\n {header}\r\n {invoiceRequestModal}\r\n {filter}\r\n {content}\r\n {pagination}\r\n \r\n );\r\n};\r\n\r\nexport default InvoiceListView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICommerceApiSettings,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { CheckoutState } from './checkout-state';\n\n/**\n * CheckoutState - action input.\n */\nexport class CheckoutStateInput implements IActionInput {\n private readonly apiSettings: ICommerceApiSettings;\n\n constructor(apiSettings: ICommerceApiSettings) {\n this.apiSettings = apiSettings;\n }\n\n public getCacheKey = () => buildCacheKey('CheckoutState', this.apiSettings);\n\n public getCacheObjectType = () => 'CheckoutState';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * CheckoutState - action.\n * @param input\n * @param ctx\n */\nexport async function checkoutStateAction(input: CheckoutStateInput, ctx: IActionContext): Promise {\n return new CheckoutState();\n}\n\n/**\n * CheckoutState - create new input for create action.\n * @param inputData\n */\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\n return new CheckoutStateInput(inputData.requestContext.apiSettings);\n};\n\n/**\n * CheckoutState - create action.\n */\nexport const checkoutStateActionDataAction = createObservableDataAction({\n action: >checkoutStateAction,\n input: createInput\n});\n\nexport default checkoutStateActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Address, GiftCard, TenderLine, TokenizedPaymentCard } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { action, computed, observable } from 'mobx';\n\n/**\n * State information related to what is needed to succesfully perform a checkout.\n */\nexport class CheckoutState {\n @observable private _tokenizedPaymentCard: TokenizedPaymentCard | undefined;\n\n @computed public get tokenizedPaymentCard(): Readonly | undefined {\n return this._tokenizedPaymentCard;\n }\n\n @observable private _tenderLine: TenderLine | undefined;\n\n @computed public get tenderLine(): Readonly | undefined {\n return this._tenderLine;\n }\n\n @observable private _billingAddress: Address | undefined;\n\n @computed public get billingAddress(): Readonly
| undefined {\n return this._billingAddress;\n }\n\n @observable private _shippingAddress: Address | undefined;\n\n @computed public get shippingAddress(): Readonly
| undefined {\n return this._shippingAddress;\n }\n\n @observable private _cardPrefix: string | undefined;\n\n @computed public get cardPrefix(): Readonly | undefined {\n return this._cardPrefix;\n }\n\n @observable private _giftCards: GiftCard[] = [];\n\n @computed public get giftCards(): readonly GiftCard[] {\n return this._giftCards;\n }\n\n @observable private _giftCardExtends: IGiftCardExtend[] = [];\n\n @computed public get giftCardExtends(): readonly IGiftCardExtend[] {\n return this._giftCardExtends;\n }\n\n @observable private _loyaltyCardNumber?: string;\n\n @computed public get loyaltyCardNumber(): Readonly | undefined {\n return this._loyaltyCardNumber;\n }\n\n @observable private _loyaltyAmount: number = 0;\n\n @computed public get loyaltyAmount(): Readonly | number {\n return this._loyaltyAmount;\n }\n\n @observable private _guestCheckoutEmail: string = '';\n\n @computed public get guestCheckoutEmail(): Readonly | string {\n return this._guestCheckoutEmail;\n }\n\n @observable private _isTermsAndConditionAccepted: boolean = false;\n\n @computed public get isTermsAndConditionAccepted(): Readonly | boolean {\n return this._isTermsAndConditionAccepted;\n }\n\n @observable private _customerAccountAmount: number = 0;\n\n @computed public get customerAccountAmount(): Readonly | number {\n return this._customerAccountAmount;\n }\n\n @action\n public updateTokenizedPaymentCard(newTokenizedPaymentCard: TokenizedPaymentCard): void {\n this._tokenizedPaymentCard = newTokenizedPaymentCard;\n }\n\n @action\n public updateTenderLine(newTenderLine: TenderLine | undefined): void {\n this._tenderLine = newTenderLine;\n }\n\n @action\n public updateShippingAddress(newShippingAddress: Address): void {\n this._shippingAddress = newShippingAddress;\n }\n\n @action\n public updateBillingAddress(newBillingAddress: Address): void {\n this._billingAddress = newBillingAddress;\n }\n\n @action\n public updateCardPrefix(newCardPrefix: string): void {\n this._cardPrefix = newCardPrefix;\n }\n\n @action\n public removeGiftCard(giftCardNumber: string): void {\n this._giftCards = this._giftCards.filter(giftCard => giftCard.Id !== giftCardNumber);\n }\n\n @action\n public removeGiftCardExtend(giftCardNumber: string): void {\n this._giftCardExtends = this._giftCardExtends.filter(giftCard => giftCard.Id !== giftCardNumber);\n }\n\n @action\n public addGiftCard(giftCard: GiftCard): void {\n this._giftCards = [giftCard, ...this._giftCards];\n }\n\n @action\n public addGiftCardExtend(giftCard: IGiftCardExtend): void {\n this._giftCardExtends = [giftCard, ...this._giftCards];\n }\n\n @action\n public updateLoyaltyCardNumber(newLoyaltyCardNumber: string): void {\n this._loyaltyCardNumber = newLoyaltyCardNumber;\n }\n\n @action\n public updateLoyaltyAmount(newAmount: number): void {\n this._loyaltyAmount = newAmount;\n }\n\n @action\n public updateGuestCheckoutEmail(newGuestCheckoutEmail: string): void {\n this._guestCheckoutEmail = newGuestCheckoutEmail;\n }\n\n @action\n public updateTermsAndConditionsAcceptance(newIsTermsAndConditionAccepted: boolean): void {\n this._isTermsAndConditionAccepted = newIsTermsAndConditionAccepted;\n }\n\n @action\n public updateCustomerAccountAmount(newAmount: number): void {\n this._customerAccountAmount = newAmount;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, IActionContext, IActionInput } from '@msdyn365-commerce/core';\n\nimport { IModuleStates } from './module-state.data';\n\n/**\n * GetModulesInput.\n */\nexport class ModuleStatesCacheKey implements IActionInput {\n public getCacheKey = () => 'ModuleState';\n\n public getCacheObjectType = () => 'ModuleState';\n\n public dataCacheType = (): CacheType => 'none';\n}\n\nexport function getModuleStates(ctx: IActionContext): IModuleStates {\n const cacheKey = new ModuleStatesCacheKey();\n\n let moduleStates = ctx.get(cacheKey.getCacheObjectType(), cacheKey.getCacheKey());\n if (moduleStates) {\n return moduleStates;\n }\n ctx.update(cacheKey, {});\n moduleStates = ctx.get(cacheKey.getCacheObjectType(), cacheKey.getCacheKey());\n return moduleStates;\n}\n\nexport function updateModuleStates(value: IModuleStates, ctx: IActionContext): void {\n const cacheKey = new ModuleStatesCacheKey();\n ctx.update(cacheKey, value);\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModule } from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport isMatch from 'lodash/isMatch';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { getModuleStates, updateModuleStates } from './module-state';\nimport { IModuleState, IModuleStateManager, IModuleStateProps, IModuleStates } from './module-state.data';\n\nexport interface IProps extends IModule, IModuleStateProps {\n enableControl?: boolean;\n}\n\nconst sectionContainerModuleId = 'section-container';\nconst paymentInstrumentModuleId = 'payment-instrument';\n\nconst withModuleState =

(WrappedComponent: React.ComponentType

): React.ComponentType

=> {\n /**\n *\n * ModuleState component.\n * @extends {React.Component

}\n */\n @observer\n class ModuleState extends React.Component

{\n constructor(props: P) {\n super(props);\n this.initializeState();\n }\n\n public shouldComponentUpdate(nextProps: IModuleStateProps): boolean {\n if (this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const { id } = this.props;\n return ;\n }\n\n private readonly initializeState = (): void => {\n const { id, typeName, context } = this.props;\n const states = getModuleStates(context.actionContext);\n if (!states) {\n this.props.telemetry.error('withModuleState initializeState() - states not found');\n return;\n }\n\n if (states[id]) {\n // State has been initialized\n return;\n }\n\n updateModuleStates(\n {\n ...states,\n [id]: {\n id,\n typeName,\n hasInitialized: false,\n hasError: false,\n isRequired: true,\n isCancellable: true,\n isSubmitContainer: false,\n status: undefined,\n childIds: []\n }\n },\n context.actionContext\n );\n };\n\n /**\n * GetModuleStateManager\n * Get module state manager by id.\n * @param id\n */\n private readonly getModuleStateManager = (id: string): IModuleStateManager => {\n const moduleState = this.get()[id];\n return {\n ...moduleState!,\n hasInitialized: this.validate(id, { hasInitialized: true }, true), // All has initialized is initialized\n hasError: this.validate(id, { hasError: true }), // Partial has error is error\n isReady: this.validate(id, { status: 'ready' }, true, true), // All ready is ready (exclued disabled and skipped)\n isUpdating: this.validate(id, { status: 'updating' }), // Partial updating is updating\n isPending: this.validate(id, { status: 'pending' }), // Partial pending is pending\n isSkipped: this.validate(id, { status: 'skipped' }, true, true), // All skipped is skipped (exclued disabled)\n isDisabled: this.validate(id, { status: 'disabled' }, true), // All disabled is disabled\n isCancelAllowed: this.validate(id, { isCancellable: true }, true, true), // Partial not allowed is not allowed\n shouldSubmitContainer: this.validate(id, { isSubmitContainer: true }), // Partial submit is submit.\n hasExternalSubmitGroup: this.hasExternalSubmitGroup(),\n hasModuleState: this.hasModuleState(id),\n setIsRequired: (value: boolean): void => {\n this.update(id, { isRequired: value });\n },\n setIsCancellable: (value: boolean): void => {\n this.update(id, { isCancellable: value });\n },\n setIsSubmitContainer: (value: boolean): void => {\n this.update(id, { isSubmitContainer: value });\n },\n setHasError: (value: boolean): void => {\n this.update(id, { hasError: value });\n },\n onReady: (): void => {\n this.update(id, { status: 'ready' });\n },\n onUpdating: (): void => {\n this.update(id, { status: 'updating' });\n },\n onPending: (): void => {\n this.update(id, { status: 'pending' });\n },\n onSkip: (): void => {\n this.update(id, { status: 'skipped' });\n },\n onDisable: (): void => {\n this.update(id, { status: 'disabled' });\n },\n getModule: (moduleId: string): IModuleStateManager => this.getModuleStateManager(moduleId),\n getModuleByTypeName: (typeName: string): IModuleStateManager => this.getModuleStateManagerByTypeName(typeName),\n init: (options?: Partial): void => {\n if (moduleState?.hasInitialized) {\n // State has been initialized\n return;\n }\n this.update(id, {\n hasInitialized: true,\n ...options\n });\n }\n };\n };\n\n /**\n * GetModuleStateManagerByTypeName\n * Get module state manager by type name.\n * @param typeName\n */\n private readonly getModuleStateManagerByTypeName = (typeName: string): IModuleStateManager => {\n const moduleStates = getModuleStates(this.props.context.actionContext);\n const moduleState = Object.values(moduleStates).find(_moduleState => _moduleState?.typeName === typeName);\n return this.getModuleStateManager((moduleState && moduleState.id) || '');\n };\n\n /**\n * Get\n * Get all module states.\n */\n private readonly get = (): IModuleStates => {\n return getModuleStates(this.props.context.actionContext);\n };\n\n /**\n * Update\n * Update module state.\n * @param id\n * @param value\n */\n private readonly update = (id: string, value: Partial): void => {\n // Console.log('withModuleState - update', id, value);\n const modules = this.get();\n if (!modules[id]) {\n this.props.telemetry.error(`withModuleState update() - Module state with id ${id} is not found.`);\n return;\n }\n modules[id] = {\n ...modules[id]!,\n ...value\n };\n };\n\n private readonly _validateLeaf = (id: string, source: Partial): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n return false;\n }\n return isMatch(module, source);\n };\n\n private readonly _validateContainer = (\n id: string,\n source: Partial,\n allMatched?: boolean,\n skipSkippableItem?: boolean\n ): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n // Module doesn't has module state\n return !!allMatched;\n }\n\n if (skipSkippableItem && (module.status === 'disabled' || module.status === 'skipped')) {\n // Skip disabled or skipped modules\n return !!allMatched;\n }\n\n // It is leaf module\n if (!module.childIds || module.childIds.length === 0) {\n return this._validateLeaf(id, source);\n }\n\n let childIds = module.childIds;\n\n if (this.props.context.app.config.shouldEnableSinglePaymentAuthorizationCheckout) {\n // For new checkout flow, we bypass the isReady check for payment section container to enable the place order button.\n childIds = childIds.filter(childId => !this._isPaymentSectionContainer(childId));\n }\n\n // It is container module\n const method = allMatched ? 'every' : 'some';\n return childIds[method](childId => this._validateContainer(childId, source, allMatched, skipSkippableItem));\n };\n\n /**\n * Check if it is a section container with payment module.\n * @param moduleId -- The id of the module.\n * @returns If it is a section container with payment module.\n */\n private readonly _isPaymentSectionContainer = (moduleId: string): boolean => {\n if (!moduleId.includes(sectionContainerModuleId)) {\n return false;\n }\n\n const modules = this.get();\n const module = modules[moduleId];\n\n if (module && ArrayExtensions.hasElements(module.childIds.filter(childId => childId.includes(paymentInstrumentModuleId)))) {\n return true;\n }\n\n return false;\n };\n\n /**\n * Validate\n * Validate current module and all its child module match the provided condition.\n * @param id\n * @param source\n * @param allMatched\n * @param skipSkippableItem\n */\n private readonly validate = (\n id: string,\n source: Partial,\n allMatched?: boolean,\n skipSkippableItem?: boolean\n ): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n return false;\n }\n\n // It is leaf module\n if (!module.childIds || module.childIds.length === 0) {\n return this._validateLeaf(id, source);\n }\n\n // It is container module\n return this._validateContainer(id, source, allMatched, skipSkippableItem);\n };\n\n /**\n * HasExternalSubmitGroup\n * Module will use external submit group.\n */\n private readonly hasExternalSubmitGroup = (): boolean => {\n return !!this.props.enableControl;\n };\n\n /**\n * HasModuleState\n * Module is using module state manager.\n * @param id\n */\n private readonly hasModuleState = (id: string): boolean => {\n const modules = this.get();\n const module = modules[id];\n return !!module;\n };\n }\n\n return ModuleState;\n};\n\nexport default withModuleState;\n"],"names":["_ref","isChecked","ariaLabel","disabled","telemetryContent","onChange","id","payLoad","getPayloadObject","attribute","getTelemetryAttributes","React","Object","assign","className","type","name","checked","message","title","CheckoutTermsAndConditions","constructor","props","super","isTermsAccepted","handleTextChange1","event","this","config","termsTitle","text","target","value","handleParagraphChange1","termsContent","handleTextChange","description","getTermsAndConditions","moduleState","isReady","showCheckbox","isDisabled","isAutoSave","isTermsAndConditionAccepted","checkboxAriaLabel","resources","termsAndConditionAcceptance","checkBox","CheckboxComponent","MsDyn365","editProps","onEdit","requestContext","context","request","init","async","_this$props$data$chec","_data$checkout$result","data","hasInvoiceLine","checkout","result","checkoutCart","updateTermsAndConditionsAcceptance","onCancel","onSubmit","status","getErrorMessage","errorMessageTitle","error","tag","role","ErrorTitleComponent","ErrorMessageComponent","errorMessage","getCancelButton","cancelBtnLabel","cancelBtnAriaLabel","Button","color","onClick","getSaveButton","saveBtnLabel","saveBtnAriaLabel","getEditButton","editBtnLabel","editBtnAriaLabel","onUpdating","clearError","onReady","setError","setHasError","telemetry","newIsTermsAndConditionAccepted","undefined","_this$props$data$chec2","shouldEnableSinglePaymentAuthorizationCheckout","updateIsTermsAndConditionsChecked","newIsTermsAndConditionChecked","getTelemetryObject","telemetryPageName","friendlyName","isDataReady","isShowButtons","showControlButtons","hasExternalSubmitGroup","defaultTermsAndConditionAcceptedValue","when","reaction","_this$props$data$chec3","shouldComponentUpdate","nextProps","nextState","state","render","_this$props$data$chec4","hasError","TermsTitle","TermsContent","isError","isShowContent","isShowSelected","viewProps","_objectSpread","errorMessageData","viewState","isShowSaveButton","isShowEditButton","isShowCancelButton","checkoutTermsAndConditions","moduleProps","classname","termsAndConditionsContent","saveButton","editButton","cancelButton","onSave","renderView","__decorate","observable","computed","action","withModuleState","observer","TermsAndCondition","Node","ErrorMessage","_ref2","modal","setModal","useState","toggle","Module","Modal","isOpen","ModalHeader","ModalBody","InvoiceErrorComponent","msdyn365Commerce","component","messageHeader","otherError","showError","payInvoiceErrorModalOpen","errorDialogHeader","errorDialogBodyErrorTitle","errorDialogBodyErrorDescription","errorDialogFooterGoToCartButtonText","errorDialogFooterCancelButtonText","cartUrl","setPayInvoiceErrorModalClose","errorMessages","push","Alert","length","assertive","map","index","key","ModalFooter","href","InvoicesFilterState","getInvoicesFilterStateResources","filterState","ShowAll","invoicesFilterShowAll","Paid","invoiceStatusPaid","PartiallyPaid","invoiceStatusPartiallyPaid","Unpaid","invoiceStatusUnpaid","Error","onClickHandler","onStateClick","InvoicesFilterComponent","popoverRef","popoverState","setPopoverState","togglePopover","setFilterState","currentState","onFilterStateClick","clickedState","onFilterStateChanged","innerRef","Popover","placement","EnumExtensions","renderFilterStateItem","stateStringRepresentation","InvoicesTableHeaderComponent","rowClassName","switchCheckedState","onSelectAll","isSelectedAll","headerCells","isMobile","getMobileHeaderCells","classnames","invoiceListSelectAllRadioAriaLabelText","invoicesText","invoiceDateMobileText","getDesktopHeaderCells","invoiceNumberText","invoiceDateText","isAdmin","invoiceUsersText","invoiceAmountText","invoiceDueDateText","invoiceAmountDueText","invoiceStatusText","invoiceActionsText","getInvoiceStatusText","invoiceStatus","InvoicePaidStatus","invoiceStatusNone","PayInvoiceComponentActions","_event","setDisabled","invoices","actionContext","onError","invoicesToAdd","filter","invoice","canBePaid","ArrayExtensions","errorReason","failureReason","cartState","getCartState","addInvoicesToCart","invoiceIds","_result$errorDetails","_result$errorDetails2","errorDetails","LocalizedMessage","errorCode","ErrorResourceId","getUrlSync","_window","window","location","payInvoices","errorState","reference","PayInvoiceComponent","RequestInvoiceButton","onClicked","requestInvoiceButtonLabel","innerReference","formatAmount","amount","currencyCode","cultureFormatter","formatCurrency","formatDate","date","year","month","day","onRequestSpecificInvoice","requestInvoiceButtonReference","onRequestInvoice","setShowPreviousActions","onClickViewDetails","linkToInvoiceDetails","isShowActions","setShowActions","shouldShowActions","getMobileRowCells","onSelectLine","getInvoiceDetailsPageUrlSync","invoiceRowArialabel","format","invoiceListSelectRadioAriaLabelText","isSelected","customerName","dueDate","invoiceViewDetailsButtonAriaLabel","invoiceViewDetailsButtonText","invoiceActionsButtonTextAriaLabel","showActions","actionsContainerClassName","payInvoiceClassName","typeName","payInvoiceReferences","invoiceReferences","invoiceRequestButtonLabel","extraActionsPopup","InvoicesTableRowComponent","rowCells","getDesktopRowCells","customer","isCurrentUser","StringExtensions","AccountNumber","customerAccountNumber","payInvoiceButtonReference","invoiceDate","IsB2bAdmin","invoiceCurrentUser","amountDue","isMobileView","viewport","device","Type","innerWidth","gridSettings","xs","w","sm","md","lg","getViewport","onSelectAllHandler","forEach","InvoicesTableComponent","setIsMobile","updateViewport","addEventListener","headerClassName","invoiceButtonReferences","Number","payInvoiceButtonReferences","MakePaymentComponent","input","onSubmitRequestClick","selectedInvoiceIndex","onClosing","filteredInvoices","onSubmitRequest","searchInputChangedHandler","setSearchInput","onCancelHandler","renderInvoiceOptions","setSelectedInvoiceIndex","onInvoiceSelect","onInvoiceSelectHandler","radioButtonId","htmlFor","RequestInvoiceModal","email","isModalOpen","modalHeaderLabel","sendToEmailLabel","submitRequestLabel","cancelLabel","searchPlaceholderLabel","invoicesFoundString","singleInvoiceFoundString","searchButtonAltText","setFilteredInvoices","searchInput","shouldShowSearchResults","setShouldShowSearchResults","invoiceOptionsData","invoiceOptions","setInvoiceOptions","focusElement","current","setTimeout","_focusElement$current","focus","searchEntered","searchEnteredHandler","updatedInvoices","toLocaleUpperCase","includes","searchResultString","invoicesFoundReplaceIndex","indexOf","horizontalPosition","verticalPosition","autoFocus","fade","onOpened","setFilteredInvoicesToSelectedInvoices","selectedInvoices","requestInvoiceDialogAriaLabel","substring","ref","placeholder","InvoiceModel","Id","InvoiceDate","Date","CustomerAccountNumber","CustomerName","TotalAmount","InvoiceDueDate","AmountBalance","InvoicePaidStatusValue","CurrencyCode","InvoicesList","_className","buttonChildReference","buttonChildPayButtonReference","_onToggleInvoiceRequestParentModal","setState","selectedButtonElement","payInvoiceRequestReference","_onToggleInvoiceRequestModal","_queryResultSettings","QueryResultSettingsProxy","QueryResultSettings","makePaymentReference","_updateInvoicesState","bind","_onAddToCartFailed","_handleFilterStateChange","_loadMoreInvoices","_requestInvoice","_requestSpecificInvoice","_setPayInvoiceErrorModalClose","invoicesFilterState","isLoading","isPageLoaded","isInvoiceRequestModalOpen","_customerBalance$resu","_customerBalance$resu2","_heading$text","heading","channel","customerBalance","invoicesListTitle","invoicesListDescTitle","invoicesListDescCount","amountText","OpenInvoiceBalance","toFixed","Currency","totalCount","OpenInvoiceCount","countText","replace","toString","invoicesListTitleHeading","header","Heading","invoiceRequestModal","_renderInvoiceRequestModal","_renderInvoicesFilter","pagination","_renderPagination","content","_renderListContainer","_renderEmptyInvoiceLinesPageContent","invoicesData","_initializeWithInvoices","_addInvoices","newInvoices","concat","containerClass","actionsContainerClass","invoiceEmptyInvoiceLinesTitle","invoiceEmptyInvoiceLinesDescription","invoiceEmptyInvoiceLinesContinueShoppingButtonAriaLabel","invoiceEmptyInvoiceLinesContinueShoppingButtonText","containerHeaderClass","containerContentClass","_renderMakePayment","_renderInvoiceRequestButton","_renderInvoiceErrors","_renderInvoicesList","searchCriteria","businessPartner","getCurrentAsync","callerContext","BusinessPartnerId","getCustomer","GetCustomerInput","apiSettings","CustomerId","InvoicePaidStatusValues","_getInvoicesSearchCriteria","Paging","Skip","getInvoices","GetInvoicesInput","filterClassName","tableClassName","newErrorState","_newErrorState$errorR","errorHost","invoiceErrorInvoiceIdNotExist","invoiceErrorFailedAddInvoiceToCart","shouldShowAdditionalInfoInPopup","makePaymentResources","makePaymentButtonText","makePaymentButtonAriaLabel","_getSelectedInvoices","moduleId","moduleTypeName","navigationUrl","buttonReferences","_this$state$selectedB","payInvoiceErrorDialogHeader","payInvoiceErrorDialogBodyErrorTitle","payInvoiceErrorDialogBodyErrorDescription","payInvoiceErrorDialogFooterGoToCartButtonText","payInvoiceErrorDialogFooterCancelButtonText","errorClassName","invoiceErrorMessageHeader","_data$invoices","Top","invoicesLoadMore","invoiceRequestModalCancelLabel","invoiceRequestModalSubmitLabel","invoiceRequestModalHeaderLabel","invoiceRequestModalSendToEmailLabel","invoiceRequestModalSearch","invoiceRequestModalInvoiceSearchDisplay","invoiceRequestModalSingleInvoiceSearchDisplay","invoiceRequestModalSearchButton","Email","_this$state$selectedB2","invoiceId","_this$props$data$b2bU","_this$props$data$b2bU2","b2bUserId","b2bUserInformation","B2BUserId","BusinessPartnerUsersDataActions","BusinessPartnerOperationDeliveryType","specificInvoice","InvoiceListView","CheckoutStateInput","_this","getCacheKey","buildCacheKey","getCacheObjectType","dataCacheType","createObservableDataAction","ctx","CheckoutState","inputData","_giftCards","_giftCardExtends","_loyaltyAmount","_guestCheckoutEmail","_isTermsAndConditionAccepted","_customerAccountAmount","defineProperty","prototype","_tokenizedPaymentCard","_tenderLine","_billingAddress","_shippingAddress","_cardPrefix","_loyaltyCardNumber","updateTokenizedPaymentCard","newTokenizedPaymentCard","updateTenderLine","newTenderLine","updateShippingAddress","newShippingAddress","updateBillingAddress","newBillingAddress","updateCardPrefix","newCardPrefix","removeGiftCard","giftCardNumber","giftCard","removeGiftCardExtend","addGiftCard","__spreadArrays","addGiftCardExtend","updateLoyaltyCardNumber","newLoyaltyCardNumber","updateLoyaltyAmount","newAmount","updateGuestCheckoutEmail","newGuestCheckoutEmail","updateCustomerAccountAmount","ModuleStatesCacheKey","getModuleStates","cacheKey","moduleStates","get","update","WrappedComponent","_super","ModuleState","call","initializeState","_b","states","__assign","_a","hasInitialized","isRequired","isCancellable","isSubmitContainer","childIds","getModuleStateManager","validate","isUpdating","isPending","isSkipped","isCancelAllowed","shouldSubmitContainer","hasModuleState","setIsRequired","setIsCancellable","setIsSubmitContainer","onPending","onSkip","onDisable","getModule","getModuleByTypeName","getModuleStateManagerByTypeName","options","values","find","_moduleState","modules","_validateLeaf","source","module","isMatch","_validateContainer","allMatched","skipSkippableItem","app","childId","_isPaymentSectionContainer","enableControl","__extends"],"sourceRoot":""}