mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
fix: danger intent fields.
This commit is contained in:
@@ -109,6 +109,7 @@ export default function ItemFormPrimarySection() {
|
||||
<InputGroup
|
||||
medium={true}
|
||||
{...field}
|
||||
intent={inputIntent({ error, touched })}
|
||||
inputRef={(ref) => (nameFieldRef.current = ref)}
|
||||
/>
|
||||
</FormGroup>
|
||||
@@ -125,7 +126,7 @@ export default function ItemFormPrimarySection() {
|
||||
helperText={<ErrorMessage name={'code'} />}
|
||||
inline={true}
|
||||
>
|
||||
<InputGroup medium={true} {...field} />
|
||||
<InputGroup medium={true} intent={inputIntent({ error, touched })} {...field} />
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
|
||||
@@ -11,7 +11,9 @@ import {
|
||||
Classes,
|
||||
Intent,
|
||||
Switch,
|
||||
Alignment,
|
||||
} from '@blueprintjs/core';
|
||||
import { Tooltip2 } from '@blueprintjs/popover2';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import intl from 'react-intl-universal';
|
||||
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
|
||||
@@ -19,6 +21,7 @@ import Icon from 'components/Icon';
|
||||
import { If, DashboardActionViewsList } from 'components';
|
||||
|
||||
import { useItemsListContext } from './ItemsListProvider';
|
||||
import { useRefreshItems } from 'hooks/query/items';
|
||||
|
||||
import withItems from 'containers/Items/withItems';
|
||||
import withItemsActions from './withItemsActions';
|
||||
@@ -43,7 +46,8 @@ function ItemsActionsBar({
|
||||
// Items list context.
|
||||
const { itemsViews } = useItemsListContext();
|
||||
|
||||
// React intl.
|
||||
// Items refresh action.
|
||||
const { refresh } = useRefreshItems();
|
||||
|
||||
// History context.
|
||||
const history = useHistory();
|
||||
@@ -69,6 +73,10 @@ function ItemsActionsBar({
|
||||
setItemsTableState({ inactiveMode: checked });
|
||||
};
|
||||
|
||||
const handleRefreshBtnClick = () => {
|
||||
refresh();
|
||||
};
|
||||
|
||||
return (
|
||||
<DashboardActionsBar>
|
||||
<NavbarGroup>
|
||||
@@ -125,6 +133,14 @@ function ItemsActionsBar({
|
||||
onChange={handleInactiveSwitchChange}
|
||||
/>
|
||||
</NavbarGroup>
|
||||
|
||||
<NavbarGroup align={Alignment.RIGHT}>
|
||||
<Button
|
||||
className={Classes.MINIMAL}
|
||||
icon={<Icon icon="refresh-16" iconSize={14} />}
|
||||
onClick={handleRefreshBtnClick}
|
||||
/>
|
||||
</NavbarGroup>
|
||||
</DashboardActionsBar>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user