mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
38 lines
937 B
TypeScript
38 lines
937 B
TypeScript
// @ts-nocheck
|
|
import React from 'react';
|
|
import * as R from 'ramda';
|
|
|
|
import { FinancialReportBody } from '../FinancialReportPage';
|
|
import { FinancialSheetSkeleton } from '@/components';
|
|
import { JournalTable } from './JournalTable';
|
|
import { useJournalSheetContext } from './JournalProvider';
|
|
|
|
import withCurrentOrganization from '@/containers/Organization/withCurrentOrganization';
|
|
|
|
/**
|
|
* Journal report body.
|
|
* @returns {JSX.Element}
|
|
*/
|
|
function JournalBodyJSX({
|
|
// #withCurrentOrganization
|
|
organizationName,
|
|
}) {
|
|
const { isLoading } = useJournalSheetContext();
|
|
|
|
return (
|
|
<FinancialReportBody>
|
|
{isLoading ? (
|
|
<FinancialSheetSkeleton />
|
|
) : (
|
|
<JournalTable companyName={organizationName} />
|
|
)}
|
|
</FinancialReportBody>
|
|
);
|
|
}
|
|
|
|
export const JournalBody = R.compose(
|
|
withCurrentOrganization(({ organization }) => ({
|
|
organizationName: organization.name,
|
|
})),
|
|
)(JournalBodyJSX);
|