// @ts-nocheck 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 FinancialStatementsFilter from '../FinancialStatementsFilter'; import { FormattedMessage as T, ContactsMultiSelect, Row, Col, FieldHint, } from '@/components'; import { momentFormatter } from '@/utils'; import { useARAgingSummaryGeneralContext } from './ARAgingSummaryGeneralProvider'; import { filterCustomersOptions } from './constants'; /** * AR Aging Summary - Drawer Header - General Fields. */ export default function ARAgingSummaryHeaderGeneralContent() { // AR Aging summary context. const { customers } = useARAgingSummaryGeneralContext(); return (
{({ form, field: { value }, meta: { error, touched } }) => ( } labelInfo={} fill={true} intent={error && Intent.DANGER} > { form.setFieldValue('asDate', selectedDate); }} popoverProps={{ position: Position.BOTTOM, minimal: true }} minimal={true} fill={true} /> )} {({ field, meta: { error, touched } }) => ( } labelInfo={} className={'form-group--aging-before-days'} intent={error && Intent.DANGER} > )} {({ field, meta: { error, touched } }) => ( } labelInfo={} className={'form-group--aging-periods'} intent={error && Intent.DANGER} > )} } /> {({ form: { setFieldValue }, field: { value } }) => ( } className={classNames('form-group--select-list', Classes.FILL)} > { const customersIds = customers.map( (customer) => customer.id, ); setFieldValue('customersIds', customersIds); }} /> )}
); }