import React from 'react'; import { FastField, Field } from 'formik'; import { DateInput } from '@blueprintjs/datetime'; import { Intent, FormGroup, InputGroup, Position, Classes, } from '@blueprintjs/core'; import classNames from 'classnames'; import { FormattedMessage as T, ContactsMultiSelect, Row, Col, FieldHint, } from 'components'; import { useAPAgingSummaryGeneralContext } from './APAgingSummaryGeneralProvider'; import { momentFormatter, tansformDateValue, inputIntent, handleDateChange, } from 'utils'; /** * AP Aging Summary - Drawer Header - General panel - Content. */ export default function APAgingSummaryHeaderGeneralContent() { const { vendors } = useAPAgingSummaryGeneralContext(); 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, meta: { error } }) => ( } labelInfo={} intent={inputIntent({ error })} > )} {({ field, meta: { error } }) => ( } labelInfo={} intent={inputIntent({ error })} > )} {({ form: { setFieldValue }, field: { value } }) => ( } className={classNames('form-group--select-list', Classes.FILL)} > { const vendorsIds = vendors.map((customer) => customer.id); setFieldValue('vendorsIds', vendorsIds); }} /> )}
); }