WIP financial statements.

This commit is contained in:
Ahmed Bouhuolia
2020-03-31 16:30:38 +02:00
parent da05239e84
commit 1bf837ae17
26 changed files with 442 additions and 148 deletions

View File

@@ -1,26 +1,35 @@
import React, { Children } from 'react';
import moment from 'moment';
import classnames from 'classnames';
import LoadingIndicator from 'components/LoadingIndicator';
export default function FinancialSheet({
companyTitle,
sheetType,
date,
children,
accountingBasis
accountingBasis,
name,
loading,
}) {
const formattedDate = moment(date).format('DD MMMM YYYY')
const nameModifer = name ? `financial-sheet--${name}` : '';
return (
<div class="financial-sheet">
<h1 class="financial-sheet__title">{ companyTitle }</h1>
<h6 class="financial-sheet__sheet-type">{ sheetType }</h6>
<span class="financial-sheet__date">{ date }</span>
<div className={classnames('financial-sheet', nameModifer)}>
<LoadingIndicator loading={loading}>
<h1 class="financial-sheet__title">{ companyTitle }</h1>
<h6 class="financial-sheet__sheet-type">{ sheetType }</h6>
<div class="financial-sheet__date">As of { formattedDate }</div>
<div class="financial-sheet__table">
{ children }
</div>
<div class="financial-sheet__table">
{ children }
</div>
<div class="financial-sheet__accounting-basis">
{ accountingBasis }
</div>
<div class="financial-sheet__accounting-basis">
{ accountingBasis }
</div>
</LoadingIndicator>
</div>
);
}