mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
36 lines
889 B
JavaScript
36 lines
889 B
JavaScript
import React, { lazy } from 'react';
|
|
import { FormattedMessage as T } from 'components';
|
|
import { Dialog, DialogSuspense } from 'components';
|
|
import withDialogRedux from 'components/DialogReduxConnect';
|
|
import { compose } from 'utils';
|
|
|
|
const UserFormDialogContent = lazy(() => import('./UserFormDialogContent'));
|
|
|
|
function UserFormDialog({
|
|
dialogName,
|
|
payload = { action: '', userId: null },
|
|
isOpen,
|
|
}) {
|
|
|
|
return (
|
|
<Dialog
|
|
name={dialogName}
|
|
title={<T id={'edit_user'} />}
|
|
className={'dialog--user-form'}
|
|
autoFocus={true}
|
|
canEscapeKeyClose={true}
|
|
isOpen={isOpen}
|
|
>
|
|
<DialogSuspense>
|
|
<UserFormDialogContent
|
|
dialogName={dialogName}
|
|
userId={payload.userId}
|
|
action={payload.action}
|
|
/>
|
|
</DialogSuspense>
|
|
</Dialog>
|
|
);
|
|
}
|
|
|
|
export default compose(withDialogRedux())(UserFormDialog);
|