mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
import React from 'react';
|
|
import * as R from 'ramda';
|
|
|
|
import { useInventoryItemDetailsContext } from './InventoryItemDetailsProvider';
|
|
import { InventoryItemDetailsTable } from './InventoryItemDetailsTable';
|
|
|
|
import { FinancialReportBody } from '../FinancialReportPage';
|
|
import { FinancialSheetSkeleton } from '../../../components/FinancialSheet';
|
|
import withCurrentOrganization from 'containers/Organization/withCurrentOrganization';
|
|
|
|
/**
|
|
* Inventory item details body.
|
|
* @returns {JSX.Element}
|
|
*/
|
|
function InventoryItemDetailsBodyJSX({
|
|
// #withCurrentOrganization
|
|
organizationName,
|
|
}) {
|
|
const { isInventoryItemDetailsLoading } = useInventoryItemDetailsContext();
|
|
|
|
return (
|
|
<FinancialReportBody>
|
|
{isInventoryItemDetailsLoading ? (
|
|
<FinancialSheetSkeleton />
|
|
) : (
|
|
<InventoryItemDetailsTable companyName={organizationName} />
|
|
)}
|
|
</FinancialReportBody>
|
|
);
|
|
}
|
|
|
|
export const InventoryItemDetailsBody = R.compose(
|
|
withCurrentOrganization(({ organization }) => ({
|
|
organizationName: organization.name,
|
|
})),
|
|
)(InventoryItemDetailsBodyJSX);
|