mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
30 lines
839 B
JavaScript
30 lines
839 B
JavaScript
import React from 'react';
|
|
|
|
import { FormattedMessage as T } from 'components';
|
|
import { Dialog, DialogSuspense } from 'components';
|
|
import withDialogRedux from 'components/DialogReduxConnect';
|
|
import { compose } from 'redux';
|
|
|
|
const BadDebtDialogContent = React.lazy(() => import('./BadDebtDialogContent'));
|
|
|
|
/**
|
|
* Bad debt dialog.
|
|
*/
|
|
function BadDebtDialog({ dialogName, payload: { invoiceId = null }, isOpen }) {
|
|
return (
|
|
<Dialog
|
|
name={dialogName}
|
|
title={<T id={'bad_debt.dialog.bad_debt'} />}
|
|
isOpen={isOpen}
|
|
canEscapeJeyClose={true}
|
|
autoFocus={true}
|
|
className={'dialog--bad-debt'}
|
|
>
|
|
<DialogSuspense>
|
|
<BadDebtDialogContent dialogName={dialogName} invoice={invoiceId} />
|
|
</DialogSuspense>
|
|
</Dialog>
|
|
);
|
|
}
|
|
export default compose(withDialogRedux())(BadDebtDialog);
|