mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
fix(preferences): fix preferences users page.
This commit is contained in:
@@ -1,19 +1,14 @@
|
||||
import React, { useMemo, useCallback } from 'react';
|
||||
import React from 'react';
|
||||
import {
|
||||
Button,
|
||||
Classes,
|
||||
FormGroup,
|
||||
InputGroup,
|
||||
Intent,
|
||||
} from '@blueprintjs/core';
|
||||
import { Form, useFormikContext, FastField } from 'formik';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { pick } from 'lodash';
|
||||
import { FastField } from 'formik';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import {
|
||||
ErrorMessage,
|
||||
AppToaster,
|
||||
FieldRequiredHint,
|
||||
DialogContent,
|
||||
} from 'components';
|
||||
|
||||
import { useAutofocus } from 'hooks';
|
||||
@@ -33,7 +28,7 @@ export default function CurrencyFormFields() {
|
||||
className={'form-group--currency-name'}
|
||||
intent={inputIntent({ error, touched })}
|
||||
helperText={<ErrorMessage name="currency_name" />}
|
||||
inline={true}
|
||||
// inline={true}
|
||||
>
|
||||
<InputGroup
|
||||
inputRef={(ref) => (currencyNameFieldRef.current = ref)}
|
||||
@@ -51,7 +46,7 @@ export default function CurrencyFormFields() {
|
||||
className={'form-group--currency-code'}
|
||||
intent={inputIntent({ error, touched })}
|
||||
helperText={<ErrorMessage name="currency_code" />}
|
||||
inline={true}
|
||||
// inline={true}
|
||||
>
|
||||
<InputGroup {...field} />
|
||||
</FormGroup>
|
||||
|
||||
@@ -14,7 +14,7 @@ function CurrencyFormProvider({ isEditMode, currency, dialogName, ...props }) {
|
||||
const { mutateAsync: editCurrencyMutate } = useEditCurrency();
|
||||
|
||||
// fetch Currencies list.
|
||||
const { data: currencies, isFetching: isCurrenciesLoading } = useCurrencies();
|
||||
const { data: currencies, isLoading: isCurrenciesLoading } = useCurrencies();
|
||||
|
||||
// Provider state.
|
||||
const provider = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { lazy } from 'react';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { Dialog, DialogSuspense } from 'components';
|
||||
import withDialogRedux from 'components/DialogReduxConnect';
|
||||
import { compose } from 'utils';
|
||||
@@ -30,6 +30,7 @@ function CurrencyFormDialog({
|
||||
isOpen={isOpen}
|
||||
autoFocus={true}
|
||||
canEscapeKeyClose={true}
|
||||
style={{ width: '450px' }}
|
||||
>
|
||||
<DialogSuspense>
|
||||
<CurrencyFormDialogContent
|
||||
|
||||
@@ -12,7 +12,7 @@ function InviteUserFormProvider({ userId, isEditMode, dialogName, ...props }) {
|
||||
const { mutateAsync: inviteUserMutate } = useCreateInviteUser();
|
||||
|
||||
// fetch users list.
|
||||
const { isFetching: isUsersLoading } = useUsers();
|
||||
const { isLoading: isUsersLoading } = useUsers();
|
||||
|
||||
// Provider state.
|
||||
const provider = {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { formatMessage } from 'services/intl';
|
||||
|
||||
export const transformApiErrors = (errors) => {
|
||||
const fields = {};
|
||||
|
||||
if (errors.find(error => error.type === 'EMAIL.ALREADY.INVITED')) {
|
||||
fields.email = formatMessage({ id: 'email_is_already_used' });
|
||||
}
|
||||
return fields;
|
||||
}
|
||||
const fields = {};
|
||||
|
||||
if (errors.find((error) => error.type === 'EMAIL.ALREADY.INVITED')) {
|
||||
fields.email = formatMessage({ id: 'email_is_already_used' });
|
||||
}
|
||||
return fields;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user