import React from 'react'; import { FastField, Field } from 'formik'; import { DateInput } from '@blueprintjs/datetime'; import { Classes, FormGroup, Position, Checkbox } from '@blueprintjs/core'; import { ContactsMultiSelect, FormattedMessage as T } from 'components'; import classNames from 'classnames'; import { Row, Col, FieldHint } from 'components'; import { momentFormatter, tansformDateValue, inputIntent, handleDateChange, } from 'utils'; import { useCustomersBalanceSummaryGeneralContext } from './CustomersBalanceSummaryGeneralProvider'; /** * Customers balance header - General panel - Content */ export default function CustomersBalanceSummaryGeneralPanelContent() { const { customers } = useCustomersBalanceSummaryGeneralContext(); return (
{({ form, field: { value }, meta: { error } }) => ( } labelInfo={} fill={true} intent={inputIntent({ error })} > { form.setFieldValue('asDate', selectedDate); })} popoverProps={{ position: Position.BOTTOM, minimal: true }} minimal={true} fill={true} /> )} {({ field }) => ( }> } {...field} /> )} {({ form: { setFieldValue }, field: { value }, meta: { error, touched }, }) => ( } className={classNames('form-group--select-list', Classes.FILL)} > { setFieldValue('customersIds', contactsIds); }} contacts={customers} contactsSelected={value} /> )}
); }