diff --git a/client/package.json b/client/package.json
index e7d8b7964..861134a8d 100644
--- a/client/package.json
+++ b/client/package.json
@@ -73,7 +73,7 @@
"react-hook-form": "^4.9.4",
"react-intl": "^3.12.0",
"react-loadable": "^5.5.0",
- "react-query": "^1.3.3",
+ "react-query": "^2.4.6",
"react-redux": "^7.1.3",
"react-router-breadcrumbs-hoc": "^3.2.10",
"react-router-dom": "^5.1.2",
@@ -128,7 +128,7 @@
"devDependencies": {
"@babel/preset-flow": "^7.9.0",
"http-proxy-middleware": "^1.0.0",
- "react-query-devtools": "^1.1.5",
+ "react-query-devtools": "^2.1.1",
"redux-devtools": "^3.5.0"
},
"jest": {
diff --git a/client/public/favicon.ico b/client/public/favicon.ico
deleted file mode 100644
index bcd5dfd67..000000000
Binary files a/client/public/favicon.ico and /dev/null differ
diff --git a/client/public/favicons/favicon-32.ico b/client/public/favicons/favicon-32.ico
new file mode 100644
index 000000000..cff6d2720
Binary files /dev/null and b/client/public/favicons/favicon-32.ico differ
diff --git a/client/public/index.html b/client/public/index.html
index 68c21886a..abbfd9917 100644
--- a/client/public/index.html
+++ b/client/public/index.html
@@ -2,14 +2,14 @@
-
+
-
+
- React App
+ Bigcapital
@@ -41,7 +41,7 @@
To create a production bundle, use `npm run build` or `yarn build`.
-->
-
+
diff --git a/client/src/components/AccountsSelectList.js b/client/src/components/AccountsSelectList.js
index 374010f77..e037a7aad 100644
--- a/client/src/components/AccountsSelectList.js
+++ b/client/src/components/AccountsSelectList.js
@@ -27,11 +27,29 @@ export default function AccountsSelectList({
onAccountSelected && onAccountSelected(account);
}, [setSelectedAccount, onAccountSelected]);
+ // Filters accounts items.
+ const filterAccountsPredicater = useCallback(
+ (query, account, _index, exactMatch) => {
+ const normalizedTitle = account.name.toLowerCase();
+ const normalizedQuery = query.toLowerCase();
+
+ if (exactMatch) {
+ return normalizedTitle === normalizedQuery;
+ } else {
+ return (
+ `${account.code} ${normalizedTitle}`.indexOf(normalizedQuery) >= 0
+ );
+ }
+ },
+ [],
+ );
+
return (
}
itemRenderer={accountItem}
+ itemPredicate={filterAccountsPredicater}
popoverProps={{ minimal: true }}
filterable={true}
onItemSelect={onAccountSelect}>
diff --git a/client/src/components/App.js b/client/src/components/App.js
index e68fd59db..42095276b 100644
--- a/client/src/components/App.js
+++ b/client/src/components/App.js
@@ -17,9 +17,9 @@ function App({ locale }) {
const history = createBrowserHistory();
const queryConfig = {
- refetchAllOnWindowFocus: false,
- cacheTime: 10000,
- staleTime: 10000,
+ queries: {
+ refetchOnWindowFocus: true,
+ }
};
return (
diff --git a/client/src/components/ContactsListField.js b/client/src/components/ContactsListField.js
index 7e73470f2..b99c17c4c 100644
--- a/client/src/components/ContactsListField.js
+++ b/client/src/components/ContactsListField.js
@@ -32,7 +32,7 @@ export default function ContactsListField({
const onContactSelect = useCallback((contact) => {
setSelectedContact(contact.id);
- onContactSelected && onContactSelected(contact.id);
+ onContactSelected && onContactSelected(contact);
}, [setSelectedContact, onContactSelected]);
return (
diff --git a/client/src/components/CurrenciesSelectList.js b/client/src/components/CurrenciesSelectList.js
index 590cdefc8..2ae5788e5 100644
--- a/client/src/components/CurrenciesSelectList.js
+++ b/client/src/components/CurrenciesSelectList.js
@@ -9,11 +9,15 @@ import {
import {
Select
} from '@blueprintjs/select';
-
+import classNames from 'classnames';
import { FormattedMessage as T } from 'react-intl';
-export default function CurrenciesSelectList(props) {
- const {formGroupProps, selectProps, onItemSelect} = props;
+export default function CurrenciesSelectList({
+ formGroupProps,
+ selectProps,
+ onItemSelect,
+ className,
+}) {
const currencies = [{
name: 'USD US dollars', key: 'USD',
name: 'CAD Canadian dollars', key: 'CAD',
@@ -41,7 +45,13 @@ export default function CurrenciesSelectList(props) {
return (
}
- className={'form-group--select-list form-group--currency'}
+ className={
+ classNames(
+ 'form-group--select-list',
+ 'form-group--currency',
+ className,
+ )
+ }
{...formGroupProps}
>
diff --git a/client/src/components/Dashboard/DashboardTopbar.js b/client/src/components/Dashboard/DashboardTopbar.js
index 53e792c8d..a598c06b9 100644
--- a/client/src/components/Dashboard/DashboardTopbar.js
+++ b/client/src/components/Dashboard/DashboardTopbar.js
@@ -14,17 +14,15 @@ import { FormattedMessage as T } from 'react-intl';
import DashboardTopbarUser from 'components/Dashboard/TopbarUser';
import DashboardBreadcrumbs from 'components/Dashboard/DashboardBreadcrumbs';
-import Icon from 'components/Icon';
+import { Icon, If } from 'components';
-import withSearch from 'containers/GeneralSearch/withSearch'
+import withSearch from 'containers/GeneralSearch/withSearch';
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
import withDashboard from 'containers/Dashboard/withDashboard';
import { compose } from 'utils';
-
function DashboardTopbar({
-
// #withDashboard
pageTitle,
pageSubtitle,
@@ -42,69 +40,75 @@ function DashboardTopbar({
history.push(`/custom_views/${editViewId}/edit`);
};
- const maybleRenderPageSubtitle = pageSubtitle && {pageSubtitle}
;
- const maybeRenderEditViewBtn = pageSubtitle && editViewId && (
- }
- onClick={handlerClickEditView}
- />
- );
-
const handleSidebarToggleBtn = () => {
toggleSidebarExpend();
};
return (
-