// @ts-nocheck import React from 'react'; import styled from 'styled-components'; import classNames from 'classnames'; import { Form } from 'formik'; import { Button, FormGroup, Intent } from '@blueprintjs/core'; import { TimezonePicker } from '@blueprintjs/timezone'; import { ErrorMessage, FastField } from 'formik'; import { useHistory } from 'react-router-dom'; import { FieldRequiredHint, FormattedMessage as T, FFormGroup, FInputGroup, FSelect, } from '@/components'; import { inputIntent } from '@/utils'; import { CLASSES } from '@/constants/classes'; import { getAllCurrenciesOptions } from '@/constants/currencies'; import { getFiscalYear } from '@/constants/fiscalYearOptions'; import { getLanguages } from '@/constants/languagesOptions'; import { useGeneralFormContext } from './GeneralFormProvider'; import { getAllCountries } from '@/utils/countries'; import { shouldBaseCurrencyUpdate } from './utils'; const Countries = getAllCountries(); /** * Preferences general form. */ export default function PreferencesGeneralForm({ isSubmitting }) { const history = useHistory(); const FiscalYear = getFiscalYear(); const Languages = getLanguages(); const Currencies = getAllCurrenciesOptions(); const { dateFormats, baseCurrencyMutateAbility } = useGeneralFormContext(); const baseCurrencyDisabled = baseCurrencyMutateAbility.length > 0; // Handle close click. const handleCloseClick = () => { history.go(-1); }; return (
); } const CardFooterActions = styled.div` padding-top: 16px; border-top: 1px solid #e0e7ea; margin-top: 30px; .bp3-button { min-width: 70px; + .bp3-button { margin-left: 10px; } } `;