mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
WIP / FIx & no-unused-vars
This commit is contained in:
@@ -16,7 +16,7 @@ import { useFormik } from 'formik';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
import { omit } from 'lodash';
|
||||
import { useQuery, queryCache } from 'react-query';
|
||||
import { useQuery } from 'react-query';
|
||||
|
||||
import Dialog from 'components/Dialog';
|
||||
import AppToaster from 'components/AppToaster';
|
||||
@@ -228,13 +228,13 @@ function AccountFormDialog({
|
||||
fetchAccountsList.refetch();
|
||||
fetchAccountsTypes.refetch();
|
||||
fetchAccount.refetch();
|
||||
}, []);
|
||||
}, [ fetchAccount, fetchAccountsList, fetchAccountsTypes]);
|
||||
|
||||
const onChangeAccountType = useCallback(
|
||||
(accountType) => {
|
||||
formik.setFieldValue('account_type_id', accountType.id);
|
||||
},
|
||||
[setSelectedAccountType, formik]
|
||||
[formik]
|
||||
);
|
||||
|
||||
// Handles change sub-account.
|
||||
|
||||
@@ -11,20 +11,21 @@ import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { useFormik } from 'formik';
|
||||
import { useQuery } from 'react-query';
|
||||
import { connect } from 'react-redux';
|
||||
import { pick } from 'lodash';
|
||||
|
||||
import { compose } from 'utils';
|
||||
import Dialog from 'components/Dialog';
|
||||
|
||||
import AppToaster from 'components/AppToaster';
|
||||
import DialogConnect from 'connectors/Dialog.connector';
|
||||
import Dialog from 'components/Dialog';
|
||||
import DialogReduxConnect from 'components/DialogReduxConnect';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import classNames from 'classnames';
|
||||
import DialogConnect from 'connectors/Dialog.connector';
|
||||
import { getDialogPayload } from 'store/dashboard/dashboard.reducer';
|
||||
|
||||
import withCurrency from 'containers/Currencies/withCurrency';
|
||||
import withCurrenciesActions from 'containers/Currencies/withCurrenciesActions';
|
||||
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import classNames from 'classnames';
|
||||
import { pick } from 'lodash';
|
||||
import { getDialogPayload } from 'store/dashboard/dashboard.reducer';
|
||||
import { compose } from 'utils';
|
||||
|
||||
|
||||
|
||||
@@ -59,11 +60,9 @@ function CurrencyDialog({
|
||||
}), []);
|
||||
|
||||
const {
|
||||
values,
|
||||
errors,
|
||||
touched,
|
||||
isSubmitting,
|
||||
setFieldValue,
|
||||
getFieldProps,
|
||||
handleSubmit,
|
||||
resetForm,
|
||||
@@ -118,7 +117,7 @@ function CurrencyDialog({
|
||||
const onDialogClosed = useCallback(() => {
|
||||
resetForm();
|
||||
closeDialog(name);
|
||||
}, [closeDialog, name]);
|
||||
}, [closeDialog, name,resetForm]);
|
||||
|
||||
const requiredSpan = useMemo(() => <span className={'required'}>*</span>, []);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useState, useMemo, useCallback, useEffect } from 'react';
|
||||
import React, { useState, useMemo, useCallback } from 'react';
|
||||
import {
|
||||
Button,
|
||||
Classes,
|
||||
@@ -12,17 +12,17 @@ import { pick } from 'lodash';
|
||||
import * as Yup from 'yup';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { useFormik } from 'formik';
|
||||
import Dialog from 'components/Dialog';
|
||||
import AppToaster from 'components/AppToaster';
|
||||
|
||||
import { useQuery, queryCache } from 'react-query';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import classNames from 'classnames';
|
||||
import { Select } from '@blueprintjs/select';
|
||||
import { useQuery } from 'react-query';
|
||||
import moment from 'moment';
|
||||
import { DateInput } from '@blueprintjs/datetime';
|
||||
import { momentFormatter } from 'utils';
|
||||
|
||||
import AppToaster from 'components/AppToaster';
|
||||
import Dialog from 'components/Dialog';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import withExchangeRatesDialog from './ExchangeRateDialog.container';
|
||||
|
||||
|
||||
@@ -61,7 +61,6 @@ function ExchangeRateDialog({
|
||||
}), []);
|
||||
|
||||
const {
|
||||
values,
|
||||
touched,
|
||||
errors,
|
||||
isSubmitting,
|
||||
@@ -117,7 +116,7 @@ function ExchangeRateDialog({
|
||||
const onDialogClosed = useCallback(() => {
|
||||
resetForm();
|
||||
closeDialog(name);
|
||||
}, [closeDialog, name]);
|
||||
}, [closeDialog, name,resetForm]);
|
||||
|
||||
const onDialogOpening = useCallback(() => {
|
||||
fetchExchangeRatesDialog.refetch();
|
||||
|
||||
@@ -10,14 +10,17 @@ import {
|
||||
Intent,
|
||||
Classes,
|
||||
} from '@blueprintjs/core';
|
||||
import UserListDialogConnect from 'connectors/UsersList.connector';
|
||||
import DialogReduxConnect from 'components/DialogReduxConnect';
|
||||
import useAsync from 'hooks/async';
|
||||
import { objectKeysTransform } from 'utils';
|
||||
import { pick, snakeCase } from 'lodash';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import AppToaster from 'components/AppToaster';
|
||||
|
||||
import DialogReduxConnect from 'components/DialogReduxConnect';
|
||||
import UserListDialogConnect from 'connectors/UsersList.connector';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import useAsync from 'hooks/async';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
function InviteUserDialog({
|
||||
@@ -84,7 +87,7 @@ function InviteUserDialog({
|
||||
}
|
||||
},
|
||||
});
|
||||
const { values, errors, touched } = useMemo(() => formik, [formik]);
|
||||
const { errors, touched } = useMemo(() => formik, [formik]);
|
||||
|
||||
const onDialogOpening = () => {
|
||||
fetchHook.execute();
|
||||
|
||||
@@ -16,6 +16,7 @@ import { useFormik } from 'formik';
|
||||
import { compose } from 'utils';
|
||||
import { useQuery, queryCache } from 'react-query';
|
||||
import classNames from 'classnames';
|
||||
import {connect} from 'react-redux';
|
||||
|
||||
import AppToaster from 'components/AppToaster';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
@@ -24,7 +25,6 @@ import Dialog from 'components/Dialog';
|
||||
import DialogConnect from 'connectors/Dialog.connector';
|
||||
import DialogReduxConnect from 'components/DialogReduxConnect';
|
||||
|
||||
import {connect} from 'react-redux';
|
||||
import { getDialogPayload } from 'store/dashboard/dashboard.reducer';
|
||||
import withItemCategoryDetail from 'containers/Items/withItemCategoryDetail';
|
||||
import withItemCategories from 'containers/Items/withItemCategories';
|
||||
@@ -75,7 +75,6 @@ function ItemCategoryDialog({
|
||||
// Formik
|
||||
const {
|
||||
errors,
|
||||
values,
|
||||
touched,
|
||||
setFieldValue,
|
||||
handleSubmit,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useMemo, useCallback } from 'react';
|
||||
import React, {useCallback } from 'react';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { useFormik } from 'formik';
|
||||
import * as Yup from 'yup';
|
||||
@@ -10,14 +10,15 @@ import {
|
||||
Intent,
|
||||
Classes,
|
||||
} from '@blueprintjs/core';
|
||||
import UserFormDialogConnect from 'connectors/UserFormDialog.connector';
|
||||
import DialogReduxConnect from 'components/DialogReduxConnect';
|
||||
import AppToaster from 'components/AppToaster';
|
||||
import useAsync from 'hooks/async';
|
||||
import { objectKeysTransform } from 'utils';
|
||||
import { pick, snakeCase } from 'lodash';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import AppToaster from 'components/AppToaster';
|
||||
import DialogReduxConnect from 'components/DialogReduxConnect';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import useAsync from 'hooks/async';
|
||||
import UserFormDialogConnect from 'connectors/UserFormDialog.connector';
|
||||
import { compose } from 'utils';
|
||||
|
||||
function UserFormDialog({
|
||||
@@ -49,7 +50,6 @@ function UserFormDialog({
|
||||
};
|
||||
|
||||
const {
|
||||
values,
|
||||
errors,
|
||||
touched,
|
||||
resetForm,
|
||||
|
||||
Reference in New Issue
Block a user