mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
chrone: sperate client and server to different repos.
This commit is contained in:
43
src/containers/Drawers/PaperTemplate/PaperTemplateTable.js
Normal file
43
src/containers/Drawers/PaperTemplate/PaperTemplateTable.js
Normal file
@@ -0,0 +1,43 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
import { DataTable, Money } from 'components';
|
||||
|
||||
export default function DrawerTemplateTable({ tableData, currencyCode }) {
|
||||
const columns = useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: intl.get('description'),
|
||||
accessor: 'description',
|
||||
disableSortBy: true,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
Header: intl.get('rate'),
|
||||
accessor: 'rate',
|
||||
accessor: ({ rate }) => <Money amount={rate} currency={currencyCode} />,
|
||||
disableSortBy: true,
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
Header: intl.get('qty'),
|
||||
accessor: 'quantity',
|
||||
disableSortBy: true,
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
Header: intl.get('total'),
|
||||
accessor: ({ total }) => (
|
||||
<Money amount={total} currency={currencyCode} />
|
||||
),
|
||||
disableSortBy: true,
|
||||
width: 70,
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
return (
|
||||
<div className="template__table">
|
||||
<DataTable columns={columns} data={tableData} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user