Files
bigcapital/packages/webapp/src/containers/FinancialStatements/ARAgingSummary/dialogs/ARAgingSummaryPdfDialog/ARAgingSummaryPdfDialog.tsx
2024-02-17 00:15:20 +02:00

40 lines
1.0 KiB
TypeScript

// @ts-nocheck
import React, { lazy } from 'react';
import classNames from 'classnames';
import { Dialog, DialogSuspense } from '@/components';
import withDialogRedux from '@/components/DialogReduxConnect';
import { CLASSES } from '@/constants/classes';
import { compose } from '@/utils';
// Lazy loading the content.
const ARAgingSummaryPdfDialogContent = lazy(
() => import('./ARAgingSummaryPdfDialogContent'),
);
/**
* Balance sheet pdf preview dialog.
* @returns {React.ReactNode}
*/
function ARAgingSummaryPdfDialogRoot({ dialogName, payload, isOpen }) {
return (
<Dialog
name={dialogName}
title={'A/R Aging Summary Print Preview'}
className={classNames(CLASSES.DIALOG_PDF_PREVIEW)}
autoFocus={true}
canEscapeKeyClose={true}
isOpen={isOpen}
style={{ width: '1000px' }}
>
<DialogSuspense>
<ARAgingSummaryPdfDialogContent dialogName={dialogName} />
</DialogSuspense>
</Dialog>
);
}
export const ARAgingSummaryPdfDialog = compose(withDialogRedux())(
ARAgingSummaryPdfDialogRoot,
);