mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
fix: homepage.
This commit is contained in:
7
client/src/containers/Homepage/AccountsPayableSection.js
Normal file
7
client/src/containers/Homepage/AccountsPayableSection.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import React from 'react';
|
||||
import ShortcutBoxesSection from './ShortcutBoxesSection';
|
||||
import { accountsPayable } from 'common/homepageOptions';
|
||||
|
||||
export default function AccountsPayableSection() {
|
||||
return <ShortcutBoxesSection section={accountsPayable} />;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import React from 'react';
|
||||
import ShortcutBoxesSection from './ShortcutBoxesSection';
|
||||
import { accountsReceivable } from 'common/homepageOptions';
|
||||
|
||||
export default function AccountsReceivableSection() {
|
||||
return <ShortcutBoxesSection section={accountsReceivable} />;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import React from 'react';
|
||||
import ShortcutBoxesSection from './ShortcutBoxesSection';
|
||||
import { financialAccounting } from 'common/homepageOptions';
|
||||
|
||||
export default function FinancialAccountingSection() {
|
||||
return <ShortcutBoxesSection section={financialAccounting} />;
|
||||
}
|
||||
@@ -1,14 +1,17 @@
|
||||
import React from 'react';
|
||||
import ShortcutBoxes from './ShortcutBoxes';
|
||||
import AnnouncementList from './AnnouncementList';
|
||||
|
||||
import AccountsReceivableSection from './AccountsReceivableSection';
|
||||
import AccountsPayableSection from './AccountsPayableSection';
|
||||
import FinancialAccountingSection from './FinancialAccountingSection';
|
||||
import ProductsServicesSection from './ProductsServicesSection';
|
||||
import 'style/pages/HomePage/HomePage.scss';
|
||||
|
||||
function HomepageContent() {
|
||||
return (
|
||||
<div className={'homepage__container'}>
|
||||
<ShortcutBoxes />
|
||||
<AnnouncementList />
|
||||
<div>
|
||||
<AccountsReceivableSection />
|
||||
<AccountsPayableSection />
|
||||
<FinancialAccountingSection />
|
||||
<ProductsServicesSection />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import React from 'react';
|
||||
import ShortcutBoxesSection from './ShortcutBoxesSection';
|
||||
import { productsServices } from 'common/homepageOptions';
|
||||
|
||||
export default function ProductsServicesSection() {
|
||||
return <ShortcutBoxesSection section={productsServices} />;
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
import React from 'react';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import classNames from 'classnames';
|
||||
import { shortcutBox } from 'common/homepageOptions';
|
||||
import { Icon } from 'components';
|
||||
|
||||
function ShortcutBox({ title, iconColor, description }) {
|
||||
return (
|
||||
<div className={'shortcut-box'}>
|
||||
<div className={'shortcut-box__header'}>
|
||||
<span
|
||||
className={'header--icon'}
|
||||
style={{ backgroundColor: `${iconColor}` }}
|
||||
>
|
||||
<Icon icon={'clock'} iconSize={24} />
|
||||
</span>
|
||||
<span>
|
||||
<a href={'#'}>
|
||||
<Icon icon={'arrow-top-right'} iconSize={24} />
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<div className={'shortcut-box__title'}>{title}</div>
|
||||
<div className={'shortcut-box__description'}>{description}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function ShortcutBoxes() {
|
||||
return (
|
||||
<section className={'shortcut-boxes'}>
|
||||
{shortcutBox.map(({ title, description, iconColor }) => {
|
||||
return (
|
||||
<ShortcutBox
|
||||
title={title}
|
||||
description={description}
|
||||
iconColor={iconColor}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
export default ShortcutBoxes;
|
||||
39
client/src/containers/Homepage/ShortcutBoxesSection.js
Normal file
39
client/src/containers/Homepage/ShortcutBoxesSection.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { For } from 'components';
|
||||
|
||||
import 'style/pages/FinancialStatements/FinancialSheets.scss';
|
||||
|
||||
function ShortcutBox({ title, link, description }) {
|
||||
return (
|
||||
<div className={'financial-reports__item'}>
|
||||
<Link className="title" to={link}>
|
||||
{title}
|
||||
</Link>
|
||||
<p className="desc">{description}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function ShortcutBoxes({ sectionTitle, shortcuts }) {
|
||||
return (
|
||||
<div className="financial-reports__section">
|
||||
<div className="section-title">{sectionTitle}</div>
|
||||
<div className="financial-reports__list">
|
||||
<For render={ShortcutBox} of={shortcuts} />
|
||||
|
||||
{/* {shortcuts.map(({ title, link, description }) => (
|
||||
<ShortcutBox title={title} description={description} link={link} />
|
||||
))} */}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function ShortcutBoxesSection({ section }) {
|
||||
return (
|
||||
<div className="financial-reports">
|
||||
<For render={ShortcutBoxes} of={section} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user