mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat(branches& warehouses): add branches & warehouses activate dialog.
This commit is contained in:
@@ -36,6 +36,8 @@ import CreditNotePdfPreviewDialog from '../containers/Dialogs/CreditNotePdfPrevi
|
||||
import PaymentReceivePdfPreviewDialog from '../containers/Dialogs/PaymentReceivePdfPreviewDialog';
|
||||
import WarehouseFormDialog from '../containers/Dialogs/WarehouseFormDialog';
|
||||
import BranchFormDialog from '../containers/Dialogs/BranchFormDialog';
|
||||
import BranchActivateDialog from '../containers/Dialogs/BranchActivateDialog';
|
||||
import WarehouseActivateDialog from '../containers/Dialogs/WarehouseActivateDialog';
|
||||
|
||||
/**
|
||||
* Dialogs container.
|
||||
@@ -82,6 +84,8 @@ export default function DialogsContainer() {
|
||||
<PaymentReceivePdfPreviewDialog dialogName={'payment-pdf-preview'} />
|
||||
<WarehouseFormDialog dialogName={'warehouse-form'} />
|
||||
<BranchFormDialog dialogName={'branch-form'} />
|
||||
<BranchActivateDialog dialogName={'branch-activate'} />
|
||||
<WarehouseActivateDialog dialogName={'warehouse-activate'} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
import React from 'react';
|
||||
import { Intent, Button, Callout, Classes } from '@blueprintjs/core';
|
||||
import { DialogContent, T } from 'components';
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
function BranchActivateDialogContent({
|
||||
// #ownProps
|
||||
dialogName,
|
||||
// #withDialogActions
|
||||
closeDialog,
|
||||
}) {
|
||||
// Handle close button click.
|
||||
const handleCancelBtnClick = () => {
|
||||
closeDialog(dialogName);
|
||||
};
|
||||
return (
|
||||
<DialogContent>
|
||||
<div className={Classes.DIALOG_BODY}>
|
||||
<Callout icon={null} intent={Intent.PRIMARY}>
|
||||
Aute esse eiusmod dolore ipsum dolor sint qui proident pariatur
|
||||
proident fugiat ea ad aliquip.
|
||||
</Callout>
|
||||
</div>
|
||||
<div className={Classes.DIALOG_FOOTER}>
|
||||
<div className={Classes.DIALOG_FOOTER_ACTIONS}>
|
||||
<Button onClick={handleCancelBtnClick} style={{ minWidth: '85px' }}>
|
||||
<T id={'cancel'} />
|
||||
</Button>
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
style={{ minWidth: '95px' }}
|
||||
type="submit"
|
||||
>
|
||||
{<T id={'activate'} />}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</DialogContent>
|
||||
);
|
||||
}
|
||||
export default compose(withDialogActions)(BranchActivateDialogContent);
|
||||
32
src/containers/Dialogs/BranchActivateDialog/index.js
Normal file
32
src/containers/Dialogs/BranchActivateDialog/index.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import React from 'react';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { Dialog, DialogSuspense } from 'components';
|
||||
import withDialogRedux from 'components/DialogReduxConnect';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
const BranchActivateDialogContent = React.lazy(() =>
|
||||
import('./BranchActivateDialogContent'),
|
||||
);
|
||||
|
||||
/**
|
||||
* Branch activate dialog.
|
||||
*/
|
||||
function BranchActivateDialog({ dialogName, payload: {}, isOpen }) {
|
||||
return (
|
||||
<Dialog
|
||||
name={dialogName}
|
||||
title={'Branches Activate'}
|
||||
isOpen={isOpen}
|
||||
canEscapeJeyClose={true}
|
||||
autoFocus={true}
|
||||
className={'dialog--branch-activate'}
|
||||
>
|
||||
<DialogSuspense>
|
||||
<BranchActivateDialogContent dialogName={dialogName} />
|
||||
</DialogSuspense>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
|
||||
export default compose(withDialogRedux())(BranchActivateDialog);
|
||||
@@ -0,0 +1,48 @@
|
||||
import React from 'react';
|
||||
import { Intent, Button, Callout, Classes } from '@blueprintjs/core';
|
||||
import { DialogContent, T } from 'components';
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
/**
|
||||
* Warehouse activate dialog content.
|
||||
* @returns
|
||||
*/
|
||||
function WarehouseActivateDialogContent({
|
||||
// #ownProps
|
||||
dialogName,
|
||||
// #withDialogActions
|
||||
closeDialog,
|
||||
}) {
|
||||
// Handle close button click.
|
||||
const handleCancelBtnClick = () => {
|
||||
closeDialog(dialogName);
|
||||
};
|
||||
return (
|
||||
<DialogContent>
|
||||
<div className={Classes.DIALOG_BODY}>
|
||||
<Callout icon={null} intent={Intent.PRIMARY}>
|
||||
Aute esse eiusmod dolore ipsum dolor sint qui proident pariatur
|
||||
proident fugiat ea ad aliquip.
|
||||
</Callout>
|
||||
</div>
|
||||
<div className={Classes.DIALOG_FOOTER}>
|
||||
<div className={Classes.DIALOG_FOOTER_ACTIONS}>
|
||||
<Button onClick={handleCancelBtnClick} style={{ minWidth: '85px' }}>
|
||||
<T id={'cancel'} />
|
||||
</Button>
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
style={{ minWidth: '95px' }}
|
||||
type="submit"
|
||||
>
|
||||
{<T id={'activate'} />}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</DialogContent>
|
||||
);
|
||||
}
|
||||
|
||||
export default compose(withDialogActions)(WarehouseActivateDialogContent);
|
||||
32
src/containers/Dialogs/WarehouseActivateDialog/index.js
Normal file
32
src/containers/Dialogs/WarehouseActivateDialog/index.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import React from 'react';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { Dialog, DialogSuspense } from 'components';
|
||||
import withDialogRedux from 'components/DialogReduxConnect';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
const WarehouseActivateDialogContent = React.lazy(() =>
|
||||
import('./WarehouseActivateDialogContent'),
|
||||
);
|
||||
|
||||
/**
|
||||
* Warehouse activate dialog.
|
||||
*/
|
||||
function WarehouseActivateDialog({ dialogName, payload: {}, isOpen }) {
|
||||
return (
|
||||
<Dialog
|
||||
name={dialogName}
|
||||
title={'Warehouses Activate'}
|
||||
isOpen={isOpen}
|
||||
canEscapeJeyClose={true}
|
||||
autoFocus={true}
|
||||
className={'dialog--warehouse-activate'}
|
||||
>
|
||||
<DialogSuspense>
|
||||
<WarehouseActivateDialogContent dialogName={dialogName} />
|
||||
</DialogSuspense>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
|
||||
export default compose(withDialogRedux())(WarehouseActivateDialog);
|
||||
Reference in New Issue
Block a user