// @ts-nocheck import React, { useEffect } from 'react'; import intl from 'react-intl-universal'; import { Menu, MenuItem, Position, Button } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; import { useFormikContext } from 'formik'; import * as R from 'ramda'; import { ExchangeRateInputGroup, Icon, Hint, FormattedMessage as T, } from '@/components'; import { AccountsListFieldCell, MoneyFieldCell, InputGroupCell, ContactsListFieldCell, BranchesListFieldCell, ProjectsListFieldCell, } from '@/components/DataTableCells'; import { CellType, Features, Align } from '@/constants'; import { useCurrentOrganization, useFeatureCan } from '@/hooks/state'; import { useJournalIsForeign } from './utils'; import withSettings from '@/containers/Settings/withSettings'; import { transactionNumber } from '@/utils'; import { useUpdateEffect } from '@/hooks'; /** * Contact header cell. */ export function ContactHeaderCell() { return ( <> } position={Position.LEFT_BOTTOM} /> ); } /** * Credit header cell. */ export function CreditHeaderCell({ payload: { currencyCode } }) { return intl.get('credit_currency', { currency: currencyCode }); } /** * debit header cell. */ export function DebitHeaderCell({ payload: { currencyCode } }) { return intl.get('debit_currency', { currency: currencyCode }); } /** * Actions cell renderer. */ export const ActionsCellRenderer = ({ row: { index }, column: { id }, cell: { value: initialValue }, data, payload, }) => { const handleClickRemoveRole = () => { payload.removeRow(index); }; const exampleMenu = ( ); return (