import React from 'react'; import { Intent, Position, Button, Tooltip } from '@blueprintjs/core'; import intl from 'react-intl-universal'; import { Icon, Hint, FormattedMessage as T } from 'components'; import { AccountsListFieldCell, MoneyFieldCell, InputGroupCell, ContactsListFieldCell, BranchesListFieldCell, } from 'components/DataTableCells'; import { useFeatureCan } from 'hooks/state'; import { Features } from 'common'; /** * 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 onClickRemoveRole = () => { payload.removeRow(index); }; return ( } position={Position.LEFT}>