re-structure to monorepo.

This commit is contained in:
a.bouhuolia
2023-02-03 01:02:31 +02:00
parent 8242ec64ba
commit 7a0a13f9d5
10400 changed files with 46966 additions and 17223 deletions

View File

@@ -0,0 +1,77 @@
// @ts-nocheck
import React from 'react';
import intl from 'react-intl-universal';
import clsx from 'classnames';
import { CLASSES } from '@/constants/classes';
import { FormatDateCell } from '@/components';
import { NoteAccessor, StatusAccessor } from './components';
/**
* Retrieve the manual journals columns.
*/
export const useManualJournalsColumns = () => {
return React.useMemo(
() => [
{
id: 'date',
Header: intl.get('date'),
accessor: 'date',
Cell: FormatDateCell,
width: 115,
className: 'date',
clickable: true,
},
{
id: 'amount',
Header: intl.get('amount'),
accessor: 'formatted_amount',
width: 115,
clickable: true,
align: 'right',
className: clsx(CLASSES.FONT_BOLD),
},
{
id: 'journal_number',
Header: intl.get('journal_no'),
accessor: (row) => `${row.journal_number}`,
className: 'journal_number',
width: 100,
clickable: true,
textOverview: true,
},
{
id: 'journal_type',
Header: intl.get('journal_type'),
accessor: 'journal_type',
width: 110,
clickable: true,
textOverview: true,
},
{
id: 'status',
Header: intl.get('publish'),
accessor: (row) => StatusAccessor(row),
width: 95,
clickable: true,
},
{
id: 'note',
Header: intl.get('note'),
accessor: NoteAccessor,
disableSortBy: true,
width: 85,
clickable: true,
},
{
id: 'created_at',
Header: intl.get('created_at'),
accessor: 'created_at',
Cell: FormatDateCell,
width: 125,
clickable: true,
},
],
[],
);
};