import React from 'react'; import { Intent, Tag, Button, Popover, Menu, MenuItem, MenuDivider, Position, } from '@blueprintjs/core'; import { Money, Choose, Icon, If } from 'components'; import { FormattedMessage as T, useIntl } from 'react-intl'; import { safeCallback } from 'utils'; import moment from 'moment'; /** * Status accessor. */ export const statusAccessor = (row) => ( ); /** * Actions menu. */ export function ActionsMenu({ row: { original }, payload: { onEdit, onDeliver, onReject, onApprove, onDelete, onDrawer, onConvert, }, }) { const { formatMessage } = useIntl(); return ( } text={formatMessage({ id: 'view_details' })} /> } text={formatMessage({ id: 'edit_estimate' })} onClick={safeCallback(onEdit, original)} /> } text={formatMessage({ id: 'convert_to_invoice' })} onClick={safeCallback(onConvert, original)} /> } text={formatMessage({ id: 'mark_as_delivered' })} onClick={safeCallback(onDeliver, original)} /> } text={formatMessage({ id: 'mark_as_rejected' })} onClick={safeCallback(onReject, original)} /> } text={formatMessage({ id: 'mark_as_approved' })} onClick={safeCallback(onApprove, original)} /> } text={formatMessage({ id: 'mark_as_approved' })} onClick={safeCallback(onApprove, original)} /> } text={formatMessage({ id: 'mark_as_rejected' })} onClick={safeCallback(onReject, original)} /> } text={formatMessage({ id: 'estimate_paper' })} onClick={safeCallback(onDrawer, original)} /> } /> ); } function DateCell({ value }) { return moment(value).format('YYYY MMM DD'); } function AmountAccessor(row) { return ; } function ActionsCell(props) { return ( } position={Position.RIGHT_BOTTOM} >