mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat: view details.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import React from 'react';
|
||||
import { Tabs, Tab } from '@blueprintjs/core';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
import JournalEntriesTable from '../../JournalEntriesTable/JournalEntriesTable';
|
||||
|
||||
/**
|
||||
* payment receive view detail.
|
||||
*/
|
||||
export default function PaymentReceiveDetail() {
|
||||
return (
|
||||
<div className="view-detail-drawer">
|
||||
<Tabs animate={true} large={true} defaultSelectedTabId="journal_entries">
|
||||
<Tab title={intl.get('details')} id={'details'} disabled={true} />
|
||||
<Tab
|
||||
title={intl.get('journal_entries')}
|
||||
id={'journal_entries'}
|
||||
panel={<JournalEntriesTable journal={[]} />}
|
||||
/>
|
||||
</Tabs>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
|
||||
|
||||
import 'style/components/Drawers/ViewDetail/ViewDetail.scss';
|
||||
|
||||
import PaymentReceiveDetail from './PaymentReceiveDetail';
|
||||
import { PaymentReceiveDetailProvider } from './PaymentReceiveDetailProvider';
|
||||
|
||||
/**
|
||||
* Payment receive detail content.
|
||||
*/
|
||||
export default function PaymentReceiveDetailContent({
|
||||
// #ownProp
|
||||
paymentReceive,
|
||||
}) {
|
||||
return (
|
||||
<PaymentReceiveDetailProvider paymentReceiveId={paymentReceive}>
|
||||
<PaymentReceiveDetail />
|
||||
</PaymentReceiveDetailProvider>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
import { DrawerHeaderContent, DashboardInsider } from 'components';
|
||||
|
||||
const PaymentReceiveDetailContext = React.createContext();
|
||||
/**
|
||||
* Payment receive detail provider.
|
||||
*/
|
||||
function PaymentReceiveDetailProvider({ paymentReceiveId, ...props }) {
|
||||
//provider.
|
||||
const provider = {};
|
||||
|
||||
return (
|
||||
<DashboardInsider>
|
||||
<DrawerHeaderContent
|
||||
name="payment-receive-detail-drawer"
|
||||
title={intl.get('payment_receive_details')}
|
||||
/>
|
||||
<PaymentReceiveDetailContext.Provider value={provider} {...props} />
|
||||
</DashboardInsider>
|
||||
);
|
||||
}
|
||||
|
||||
const usePaymentReceiveDetailContext = () =>
|
||||
React.useContext(PaymentReceiveDetailContext);
|
||||
|
||||
export { PaymentReceiveDetailProvider, usePaymentReceiveDetailContext };
|
||||
@@ -0,0 +1,29 @@
|
||||
import React from 'react';
|
||||
import { Drawer, DrawerSuspense } from 'components';
|
||||
import withDrawers from 'containers/Drawer/withDrawers';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
const PaymentReceiveDetailContent = React.lazy(() =>
|
||||
import('./PaymentReceiveDetailContent'),
|
||||
);
|
||||
|
||||
/**
|
||||
* Payment receive detail drawer
|
||||
*/
|
||||
function PaymentReceiveDetailDrawer({
|
||||
name,
|
||||
// #withDrawer
|
||||
isOpen,
|
||||
payload: { paymentReceiveId },
|
||||
}) {
|
||||
return (
|
||||
<Drawer isOpen={isOpen} name={name} size={'750px'}>
|
||||
<DrawerSuspense>
|
||||
<PaymentReceiveDetailContent paymentReceive={paymentReceiveId} />
|
||||
</DrawerSuspense>
|
||||
</Drawer>
|
||||
);
|
||||
}
|
||||
|
||||
export default compose(withDrawers())(PaymentReceiveDetailDrawer);
|
||||
Reference in New Issue
Block a user