mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 07:10:33 +00:00
feat(balancesheet): balance sheet comparisons.
This commit is contained in:
@@ -13,53 +13,20 @@ import { Row, Col, FieldHint } from '../../../components';
|
|||||||
export default function BalanceSheetHeaderComparisonPanal() {
|
export default function BalanceSheetHeaderComparisonPanal() {
|
||||||
return (
|
return (
|
||||||
<BalanceSheetComparisonWrap>
|
<BalanceSheetComparisonWrap>
|
||||||
{/*------------ Percentage -----------*/}
|
{/**----------- Previous Year -----------*/}
|
||||||
|
<FastField name={'previous_year'} type={'checkbox'}>
|
||||||
|
{({ field }) => (
|
||||||
|
<FormGroup labelInfo={<FieldHint />}>
|
||||||
|
<Checkbox
|
||||||
|
inline={true}
|
||||||
|
small={true}
|
||||||
|
label={<T id={'balance_sheet.previous_year'} />}
|
||||||
|
{...field}
|
||||||
|
/>
|
||||||
|
</FormGroup>
|
||||||
|
)}
|
||||||
|
</FastField>
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={3}>
|
|
||||||
<FastField name={'percentage_of_column'} type={'checkbox'}>
|
|
||||||
{({ field }) => (
|
|
||||||
<FormGroup labelInfo={<FieldHint />}>
|
|
||||||
<Checkbox
|
|
||||||
inline={true}
|
|
||||||
small={true}
|
|
||||||
label={<T id={'balance_sheet.percentage_of_column'} />}
|
|
||||||
{...field}
|
|
||||||
/>
|
|
||||||
</FormGroup>
|
|
||||||
)}
|
|
||||||
</FastField>
|
|
||||||
</Col>
|
|
||||||
<Col xs={3}>
|
|
||||||
<FastField name={'percentage_of_row'} type={'checkbox'}>
|
|
||||||
{({ field }) => (
|
|
||||||
<FormGroup labelInfo={<FieldHint />}>
|
|
||||||
<Checkbox
|
|
||||||
inline={true}
|
|
||||||
small={true}
|
|
||||||
label={<T id={'balance_sheet.percentage_of_row'} />}
|
|
||||||
{...field}
|
|
||||||
/>
|
|
||||||
</FormGroup>
|
|
||||||
)}
|
|
||||||
</FastField>
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
{/*------------ Previous Year -----------*/}
|
|
||||||
<Row>
|
|
||||||
<Col xs={3}>
|
|
||||||
<FastField name={'previous_year'} type={'checkbox'}>
|
|
||||||
{({ field }) => (
|
|
||||||
<FormGroup labelInfo={<FieldHint />}>
|
|
||||||
<Checkbox
|
|
||||||
inline={true}
|
|
||||||
small={true}
|
|
||||||
label={<T id={'balance_sheet.previous_year'} />}
|
|
||||||
{...field}
|
|
||||||
/>
|
|
||||||
</FormGroup>
|
|
||||||
)}
|
|
||||||
</FastField>
|
|
||||||
</Col>
|
|
||||||
<Col xs={3}>
|
<Col xs={3}>
|
||||||
<FastField name={'previous_year_amount_change'} type={'checkbox'}>
|
<FastField name={'previous_year_amount_change'} type={'checkbox'}>
|
||||||
{({ field }) => (
|
{({ field }) => (
|
||||||
@@ -90,21 +57,19 @@ export default function BalanceSheetHeaderComparisonPanal() {
|
|||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
{/*------------ Previous Period -----------*/}
|
{/*------------ Previous Period -----------*/}
|
||||||
|
<FastField name={'previous_period'} type={'checkbox'}>
|
||||||
|
{({ field }) => (
|
||||||
|
<FormGroup labelInfo={<FieldHint />}>
|
||||||
|
<Checkbox
|
||||||
|
inline={true}
|
||||||
|
small={true}
|
||||||
|
label={<T id={'balance_sheet.previous_period'} />}
|
||||||
|
{...field}
|
||||||
|
/>
|
||||||
|
</FormGroup>
|
||||||
|
)}
|
||||||
|
</FastField>
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={3}>
|
|
||||||
<FastField name={'previous_period'} type={'checkbox'}>
|
|
||||||
{({ field }) => (
|
|
||||||
<FormGroup labelInfo={<FieldHint />}>
|
|
||||||
<Checkbox
|
|
||||||
inline={true}
|
|
||||||
small={true}
|
|
||||||
label={<T id={'balance_sheet.previous_period'} />}
|
|
||||||
{...field}
|
|
||||||
/>
|
|
||||||
</FormGroup>
|
|
||||||
)}
|
|
||||||
</FastField>
|
|
||||||
</Col>
|
|
||||||
<Col xs={3}>
|
<Col xs={3}>
|
||||||
<FastField name={'previous_period_amount_change'} type={'checkbox'}>
|
<FastField name={'previous_period_amount_change'} type={'checkbox'}>
|
||||||
{({ field }) => (
|
{({ field }) => (
|
||||||
@@ -137,24 +102,48 @@ export default function BalanceSheetHeaderComparisonPanal() {
|
|||||||
</FastField>
|
</FastField>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
|
{/**----------- % of Column -----------*/}
|
||||||
|
<FastField name={'previous_period_percentage_change'} type={'checkbox'}>
|
||||||
|
{({ field }) => (
|
||||||
|
<FormGroup labelInfo={<FieldHint />}>
|
||||||
|
<Checkbox
|
||||||
|
inline={true}
|
||||||
|
small={true}
|
||||||
|
label={<T id={'profit_loss_sheet.percentage_of_column'} />}
|
||||||
|
{...field}
|
||||||
|
/>
|
||||||
|
</FormGroup>
|
||||||
|
)}
|
||||||
|
</FastField>
|
||||||
|
|
||||||
|
{/**----------- % of Row -----------*/}
|
||||||
|
<FastField name={'previous_period_percentage_change'} type={'checkbox'}>
|
||||||
|
{({ field }) => (
|
||||||
|
<FormGroup labelInfo={<FieldHint />}>
|
||||||
|
<Checkbox
|
||||||
|
inline={true}
|
||||||
|
small={true}
|
||||||
|
label={<T id={'profit_loss_sheet.percentage_of_row'} />}
|
||||||
|
{...field}
|
||||||
|
/>
|
||||||
|
</FormGroup>
|
||||||
|
)}
|
||||||
|
</FastField>
|
||||||
</BalanceSheetComparisonWrap>
|
</BalanceSheetComparisonWrap>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const BalanceSheetComparisonWrap = styled.div`
|
const BalanceSheetComparisonWrap = styled.div`
|
||||||
.row {
|
.row {
|
||||||
display: flex;
|
margin-left: 0.15rem;
|
||||||
flex-wrap: nowrap;
|
|
||||||
margin-left: -0.3rem;
|
|
||||||
margin-right: -0.3rem;
|
|
||||||
|
|
||||||
.col {
|
.col {
|
||||||
padding-left: 0.3rem;
|
min-width: 150px;
|
||||||
padding-right: 0.3rem;
|
max-width: 190px;
|
||||||
|
|
||||||
.bp3-form-group {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.bp3-form-group {
|
||||||
|
margin-bottom: 3px;
|
||||||
|
/* margin-bottom: 0; */
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user