mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
refactoring: invoice, receipt, payment receive, estimate and journal number dialogs.
This commit is contained in:
@@ -2,13 +2,19 @@ import React, { lazy } from 'react';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { Dialog, DialogSuspense } from 'components';
|
||||
import withDialogRedux from 'components/DialogReduxConnect';
|
||||
import { compose } from 'utils';
|
||||
import { compose, saveInvoke } from 'utils';
|
||||
|
||||
const InvoiceNumberDialogContent = lazy(() =>
|
||||
import('./InvoiceNumberDialogContent'),
|
||||
);
|
||||
|
||||
function InvoiceNumberDialog({ dialogName, payload = { id: null }, isOpen }) {
|
||||
function InvoiceNumberDialog({
|
||||
dialogName,
|
||||
payload = { id: null },
|
||||
isOpen,
|
||||
onConfirm,
|
||||
}) {
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
title={<T id={'invoice_number_settings'} />}
|
||||
@@ -18,7 +24,9 @@ function InvoiceNumberDialog({ dialogName, payload = { id: null }, isOpen }) {
|
||||
isOpen={isOpen}
|
||||
>
|
||||
<DialogSuspense>
|
||||
<InvoiceNumberDialogContent InvoiceNumberId={payload.id} />
|
||||
<InvoiceNumberDialogContent
|
||||
InvoiceNumberId={payload.id}
|
||||
onConfirm={(values) => saveInvoke(onConfirm, values)} />
|
||||
</DialogSuspense>
|
||||
</Dialog>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user