mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-22 15:50:32 +00:00
feat(FinancialSheet): add skeleton view.
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
export * from './TableStyle';
|
export * from './TableStyle';
|
||||||
|
|
||||||
|
export const Align = { Left: 'left', Right: 'right', Center: 'center' };
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { useContext } from 'react';
|
import React, { useContext } from 'react';
|
||||||
|
import clsx from 'classnames';
|
||||||
import TableContext from './TableContext';
|
import TableContext from './TableContext';
|
||||||
import { Skeleton } from 'components';
|
import { Skeleton } from 'components';
|
||||||
|
|
||||||
@@ -8,7 +9,13 @@ function TableHeaderCell({ column }) {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
{...column.getHeaderProps({
|
{...column.getHeaderProps({
|
||||||
className: 'th',
|
className: clsx(
|
||||||
|
'th',
|
||||||
|
{
|
||||||
|
[`align-${column.align}`]: column.align,
|
||||||
|
},
|
||||||
|
column.className,
|
||||||
|
),
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<Skeleton minWidth={skeletonWidthMin} maxWidth={skeletonWidthMax} />
|
<Skeleton minWidth={skeletonWidthMin} maxWidth={skeletonWidthMax} />
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { useContext } from 'react';
|
import React, { useContext } from 'react';
|
||||||
|
import clsx from 'classnames';
|
||||||
import TableContext from './TableContext';
|
import TableContext from './TableContext';
|
||||||
import { Skeleton } from 'components';
|
import { Skeleton } from 'components';
|
||||||
|
|
||||||
@@ -11,7 +12,13 @@ function TableHeaderCell({ column }) {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
{...column.getHeaderProps({
|
{...column.getHeaderProps({
|
||||||
className: 'td',
|
className: clsx(
|
||||||
|
'td',
|
||||||
|
{
|
||||||
|
[`align-${column.align}`]: column.align,
|
||||||
|
},
|
||||||
|
column.className,
|
||||||
|
),
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<Skeleton minWidth={skeletonWidthMin} maxWidth={skeletonWidthMax} />
|
<Skeleton minWidth={skeletonWidthMin} maxWidth={skeletonWidthMax} />
|
||||||
|
|||||||
23
src/components/FinancialReport/index.js
Normal file
23
src/components/FinancialReport/index.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
|
const FinancialStatementRoot = styled.div``;
|
||||||
|
const FinancialStatementBodyRoot = styled.div``;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @returns {React.JSX}
|
||||||
|
*/
|
||||||
|
export function FinancialReport({ children, className }) {
|
||||||
|
return <FinancialStatementRoot children={children} className={className} />;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {React.JSX}
|
||||||
|
*/
|
||||||
|
export function FinancialReportBody({ children, className }) {
|
||||||
|
return (
|
||||||
|
<FinancialStatementBodyRoot children={children} className={className} />
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
import React, { useMemo, useCallback } from 'react';
|
|
||||||
import moment from 'moment';
|
|
||||||
import classnames from 'classnames';
|
|
||||||
import { FormattedMessage as T } from 'components';
|
|
||||||
import intl from 'react-intl-universal';
|
|
||||||
|
|
||||||
import { If, LoadingIndicator, MODIFIER } from 'components';
|
|
||||||
|
|
||||||
export default function FinancialSheet({
|
|
||||||
companyName,
|
|
||||||
sheetType,
|
|
||||||
fromDate,
|
|
||||||
toDate,
|
|
||||||
asDate,
|
|
||||||
children,
|
|
||||||
accountingBasis,
|
|
||||||
name,
|
|
||||||
loading,
|
|
||||||
className,
|
|
||||||
basis,
|
|
||||||
minimal = false,
|
|
||||||
fullWidth = false,
|
|
||||||
currentDate = true,
|
|
||||||
}) {
|
|
||||||
|
|
||||||
const format = 'DD MMMM YYYY';
|
|
||||||
const formattedFromDate = useMemo(() => moment(fromDate).format(format), [
|
|
||||||
fromDate,
|
|
||||||
]);
|
|
||||||
const formattedToDate = useMemo(() => moment(toDate).format(format), [
|
|
||||||
toDate,
|
|
||||||
]);
|
|
||||||
const formattedAsDate = useMemo(() => moment(asDate).format(format), [
|
|
||||||
asDate,
|
|
||||||
]);
|
|
||||||
|
|
||||||
const nameModifer = name ? `financial-sheet--${name}` : '';
|
|
||||||
const methodsLabels = useMemo(
|
|
||||||
() => ({
|
|
||||||
cash: intl.get('cash'),
|
|
||||||
accrual: intl.get('accrual'),
|
|
||||||
}),
|
|
||||||
[],
|
|
||||||
);
|
|
||||||
const getBasisLabel = useCallback((b) => methodsLabels[b], [methodsLabels]);
|
|
||||||
const basisLabel = useMemo(() => getBasisLabel(basis), [
|
|
||||||
getBasisLabel,
|
|
||||||
basis,
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className={classnames('financial-sheet', nameModifer, className, {
|
|
||||||
[MODIFIER.FINANCIAL_SHEET_MINIMAL]: minimal,
|
|
||||||
'is-full-width': fullWidth,
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
{loading ? (
|
|
||||||
<LoadingIndicator loading={loading} spinnerSize={34} />
|
|
||||||
) : (
|
|
||||||
<div className={classnames('financial-sheet__inner')}>
|
|
||||||
<If condition={!!companyName}>
|
|
||||||
<h1 class="financial-sheet__title">{companyName}</h1>
|
|
||||||
</If>
|
|
||||||
|
|
||||||
<If condition={!!sheetType}>
|
|
||||||
<h6 class="financial-sheet__sheet-type">{sheetType}</h6>
|
|
||||||
</If>
|
|
||||||
|
|
||||||
<div class="financial-sheet__date">
|
|
||||||
<If condition={asDate}>
|
|
||||||
<T id={'as'} /> {formattedAsDate}
|
|
||||||
</If>
|
|
||||||
|
|
||||||
<If condition={fromDate && toDate}>
|
|
||||||
<T id={'from'} /> {formattedFromDate} | <T id={'to'} />{' '}
|
|
||||||
{formattedToDate}
|
|
||||||
</If>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="financial-sheet__table">{children}</div>
|
|
||||||
<div class="financial-sheet__accounting-basis">{accountingBasis}</div>
|
|
||||||
|
|
||||||
<div class="financial-sheet__footer">
|
|
||||||
<If condition={basisLabel}>
|
|
||||||
<span class="financial-sheet__basis">
|
|
||||||
<T id={'accounting_basis'} /> {basisLabel}
|
|
||||||
</span>
|
|
||||||
</If>
|
|
||||||
|
|
||||||
<If condition={currentDate}>
|
|
||||||
<span class="financial-sheet__current-date">
|
|
||||||
{moment().format('YYYY MMM DD HH:MM')}
|
|
||||||
</span>
|
|
||||||
</If>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
95
src/components/FinancialSheet/FinancialSheet.js
Normal file
95
src/components/FinancialSheet/FinancialSheet.js
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
import React, { useMemo, useCallback } from 'react';
|
||||||
|
import moment from 'moment';
|
||||||
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
|
import { If, FormattedMessage as T } from 'components';
|
||||||
|
import {
|
||||||
|
FinancialSheetRoot,
|
||||||
|
FinancialSheetFooterCurrentTime,
|
||||||
|
FinancialSheetFooterBasis,
|
||||||
|
FinancialSheetFooter,
|
||||||
|
FinancialSheetAccountingBasis,
|
||||||
|
FinancialSheetTable,
|
||||||
|
FinancialSheetDate,
|
||||||
|
FinancialSheetType,
|
||||||
|
FinancialSheetTitle,
|
||||||
|
} from './StyledFinancialSheet';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Financial sheet.
|
||||||
|
* @returns {React.JSX}
|
||||||
|
*/
|
||||||
|
export function FinancialSheet({
|
||||||
|
companyName,
|
||||||
|
sheetType,
|
||||||
|
fromDate,
|
||||||
|
toDate,
|
||||||
|
asDate,
|
||||||
|
children,
|
||||||
|
accountingBasis,
|
||||||
|
basis,
|
||||||
|
minimal = false,
|
||||||
|
fullWidth = false,
|
||||||
|
currentDate = true,
|
||||||
|
}) {
|
||||||
|
const format = 'DD MMMM YYYY';
|
||||||
|
const formattedFromDate = useMemo(
|
||||||
|
() => moment(fromDate).format(format),
|
||||||
|
[fromDate],
|
||||||
|
);
|
||||||
|
const formattedToDate = useMemo(
|
||||||
|
() => moment(toDate).format(format),
|
||||||
|
[toDate],
|
||||||
|
);
|
||||||
|
const formattedAsDate = useMemo(
|
||||||
|
() => moment(asDate).format(format),
|
||||||
|
[asDate],
|
||||||
|
);
|
||||||
|
const methodsLabels = useMemo(
|
||||||
|
() => ({
|
||||||
|
cash: intl.get('cash'),
|
||||||
|
accrual: intl.get('accrual'),
|
||||||
|
}),
|
||||||
|
[],
|
||||||
|
);
|
||||||
|
const getBasisLabel = useCallback((b) => methodsLabels[b], [methodsLabels]);
|
||||||
|
const basisLabel = useMemo(
|
||||||
|
() => getBasisLabel(basis),
|
||||||
|
[getBasisLabel, basis],
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<FinancialSheetRoot minimal={minimal} fullWidth={fullWidth}>
|
||||||
|
{companyName && <FinancialSheetTitle>{companyName}</FinancialSheetTitle>}
|
||||||
|
{sheetType && <FinancialSheetType>{sheetType}</FinancialSheetType>}
|
||||||
|
|
||||||
|
<FinancialSheetDate>
|
||||||
|
<If condition={asDate}>
|
||||||
|
<T id={'as'} /> {formattedAsDate}
|
||||||
|
</If>
|
||||||
|
<If condition={fromDate && toDate}>
|
||||||
|
<T id={'from'} /> {formattedFromDate} | <T id={'to'} />{' '}
|
||||||
|
{formattedToDate}
|
||||||
|
</If>
|
||||||
|
</FinancialSheetDate>
|
||||||
|
|
||||||
|
<FinancialSheetTable>{children}</FinancialSheetTable>
|
||||||
|
<FinancialSheetAccountingBasis>
|
||||||
|
{accountingBasis}
|
||||||
|
</FinancialSheetAccountingBasis>
|
||||||
|
|
||||||
|
<FinancialSheetFooter>
|
||||||
|
{basisLabel && (
|
||||||
|
<FinancialSheetFooterBasis>
|
||||||
|
<T id={'accounting_basis'} /> {basisLabel}
|
||||||
|
</FinancialSheetFooterBasis>
|
||||||
|
)}
|
||||||
|
{currentDate && (
|
||||||
|
<FinancialSheetFooterCurrentTime>
|
||||||
|
{moment().format('YYYY MMM DD HH:MM')}
|
||||||
|
</FinancialSheetFooterCurrentTime>
|
||||||
|
)}
|
||||||
|
</FinancialSheetFooter>
|
||||||
|
</FinancialSheetRoot>
|
||||||
|
);
|
||||||
|
}
|
||||||
84
src/components/FinancialSheet/FinancialSheetSkeleton.js
Normal file
84
src/components/FinancialSheet/FinancialSheetSkeleton.js
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
|
import { Align } from 'common';
|
||||||
|
import { SkeletonText, DataTable } from 'components';
|
||||||
|
|
||||||
|
import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
|
||||||
|
import TableSkeletonHeader from 'components/Datatable/TableHeaderSkeleton';
|
||||||
|
import { TableStyle } from 'common';
|
||||||
|
import {
|
||||||
|
FinancialSheetRoot,
|
||||||
|
FinancialSheetTitle,
|
||||||
|
FinancialSheetType,
|
||||||
|
FinancialSheetDate,
|
||||||
|
FinancialSheetTable,
|
||||||
|
} from './StyledFinancialSheet';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Financial sheet paper skeleton.
|
||||||
|
* @returns {React.JSX}
|
||||||
|
*/
|
||||||
|
export function FinancialSheetSkeleton({
|
||||||
|
minimal,
|
||||||
|
fullWidth,
|
||||||
|
titleCharsLength,
|
||||||
|
typeCharsLength,
|
||||||
|
dateCharsLength,
|
||||||
|
skeletonTableColumns,
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<FinancialSheetRoot minimal={minimal} fullWidth={fullWidth}>
|
||||||
|
<FinancialSheetTitle>
|
||||||
|
<SkeletonText charsLength={titleCharsLength} />
|
||||||
|
</FinancialSheetTitle>
|
||||||
|
|
||||||
|
<FinancialSheetType>
|
||||||
|
<SkeletonText charsLength={typeCharsLength} />
|
||||||
|
</FinancialSheetType>
|
||||||
|
|
||||||
|
<FinancialSheetDate>
|
||||||
|
<SkeletonText charsLength={dateCharsLength} />
|
||||||
|
</FinancialSheetDate>
|
||||||
|
|
||||||
|
<FinancialSheetTable>
|
||||||
|
<FinancialSkeletonTable
|
||||||
|
columns={skeletonTableColumns}
|
||||||
|
data={[]}
|
||||||
|
noInitialFetch={true}
|
||||||
|
expandable={true}
|
||||||
|
styleName={TableStyle.Constrant}
|
||||||
|
TableLoadingRenderer={TableSkeletonRows}
|
||||||
|
TableHeaderSkeletonRenderer={TableSkeletonHeader}
|
||||||
|
headerLoading={true}
|
||||||
|
loading={true}
|
||||||
|
/>
|
||||||
|
</FinancialSheetTable>
|
||||||
|
</FinancialSheetRoot>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
FinancialSheetSkeleton.defaultProps = {
|
||||||
|
titleCharsLength: 20,
|
||||||
|
typeCharsLength: 40,
|
||||||
|
dateCharsLength: 20,
|
||||||
|
skeletonTableColumns: [
|
||||||
|
{
|
||||||
|
id: 'skeleton-1',
|
||||||
|
className: 'skeleton-1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'skeleton-2',
|
||||||
|
className: 'skeleton-2',
|
||||||
|
align: Align.Right,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const FinancialSkeletonTable = styled(DataTable)`
|
||||||
|
.table .th .skeleton,
|
||||||
|
.table .td .skeleton {
|
||||||
|
margin-top: 4px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
`;
|
||||||
82
src/components/FinancialSheet/StyledFinancialSheet.js
Normal file
82
src/components/FinancialSheet/StyledFinancialSheet.js
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
|
export const FinancialSheetRoot = styled.div`
|
||||||
|
border: 2px solid #f0f0f0;
|
||||||
|
border-radius: 10px;
|
||||||
|
min-width: 640px;
|
||||||
|
width: auto;
|
||||||
|
padding: 30px 18px;
|
||||||
|
max-width: 100%;
|
||||||
|
margin: 35px auto;
|
||||||
|
min-height: 400px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
background: #fff;
|
||||||
|
|
||||||
|
${(props) =>
|
||||||
|
props.fullWidth &&
|
||||||
|
`
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 25px;`}
|
||||||
|
|
||||||
|
${(props) =>
|
||||||
|
props.minimal &&
|
||||||
|
`
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
margin-top: 20px;
|
||||||
|
|
||||||
|
${FinancialSheetTitle} {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
${FinancialSheetTitle} + ${FinancialSheetDate} {
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
${FinancialSheetDate} {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
`}
|
||||||
|
`;
|
||||||
|
|
||||||
|
export const FinancialSheetTitle = styled.h1`
|
||||||
|
margin: 0;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 20px;
|
||||||
|
color: #464646;
|
||||||
|
text-align: center;
|
||||||
|
`;
|
||||||
|
|
||||||
|
export const FinancialSheetType = styled.h6`
|
||||||
|
text-align: center;
|
||||||
|
margin: 0;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #666;
|
||||||
|
margin-top: 6px;
|
||||||
|
`;
|
||||||
|
|
||||||
|
export const FinancialSheetDate = styled.div`
|
||||||
|
text-align: center;
|
||||||
|
color: #666;
|
||||||
|
margin-top: 6px;
|
||||||
|
`;
|
||||||
|
|
||||||
|
export const FinancialSheetFooter = styled.div`
|
||||||
|
color: #888;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: auto;
|
||||||
|
padding-top: 18px;
|
||||||
|
font-size: 13px;
|
||||||
|
|
||||||
|
> span + span {
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
export const FinancialSheetTable = styled.div`
|
||||||
|
margin-top: 24px;
|
||||||
|
`;
|
||||||
|
export const FinancialSheetFooterBasis = styled.span``;
|
||||||
|
export const FinancialSheetFooterCurrentTime = styled.span``;
|
||||||
|
|
||||||
|
export const FinancialSheetAccountingBasis = styled.div``;
|
||||||
2
src/components/FinancialSheet/index.js
Normal file
2
src/components/FinancialSheet/index.js
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
export * from './FinancialSheet';
|
||||||
|
export * from './FinancialSheetSkeleton';
|
||||||
@@ -1,15 +1,24 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import className from 'classnames';
|
import styled from 'styled-components';
|
||||||
import 'style/containers/FinancialStatements/FinancialSheet.scss';
|
|
||||||
|
|
||||||
export default function FinancialStatements({ name, children }) {
|
const FinancialStatementRoot = styled.div``;
|
||||||
|
const FinancialStatementBodyRoot = styled.div``;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {*} param0
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function FinancialStatement({ children, className }) {
|
||||||
|
return <FinancialStatementRoot children={children} className={className} />;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {React.JSX}
|
||||||
|
*/
|
||||||
|
export function FinancialStatementBody({ children, className }) {
|
||||||
return (
|
return (
|
||||||
<div
|
<FinancialStatementBodyRoot children={children} className={className} />
|
||||||
className={className('financial-statement', {
|
|
||||||
[`financial-statement--${name}`]: name,
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,14 +6,36 @@ import { randomNumber } from 'utils';
|
|||||||
/**
|
/**
|
||||||
* Skeleton component.
|
* Skeleton component.
|
||||||
*/
|
*/
|
||||||
export default function Skeleton({
|
export function Skeleton({
|
||||||
Tag = 'span',
|
Tag = 'span',
|
||||||
minWidth = 40,
|
minWidth = 40,
|
||||||
maxWidth = 100,
|
maxWidth = 100,
|
||||||
|
children,
|
||||||
}) {
|
}) {
|
||||||
const randomWidth = useMemo(() => randomNumber(minWidth, maxWidth), [
|
const randomWidth = useMemo(
|
||||||
minWidth,
|
() => randomNumber(minWidth, maxWidth),
|
||||||
maxWidth,
|
[minWidth, maxWidth],
|
||||||
]);
|
);
|
||||||
return <Tag className={'skeleton'} style={{ width: `${randomWidth}%` }} />;
|
return (
|
||||||
|
<Tag
|
||||||
|
className={'skeleton'}
|
||||||
|
style={{ width: `${randomWidth}%` }}
|
||||||
|
children={children}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function SkeletonText({
|
||||||
|
Tag = 'span',
|
||||||
|
charsLength,
|
||||||
|
minChars = 40,
|
||||||
|
maxChars = 100,
|
||||||
|
}) {
|
||||||
|
const computedCharLength = useMemo(
|
||||||
|
() => (charsLength ? charsLength : randomNumber(minChars, maxChars)),
|
||||||
|
[charsLength, minChars, maxChars],
|
||||||
|
);
|
||||||
|
const randamText = 'X'.repeat(computedCharLength);
|
||||||
|
|
||||||
|
return <Tag className={'skeleton'}>{randamText}</Tag>;
|
||||||
}
|
}
|
||||||
|
|||||||
0
src/components/SkeletonText.js
Normal file
0
src/components/SkeletonText.js
Normal file
@@ -5,9 +5,6 @@ import Choose from './Utils/Choose';
|
|||||||
import For from './Utils/For';
|
import For from './Utils/For';
|
||||||
import { FormattedMessage, FormattedHTMLMessage } from './FormattedMessage';
|
import { FormattedMessage, FormattedHTMLMessage } from './FormattedMessage';
|
||||||
import ListSelect from './ListSelect';
|
import ListSelect from './ListSelect';
|
||||||
import FinancialStatement from './FinancialStatement';
|
|
||||||
// import DynamicFilterValueField from './DynamicFilter/DynamicFilterValueField';
|
|
||||||
// import DynamicFilterCompatatorField from './DynamicFilter/DynamicFilterCompatatorField';
|
|
||||||
import ErrorMessage from './ErrorMessage';
|
import ErrorMessage from './ErrorMessage';
|
||||||
import MODIFIER from './modifiers';
|
import MODIFIER from './modifiers';
|
||||||
import FieldHint from './FieldHint';
|
import FieldHint from './FieldHint';
|
||||||
@@ -41,7 +38,6 @@ import InputPrependText from './Forms/InputPrependText';
|
|||||||
import PageFormBigNumber from './PageFormBigNumber';
|
import PageFormBigNumber from './PageFormBigNumber';
|
||||||
import AccountsMultiSelect from './AccountsMultiSelect';
|
import AccountsMultiSelect from './AccountsMultiSelect';
|
||||||
import ContactsMultiSelect from './ContactsMultiSelect';
|
import ContactsMultiSelect from './ContactsMultiSelect';
|
||||||
import Skeleton from './Skeleton';
|
|
||||||
import ContextMenu from './ContextMenu';
|
import ContextMenu from './ContextMenu';
|
||||||
import TableFastCell from './Datatable/TableFastCell';
|
import TableFastCell from './Datatable/TableFastCell';
|
||||||
import DashboardContentTable from './Dashboard/DashboardContentTable';
|
import DashboardContentTable from './Dashboard/DashboardContentTable';
|
||||||
@@ -95,6 +91,10 @@ export * from './Card';
|
|||||||
export * from './Customers'
|
export * from './Customers'
|
||||||
export * from './Vendors'
|
export * from './Vendors'
|
||||||
export * from './Table';
|
export * from './Table';
|
||||||
|
export * from './Skeleton';
|
||||||
|
export * from './FinancialStatement';
|
||||||
|
export * from './FinancialReport';
|
||||||
|
export * from './FinancialSheet';
|
||||||
|
|
||||||
const Hint = FieldHint;
|
const Hint = FieldHint;
|
||||||
|
|
||||||
@@ -110,7 +110,6 @@ export {
|
|||||||
T,
|
T,
|
||||||
Money,
|
Money,
|
||||||
ListSelect,
|
ListSelect,
|
||||||
FinancialStatement,
|
|
||||||
// DynamicFilterValueField,
|
// DynamicFilterValueField,
|
||||||
// DynamicFilterCompatatorField,
|
// DynamicFilterCompatatorField,
|
||||||
MODIFIER,
|
MODIFIER,
|
||||||
@@ -148,7 +147,6 @@ export {
|
|||||||
DataTableEditable,
|
DataTableEditable,
|
||||||
ContactsMultiSelect,
|
ContactsMultiSelect,
|
||||||
TableFastCell,
|
TableFastCell,
|
||||||
Skeleton,
|
|
||||||
ContextMenu,
|
ContextMenu,
|
||||||
DashboardContentTable,
|
DashboardContentTable,
|
||||||
DashboardPageContent,
|
DashboardPageContent,
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React from 'react';
|
||||||
import { FormattedMessage as T } from 'components';
|
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import { DataTable } from 'components';
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
import { DataTable, FinancialSheet } from 'components';
|
||||||
|
|
||||||
import { useAPAgingSummaryContext } from './APAgingSummaryProvider';
|
import { useAPAgingSummaryContext } from './APAgingSummaryProvider';
|
||||||
import { useAPAgingSummaryColumns } from './components';
|
import { useAPAgingSummaryColumns } from './components';
|
||||||
@@ -14,8 +13,6 @@ export default function APAgingSummaryTable({
|
|||||||
//#ownProps
|
//#ownProps
|
||||||
organizationName,
|
organizationName,
|
||||||
}) {
|
}) {
|
||||||
|
|
||||||
|
|
||||||
// AP aging summary report content.
|
// AP aging summary report content.
|
||||||
const {
|
const {
|
||||||
APAgingSummary: { tableRows },
|
APAgingSummary: { tableRows },
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import DataTable from 'components/DataTable';
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
import { DataTable, FinancialSheet } from 'components';
|
||||||
|
|
||||||
import { useARAgingSummaryContext } from './ARAgingSummaryProvider';
|
import { useARAgingSummaryContext } from './ARAgingSummaryProvider';
|
||||||
import { useARAgingSummaryColumns } from './components';
|
import { useARAgingSummaryColumns } from './components';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { FinancialReportBody } from '../FinancialReportPage';
|
|||||||
|
|
||||||
import withCurrentOrganization from 'containers/Organization/withCurrentOrganization';
|
import withCurrentOrganization from 'containers/Organization/withCurrentOrganization';
|
||||||
import { useBalanceSheetContext } from './BalanceSheetProvider';
|
import { useBalanceSheetContext } from './BalanceSheetProvider';
|
||||||
|
import { FinancialSheetSkeleton } from '../../../components/FinancialSheet';
|
||||||
import { compose } from 'utils';
|
import { compose } from 'utils';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -21,7 +21,7 @@ function BalanceSheetBodyJSX({
|
|||||||
return (
|
return (
|
||||||
<FinancialReportBody>
|
<FinancialReportBody>
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
'loading'
|
<FinancialSheetSkeleton />
|
||||||
) : (
|
) : (
|
||||||
<BalanceSheetTable companyName={organizationName} />
|
<BalanceSheetTable companyName={organizationName} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import React from 'react';
|
|||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
import { DataTable, FinancialSheet } from 'components';
|
||||||
import DataTable from 'components/DataTable';
|
|
||||||
import { useBalanceSheetContext } from './BalanceSheetProvider';
|
import { useBalanceSheetContext } from './BalanceSheetProvider';
|
||||||
|
|
||||||
import { defaultExpanderReducer, tableRowTypesToClassnames } from 'utils';
|
import { defaultExpanderReducer, tableRowTypesToClassnames } from 'utils';
|
||||||
@@ -36,8 +36,7 @@ export default function BalanceSheetTable({
|
|||||||
name="balance-sheet"
|
name="balance-sheet"
|
||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
sheetType={intl.get('balance_sheet')}
|
sheetType={intl.get('balance_sheet')}
|
||||||
fromDate={query.from_date}
|
asDate={query.to_date}
|
||||||
toDate={query.to_date}
|
|
||||||
basis={query.basis}
|
basis={query.basis}
|
||||||
>
|
>
|
||||||
<BalanceSheetDataTable
|
<BalanceSheetDataTable
|
||||||
@@ -49,6 +48,8 @@ export default function BalanceSheetTable({
|
|||||||
expanded={expandedRows}
|
expanded={expandedRows}
|
||||||
expandToggleColumn={1}
|
expandToggleColumn={1}
|
||||||
expandColumnSpace={0.8}
|
expandColumnSpace={0.8}
|
||||||
|
headerLoading={true}
|
||||||
|
sticky={true}
|
||||||
styleName={TableStyle.Constrant}
|
styleName={TableStyle.Constrant}
|
||||||
/>
|
/>
|
||||||
</FinancialSheet>
|
</FinancialSheet>
|
||||||
@@ -60,8 +61,8 @@ const BalanceSheetDataTable = styled(DataTable)`
|
|||||||
.tbody .tr {
|
.tbody .tr {
|
||||||
.td {
|
.td {
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
padding-top: 0.36rem;
|
padding-top: 0.32rem;
|
||||||
padding-bottom: 0.36rem;
|
padding-bottom: 0.32rem;
|
||||||
}
|
}
|
||||||
&.is-expanded {
|
&.is-expanded {
|
||||||
.td:not(.name) .cell-inner {
|
.td:not(.name) .cell-inner {
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ import * as R from 'ramda';
|
|||||||
import { isEmpty } from 'lodash';
|
import { isEmpty } from 'lodash';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
|
import { Align } from 'common';
|
||||||
import { CellTextSpan } from 'components/Datatable/Cells';
|
import { CellTextSpan } from 'components/Datatable/Cells';
|
||||||
import { getColumnWidth } from 'utils';
|
import { getColumnWidth } from 'utils';
|
||||||
|
|
||||||
const getTableCellValueAccessor = (index) => `cells[${index}].value`;
|
const getTableCellValueAccessor = (index) => `cells[${index}].value`;
|
||||||
|
|
||||||
const Align = { Left: 'left', Right: 'right', Center: 'center' };
|
|
||||||
|
|
||||||
const getReportColWidth = (data, accessor, headerText) => {
|
const getReportColWidth = (data, accessor, headerText) => {
|
||||||
return getColumnWidth(
|
return getColumnWidth(
|
||||||
data,
|
data,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
import { DataTable } from 'components';
|
import { DataTable, FinancialSheet } from 'components';
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
|
||||||
import { useCashFlowStatementColumns } from './components';
|
import { useCashFlowStatementColumns } from './components';
|
||||||
import { useCashFlowStatementContext } from './CashFlowStatementProvider';
|
import { useCashFlowStatementContext } from './CashFlowStatementProvider';
|
||||||
|
|
||||||
@@ -15,8 +15,6 @@ export default function CashFlowStatementTable({
|
|||||||
// #ownProps
|
// #ownProps
|
||||||
companyName,
|
companyName,
|
||||||
}) {
|
}) {
|
||||||
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
cashFlowStatement: { tableRows },
|
cashFlowStatement: { tableRows },
|
||||||
isCashFlowLoading,
|
isCashFlowLoading,
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
import { DataTable, FinancialSheet } from 'components';
|
||||||
import DataTable from 'components/DataTable';
|
|
||||||
|
|
||||||
import { useCustomersBalanceSummaryContext } from './CustomersBalanceSummaryProvider';
|
import { useCustomersBalanceSummaryContext } from './CustomersBalanceSummaryProvider';
|
||||||
import { useCustomersSummaryColumns } from './components';
|
import { useCustomersSummaryColumns } from './components';
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
import { DataTable, FinancialSheet } from 'components';
|
||||||
import DataTable from 'components/DataTable';
|
|
||||||
import { useCustomersTransactionsColumns } from './components';
|
import { useCustomersTransactionsColumns } from './components';
|
||||||
import { useCustomersTransactionsContext } from './CustomersTransactionsProvider';
|
import { useCustomersTransactionsContext } from './CustomersTransactionsProvider';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import React, { useMemo } from 'react';
|
|||||||
import { defaultExpanderReducer } from 'utils';
|
import { defaultExpanderReducer } from 'utils';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
import { FinancialSheet } from 'components';
|
||||||
import DataTable from 'components/DataTable';
|
import DataTable from 'components/DataTable';
|
||||||
import TableVirtualizedListRows from 'components/Datatable/TableVirtualizedRows';
|
import TableVirtualizedListRows from 'components/Datatable/TableVirtualizedRows';
|
||||||
import TableFastCell from 'components/Datatable/TableFastCell';
|
import TableFastCell from 'components/Datatable/TableFastCell';
|
||||||
@@ -37,7 +37,6 @@ export default function GeneralLedgerTable({ companyName }) {
|
|||||||
sheetType={intl.get('general_ledger_sheet')}
|
sheetType={intl.get('general_ledger_sheet')}
|
||||||
fromDate={query.from_date}
|
fromDate={query.from_date}
|
||||||
toDate={query.to_date}
|
toDate={query.to_date}
|
||||||
name="general-ledger"
|
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
import { DataTable, FinancialSheet } from 'components';
|
||||||
import { DataTable } from 'components';
|
|
||||||
import { useInventoryItemDetailsColumns } from './components';
|
import { useInventoryItemDetailsColumns } from './components';
|
||||||
import { useInventoryItemDetailsContext } from './InventoryItemDetailsProvider';
|
import { useInventoryItemDetailsContext } from './InventoryItemDetailsProvider';
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import intl, { init } from 'react-intl-universal';
|
import intl, { init } from 'react-intl-universal';
|
||||||
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
import { DataTable, FinancialSheet } from 'components';
|
||||||
import { DataTable } from 'components';
|
|
||||||
|
|
||||||
import { useInventoryValuationContext } from './InventoryValuationProvider';
|
import { useInventoryValuationContext } from './InventoryValuationProvider';
|
||||||
import { useInventoryValuationTableColumns } from './components';
|
import { useInventoryValuationTableColumns } from './components';
|
||||||
|
|||||||
@@ -1,25 +1,24 @@
|
|||||||
import React, { useCallback, useMemo } from 'react';
|
import React, { useCallback, useMemo } from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
import { DataTable, FinancialSheet } from 'components';
|
||||||
import DataTable from 'components/DataTable';
|
|
||||||
import { useJournalSheetContext } from './JournalProvider';
|
|
||||||
import TableVirtualizedListRows from 'components/Datatable/TableVirtualizedRows';
|
import TableVirtualizedListRows from 'components/Datatable/TableVirtualizedRows';
|
||||||
import TableFastCell from 'components/Datatable/TableFastCell';
|
import TableFastCell from 'components/Datatable/TableFastCell';
|
||||||
import { defaultExpanderReducer } from 'utils';
|
|
||||||
import { useJournalTableColumns } from './components';
|
import { useJournalTableColumns } from './components';
|
||||||
|
import { useJournalSheetContext } from './JournalProvider';
|
||||||
|
|
||||||
|
import { defaultExpanderReducer } from 'utils';
|
||||||
|
|
||||||
export default function JournalSheetTable({
|
export default function JournalSheetTable({
|
||||||
// #ownProps
|
// #ownProps
|
||||||
onFetchData,
|
onFetchData,
|
||||||
companyName,
|
companyName,
|
||||||
}) {
|
}) {
|
||||||
|
|
||||||
|
|
||||||
// Journal sheet context.
|
// Journal sheet context.
|
||||||
const {
|
const {
|
||||||
journalSheet: { tableRows, query },
|
journalSheet: { tableRows, query },
|
||||||
isLoading
|
isLoading,
|
||||||
} = useJournalSheetContext();
|
} = useJournalSheetContext();
|
||||||
|
|
||||||
// Retreive the journal table columns.
|
// Retreive the journal table columns.
|
||||||
@@ -42,8 +41,6 @@ export default function JournalSheetTable({
|
|||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FinancialSheet
|
<FinancialSheet
|
||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
@@ -60,14 +57,15 @@ export default function JournalSheetTable({
|
|||||||
columns={columns}
|
columns={columns}
|
||||||
data={tableRows}
|
data={tableRows}
|
||||||
rowClassNames={rowClassNames}
|
rowClassNames={rowClassNames}
|
||||||
noResults={intl.get('this_report_does_not_contain_any_data_between_date_period')}
|
noResults={intl.get(
|
||||||
|
'this_report_does_not_contain_any_data_between_date_period',
|
||||||
|
)}
|
||||||
expanded={expandedRows}
|
expanded={expandedRows}
|
||||||
sticky={true}
|
sticky={true}
|
||||||
TableRowsRenderer={TableVirtualizedListRows}
|
TableRowsRenderer={TableVirtualizedListRows}
|
||||||
// #TableVirtualizedListRows props.
|
// #TableVirtualizedListRows props.
|
||||||
vListrowHeight={28}
|
vListrowHeight={28}
|
||||||
vListOverscanRowCount={2}
|
vListOverscanRowCount={2}
|
||||||
|
|
||||||
TableCellRenderer={TableFastCell}
|
TableCellRenderer={TableFastCell}
|
||||||
id={'journal'}
|
id={'journal'}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import { FinancialSheetSkeleton } from '../../../components/FinancialSheet';
|
||||||
import ProfitLossSheetTable from './ProfitLossSheetTable';
|
import ProfitLossSheetTable from './ProfitLossSheetTable';
|
||||||
import { FinancialReportBody } from '../FinancialReportPage';
|
import { FinancialReportBody } from '../FinancialReportPage';
|
||||||
|
|
||||||
@@ -20,7 +21,7 @@ function ProfitLossBodyJSX({
|
|||||||
return (
|
return (
|
||||||
<FinancialReportBody>
|
<FinancialReportBody>
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
'loading'
|
<FinancialSheetSkeleton />
|
||||||
) : (
|
) : (
|
||||||
<ProfitLossSheetTable companyName={organizationName} />
|
<ProfitLossSheetTable companyName={organizationName} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -2,13 +2,10 @@ import React from 'react';
|
|||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { TableStyle } from 'common';
|
import { TableStyle } from 'common';
|
||||||
import { FormattedMessage as T } from 'components';
|
import { DataTable, FinancialSheet, FormattedMessage as T } from 'components';
|
||||||
|
|
||||||
import { useProfitLossSheetColumns } from './hooks';
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
|
||||||
import DataTable from 'components/DataTable';
|
|
||||||
|
|
||||||
import { tableRowTypesToClassnames, defaultExpanderReducer } from 'utils';
|
import { tableRowTypesToClassnames, defaultExpanderReducer } from 'utils';
|
||||||
|
import { useProfitLossSheetColumns } from './hooks';
|
||||||
import { useProfitLossSheetContext } from './ProfitLossProvider';
|
import { useProfitLossSheetContext } from './ProfitLossProvider';
|
||||||
|
|
||||||
export default function ProfitLossSheetTable({
|
export default function ProfitLossSheetTable({
|
||||||
@@ -60,8 +57,8 @@ const ProfitLossDataTable = styled(DataTable)`
|
|||||||
.tbody .tr {
|
.tbody .tr {
|
||||||
.td {
|
.td {
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
padding-top: 0.36rem;
|
padding-top: 0.32rem;
|
||||||
padding-bottom: 0.36rem;
|
padding-bottom: 0.32rem;
|
||||||
}
|
}
|
||||||
&.is-expanded {
|
&.is-expanded {
|
||||||
.td:not(.name) .cell-inner {
|
.td:not(.name) .cell-inner {
|
||||||
@@ -74,8 +71,8 @@ const ProfitLossDataTable = styled(DataTable)`
|
|||||||
border-top: 1px solid #bbb;
|
border-top: 1px solid #bbb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&:last-of-type .td{
|
&:last-of-type .td {
|
||||||
border-bottom: 1px solid #bbb;
|
border-bottom: 3px double #000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import * as R from 'ramda';
|
import * as R from 'ramda';
|
||||||
import { isEmpty } from 'lodash';
|
import { isEmpty } from 'lodash';
|
||||||
|
|
||||||
|
import { Align } from 'common';
|
||||||
import { CellTextSpan } from 'components/Datatable/Cells';
|
import { CellTextSpan } from 'components/Datatable/Cells';
|
||||||
import { getColumnWidth } from 'utils';
|
import { getColumnWidth } from 'utils';
|
||||||
|
|
||||||
const Align = { Left: 'left', Right: 'right', Center: 'center' };
|
|
||||||
const getTableCellValueAccessor = (index) => `cells[${index}].value`;
|
const getTableCellValueAccessor = (index) => `cells[${index}].value`;
|
||||||
|
|
||||||
const getReportColWidth = (data, accessor, labelText) => {
|
const getReportColWidth = (data, accessor, labelText) => {
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
import { DataTable, FinancialSheet } from 'components';
|
||||||
import { DataTable } from 'components';
|
|
||||||
|
|
||||||
import { usePurchaseByItemsContext } from './PurchasesByItemsProvider';
|
import { usePurchaseByItemsContext } from './PurchasesByItemsProvider';
|
||||||
|
|
||||||
import { usePurchasesByItemsTableColumns } from './components';
|
import { usePurchasesByItemsTableColumns } from './components';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
import { DataTable, FinancialSheet } from 'components';
|
||||||
import { DataTable } from 'components';
|
|
||||||
import { useSalesByItemsContext } from './SalesByItemProvider';
|
import { useSalesByItemsContext } from './SalesByItemProvider';
|
||||||
import { useSalesByItemsTableColumns } from './components';
|
import { useSalesByItemsTableColumns } from './components';
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
import { DataTable, FinancialSheet } from 'components';
|
||||||
import DataTable from 'components/DataTable';
|
|
||||||
|
|
||||||
import { useTrialBalanceSheetContext } from './TrialBalanceProvider';
|
import { useTrialBalanceSheetContext } from './TrialBalanceProvider';
|
||||||
|
|
||||||
|
|
||||||
import { useTrialBalanceTableColumns } from './components';
|
import { useTrialBalanceTableColumns } from './components';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FormattedMessage as T } from 'components';
|
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import { DataTable } from 'components';
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
import { DataTable, FinancialSheet } from 'components';
|
||||||
|
|
||||||
import { useVendorsBalanceColumns } from './components';
|
import { useVendorsBalanceColumns } from './components';
|
||||||
import { useVendorsBalanceSummaryContext } from './VendorsBalanceSummaryProvider';
|
import { useVendorsBalanceSummaryContext } from './VendorsBalanceSummaryProvider';
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
import { DataTable, FinancialSheet } from 'components';
|
||||||
import DataTable from 'components/DataTable';
|
|
||||||
import { useVendorsTransactionsColumns } from './components';
|
import { useVendorsTransactionsColumns } from './components';
|
||||||
import { useVendorsTransactionsContext } from './VendorsTransactionsProvider';
|
import { useVendorsTransactionsContext } from './VendorsTransactionsProvider';
|
||||||
|
|
||||||
|
|||||||
@@ -147,6 +147,19 @@
|
|||||||
width: 65%;
|
width: 65%;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.align-right {
|
||||||
|
.skeleton {
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.align-center {
|
||||||
|
.skeleton {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.th {
|
.th {
|
||||||
@@ -363,13 +376,14 @@
|
|||||||
.table-constrant,
|
.table-constrant,
|
||||||
.table--constrant {
|
.table--constrant {
|
||||||
.table {
|
.table {
|
||||||
.thead{
|
.thead {
|
||||||
.tr:first-of-type .th{
|
.tr:first-of-type .th {
|
||||||
border-top: 1px solid #000000;
|
border-top: 1px solid #000000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.thead .th {
|
.thead .th {
|
||||||
background: transparent;
|
background: #fff;
|
||||||
color: #222222;
|
color: #222222;
|
||||||
border-bottom: 1px solid #000000;
|
border-bottom: 1px solid #000000;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
|
|||||||
@@ -1,118 +0,0 @@
|
|||||||
// Financial sheet.
|
|
||||||
// -----------------------
|
|
||||||
.financial-sheet {
|
|
||||||
border: 2px solid #f0f0f0;
|
|
||||||
border-radius: 10px;
|
|
||||||
min-width: 640px;
|
|
||||||
width: auto;
|
|
||||||
padding: 30px 18px;
|
|
||||||
max-width: 100%;
|
|
||||||
margin: 35px auto;
|
|
||||||
min-height: 400px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
background: #fff;
|
|
||||||
|
|
||||||
&__title {
|
|
||||||
margin: 0;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 20px;
|
|
||||||
color: #464646;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
&__sheet-type {
|
|
||||||
text-align: center;
|
|
||||||
margin: 0;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #666;
|
|
||||||
margin-top: 6px;
|
|
||||||
}
|
|
||||||
&__date {
|
|
||||||
text-align: center;
|
|
||||||
color: #666;
|
|
||||||
margin-top: 6px;
|
|
||||||
}
|
|
||||||
&__table {
|
|
||||||
margin-top: 24px;
|
|
||||||
|
|
||||||
.table {
|
|
||||||
.tbody,
|
|
||||||
.thead {
|
|
||||||
.tr .td,
|
|
||||||
.tr .th {
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tr.no-results {
|
|
||||||
.td {
|
|
||||||
flex-direction: column;
|
|
||||||
padding: 20px;
|
|
||||||
color: #666;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&__inner {
|
|
||||||
&.is-loading {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&__footer {
|
|
||||||
color: #888;
|
|
||||||
text-align: center;
|
|
||||||
margin-top: auto;
|
|
||||||
padding-top: 18px;
|
|
||||||
font-size: 13px;
|
|
||||||
|
|
||||||
|
|
||||||
> span + span{
|
|
||||||
padding-left: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.dashboard__loading-indicator {
|
|
||||||
margin: auto;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
&--expended {
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--minimal {
|
|
||||||
border: 0;
|
|
||||||
padding: 0;
|
|
||||||
margin-top: 20px;
|
|
||||||
|
|
||||||
.financial-sheet {
|
|
||||||
&__title {
|
|
||||||
font-size: 18px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
&__title + .financial-sheet__date {
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
&__table {
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&.is-full-width {
|
|
||||||
width: 100%;
|
|
||||||
margin-top: 25px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.financial-statement {
|
|
||||||
&__header {
|
|
||||||
}
|
|
||||||
|
|
||||||
&__body {
|
|
||||||
padding-left: 15px;
|
|
||||||
padding-right: 15px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user