{"version":3,"sources":["webpack:///./obj/desktop/src/invoice/components/confirm-payment/desktop/confirm-payment.less","webpack:///./obj/desktop/src/invoice/components/invoice-summary/desktop/invoice-summary.less","webpack:///./obj/desktop/src/invoice/components/invoice-details/desktop/invoice-details.less","webpack:///./obj/desktop/src/invoice/components/pay-invoice/pay-invoice.less","webpack:///./obj/desktop/src/invoice/components/confirm-payment/desktop/confirm-payment.tsx","webpack:///./obj/desktop/src/invoice/components/confirm-payment/confirm-payment.tsx","webpack:///./obj/desktop/src/invoice/components/invoice-summary/desktop/invoice-summary.tsx","webpack:///./obj/desktop/src/invoice/components/invoice-summary/invoice-summary.tsx","webpack:///./obj/desktop/src/invoice/components/invoice-details/desktop/invoice-details.tsx","webpack:///./obj/desktop/src/invoice/components/invoice-details/invoice-details.tsx","webpack:///./obj/desktop/src/invoice/components/pay-invoice/pay-invoice.tsx","webpack:///./obj/desktop/src/invoice/components/invoice-routes.tsx"],"names":["module","exports","ConfirmPayment","container","confirmation","gotoPay","clientData","className","page","src","srcSet","transactionNumber","transaction","balance","paid","partialPaid","remainingBalance","amountPaid","label","remaining","email","get","getIsLoggedIn","signDetails","links","href","createTenantURL","nonStickyButtonWrapper","Button","nextStepButton","variant","color","onClick","props","isAnonymousPayments","history","push","match","params","id","gotoHome","confirmId","paymentMethodStore","getCachedConfirmation","invoiceStore","analytics","viewPaymentResultPage","invoiceNumber","customerId","isInitialized","init","replace","render","this","ConfirmPaymentContainer","InvoiceSummary","viewMore","currentHtml","isExpanded","toggleExpanded","showViewMore","setTextDiv","card","title","text","expanded","dangerouslySetInnerHTML","__html","ref","hidden","InvoiceSummaryContainer","invoice","summarySanitized","component","errorMessage","showButton","showSummaryView","renderInvoice","invoiceHeader","cardWrapper","invoiceHeaderInner","num","number","date","dueDate","serviceDate","address","downloadLinkEnabled","target","rel","invoiceTotals","row","subtotal","tax","total","payments","length","invoicePayments","header","map","payment","index","key","paidOn","type","amount","invoiceBalance","alignContent","spacing","MemberSavings","memberSavings","Item","fill","el","size","InvoiceDetails","actualSavings","potentialSavings","ActualSavings","PotentialSavings","minimumPotentialSavings","maximumPotentialSavings","bold","totalMemberSavings","url","getInvoicePromise","getInvoice","creditCardDisabled","achDisabled","payByBankDisabled","items","then","viewInvoicePage","err","InvoiceDetailsContainer","getPaymentAmount","paymentAmountData","isFullBalance","value","fullBalance","Number","customAmount","$","usePaymentGateway","payButtonText","isPaymentMethodFormValid","isSecurityCodeValid","accounts","processing","paymentMethodAction","paymentMethodSubmit","paymentMethodType","PayByBank","clearError","pgcardInfoData","cardInfoData","achInfoData","handleSubmit","e","preventDefault","setPaymentButtonTextIcon","icon","payButtonIcon","setPaymentMethodType","setPaymentMethodAction","action","setPaymentMethodSubmit","submit","checkUsePaymentGateway","setPaymentMethodValid","isValid","setSecurityCodeValid","setConnectedAccounts","invoiceId","skipIFrameMessageHandler","currentInvoiceId","infoFormIsValid","CreditCard","getShowLoginLink","selectedPaymentMethod","form","validate","hasError","ACH","maximumAmount","componentDidMount","fullHeight","spinner","loadingMessage","status","onClose","onSubmit","isSubcomponent","data","chargeType","NUMBER_0","showLoginLink","disabled","valid","name","PayInvoice","InvoiceRoutes","exact","path","allowAnonPayments","allowAnonStatements"],"mappings":"+EACAA,EAAOC,QAAU,CAAC,qBAAqB,0BAA0B,kBAAoB,0BAA0B,QAAU,wBAAwB,MAAQ,wBAAwB,MAAQ,0BAA0B,eAAe,wBAAwB,YAAc,wBAAwB,KAAO,wBAAwB,UAAY,wBAAwB,MAAQ,0BAA0B,eAAe,0BAA0B,YAAc,0BAA0B,4BAA4B,0BAA0B,uBAAyB,0BAA0B,KAAO,0BAA0B,mBAAmB,0BAA0B,eAAiB,4B,qBCA9pBD,EAAOC,QAAU,CAAC,KAAO,0BAA0B,MAAQ,0BAA0B,KAAO,0BAA0B,SAAW,0BAA0B,SAAW,4B,qBCAtKD,EAAOC,QAAU,CAAC,KAAO,wBAAwB,MAAQ,0BAA0B,iBAAiB,0BAA0B,cAAgB,0BAA0B,mB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gBAAC,IAAK,CAACA,UAAW,WAAM,uBAAC,IAAS,CAAC+B,KAAK","file":"invoice.bundle.js?95807feb536b5f2007cb","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"transaction-number\":\"_3s_gBPQgIDHLF7sS4cRlAf\",\"transactionNumber\":\"_3s_gBPQgIDHLF7sS4cRlAf\",\"balance\":\"QauJgR5MBSHa4Twmqyfmz\",\"email\":\"cyHknubserrd_0LPDQnjL\",\"links\":\"_3DhJrIODkL6b8MNTKcK3SI\",\"sign-details\":\"I2pnyM5vlD9WpvZ6JFPav\",\"signDetails\":\"I2pnyM5vlD9WpvZ6JFPav\",\"paid\":\"caH_VdpBR3uLVovp3MDCn\",\"remaining\":\"MVPE4QMctKeKmDDTyovzg\",\"label\":\"_1dGRGdWdBR93-SVAhAsy7W\",\"partial-paid\":\"_3BxXxv02xVPu-QI2rUNyxl\",\"partialPaid\":\"_3BxXxv02xVPu-QI2rUNyxl\",\"non-sticky-button-wrapper\":\"_3WQ5BwjYpPPsRVZugGTRxk\",\"nonStickyButtonWrapper\":\"_3WQ5BwjYpPPsRVZugGTRxk\",\"page\":\"_1igZF-Zeh_7SbV5u-UAwVK\",\"next-step-button\":\"_3QWzLvnMegYsKbMj327BSV\",\"nextStepButton\":\"_3QWzLvnMegYsKbMj327BSV\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"card\":\"_2XHUAUm1XFbUaBk6HuTdOM\",\"title\":\"_3fItCL-nehaMKnNj26imXX\",\"text\":\"_2aL13lVwlXiwDCipksEFE4\",\"expanded\":\"_3G4dUwgYufR-yRblbt8IEh\",\"viewMore\":\"_3iWmU_dMz-E_9j4-YDQIPc\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"card\":\"gTKOf8tM56rwiC5AB4ojl\",\"table\":\"_1XCXckzVOzRE1kzVECnZtM\",\"invoice-header\":\"_2CYmRtcTLo5aphxugEDEx9\",\"invoiceHeader\":\"_2CYmRtcTLo5aphxugEDEx9\",\"invoiceHeaderInner\":\"_2B7zBeAzAzxpGURMJJuorw\",\"balance\":\"_1P-78eTZY61rY7oV3-3fIM\",\"num\":\"pYLipuKv-uTTu13A_l6Yy\",\"date\":\"_-oy_4ukVVAsM2bNPhqZFm\",\"address\":\"_3arDeAPKq-YNW2UAnF7H1l\",\"cardWrapper\":\"I9RMuBVs761Gb_FucFELq\",\"invoice-items\":\"_1pbZJeqvENJa2c0RTvpcxz\",\"invoiceItems\":\"_1pbZJeqvENJa2c0RTvpcxz\",\"task\":\"_2KPAF5g9PXodiTCGaRkmiM\",\"description\":\"_36zLtPAUpXYI58BzOKXm5A\",\"quantity\":\"_1oZkmAgCv-79uwxf6NAxOm\",\"price\":\"_2S6TPiBluWABnlE10-UIh\",\"total\":\"d2tkNdfCT2QbxfOYXsZzM\",\"hr\":\"HAQNbTm3-OduuLIiMcW2h\",\"code\":\"_3An2RiS9YPvRUpOafgQ9wa\",\"invoice-totals\":\"_26d5cBNaL166V8lCKcsAj5\",\"invoiceTotals\":\"_26d5cBNaL166V8lCKcsAj5\",\"invoice-balance\":\"_1Scbki3WN8pxZMxzIp1mEB\",\"invoiceBalance\":\"_1Scbki3WN8pxZMxzIp1mEB\",\"row\":\"_38wnD6WgiEC3C4QAa7uJdw\",\"invoice-payments\":\"_1ZUPOR0210QHs4uUOPlrYR\",\"invoicePayments\":\"_1ZUPOR0210QHs4uUOPlrYR\",\"header\":\"_3n98DCXawsi28fbQbI1anC\",\"invoice-footer\":\"_3mYJR0fdNyQJ2mCABg-NP2\",\"invoiceFooter\":\"_3mYJR0fdNyQJ2mCABg-NP2\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"non-sticky-button-wrapper\":\"_2ru02lRibTu9nEsdjNvw6J\",\"nonStickyButtonWrapper\":\"_2ru02lRibTu9nEsdjNvw6J\",\"next-step-button\":\"_37uNbYUNKyVwOCkToLTY4M\",\"nextStepButton\":\"_37uNbYUNKyVwOCkToLTY4M\",\"spinner\":\"_2gk5p-vycjPvt-Mf2o9P1q\",\"full-height\":\"_1RhXLKyG-v6LjbRb2UiD_3\",\"fullHeight\":\"_1RhXLKyG-v6LjbRb2UiD_3\",\"loading-message\":\"IM7EhA10mS_MPfqZpknPL\",\"loadingMessage\":\"IM7EhA10mS_MPfqZpknPL\",\"hidden\":\"_1ZKB0Twe3G2brA_WwIzTSE\"};","import classnames from 'classnames';\nimport * as React from 'react';\nimport { Button } from '@material-ui/core';\nimport { observer } from 'mobx-react';\n\nimport { ConfirmPaymentContainer } from '../confirm-payment';\nimport { PageFooterContainer } from 'src/core/components/page-footer/page-footer';\nimport { currency } from 'src/util/formatters';\n\nimport styles from './confirm-payment.less';\nimport { paymentMethodsContainer } from 'src/payment-method/ioc';\nimport { SavedPaymentMethodsStore } from 'src/payment-method/stores/saved-payment-methods.store';\nimport { ClientDataStore } from 'src/core/stores/client-data.store';\n\ninterface Props {\n container: ConfirmPaymentContainer;\n clientData: ClientDataStore;\n}\n\nexport const ConfirmPayment = observer>(\n ({ container: { confirmation, gotoPay }, clientData }) =>\n confirmation ? (\n
\n
\n
\n

Payment Completed.

\n
\n
\n
\n
\n \n
\n Confirmation #{confirmation.transaction}\n
\n
\n 0,\n })}\n >\n
{currency(confirmation.amountPaid)}
\n
Amount Paid
\n
\n {confirmation.remainingBalance > 0 ? (\n
\n
{currency(confirmation.remainingBalance)}
\n
Remaining Balance
\n
\n ) : null}\n
\n\n
\n You will receive an email confirmation shortly.\n
\n\n {!paymentMethodsContainer.get(SavedPaymentMethodsStore).getIsLoggedIn() && (
\n

Create an Account{' '}to save your payment information

\n

Sign In{' '}for a 1-click checkout in the future

\n
)}\n
\n {confirmation.remainingBalance > 0 ? (\n \n \n Pay Now\n \n
\n ) : null}\n \n
\n \n
\n ) : null\n);\n","import { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { RouteComponentProps } from 'react-router';\n\nimport { AnalyticsStore } from 'src/core/stores/analytics.store';\nimport { ClientDataStore } from 'src/core/stores/client-data.store';\nimport { lazyInject } from '../../ioc';\nimport { InvoiceStore, PaymentConfirmation } from '../../stores/invoice.store';\n\nimport { ConfirmPayment } from './desktop/confirm-payment';\nimport { SavedPaymentMethodsStore } from 'src/payment-method/stores/saved-payment-methods.store';\n\ninterface RouteParams {\n id: string;\n confirmId: string;\n}\n\n@observer\nexport class ConfirmPaymentContainer extends React.Component> {\n @lazyInject(AnalyticsStore) private analytics!: AnalyticsStore;\n @lazyInject(ClientDataStore) private clientData!: ClientDataStore;\n @lazyInject(InvoiceStore) private invoiceStore!: InvoiceStore;\n @lazyInject(SavedPaymentMethodsStore) private paymentMethodStore!: SavedPaymentMethodsStore;\n\n confirmation: PaymentConfirmation | undefined;\n isAnonymousPayments = this.clientData.isAnonymousPayments;\n\n constructor(props: RouteComponentProps) {\n super(props);\n\n const confirmId = this.props.match.params.confirmId;\n if (!confirmId) {\n return;\n }\n\n // Try to retrieve cached confirmation if exists\n const confirmation = this.paymentMethodStore.getCachedConfirmation(confirmId) || this.invoiceStore.getCachedConfirmation(confirmId);\n\n if (!confirmation) {\n this.props.history.replace(`/invoice/${this.props.match.params.id}`);\n return;\n }\n\n this.confirmation = confirmation;\n this.analytics.viewPaymentResultPage(confirmation.invoiceNumber, confirmation.customerId);\n\n if(!this.clientData.isInitialized) this.clientData.init();\n }\n\n gotoPay = () => {\n this.props.history.push(`/invoice/${this.props.match.params.id}/pay`);\n };\n\n gotoHome = () => {\n this.props.history.push('/home');\n };\n\n render() {\n return ;\n }\n}\n","import classnames from 'classnames';\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\n\nimport { IViewMore } from 'src/core/components/view-more';\n\nimport styles from './invoice-summary.less';\n\ninterface Props {\n viewMore: IViewMore;\n}\n\nexport const InvoiceSummary = observer>(\n ({ viewMore: { currentHtml, isExpanded, toggleExpanded, showViewMore, setTextDiv } }) => (\n
\n
Description of Work
\n \n \n
\n )\n);\n","import * as React from 'react';\n\nimport { Invoice } from 'src/api';\nimport { InvoiceSummary } from './desktop/invoice-summary';\nimport { ViewMore } from 'src/core/components/view-more';\n\ninterface Props {\n invoice: Invoice;\n}\n\nexport const InvoiceSummaryContainer: React.SFC = ({ invoice }) =>\n (invoice.summarySanitized && (\n \n )) ||\n null;\n","import classnames from 'classnames';\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { Button } from '@material-ui/core';\nimport { InvoiceDetailsContainer } from '../invoice-details';\nimport { InvoiceSummaryContainer } from '../../invoice-summary/invoice-summary';\nimport { Invoice, MemberSavingsModel, ActualSavingsModel, PotentialSavingsModel } from 'src/api';\nimport { address, currency, localeDate } from 'src/util/formatters';\nimport { PageFooterContainer } from 'src/core/components/page-footer/page-footer';\n\nimport styles from './invoice-details.less';\nimport { Stack, Text } from '@servicetitan/design-system';\n\ninterface Props {\n container: InvoiceDetailsContainer;\n}\n\n@observer\nexport class InvoiceDetails extends React.Component {\n render() {\n const { invoice, errorMessage, showButton, gotoPay, showSummaryView } =\n this.props.container;\n\n return (\n
\n
\n {errorMessage ? (\n
\n
\n

{errorMessage}

\n
\n
\n ) : null}\n
\n\n {invoice && this.renderInvoice(invoice, showSummaryView)}\n\n {showButton ? (\n
\n \n Pay Balance\n \n
\n ) : null}\n\n
\n \n
\n );\n }\n\n renderInvoice(invoice: Invoice, showSummaryView: boolean) {\n return (\n \n {showSummaryView && (\n
\n

\n {invoice.balance > 0 ? 'Balance Due' : 'Invoice'}\n

\n
\n )}\n \n \n
\n Balance Due {currency(invoice.balance)}\n
\n
\n
#{invoice.number}
\n
Invoice
\n
\n
\n
{localeDate(invoice.dueDate)}
\n
Due Date
\n
\n
\n
\n {invoice.serviceDate ? localeDate(invoice.serviceDate) : 'N/A'}\n
\n
Service Date
\n
\n
\n {invoice.address ? (\n
\n {address(invoice.address)}\n
\n ) : (\n
\n )}\n
Service Address
\n
\n
\n
\n\n
\n \n {invoice.downloadLinkEnabled ? (\n
\n \n Preview Invoice\n \n
Download Invoice\n
\n ) : null}\n
\n\n
\n
\n Subtotal {currency(invoice.subtotal)}\n
\n {typeof invoice.tax === 'number' && (\n
\n Tax {currency(invoice.tax)}\n
\n )}\n
\n Total {currency(invoice.total)}\n
\n
\n {invoice.payments && invoice.payments.length > 0 ? (\n
\n
\n
\n Payments\n \n
\n {invoice.payments.map((payment, index) => (\n // eslint-disable-next-line react/no-array-index-key\n
\n {localeDate(payment.paidOn)}\n {payment.type}\n {currency(payment.amount)}\n
\n ))}\n
\n ) : null}\n
\n
\n \n \n \n \n {invoice.payments && invoice.payments.length === 0 ? (\n \n Total Balance Due:\n \n ) : null}\n {invoice.payments && invoice.payments.length > 0 ? (\n \n Remaining Balance Due:\n \n ) : null}\n \n \n \n {currency(invoice.balance)}\n \n \n \n
\n \n );\n }\n}\n\ninterface MemberSavingsProps {\n memberSavings?: MemberSavingsModel;\n}\n\nconst MemberSavings: React.FC = ({ memberSavings }) => {\n if (!memberSavings) return null;\n const { actualSavings, potentialSavings } = memberSavings;\n return (\n \n \n \n \n );\n};\n\ninterface PotentialSavingsProps {\n potentialSavings?: PotentialSavingsModel;\n}\nconst PotentialSavings: React.FC = ({ potentialSavings }) => {\n if (!potentialSavings) return null;\n const { minimumPotentialSavings, maximumPotentialSavings } = potentialSavings;\n return (\n <>\n \n {'Potential Member Savings: '}\n \n \n {minimumPotentialSavings < maximumPotentialSavings &&\n `${currency(minimumPotentialSavings)} - `}\n {currency(maximumPotentialSavings)}\n \n \n );\n};\n\ninterface ActualSavingsPrps {\n actualSavings?: ActualSavingsModel;\n}\nconst ActualSavings: React.FC = ({ actualSavings }) => {\n if (!actualSavings) return null;\n const { totalMemberSavings } = actualSavings;\n return (\n <>\n \n {'Member Savings: '}\n \n \n {currency(totalMemberSavings)}\n \n \n );\n};\n","import * as React from 'react';\nimport { RouteComponentProps } from 'react-router';\nimport { observable, computed } from 'mobx';\nimport { observer } from 'mobx-react';\n\nimport { lazyInject } from '../../ioc';\nimport { Invoice } from 'src/api';\nimport { InvoiceStore } from '../../stores/invoice.store';\nimport { AnalyticsStore } from 'src/core/stores/analytics.store';\n\nimport { InvoiceDetails } from './desktop/invoice-details';\n\ninterface RouteParams {\n id: string;\n}\n\n@observer\nexport class InvoiceDetailsContainer extends React.Component> {\n @lazyInject(AnalyticsStore) private analytics!: AnalyticsStore;\n @lazyInject(InvoiceStore) private invoiceStore!: InvoiceStore;\n\n @observable invoice: Invoice | undefined;\n @observable errorMessage: string | undefined;\n @computed get showButton() {\n return (\n this.invoice &&\n this.invoice.balance > 0 &&\n !(this.invoice.creditCardDisabled && this.invoice.achDisabled && this.invoice.payByBankDisabled)\n );\n }\n @computed get showSummaryView() {\n return (this.invoice && (!this.invoice.items || this.invoice.items.length === 0)) || false;\n }\n\n // for unit testing purposes\n getInvoicePromise: Promise | undefined;\n\n constructor(props: RouteComponentProps) {\n super(props);\n this.getInvoicePromise = this.getInvoice();\n }\n\n private getInvoice() {\n const id = this.props.match.params.id;\n if (id) {\n return this.invoiceStore.getInvoice(id, true).then(\n (invoice) => {\n this.invoice = invoice;\n this.analytics.viewInvoicePage(\n invoice.number || invoice.id,\n invoice.customerId\n );\n },\n (err) => {\n this.errorMessage = err;\n }\n );\n }\n }\n\n gotoPay = () => {\n this.props.history.push(`${this.props.match.url}/pay`);\n };\n\n render() {\n return ;\n }\n}\n","import classnames from 'classnames';\nimport { Button } from '@material-ui/core';\nimport { observable, computed } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { RouteComponentProps } from 'react-router';\n\nimport { CardInfoFormState } from '../card-info/card-info/card-info';\nimport { AchInfoFormState } from '../ach-info/ach-info/ach-info';\nimport { PageFooterContainer } from 'src/core/components/page-footer/page-footer';\nimport { PaymentAmountContainer, PaymentAmountFormState } from '../payment-amount/payment-amount';\nimport { InvoiceStore } from 'src/invoice/stores/invoice.store';\n\nimport styles from './pay-invoice.less';\nimport { PGCardInfoFormState } from '../card-info/pg-card-info/pg-card-info';\nimport { lazyInject } from '../../ioc';\n\nimport { Banner, BodyText, Icon, IconNameType, Spinner } from '@servicetitan/design-system';\nimport { ConnectedBankAccount, PaymentMethodType } from 'src/invoice/types/types';\nimport { PaymentMethodContainer } from '../payment-methods/desktop/payment-method-container';\nimport { SavedPaymentMethodsStore } from 'src/payment-method/stores/saved-payment-methods.store';\nimport { ChargeType } from 'src/api';\n\ninterface RouteParams {\n id: string;\n}\n\n@observer\nexport class PayInvoice extends React.Component> {\n @lazyInject(InvoiceStore) private invoiceStore!: InvoiceStore;\n @lazyInject(SavedPaymentMethodsStore) private paymentMethodStore!: SavedPaymentMethodsStore;\n\n @computed private get errorMessage() {\n return (this.paymentAmountData && this.paymentAmountData.errorMessage)\n ? this.usePaymentGateway\n ? this.pgcardInfoData && this.pgcardInfoData.errorMessage\n : this.cardInfoData && this.cardInfoData.errorMessage\n : this.achInfoData && this.achInfoData.errorMessage;\n }\n\n @computed private get valid() {\n let infoFormIsValid = false;\n\n const paymentMethodType = this.paymentMethodType;\n\n if (paymentMethodType === PaymentMethodType.CreditCard) {\n if (!this.paymentMethodStore.getShowLoginLink() && this.paymentMethodStore.selectedPaymentMethod) {\n infoFormIsValid = this.isSecurityCodeValid;\n } else {\n if (this.usePaymentGateway) {\n this.pgcardInfoData.form.validate();\n } else {\n this.cardInfoData.form.validate();\n }\n\n infoFormIsValid = this.usePaymentGateway\n ? this.pgcardInfoData && !this.pgcardInfoData.form.hasError\n : this.cardInfoData && !this.cardInfoData.form.hasError;\n }\n } else if (paymentMethodType === PaymentMethodType.ACH) {\n const maximumAmount = 250000;\n if (this.paymentMethodStore.selectedPaymentMethod) {\n infoFormIsValid = this.getPaymentAmount() <= maximumAmount;\n } else {\n this.achInfoData.form.validate();\n infoFormIsValid =\n !this.achInfoData.form.hasError && this.getPaymentAmount() <= maximumAmount;\n }\n } else if (paymentMethodType === PaymentMethodType.PayByBank) {\n infoFormIsValid = true;\n }\n\n return this.paymentAmountData && !this.paymentAmountData.form.hasError && this.isPaymentMethodFormValid && infoFormIsValid;\n }\n\n private getPaymentAmount = (): number =>\n (this.paymentAmountData.isFullBalance.value\n ? this.paymentAmountData.fullBalance\n : Number(this.paymentAmountData.customAmount.$)) || 0;\n\n @observable private usePaymentGateway: boolean = false;\n @observable private paymentAmountData: PaymentAmountFormState;\n @observable private cardInfoData!: CardInfoFormState;\n @observable private pgcardInfoData!: PGCardInfoFormState;\n @observable private achInfoData!: AchInfoFormState;\n @observable private payButtonText: string = 'Pay';\n @observable private payButtonIcon?: IconNameType | undefined;\n @observable private isPaymentMethodFormValid: boolean = false;\n @observable private isSecurityCodeValid: boolean = false;\n @observable private invoiceId: string;\n @observable private accounts: ConnectedBankAccount[] = [];\n @observable private processing: boolean = false;\n @observable private paymentMethodAction: () => void = async () => { };\n @observable private paymentMethodSubmit: () => void = async () => { };\n @observable private paymentMethodType: PaymentMethodType = PaymentMethodType.PayByBank;\n\n constructor(props: RouteComponentProps) {\n super(props);\n\n this.paymentAmountData = new PaymentAmountFormState(props);\n\n const id = props.match.params.id;\n this.invoiceId = id;\n this.achInfoData = new AchInfoFormState();\n this.pgcardInfoData = new PGCardInfoFormState({ id, skipIFrameMessageHandler: true });\n this.cardInfoData = new CardInfoFormState();\n\n this.invoiceStore.getInvoice(id).then((invoice) => {\n this.usePaymentGateway = invoice.usePaymentGateway;\n });\n\n this.paymentMethodStore.currentInvoiceId = this.invoiceId;\n this.paymentMethodStore.init();\n }\n\n componentDidMount() {\n this.achInfoData.form.validate();\n }\n\n private clearError = () => {\n if (this.paymentAmountData) {\n this.paymentAmountData.clearError();\n }\n if (this.usePaymentGateway) {\n if (this.pgcardInfoData) {\n this.pgcardInfoData.clearError();\n }\n } else if (this.cardInfoData) {\n this.cardInfoData.clearError();\n }\n if (this.achInfoData) {\n this.achInfoData.clearError();\n }\n };\n\n private handleSubmit = async (e?: React.FormEvent) => {\n if (e) {\n e.preventDefault();\n }\n\n if (this.paymentAmountData.handleSubmit(e, true)) {\n try {\n this.processing = true;\n await this.paymentMethodAction();\n await this.paymentMethodSubmit();\n } finally {\n this.processing = false;\n }\n }\n };\n\n private setPaymentButtonTextIcon = (text: string, icon?: IconNameType | undefined) => {\n this.payButtonIcon = icon;\n this.payButtonText = text;\n }\n\n private setPaymentMethodType = (paymentMethodType: PaymentMethodType) => {\n this.paymentMethodType = paymentMethodType;\n }\n\n private setPaymentMethodAction = (action: () => void) => {\n this.paymentMethodAction = action;\n }\n\n private setPaymentMethodSubmit = (submit: () => void) => {\n this.paymentMethodSubmit = submit;\n }\n\n private checkUsePaymentGateway = () => this.usePaymentGateway;\n\n private setPaymentMethodValid = (isValid: boolean) => {\n this.isPaymentMethodFormValid = isValid;\n }\n\n private setSecurityCodeValid = (isValid: boolean) => {\n this.isSecurityCodeValid = isValid;\n }\n\n private setConnectedAccounts = (accounts: ConnectedBankAccount[]) => {\n this.accounts = accounts;\n }\n\n render() {\n return (\n <>\n
\n \n \n One moment please...\n \n
\n
\n
\n {(this.errorMessage || this.paymentMethodStore.errorMessage) && ( this.clearError()}\n icon\n title={this.errorMessage || this.paymentMethodStore.errorMessage}\n />)}\n
\n

Pay Invoice

\n
\n
\n\n
\n
\n \n \n
\n\n \n \n {\n this.payButtonIcon && (\n )\n }\n {' '}\n {this.payButtonText}\n \n
\n \n\n
\n \n
\n \n );\n }\n}\n","import * as React from 'react';\nimport { Route, Switch } from 'react-router';\n\nimport { ConfirmPaymentContainer } from './confirm-payment/confirm-payment';\nimport { ErrorPage } from 'src/core/components/error-page/error-page';\nimport { InvoiceDetailsContainer } from './invoice-details/invoice-details';\nimport { PrivateRoute } from 'src/routes';\n\nimport { PayInvoice } from './pay-invoice/pay-invoice';\n\nimport '@servicetitan/anvil-fonts/dist/css/anvil-fonts.css';\nimport '@servicetitan/design-system/dist/system.min.css';\n\nexport const InvoiceRoutes: React.SFC = () => (\n \n }\n />\n \n {}\n \n {}\n {}\n \n } />\n \n);\n"],"sourceRoot":""}