mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
WIP / FIx & no-unused-vars
This commit is contained in:
@@ -4,9 +4,8 @@ import {
|
||||
MenuItem,
|
||||
Button
|
||||
} from '@blueprintjs/core';
|
||||
// import {Select} from '@blueprintjs/select';
|
||||
import MultiSelect from 'components/MultiSelect';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
|
||||
export default function AccountsMultiSelect({
|
||||
accounts,
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { IntlProvider } from 'react-intl';
|
||||
import { connect } from 'react-redux';
|
||||
import { Router, Switch, Redirect } from 'react-router';
|
||||
import { Router } from 'react-router';
|
||||
import { createBrowserHistory } from 'history';
|
||||
import PrivateRoute from 'components/PrivateRoute';
|
||||
import Authentication from 'components/Authentication';
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { Redirect, Route, Switch, Link } from 'react-router-dom';
|
||||
import BodyClassName from 'react-body-classname';
|
||||
import authenticationRoutes from 'routes/authentication';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
|
||||
export default function AuthenticationWrapper({
|
||||
isAuthenticated = false,
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
Select
|
||||
} from '@blueprintjs/select';
|
||||
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
|
||||
export default function CurrenciesSelectList(props) {
|
||||
const {formGroupProps, selectProps, onItemSelect} = props;
|
||||
|
||||
@@ -5,7 +5,6 @@ import {
|
||||
Classes,
|
||||
Boundary,
|
||||
} from '@blueprintjs/core';
|
||||
import classNames from 'classnames';
|
||||
import withBreadcrumbs from 'react-router-breadcrumbs-hoc';
|
||||
import routes from 'routes/dashboard';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
|
||||
@@ -7,12 +7,15 @@ import {
|
||||
Button,
|
||||
Classes,
|
||||
} from '@blueprintjs/core';
|
||||
import DashboardBreadcrumbs from 'components/Dashboard/DashboardBreadcrumbs';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
|
||||
import DashboardTopbarUser from 'components/Dashboard/TopbarUser';
|
||||
import Icon from 'components/Icon';
|
||||
import DashboardBreadcrumbs from 'components/Dashboard/DashboardBreadcrumbs';
|
||||
import SearchConnect from 'connectors/Search.connect';
|
||||
import Icon from 'components/Icon';
|
||||
|
||||
import { compose } from 'utils';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
|
||||
function DashboardTopbar({
|
||||
pageTitle,
|
||||
|
||||
@@ -8,8 +8,9 @@ import {
|
||||
Button,
|
||||
Popover
|
||||
} from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import t from 'store/types';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
|
||||
function DashboardTopbarUser({ logout }) {
|
||||
const history = useHistory();
|
||||
|
||||
@@ -51,21 +51,12 @@ export default function DataTable({
|
||||
prepareRow,
|
||||
page,
|
||||
rows,
|
||||
canPreviousPage,
|
||||
canNextPage,
|
||||
pageOptions,
|
||||
pageCount,
|
||||
gotoPage,
|
||||
nextPage,
|
||||
previousPage,
|
||||
setPageSize,
|
||||
selectedFlatRows,
|
||||
totalColumnsWidth,
|
||||
getToggleAllRowsExpandedProps,
|
||||
isAllRowsExpanded,
|
||||
|
||||
// Get the state from the instance
|
||||
state: { pageIndex, pageSize, sortBy, selectedRowIds, selectedRows },
|
||||
state: { pageIndex, pageSize, sortBy, selectedRowIds},
|
||||
} = useTable(
|
||||
{
|
||||
columns,
|
||||
@@ -128,7 +119,7 @@ export default function DataTable({
|
||||
} else {
|
||||
onFetchData && onFetchData({ pageIndex, pageSize, sortBy })
|
||||
}
|
||||
}, [pageIndex, pageSize, sortBy]);
|
||||
}, [pageIndex, pageSize, sortBy,onFetchData]);
|
||||
|
||||
useUpdateEffect(() => {
|
||||
onSelectedRowsChange && onSelectedRowsChange(selectedFlatRows);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import React, { useState, useMemo, useCallback, useEffect } from 'react'
|
||||
import React, { useState, useCallback, useEffect } from 'react'
|
||||
import { useDropzone } from 'react-dropzone'
|
||||
import { pullAt } from 'lodash';
|
||||
import classNames from 'classnames';
|
||||
import Icon from 'components/Icon';
|
||||
|
||||
|
||||
@@ -13,14 +13,13 @@ import {
|
||||
Intent,
|
||||
} from '@blueprintjs/core';
|
||||
import { useRouteMatch } from 'react-router-dom'
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
|
||||
import Icon from 'components/Icon';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
export default function ExpensesActionsBar({
|
||||
|
||||
}) {
|
||||
export default function ExpensesActionsBar() {
|
||||
const {path} = useRouteMatch();
|
||||
const onClickNewAccount = () => {};
|
||||
const views = [];
|
||||
|
||||
@@ -24,7 +24,7 @@ export default function FilterDropdown({
|
||||
const conditionalsItems = useMemo(() => [
|
||||
{ value: 'and', label:formatMessage({id:'and'}) },
|
||||
{ value: 'or', label: formatMessage({id:'or'}) },
|
||||
], []);
|
||||
], [formatMessage]);
|
||||
|
||||
const resourceFields = useMemo(() => [
|
||||
...fields.map((field) => ({ value: field.key, label: field.label_name, })),
|
||||
@@ -36,7 +36,7 @@ export default function FilterDropdown({
|
||||
{value: 'not_equal', label: formatMessage({id:'not_equal'})},
|
||||
{value: 'contain', label: formatMessage({id:'contain'})},
|
||||
{value: 'not_contain', label: formatMessage({id:'not_contain'})},
|
||||
], []);
|
||||
], [formatMessage]);
|
||||
|
||||
const defaultFilterCondition = useMemo(() => ({
|
||||
condition: 'and',
|
||||
@@ -49,8 +49,6 @@ export default function FilterDropdown({
|
||||
setFieldValue,
|
||||
getFieldProps,
|
||||
values,
|
||||
errors,
|
||||
touched,
|
||||
} = useFormik({
|
||||
enableReinitialize: true,
|
||||
initialValues: {
|
||||
@@ -82,7 +80,7 @@ export default function FilterDropdown({
|
||||
if (!isEqual(prevConditions, filteredFilterConditions) && prevConditions) {
|
||||
onFilterChangeThrottled.current(filteredFilterConditions);
|
||||
}
|
||||
}, [filteredFilterConditions]);
|
||||
}, [filteredFilterConditions,prevConditions]);
|
||||
|
||||
// Handle click remove condition.
|
||||
const onClickRemoveCondition = (index) => () => {
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function FinancialSheet({
|
||||
cash: formatMessage({id:'cash'}),
|
||||
accrual: formatMessage({id:'accrual'}),
|
||||
}),
|
||||
[]
|
||||
[formatMessage]
|
||||
);
|
||||
const getBasisLabel = useCallback((b) => methodsLabels[b], [methodsLabels]);
|
||||
const basisLabel = useMemo(() => getBasisLabel(basis), [
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import classNames from "classnames";
|
||||
import React, {useState} from "react";
|
||||
import React from "react";
|
||||
|
||||
// import {
|
||||
// ,
|
||||
|
||||
@@ -20,7 +20,6 @@ import {
|
||||
DISPLAYNAME_PREFIX,
|
||||
Popover,
|
||||
Position,
|
||||
TagInput,
|
||||
Utils,
|
||||
} from "@blueprintjs/core";
|
||||
import {
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
|
||||
import React from 'react';
|
||||
import Progress from './Progress';
|
||||
import {queryCache, useIsFetching} from 'react-query';
|
||||
import {useIsFetching} from 'react-query';
|
||||
|
||||
function AppProgress({
|
||||
|
||||
}) {
|
||||
function AppProgress() {
|
||||
const isFetching = useIsFetching();
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import React from 'react'
|
||||
import { useNProgress } from '@tanem/react-nprogress'
|
||||
import PropTypes from 'prop-types'
|
||||
import React from 'react'
|
||||
|
||||
import Bar from './Bar'
|
||||
import Container from './Container'
|
||||
import Spinner from './Spinner'
|
||||
|
||||
|
||||
const Progress = ({
|
||||
isAnimating,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useState, useMemo, useCallback} from 'react';
|
||||
import React from 'react';
|
||||
import {Button} from '@blueprintjs/core';
|
||||
import {Select} from '@blueprintjs/select';
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import React from 'react';
|
||||
import appMeta from 'config/app';
|
||||
import Icon from 'components/Icon';
|
||||
|
||||
export default function() {
|
||||
return (
|
||||
<div className="sidebar__head">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import {Menu, MenuDivider, Collapse} from "@blueprintjs/core";
|
||||
import React from 'react';
|
||||
import {Menu, MenuDivider} from "@blueprintjs/core";
|
||||
import {useHistory, useLocation} from 'react-router-dom';
|
||||
import sidebarMenuList from 'config/sidebarMenu';
|
||||
import Icon from 'components/Icon';
|
||||
|
||||
Reference in New Issue
Block a user