chore: Refactoring all import directories to alias and all .js|.jsx renamed to be .ts|.tsx

This commit is contained in:
a.bouhuolia
2022-07-15 23:25:23 +02:00
parent cd08d0ee16
commit f00097f6c8
3846 changed files with 125197 additions and 128236 deletions

View File

@@ -0,0 +1,48 @@
import React from 'react';
import intl from 'react-intl-universal';
import moment from 'moment';
export const useGLEntriesTableColumns = () => {
return React.useMemo(
() => [
{
Header: intl.get('date'),
accessor: ({ formatted_date }) =>
moment(formatted_date).format('YYYY MMM DD'),
width: 140,
className: 'date',
textOverview: true,
},
{
Header: intl.get('account_name'),
accessor: 'account_name',
width: 140,
className: 'account_name',
textOverview: true,
},
{
Header: intl.get('contact'),
accessor: 'contactTypeFormatted',
width: 140,
textOverview: true,
},
{
Header: intl.get('credit'),
accessor: ({ credit }) => credit.formatted_amount,
width: 100,
className: 'credit',
textAligment: 'right',
textOverview: true,
},
{
Header: intl.get('debit'),
accessor: ({ debit }) => debit.formatted_amount,
width: 100,
className: 'debit',
textOverview: true,
},
],
[],
);
};