mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
feat: Remove the not used imports and functions.
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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,33 +1,48 @@
|
||||
import React, { useMemo, useCallback } from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
import {useHistory} from 'react-router-dom';
|
||||
import { connect } from 'react-redux';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import {
|
||||
Menu,
|
||||
MenuItem,
|
||||
MenuDivider,
|
||||
Button,
|
||||
Popover
|
||||
Popover,
|
||||
} from '@blueprintjs/core';
|
||||
import t from 'store/types';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import t from 'store/types';
|
||||
|
||||
function DashboardTopbarUser({ logout }) {
|
||||
const history = useHistory();
|
||||
|
||||
|
||||
const onClickLogout = useCallback(() => {
|
||||
logout();
|
||||
}, [logout, history]);
|
||||
|
||||
const userAvatarDropMenu = useMemo(() => (
|
||||
<Menu>
|
||||
<MenuItem icon="graph" text={<T id={'menu'}/>} />
|
||||
<MenuItem icon="map" text={<T id={'graph'}/>} />
|
||||
<MenuItem icon="th" text={<T id={'table'}/>} shouldDismissPopover={false} />
|
||||
<MenuItem icon="zoom-to-fit" text={<T id={'nucleus'}/>} disabled={true} />
|
||||
<MenuDivider />
|
||||
<MenuItem icon="cog" text={<T id={'logout'}/>} onClick={onClickLogout} />
|
||||
</Menu>
|
||||
), [onClickLogout]);
|
||||
const userAvatarDropMenu = useMemo(
|
||||
() => (
|
||||
<Menu>
|
||||
<MenuItem icon="graph" text={<T id={'menu'} />} />
|
||||
<MenuItem icon="map" text={<T id={'graph'} />} />
|
||||
<MenuItem
|
||||
icon="th"
|
||||
text={<T id={'table'} />}
|
||||
shouldDismissPopover={false}
|
||||
/>
|
||||
<MenuItem
|
||||
icon="zoom-to-fit"
|
||||
text={<T id={'nucleus'} />}
|
||||
disabled={true}
|
||||
/>
|
||||
<MenuDivider />
|
||||
<MenuItem
|
||||
icon="cog"
|
||||
text={<T id={'logout'} />}
|
||||
onClick={onClickLogout}
|
||||
/>
|
||||
</Menu>
|
||||
),
|
||||
[onClickLogout],
|
||||
);
|
||||
|
||||
return (
|
||||
<Popover content={userAvatarDropMenu}>
|
||||
@@ -35,11 +50,11 @@ function DashboardTopbarUser({ logout }) {
|
||||
<div className="user-avatar"></div>
|
||||
</Button>
|
||||
</Popover>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
logout: () => dispatch({ type: t.LOGOUT }),
|
||||
});
|
||||
|
||||
export default connect(null, mapDispatchToProps)(DashboardTopbarUser);
|
||||
export default connect(null, mapDispatchToProps)(DashboardTopbarUser);
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T} from 'react-intl';
|
||||
|
||||
export default [
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T} from 'react-intl';
|
||||
|
||||
export default [
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { connect } from 'react-redux';
|
||||
import t from 'store/types';
|
||||
import { generalSearch } from 'store/search/search.actions';
|
||||
|
||||
export const mapStateToProps = (state, props) => ({
|
||||
resultSearch: state.globalSearch.searches,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { connect } from 'react-redux';
|
||||
import {
|
||||
FetchOption,
|
||||
FetchOptions,
|
||||
submitOptions,
|
||||
} from 'store/settings/settings.actions';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import React from 'react';
|
||||
import { Intent, Button } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
|
||||
export default function MakeJournalEntriesFooter({
|
||||
formik: { isSubmitting },
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as Yup from 'yup';
|
||||
import { useFormik } from "formik";
|
||||
import moment from 'moment';
|
||||
import { Intent } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { pick } from 'lodash';
|
||||
|
||||
import MakeJournalEntriesHeader from './MakeJournalEntriesHeader';
|
||||
@@ -60,7 +60,7 @@ function MakeJournalEntriesForm({
|
||||
} else {
|
||||
changePageTitle(formatMessage({id:'new_journal'}));
|
||||
}
|
||||
}, [changePageTitle, changePageSubtitle, manualJournal]);
|
||||
}, [changePageTitle, changePageSubtitle, manualJournal,formatMessage]);
|
||||
|
||||
const validationSchema = Yup.object().shape({
|
||||
journal_number: Yup.string().required().label(formatMessage({id:'journal_number_'})),
|
||||
|
||||
@@ -6,10 +6,11 @@ import {
|
||||
Position,
|
||||
} from '@blueprintjs/core';
|
||||
import {DateInput} from '@blueprintjs/datetime';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import {Row, Col} from 'react-grid-system';
|
||||
import moment from 'moment';
|
||||
import {momentFormatter} from 'utils';
|
||||
|
||||
import Icon from 'components/Icon';
|
||||
import CurrenciesSelectList from 'components/CurrenciesSelectList';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
@@ -17,7 +18,6 @@ import ErrorMessage from 'components/ErrorMessage';
|
||||
export default function MakeJournalEntriesHeader({
|
||||
formik: { errors, touched, setFieldValue, getFieldProps }
|
||||
}) {
|
||||
const {formatMessage} = useIntl();
|
||||
|
||||
const handleDateChange = useCallback((date) => {
|
||||
const formatted = moment(date).format('YYYY-MM-DD');
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import React, { useState, useMemo, useEffect, useCallback } from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
import DataTable from 'components/DataTable';
|
||||
import Icon from 'components/Icon';
|
||||
import { compose, formattedAmount } from 'utils';
|
||||
@@ -9,9 +11,7 @@ import {
|
||||
InputGroupCell,
|
||||
} from 'components/DataTableCells';
|
||||
import { omit } from 'lodash';
|
||||
|
||||
import withAccounts from 'containers/Accounts/withAccounts';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
// Actions cell renderer.
|
||||
const ActionsCellRenderer = ({
|
||||
@@ -188,7 +188,7 @@ function MakeJournalEntriesTable({
|
||||
width: 45,
|
||||
},
|
||||
],
|
||||
[]
|
||||
[formatMessage]
|
||||
);
|
||||
|
||||
// Handles click new line.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useMemo, useState, useCallback } from 'react';
|
||||
import React, { useMemo, useCallback } from 'react';
|
||||
import Icon from 'components/Icon';
|
||||
import {
|
||||
Button,
|
||||
@@ -14,7 +14,8 @@ import {
|
||||
} from '@blueprintjs/core';
|
||||
import classNames from 'classnames';
|
||||
import { useRouteMatch, useHistory } from 'react-router-dom';
|
||||
import { compose } from 'utils';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
|
||||
|
||||
import FilterDropdown from 'components/FilterDropdown';
|
||||
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
|
||||
@@ -25,7 +26,8 @@ import withResourceDetail from 'containers/Resources/withResourceDetails';
|
||||
import withManualJournals from 'containers/Accounting/withManualJournals';
|
||||
import withManualJournalsActions from 'containers/Accounting/withManualJournalsActions';
|
||||
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { compose } from 'utils';
|
||||
|
||||
|
||||
|
||||
function ManualJournalActionsBar({
|
||||
@@ -45,7 +47,6 @@ function ManualJournalActionsBar({
|
||||
}) {
|
||||
const { path } = useRouteMatch();
|
||||
const history = useHistory();
|
||||
const {formatMessage} = useIntl();
|
||||
|
||||
const viewsMenuItems = manualJournalsViews.map(view => {
|
||||
return (
|
||||
|
||||
@@ -97,8 +97,29 @@ function ManualJournalsDataTable({
|
||||
[onDeleteJournal]
|
||||
);
|
||||
|
||||
const actionMenuList = (journal) => (
|
||||
<Menu>
|
||||
// const actionMenuList = (journal) => (
|
||||
// <Menu>
|
||||
// <MenuItem text={<T id={'view_details'} />} />
|
||||
// <MenuDivider />
|
||||
// {!journal.status && (
|
||||
// <MenuItem
|
||||
// text={<T id={'publish_journal'} />}
|
||||
// onClick={handlePublishJournal(journal)}
|
||||
// />
|
||||
// )}
|
||||
// <MenuItem
|
||||
// text={<T id={'edit_journal'} />}
|
||||
// onClick={handleEditJournal(journal)}
|
||||
// />
|
||||
// <MenuItem
|
||||
// text={<T id={'delete_journal'} />}
|
||||
// intent={Intent.DANGER}
|
||||
// onClick={handleDeleteJournal(journal)}
|
||||
// />
|
||||
// </Menu>
|
||||
// );
|
||||
const actionMenuList =useCallback((journal)=>(
|
||||
<Menu>
|
||||
<MenuItem text={<T id={'view_details'} />} />
|
||||
<MenuDivider />
|
||||
{!journal.status && (
|
||||
@@ -117,7 +138,7 @@ function ManualJournalsDataTable({
|
||||
onClick={handleDeleteJournal(journal)}
|
||||
/>
|
||||
</Menu>
|
||||
);
|
||||
),[handleEditJournal,handleDeleteJournal,handlePublishJournal]);
|
||||
|
||||
const columns = useMemo(() => [
|
||||
{
|
||||
@@ -203,7 +224,7 @@ function ManualJournalsDataTable({
|
||||
width: 50,
|
||||
disableResizing: true,
|
||||
},
|
||||
], []);
|
||||
], [actionMenuList,formatMessage]);
|
||||
|
||||
const handleDataTableFetchData = useCallback((...args) => {
|
||||
onFetchData && onFetchData(...args);
|
||||
|
||||
@@ -38,7 +38,6 @@ function ManualJournalsTable({
|
||||
const history = useHistory();
|
||||
|
||||
const [deleteManualJournal, setDeleteManualJournal] = useState(false);
|
||||
const [deleteBulk, setDeleteBulk] = useState(false);
|
||||
const [selectedRows, setSelectedRows] = useState([]);
|
||||
const [bulkDelete, setBulkDelete] = useState(false);
|
||||
|
||||
@@ -53,7 +52,7 @@ function ManualJournalsTable({
|
||||
|
||||
useEffect(() => {
|
||||
changePageTitle(formatMessage({id:'manual_journals'}));
|
||||
}, [changePageTitle]);
|
||||
}, [changePageTitle,formatMessage]);
|
||||
|
||||
// Handle delete manual journal click.
|
||||
const handleDeleteJournal = useCallback(
|
||||
@@ -81,7 +80,7 @@ function ManualJournalsTable({
|
||||
});
|
||||
setDeleteManualJournal(false);
|
||||
});
|
||||
}, [deleteManualJournal, requestDeleteManualJournal]);
|
||||
}, [deleteManualJournal, requestDeleteManualJournal,formatMessage]);
|
||||
|
||||
|
||||
// Calculates the selected rows count.
|
||||
@@ -113,7 +112,7 @@ function ManualJournalsTable({
|
||||
.catch((error) => {
|
||||
setBulkDelete(false);
|
||||
});
|
||||
}, [requestDeleteBulkManualJournals, bulkDelete]);
|
||||
}, [requestDeleteBulkManualJournals, bulkDelete,formatMessage,selectedRowsCount]);
|
||||
|
||||
// Handle cancel bulk delete alert.
|
||||
const handleCancelBulkDelete = useCallback(() => {
|
||||
@@ -133,9 +132,9 @@ function ManualJournalsTable({
|
||||
}, [fetchManualJournals]);
|
||||
|
||||
// Handle view change to re-fetch data table.
|
||||
const handleViewChanged = useCallback(() => {
|
||||
// const handleViewChanged = useCallback(() => {
|
||||
|
||||
}, [fetchManualJournals]);
|
||||
// }, [fetchManualJournals]);
|
||||
|
||||
// Handle fetch data of manual jouranls datatable.
|
||||
const handleFetchData = useCallback(({ pageIndex, pageSize, sortBy }) => {
|
||||
@@ -151,11 +150,11 @@ function ManualJournalsTable({
|
||||
(journal) => {
|
||||
requestPublishManualJournal(journal.id).then(() => {
|
||||
AppToaster.show({
|
||||
message: 'the_manual_journal_id_has_been_published',
|
||||
message: formatMessage({id:'the_manual_journal_id_has_been_published'})
|
||||
});
|
||||
});
|
||||
},
|
||||
[requestPublishManualJournal]
|
||||
[requestPublishManualJournal,formatMessage]
|
||||
);
|
||||
|
||||
// Handle selected rows change.
|
||||
|
||||
@@ -14,13 +14,13 @@ import { connect } from 'react-redux';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
|
||||
import { useUpdateEffect } from 'hooks';
|
||||
import { compose } from 'utils';
|
||||
import Icon from 'components/Icon';
|
||||
|
||||
import withManualJournals from './withManualJournals';
|
||||
import withManualJournalsActions from './withManualJournalsActions';
|
||||
import withDashboard from 'containers/Dashboard/withDashboard';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
function ManualJournalsViewTabs({
|
||||
// #withManualJournals
|
||||
@@ -60,7 +60,7 @@ function ManualJournalsViewTabs({
|
||||
addManualJournalsTableQueries({
|
||||
custom_view_id: customViewId,
|
||||
});
|
||||
}, [customViewId]);
|
||||
}, [customViewId,addManualJournalsTableQueries]);
|
||||
|
||||
const tabs = manualJournalsViews.map((view) => {
|
||||
const baseUrl = '/manual-journals';
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { connect } from 'react-redux';
|
||||
import t from 'store/types';
|
||||
import { getManualJournal } from 'store/manualJournals/manualJournals.reducers';
|
||||
|
||||
const mapStateToProps = (state, props) => ({
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
import classNames from 'classnames';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { connect } from 'react-redux';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { If } from 'components';
|
||||
|
||||
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
|
||||
@@ -27,7 +28,6 @@ import withAccountsTableActions from 'containers/Accounts/withAccountsTableActio
|
||||
import withAccounts from 'containers/Accounts/withAccounts';
|
||||
|
||||
import {compose} from 'utils';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
|
||||
function AccountsActionsBar({
|
||||
@@ -72,9 +72,9 @@ function AccountsActionsBar({
|
||||
},
|
||||
});
|
||||
|
||||
const handleBulkArchive = useCallback(() => {
|
||||
onBulkArchive && onBulkArchive(selectedRows.map(r => r.id));
|
||||
}, [onBulkArchive, selectedRows]);
|
||||
// const handleBulkArchive = useCallback(() => {
|
||||
// onBulkArchive && onBulkArchive(selectedRows.map(r => r.id));
|
||||
// }, [onBulkArchive, selectedRows]);
|
||||
|
||||
const handleBulkDelete = useCallback(() => {
|
||||
onBulkDelete && onBulkDelete(selectedRows.map(r => r.id));
|
||||
|
||||
@@ -77,7 +77,7 @@ function AccountsChart({
|
||||
|
||||
useEffect(() => {
|
||||
changePageTitle(formatMessage({ id: 'chart_of_accounts' }));
|
||||
}, [changePageTitle]);
|
||||
}, [changePageTitle,formatMessage]);
|
||||
|
||||
// Handle click and cancel/confirm account delete
|
||||
const handleDeleteAccount = (account) => {
|
||||
@@ -115,7 +115,7 @@ function AccountsChart({
|
||||
setDeleteAccount(false);
|
||||
handleDeleteErrors(errors);
|
||||
});
|
||||
}, [deleteAccount, requestDeleteAccount]);
|
||||
}, [deleteAccount, requestDeleteAccount,formatMessage]);
|
||||
|
||||
// Handle cancel/confirm account inactive.
|
||||
const handleInactiveAccount = useCallback((account) => {
|
||||
@@ -138,7 +138,7 @@ function AccountsChart({
|
||||
intent: Intent.SUCCESS,
|
||||
});
|
||||
});
|
||||
}, [inactiveAccount, requestInactiveAccount]);
|
||||
}, [inactiveAccount, requestInactiveAccount,formatMessage]);
|
||||
|
||||
// Handle activate account click.
|
||||
const handleActivateAccount = useCallback((account) => {
|
||||
@@ -182,7 +182,7 @@ function AccountsChart({
|
||||
setBulkDelete(false);
|
||||
handleDeleteErrors(errors);
|
||||
});
|
||||
}, [requestDeleteBulkAccounts, bulkDelete]);
|
||||
}, [requestDeleteBulkAccounts, bulkDelete,formatMessage]);
|
||||
|
||||
// Handle cancel accounts bulk delete.
|
||||
const handleCancelBulkDelete = useCallback(() => {
|
||||
@@ -263,7 +263,7 @@ const handleConfirmBulkActivate = useCallback(() => {
|
||||
setBulkActivate(false);
|
||||
|
||||
});
|
||||
}, [requestBulkActivateAccounts, bulkActivate]);
|
||||
}, [requestBulkActivateAccounts, bulkActivate,formatMessage]);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useCallback, useState, useMemo } from 'react';
|
||||
import React, {useCallback, useState, useMemo } from 'react';
|
||||
import {
|
||||
Button,
|
||||
Popover,
|
||||
@@ -84,7 +84,7 @@ function AccountsDataTable({
|
||||
text={<T id={'delete_account'}/>}
|
||||
onClick={() => onDeleteAccount(account)} />
|
||||
</Menu>
|
||||
), [handleEditAccount, onDeleteAccount, onInactiveAccount]);
|
||||
), [handleEditAccount, onDeleteAccount, onInactiveAccount,handleNewParentAccount]);
|
||||
|
||||
const columns = useMemo(() => [
|
||||
{
|
||||
@@ -166,7 +166,7 @@ function AccountsDataTable({
|
||||
className: 'actions',
|
||||
width: 50,
|
||||
}
|
||||
], [actionMenuList]);
|
||||
], [actionMenuList,formatMessage]);
|
||||
|
||||
const selectionColumn = useMemo(() => ({
|
||||
minWidth: 50,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useEffect, useCallback} from 'react';
|
||||
import React, {useEffect} from 'react';
|
||||
import { useHistory } from 'react-router';
|
||||
import { connect } from 'react-redux';
|
||||
import {
|
||||
@@ -12,14 +12,15 @@ import {
|
||||
import { useParams, withRouter } from 'react-router-dom';
|
||||
import Icon from 'components/Icon';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { compose } from 'utils';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import {useUpdateEffect} from 'hooks';
|
||||
|
||||
import withDashboard from 'containers/Dashboard/withDashboard';
|
||||
import withAccounts from 'containers/Accounts/withAccounts';
|
||||
import withAccountsTableActions from 'containers/Accounts/withAccountsTableActions';
|
||||
import withViewDetail from 'containers/Views/withViewDetails';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
function AccountsViewsTabs({
|
||||
// #withViewDetail
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import React, { useCallback, useMemo, useState } from 'react';
|
||||
import * as Yup from 'yup';
|
||||
import { useFormik } from 'formik';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import AppToaster from 'components/AppToaster';
|
||||
import { compose } from 'utils';
|
||||
import withAuthenticationActions from './withAuthenticationActions';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import {
|
||||
Button,
|
||||
InputGroup,
|
||||
@@ -15,13 +9,23 @@ import {
|
||||
Position,
|
||||
Spinner,
|
||||
} from '@blueprintjs/core';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { Row, Col } from 'react-grid-system';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
|
||||
import AppToaster from 'components/AppToaster';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
|
||||
import Icon from 'components/Icon';
|
||||
import { Row, Col } from 'react-grid-system';
|
||||
import AuthInsider from 'containers/Authentication/AuthInsider';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import useAsync from 'hooks/async';
|
||||
import { If } from 'components';
|
||||
import useAsync from 'hooks/async';
|
||||
import AuthInsider from 'containers/Authentication/AuthInsider';
|
||||
|
||||
import withAuthenticationActions from './withAuthenticationActions';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
function Invite({ requestInviteAccept, requestInviteMetaByToken }) {
|
||||
const { formatMessage } = useIntl();
|
||||
@@ -75,7 +79,6 @@ function Invite({ requestInviteAccept, requestInviteMetaByToken }) {
|
||||
);
|
||||
|
||||
const {
|
||||
values,
|
||||
touched,
|
||||
errors,
|
||||
handleSubmit,
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import * as Yup from 'yup';
|
||||
|
||||
|
||||
import { useFormik } from 'formik';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import {
|
||||
@@ -12,6 +10,7 @@ import {
|
||||
FormGroup,
|
||||
Checkbox,
|
||||
} from '@blueprintjs/core';
|
||||
|
||||
import Toaster from 'components/AppToaster';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import AuthInsider from 'containers/Authentication/AuthInsider';
|
||||
@@ -49,7 +48,6 @@ function Login({
|
||||
|
||||
// Formik validation schema and submit handler.
|
||||
const {
|
||||
values,
|
||||
touched,
|
||||
errors,
|
||||
handleSubmit,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React, { useMemo, useState, useCallback } from 'react';
|
||||
import * as Yup from 'yup';
|
||||
import { useFormik } from 'formik';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
import { Row, Col } from 'react-grid-system';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import {
|
||||
Button,
|
||||
InputGroup,
|
||||
@@ -10,16 +10,17 @@ import {
|
||||
FormGroup,
|
||||
Spinner,
|
||||
} from '@blueprintjs/core';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
import { Row, Col } from 'react-grid-system';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import withAuthenticationActions from './withAuthenticationActions';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import AppToaster from 'components/AppToaster';
|
||||
import AuthInsider from 'containers/Authentication/AuthInsider';
|
||||
import { compose } from 'utils';
|
||||
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import Icon from 'components/Icon';
|
||||
import { If } from 'components';
|
||||
import AuthInsider from 'containers/Authentication/AuthInsider';
|
||||
import withAuthenticationActions from './withAuthenticationActions';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
function Register({ requestRegister }) {
|
||||
const { formatMessage } = useIntl();
|
||||
@@ -60,8 +61,6 @@ function Register({ requestRegister }) {
|
||||
const {
|
||||
errors,
|
||||
touched,
|
||||
values,
|
||||
setFieldValue,
|
||||
handleSubmit,
|
||||
getFieldProps,
|
||||
isSubmitting,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useMemo } from 'react';
|
||||
import React, { useMemo } from 'react';
|
||||
import * as Yup from 'yup';
|
||||
import { useFormik } from 'formik';
|
||||
|
||||
@@ -10,13 +10,15 @@ import {
|
||||
Position,
|
||||
} from '@blueprintjs/core';
|
||||
import { Link, useParams, useHistory } from 'react-router-dom';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import AppToaster from 'components/AppToaster';
|
||||
import { compose } from 'utils';
|
||||
import withAuthenticationActions from './withAuthenticationActions';
|
||||
import AuthInsider from 'containers/Authentication/AuthInsider';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
import AppToaster from 'components/AppToaster';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import AuthInsider from 'containers/Authentication/AuthInsider';
|
||||
import withAuthenticationActions from './withAuthenticationActions';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
|
||||
|
||||
function ResetPassword({ requestResetPassword }) {
|
||||
@@ -44,10 +46,8 @@ function ResetPassword({ requestResetPassword }) {
|
||||
|
||||
const {
|
||||
touched,
|
||||
values,
|
||||
errors,
|
||||
handleSubmit,
|
||||
setFieldValue,
|
||||
getFieldProps,
|
||||
isSubmitting,
|
||||
} = useFormik({
|
||||
|
||||
@@ -34,12 +34,10 @@ function SendResetPassword({ requestSendResetPassword }) {
|
||||
|
||||
// Formik validation
|
||||
const {
|
||||
values,
|
||||
errors,
|
||||
touched,
|
||||
handleSubmit,
|
||||
getFieldProps,
|
||||
setFieldValue,
|
||||
isSubmitting,
|
||||
} = useFormik({
|
||||
enableReinitialize: true,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -2,6 +2,7 @@ import React, { useEffect, useState, useCallback,useMemo } from 'react';
|
||||
import { useQuery } from 'react-query';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { Alert, Intent } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T, useIntl, FormattedHTMLMessage } from 'react-intl';
|
||||
import AppToaster from 'components/AppToaster';
|
||||
|
||||
import DashboardPageContent from 'components/Dashboard/DashboardPageContent';
|
||||
@@ -15,7 +16,6 @@ import withExchangeRatesActions from 'containers/ExchangeRates/withExchangeRates
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
import { FormattedMessage as T, useIntl, FormattedHTMLMessage } from 'react-intl';
|
||||
|
||||
function ExchangeRate({
|
||||
// #withDashboard
|
||||
@@ -37,10 +37,6 @@ function ExchangeRate({
|
||||
const { formatMessage } = useIntl();
|
||||
const [bulkDelete, setBulkDelete] = useState(false);
|
||||
|
||||
// const fetchExchangeRates = useQuery('exchange-rates-table', () => {
|
||||
// return Promise.all([requestFetchExchangeRates()]);
|
||||
// });
|
||||
|
||||
const fetchExchangeRates = useQuery('exchange-rates-table',
|
||||
() => requestFetchExchangeRates());
|
||||
|
||||
@@ -49,7 +45,7 @@ function ExchangeRate({
|
||||
id
|
||||
? changePageTitle(formatMessage({id:'exchange_rate_details'}))
|
||||
: changePageTitle(formatMessage({id:'exchange_rate_list'}));
|
||||
}, [id, changePageTitle]);
|
||||
}, [id, changePageTitle,formatMessage]);
|
||||
|
||||
const handelDeleteExchangeRate = useCallback(
|
||||
(exchange_rate) => {
|
||||
@@ -71,7 +67,7 @@ function ExchangeRate({
|
||||
message: formatMessage({id:'the_exchange_rate_has_been_successfully_deleted'}),
|
||||
});
|
||||
});
|
||||
}, [deleteExchangeRate, requestDeleteExchangeRate]);
|
||||
}, [deleteExchangeRate, requestDeleteExchangeRate,formatMessage]);
|
||||
|
||||
// Handle fetch data of Exchange_rates datatable.
|
||||
const handleFetchData = useCallback(
|
||||
@@ -123,7 +119,7 @@ const handleConfirmBulkDelete = useCallback(() => {
|
||||
.catch((errors) => {
|
||||
setBulkDelete(false);
|
||||
});
|
||||
}, [requestDeleteBulkExchangeRates, bulkDelete]);
|
||||
}, [requestDeleteBulkExchangeRates, bulkDelete,formatMessage]);
|
||||
|
||||
|
||||
// Calculates the data table selected rows count.
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
import React, { useCallback, useMemo,useState } from 'react';
|
||||
import Icon from 'components/Icon';
|
||||
import DialogConnect from 'connectors/Dialog.connector';
|
||||
import LoadingIndicator from 'components/LoadingIndicator';
|
||||
import DataTable from 'components/DataTable';
|
||||
import { Button, Popover, Menu, MenuItem, Position } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
import withExchangeRatesActions from 'containers/ExchangeRates/withExchangeRatesActions';
|
||||
import withExchangeRates from 'containers/ExchangeRates/withExchangeRates';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
function ExchangeRateTable({
|
||||
// #withExchangeRates
|
||||
@@ -91,7 +90,7 @@ function ExchangeRateTable({
|
||||
width: 50,
|
||||
disableResizing: false,
|
||||
},
|
||||
], [actionMenuList]);
|
||||
], [actionMenuList,formatMessage]);
|
||||
|
||||
const selectionColumn = useMemo(() => ({
|
||||
minWidth: 42,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { getResourceViews } from 'store/customViews/customViews.selectors';
|
||||
|
||||
export default (mapState) => {
|
||||
const mapStateToProps = (state, props) => {
|
||||
|
||||
@@ -4,7 +4,7 @@ import {useParams} from 'react-router-dom';
|
||||
import Connector from 'connectors/ExpenseForm.connector';
|
||||
import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
||||
import ExpenseForm from 'components/Expenses/ExpenseForm';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { useIntl } from 'react-intl';
|
||||
|
||||
function ExpenseFormContainer({
|
||||
fetchAccounts,
|
||||
@@ -23,7 +23,7 @@ function ExpenseFormContainer({
|
||||
} else {
|
||||
changePageTitle(formatMessage({id:'new_expense'}));
|
||||
}
|
||||
}, []);
|
||||
}, [id,changePageTitle,formatMessage]);
|
||||
|
||||
const fetchHook = useAsync(async () => {
|
||||
await Promise.all([
|
||||
|
||||
@@ -21,7 +21,7 @@ function ExpensesList({
|
||||
const {formatMessage} =useIntl()
|
||||
useEffect(() => {
|
||||
changePageTitle(formatMessage({id:'expenses_list'}));
|
||||
}, []);
|
||||
}, [changePageTitle,formatMessage]);
|
||||
|
||||
const [deleteExpenseState, setDeleteExpense] = useState();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useMemo, useCallback, useState } from 'react';
|
||||
import React, { useEffect, useCallback, useState } from 'react';
|
||||
|
||||
import { compose } from 'utils';
|
||||
import { useQuery } from 'react-query';
|
||||
@@ -16,7 +16,7 @@ import withSettings from 'containers/Settings/withSettings';
|
||||
import withBalanceSheetActions from './withBalanceSheetActions';
|
||||
import withBalanceSheetDetail from './withBalanceSheetDetail';
|
||||
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import {useIntl } from 'react-intl';
|
||||
|
||||
|
||||
function BalanceSheet({
|
||||
@@ -54,7 +54,7 @@ function BalanceSheet({
|
||||
|
||||
useEffect(() => {
|
||||
changePageTitle(formatMessage({ id: 'balance_sheet' }));
|
||||
}, []);
|
||||
}, [changePageTitle,formatMessage]);
|
||||
|
||||
// Handle re-fetch balance sheet after filter change.
|
||||
const handleFilterSubmit = useCallback((filter) => {
|
||||
|
||||
@@ -3,24 +3,21 @@ import {
|
||||
NavbarGroup,
|
||||
Button,
|
||||
Classes,
|
||||
NavbarHeading,
|
||||
NavbarDivider,
|
||||
Intent,
|
||||
Popover,
|
||||
PopoverInteractionKind,
|
||||
Position,
|
||||
} from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
|
||||
import Icon from 'components/Icon';
|
||||
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar'
|
||||
import FilterDropdown from 'components/FilterDropdown';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import FilterDropdown from 'components/FilterDropdown';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
|
||||
export default function JournalActionsBar({
|
||||
|
||||
}) {
|
||||
export default function JournalActionsBar() {
|
||||
const filterDropdown = FilterDropdown({
|
||||
fields: [],
|
||||
onFilterChange: (filterConditions) => {
|
||||
|
||||
@@ -6,15 +6,16 @@ import {
|
||||
FormGroup,
|
||||
MenuItem,
|
||||
} from "@blueprintjs/core";
|
||||
import SelectList from 'components/SelectList';
|
||||
import moment from 'moment';
|
||||
import Icon from 'components/Icon';
|
||||
import { useFormik } from 'formik';
|
||||
import * as Yup from 'yup';
|
||||
import { useFormik } from 'formik';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
import Icon from 'components/Icon';
|
||||
import SelectList from 'components/SelectList';
|
||||
import FinancialStatementDateRange from 'containers/FinancialStatements/FinancialStatementDateRange';
|
||||
import SelectDisplayColumnsBy from '../SelectDisplayColumnsBy';
|
||||
import RadiosAccountingBasis from '../RadiosAccountingBasis';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
|
||||
export default function BalanceSheetHeader({
|
||||
@@ -45,7 +46,7 @@ export default function BalanceSheetHeader({
|
||||
const onItemSelectDisplayColumns = useCallback((item) => {
|
||||
formik.setFieldValue('display_columns_type', item.type);
|
||||
formik.setFieldValue('display_columns_by', item.by);
|
||||
}, []);
|
||||
}, [formik]);
|
||||
|
||||
// Handle submit filter submit button.
|
||||
const handleSubmitClick = useCallback(() => {
|
||||
@@ -55,7 +56,7 @@ export default function BalanceSheetHeader({
|
||||
const filterAccountsOptions = useMemo(() => [
|
||||
{ key: '', name: formatMessage({ id: 'accounts_with_zero_balance' }) },
|
||||
{ key: 'all-trans', name: formatMessage({ id: 'all_transactions' }) },
|
||||
], []);
|
||||
], [formatMessage]);
|
||||
|
||||
const filterAccountRenderer = useCallback((item, { handleClick, modifiers, query }) => {
|
||||
return (<MenuItem text={item.name} key={item.id} onClick={handleClick} />);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import React, {useMemo, useCallback } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { useIntl } from 'react-intl';
|
||||
|
||||
import Money from 'components/Money';
|
||||
import FinancialSheet from 'components/FinancialSheet';
|
||||
@@ -12,7 +13,6 @@ import {
|
||||
} from 'store/financialStatement/financialStatements.selectors';
|
||||
|
||||
import { compose, defaultExpanderReducer } from 'utils';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
|
||||
function BalanceSheetTable({
|
||||
@@ -108,7 +108,7 @@ function BalanceSheetTable({
|
||||
width: 100,
|
||||
})))
|
||||
: [],
|
||||
], [balanceSheetQuery, balanceSheetColumns]);
|
||||
], [balanceSheetQuery, balanceSheetColumns,formatMessage]);
|
||||
|
||||
const handleFetchData = useCallback(() => {
|
||||
onFetchData && onFetchData();
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, {useState, useCallback, useMemo} from 'react';
|
||||
import {Row, Col} from 'react-grid-system';
|
||||
import {momentFormatter} from 'utils';
|
||||
import {DateInput} from '@blueprintjs/datetime';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { useIntl } from 'react-intl';
|
||||
|
||||
import {
|
||||
HTMLSelect,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useCallback, useState, useMemo } from 'react';
|
||||
import React, { useEffect, useCallback, useState} from 'react';
|
||||
import moment from 'moment';
|
||||
import GeneralLedgerTable from 'containers/FinancialStatements/GeneralLedger/GeneralLedgerTable';
|
||||
import { useQuery } from 'react-query';
|
||||
@@ -43,7 +43,7 @@ function GeneralLedger({
|
||||
// Change page title of the dashboard.
|
||||
useEffect(() => {
|
||||
changePageTitle(formatMessage({id:'general_ledger'}));
|
||||
}, []);
|
||||
}, [changePageTitle,formatMessage]);
|
||||
|
||||
const fetchAccounts = useQuery(['accounts-list'],
|
||||
() => requestFetchAccounts());
|
||||
|
||||
@@ -3,25 +3,21 @@ import {
|
||||
NavbarGroup,
|
||||
Button,
|
||||
Classes,
|
||||
NavbarHeading,
|
||||
NavbarDivider,
|
||||
Intent,
|
||||
Popover,
|
||||
PopoverInteractionKind,
|
||||
Position,
|
||||
} from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import Icon from 'components/Icon';
|
||||
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar'
|
||||
import classNames from 'classnames';
|
||||
import FilterDropdown from 'components/FilterDropdown';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
/**
|
||||
* General ledger actions bar.
|
||||
*/
|
||||
export default function GeneralLedgerActionsBar({
|
||||
|
||||
}) {
|
||||
export default function GeneralLedgerActionsBar() {
|
||||
const filterDropdown = FilterDropdown({
|
||||
fields: [],
|
||||
onFilterChange: (filterConditions) => {
|
||||
|
||||
@@ -1,31 +1,29 @@
|
||||
import React, {useState, useMemo, useEffect, useCallback} from 'react';
|
||||
import FinancialStatementHeader from 'containers/FinancialStatements/FinancialStatementHeader';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
import React, { useCallback} from 'react';
|
||||
import {
|
||||
Button,
|
||||
FormGroup,
|
||||
Classes,
|
||||
} from '@blueprintjs/core';
|
||||
import {Row, Col} from 'react-grid-system';
|
||||
import {
|
||||
compose,
|
||||
} from 'utils';
|
||||
import moment from 'moment';
|
||||
import * as Yup from 'yup';
|
||||
import {useFormik} from 'formik';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
|
||||
import AccountsMultiSelect from 'components/AccountsMultiSelect';
|
||||
import FinancialStatementHeader from 'containers/FinancialStatements/FinancialStatementHeader';
|
||||
import AccountsConnect from 'connectors/Accounts.connector'
|
||||
import classNames from 'classnames';
|
||||
import AccountsMultiSelect from 'components/AccountsMultiSelect';
|
||||
import {useFormik} from 'formik';
|
||||
import FinancialStatementDateRange from 'containers/FinancialStatements/FinancialStatementDateRange';
|
||||
import * as Yup from 'yup';
|
||||
import RadiosAccountingBasis from '../RadiosAccountingBasis';
|
||||
import {compose} from 'utils';
|
||||
|
||||
|
||||
function GeneralLedgerHeader({
|
||||
onSubmitFilter,
|
||||
pageFilter,
|
||||
accounts,
|
||||
}) {
|
||||
const {formatMessage} = useIntl();
|
||||
|
||||
const formik = useFormik({
|
||||
enableReinitialize: true,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React, {useEffect, useState, useCallback, useMemo} from 'react';
|
||||
import React, {useCallback, useMemo} from 'react';
|
||||
import moment from 'moment';
|
||||
import { connect } from 'react-redux';
|
||||
import {
|
||||
defaultExpanderReducer,
|
||||
compose
|
||||
} from 'utils';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { useIntl } from 'react-intl';
|
||||
|
||||
import FinancialSheet from 'components/FinancialSheet';
|
||||
import DataTable from 'components/DataTable';
|
||||
|
||||
@@ -36,7 +36,7 @@ function Journal({
|
||||
|
||||
useEffect(() => {
|
||||
changePageTitle(formatMessage({id:'journal_sheet'}));
|
||||
}, []);
|
||||
}, [changePageTitle,formatMessage]);
|
||||
|
||||
const fetchHook = useQuery(['journal', filter],
|
||||
(key, query) => requestFetchJournalSheet(query),
|
||||
|
||||
@@ -3,22 +3,18 @@ import {
|
||||
NavbarGroup,
|
||||
Button,
|
||||
Classes,
|
||||
NavbarHeading,
|
||||
NavbarDivider,
|
||||
Intent,
|
||||
Popover,
|
||||
PopoverInteractionKind,
|
||||
Position,
|
||||
} from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import Icon from 'components/Icon';
|
||||
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar'
|
||||
import classNames from 'classnames';
|
||||
import FilterDropdown from 'components/FilterDropdown';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import classNames from 'classnames';
|
||||
|
||||
export default function JournalActionsBar({
|
||||
|
||||
}) {
|
||||
export default function JournalActionsBar() {
|
||||
const filterDropdown = FilterDropdown({
|
||||
fields: [],
|
||||
onFilterChange: (filterConditions) => {
|
||||
|
||||
@@ -2,11 +2,10 @@ import React, { useCallback } from 'react';
|
||||
import { Row, Col } from 'react-grid-system';
|
||||
import {
|
||||
Button,
|
||||
Intent,
|
||||
} from '@blueprintjs/core';
|
||||
import moment from 'moment';
|
||||
import { useFormik } from 'formik';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import * as Yup from 'yup';
|
||||
|
||||
import FinancialStatementDateRange from 'containers/FinancialStatements/FinancialStatementDateRange';
|
||||
@@ -17,7 +16,7 @@ export default function JournalHeader({
|
||||
pageFilter,
|
||||
onSubmitFilter,
|
||||
}) {
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
const formik = useFormik({
|
||||
enableReinitialize: true,
|
||||
initialValues: {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React, { useCallback, useMemo } from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
import moment from 'moment';
|
||||
import { useIntl } from 'react-intl';
|
||||
|
||||
import FinancialSheet from 'components/FinancialSheet';
|
||||
import DataTable from 'components/DataTable';
|
||||
@@ -12,7 +13,6 @@ import {
|
||||
} from 'store/financialStatement/financialStatements.selectors';
|
||||
|
||||
import withJournal from './withJournal';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
|
||||
function JournalSheetTable({
|
||||
@@ -78,7 +78,7 @@ function JournalSheetTable({
|
||||
accessor: r => exceptRowTypes(
|
||||
r.rowType, (<Money amount={r.debit} currency={'USD'} />), ['space_entry']),
|
||||
},
|
||||
], []);
|
||||
], [formatMessage]);
|
||||
|
||||
const handleFetchData = useCallback((...args) => {
|
||||
onFetchData && onFetchData(...args)
|
||||
|
||||
@@ -5,21 +5,19 @@ import {
|
||||
Classes,
|
||||
NavbarDivider,
|
||||
} from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import Icon from 'components/Icon';
|
||||
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar'
|
||||
import classNames from 'classnames';
|
||||
import FilterDropdown from 'components/FilterDropdown';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
// import FilterDropdown from 'components/FilterDropdown';
|
||||
|
||||
export default function ProfitLossActionsBar({
|
||||
|
||||
}) {
|
||||
const filterDropdown = FilterDropdown({
|
||||
fields: [],
|
||||
onFilterChange: (filterConditions) => {
|
||||
export default function ProfitLossActionsBar() {
|
||||
// const filterDropdown = FilterDropdown({
|
||||
// fields: [],
|
||||
// onFilterChange: (filterConditions) => {
|
||||
|
||||
},
|
||||
});
|
||||
// },
|
||||
// });
|
||||
|
||||
return (
|
||||
<DashboardActionsBar>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import React, { useMemo, useCallback } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
import FinancialSheet from 'components/FinancialSheet';
|
||||
import DataTable from 'components/DataTable';
|
||||
import Money from 'components/Money';
|
||||
@@ -9,7 +11,6 @@ import {
|
||||
getFinancialSheetIndexByQuery,
|
||||
} from 'store/financialStatement/financialStatements.selectors';
|
||||
import withProfitLossDetail from './withProfitLoss';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
|
||||
function ProfitLossSheetTable({
|
||||
@@ -64,7 +65,7 @@ function ProfitLossSheetTable({
|
||||
width: 100,
|
||||
})))
|
||||
: [],
|
||||
], [profitLossQuery.display_columns_type, profitLossColumns]);
|
||||
], [profitLossQuery.display_columns_type, profitLossColumns,formatMessage]);
|
||||
|
||||
// Handle data table fetch data.
|
||||
const handleFetchData = useCallback((...args) => {
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
FormGroup,
|
||||
MenuItem,
|
||||
} from '@blueprintjs/core';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
|
||||
export default function SelectsListColumnsBy(props) {
|
||||
const { onItemSelect, formGroupProps, selectListProps } = props;
|
||||
@@ -19,7 +19,7 @@ export default function SelectsListColumnsBy(props) {
|
||||
{key: 'week', name: 'Date/Week', type: 'date_periods', by: 'month'},
|
||||
{key: 'day', name: 'Date/Day', type: 'date_periods', by: 'day'},
|
||||
{key: 'quarter', name: 'Date/Quarter', type: 'date_periods', by: 'quarter'},
|
||||
]);
|
||||
],[]);
|
||||
|
||||
const itemRenderer = useCallback((item, { handleClick, modifiers, query }) => {
|
||||
return (<MenuItem text={item.name} key={item.id} onClick={handleClick} />);
|
||||
|
||||
@@ -3,28 +3,22 @@ import {
|
||||
NavbarGroup,
|
||||
Button,
|
||||
Classes,
|
||||
NavbarHeading,
|
||||
NavbarDivider,
|
||||
Intent,
|
||||
Popover,
|
||||
PopoverInteractionKind,
|
||||
Position,
|
||||
} from '@blueprintjs/core';
|
||||
import Icon from 'components/Icon';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar'
|
||||
import classNames from 'classnames';
|
||||
import FilterDropdown from 'components/FilterDropdown';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
// import FilterDropdown from 'components/FilterDropdown';
|
||||
|
||||
export default function GeneralLedgerActionsBar({
|
||||
|
||||
}) {
|
||||
const filterDropdown = FilterDropdown({
|
||||
fields: [],
|
||||
onFilterChange: (filterConditions) => {
|
||||
export default function GeneralLedgerActionsBar() {
|
||||
|
||||
// const filterDropdown = FilterDropdown({
|
||||
// fields: [],
|
||||
// onFilterChange: (filterConditions) => {
|
||||
|
||||
},
|
||||
});
|
||||
// },
|
||||
// });
|
||||
|
||||
return (
|
||||
<DashboardActionsBar>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useCallback, useState, useMemo } from 'react';
|
||||
import React, { useEffect, useCallback, useState } from 'react';
|
||||
import { useQuery } from 'react-query';
|
||||
import moment from 'moment';
|
||||
import { useIntl } from 'react-intl';
|
||||
@@ -52,7 +52,7 @@ function TrialBalanceSheet({
|
||||
// Change page title of the dashboard.
|
||||
useEffect(() => {
|
||||
changePageTitle(formatMessage({id:'trial_balance_sheet'}));
|
||||
}, []);
|
||||
}, [changePageTitle,formatMessage]);
|
||||
|
||||
const handleFilterSubmit = useCallback((filter) => {
|
||||
const parsedFilter = {
|
||||
|
||||
@@ -59,7 +59,7 @@ function TrialBalanceSheetTable({
|
||||
className: 'balance',
|
||||
width: 120,
|
||||
}
|
||||
], []);
|
||||
], [formatMessage]);
|
||||
|
||||
const handleFetchData = useCallback(() => {
|
||||
onFetchData && onFetchData();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import React from 'react';
|
||||
import { Omnibar } from '@blueprintjs/select';
|
||||
import { MenuItem } from '@blueprintjs/core';
|
||||
import { compose } from 'utils';
|
||||
|
||||
@@ -12,7 +12,6 @@ import AppToaster from 'components/AppToaster';
|
||||
import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
||||
import ItemCategoriesDataTable from 'containers/Items/ItemCategoriesTable';
|
||||
import ItemsCategoryActionsBar from 'containers/Items/ItemsCategoryActionsBar';
|
||||
import DashboardPageContent from 'components/Dashboard/DashboardPageContent';
|
||||
|
||||
import withDialog from 'connectors/Dialog.connector';
|
||||
import withDashboardActions from 'containers/Dashboard/withDashboard';
|
||||
@@ -46,7 +45,7 @@ const ItemCategoryList = ({
|
||||
id
|
||||
? changePageTitle(formatMessage({ id: 'edit_category_details' }))
|
||||
: changePageTitle(formatMessage({ id: 'category_list' }));
|
||||
}, []);
|
||||
}, [id,changePageTitle,formatMessage]);
|
||||
|
||||
const fetchCategories = useQuery(
|
||||
['items-categories-table', filter],
|
||||
@@ -126,7 +125,7 @@ const ItemCategoryList = ({
|
||||
.catch((errors) => {
|
||||
setBulkDelete(false);
|
||||
});
|
||||
}, [requestDeleteBulkItemCategories, bulkDelete]);
|
||||
}, [requestDeleteBulkItemCategories, bulkDelete,formatMessage]);
|
||||
|
||||
|
||||
//Handel cancel itemCategories bulk delete.
|
||||
|
||||
@@ -28,10 +28,9 @@ const ItemsCategoryList = ({
|
||||
}) => {
|
||||
const {formatMessage} = useIntl();
|
||||
|
||||
const handelEditCategory = (category) => { onEditCategory(category); };
|
||||
const handleDeleteCategory = (category) => { onDeleteCategory(category); };
|
||||
|
||||
const actionMenuList = (category) => (
|
||||
const handelEditCategory=useCallback((category)=>{onEditCategory(category);},[onEditCategory])
|
||||
const handleDeleteCategory =useCallback((category)=>{onDeleteCategory(category);},[onDeleteCategory])
|
||||
const actionMenuList = useCallback((category) => (
|
||||
<Menu>
|
||||
<MenuItem
|
||||
text={<T id={'edit_category'} />}
|
||||
@@ -41,7 +40,8 @@ const ItemsCategoryList = ({
|
||||
onClick={() => handleDeleteCategory(category)}
|
||||
/>
|
||||
</Menu>
|
||||
);
|
||||
), [handelEditCategory,handleDeleteCategory]);
|
||||
|
||||
|
||||
const columns = useMemo(() => [
|
||||
{
|
||||
@@ -79,11 +79,11 @@ const ItemsCategoryList = ({
|
||||
width: 50,
|
||||
disableResizing: false
|
||||
},
|
||||
], [actionMenuList]);
|
||||
], [actionMenuList,formatMessage]);
|
||||
|
||||
const handelFetchData = useCallback((...params) => {
|
||||
onFetchData && onFetchData(...params);
|
||||
}, []);
|
||||
}, [onFetchData]);
|
||||
|
||||
const handleSelectedRowsChange = useCallback((selectedRows) => {
|
||||
onSelectedRowsChange && onSelectedRowsChange(selectedRows.map(s => s.original));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useMemo, useCallback,useEffect } from 'react';
|
||||
import * as Yup from 'yup';
|
||||
import { useFormik, Formik } from 'formik';
|
||||
import { useFormik } from 'formik';
|
||||
import {
|
||||
FormGroup,
|
||||
MenuItem,
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
import { Row, Col } from 'react-grid-system';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { queryCache } from 'react-query';
|
||||
import { useParams, useHistory } from 'react-router-dom';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { pick } from 'lodash';
|
||||
import classNames from 'classnames';
|
||||
|
||||
@@ -30,7 +30,6 @@ import withItemCategories from 'containers/Items/withItemCategories'
|
||||
import withAccounts from 'containers/Accounts/withAccounts';
|
||||
import withMediaActions from 'containers/Media/withMediaActions';
|
||||
import useMedia from 'hooks/useMedia';
|
||||
import withItems from './withItems';
|
||||
import withItemDetail from 'containers/Items/withItemDetail'
|
||||
import withDashboardActions from 'containers/Dashboard/withDashboard';
|
||||
import withAccountDetail from 'containers/Accounts/withAccountDetail';
|
||||
@@ -62,9 +61,7 @@ const ItemForm = ({
|
||||
|
||||
const history = useHistory();
|
||||
const { formatMessage } = useIntl();
|
||||
const {id} =useParams();
|
||||
const {
|
||||
files,
|
||||
setFiles,
|
||||
saveMedia,
|
||||
deletedFiles,
|
||||
@@ -80,7 +77,7 @@ const ItemForm = ({
|
||||
{ value: 'service', label: formatMessage({id:'service'}) },
|
||||
{ value: 'inventory', label: formatMessage({id:'inventory'}) },
|
||||
{ value: 'non-inventory', label: formatMessage({id:'non_inventory'}) },
|
||||
], []);
|
||||
], [formatMessage]);
|
||||
|
||||
const validationSchema = Yup.object().shape({
|
||||
active: Yup.boolean(),
|
||||
@@ -133,7 +130,7 @@ const ItemForm = ({
|
||||
itemDetail && itemDetail.id ?
|
||||
changePageTitle(formatMessage({id:'edit_item_details'})) :
|
||||
changePageTitle(formatMessage({id:'new_item'}));
|
||||
}, [changePageTitle,itemDetail]);
|
||||
}, [changePageTitle,itemDetail,formatMessage]);
|
||||
|
||||
const {
|
||||
getFieldProps,
|
||||
@@ -270,7 +267,7 @@ const ItemForm = ({
|
||||
}
|
||||
});
|
||||
},
|
||||
[setDeletedFiles, deletedFiles]
|
||||
[setDeletedFiles, deletedFiles,]
|
||||
);
|
||||
|
||||
const handleCancelClickBtn = () => {
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
import React, { useEffect,useCallback } from 'react';
|
||||
import React, {useCallback } from 'react';
|
||||
import { useParams,useHistory } from 'react-router-dom';
|
||||
import { useQuery } from 'react-query';
|
||||
|
||||
import ItemForm from 'containers/Items/ItemForm';
|
||||
import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
||||
import ItemForm from 'containers/Items/ItemForm';
|
||||
|
||||
import withDashboard from 'containers/Dashboard/withDashboard';
|
||||
import withAccountsActions from 'containers/Accounts/withAccountsActions';
|
||||
import withItemCategoriesActions from 'containers/Items/withItemCategoriesActions';
|
||||
import withItemsActions from './withItemsActions';
|
||||
|
||||
import { compose } from 'utils';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import withItemsActions from './withItemsActions';
|
||||
|
||||
|
||||
const ItemFormContainer = ({
|
||||
@@ -28,7 +27,6 @@ const ItemFormContainer = ({
|
||||
requestFetchItemCategories,
|
||||
}) => {
|
||||
const { id } = useParams();
|
||||
const {formatMessage} =useIntl()
|
||||
const history = useHistory();
|
||||
|
||||
const fetchAccounts = useQuery('accounts-list',
|
||||
@@ -50,7 +48,7 @@ const handleFormSubmit =useCallback((payload)=>{
|
||||
const handleCancel =useCallback(()=>{
|
||||
|
||||
history.push('/items/new');
|
||||
},[])
|
||||
},[history])
|
||||
|
||||
return (
|
||||
<DashboardInsider
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
Position,
|
||||
PopoverInteractionKind,
|
||||
} from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import classNames from 'classnames';
|
||||
import { connect } from 'react-redux';
|
||||
import { If } from 'components';
|
||||
@@ -21,7 +22,6 @@ import withDialog from 'connectors/Dialog.connector';
|
||||
import withDashboard from 'containers/Dashboard/withDashboard';
|
||||
|
||||
import { compose } from 'utils';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
const ItemsCategoryActionsBar = ({
|
||||
// #withResourceDetail
|
||||
|
||||
@@ -8,13 +8,13 @@ import {
|
||||
Position,
|
||||
} from '@blueprintjs/core'
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import {compose} from 'utils';
|
||||
import DataTable from 'components/DataTable';
|
||||
import Icon from 'components/Icon';
|
||||
import Money from 'components/Money';
|
||||
|
||||
import withItems from 'containers/Items/withItems';
|
||||
import LoadingIndicator from 'components/LoadingIndicator';
|
||||
import withItems from 'containers/Items/withItems';
|
||||
import {compose} from 'utils';
|
||||
|
||||
const ItemsDataTable = ({
|
||||
loading,
|
||||
@@ -48,8 +48,8 @@ const ItemsDataTable = ({
|
||||
);
|
||||
|
||||
|
||||
const handleDeleteItem = (item) => () => { onDeleteItem(item); };
|
||||
|
||||
// const handleDeleteItem = (item) => () => { onDeleteItem(item); };
|
||||
const handleDeleteItem =useCallback((item)=>()=>{onDeleteItem(item)},[onDeleteItem])
|
||||
const actionMenuList = useCallback((item) =>
|
||||
(<Menu>
|
||||
<MenuItem text={<T id={'view_details'}/>} />
|
||||
@@ -112,7 +112,7 @@ const ItemsDataTable = ({
|
||||
className: 'actions',
|
||||
width: 50,
|
||||
},
|
||||
], [actionMenuList]);
|
||||
], [actionMenuList,formatMessage]);
|
||||
|
||||
const selectionColumn = useMemo(() => ({
|
||||
minWidth: 42,
|
||||
@@ -122,7 +122,7 @@ const ItemsDataTable = ({
|
||||
|
||||
const handleFetchData = useCallback((...args) => {
|
||||
onFetchData && onFetchData(...args)
|
||||
}, [onFetchData]);
|
||||
}, []);
|
||||
|
||||
const handleSelectedRowsChange = useCallback((selectedRows) => {
|
||||
onSelectedRowsChange && onSelectedRowsChange(selectedRows.map(s => s.original));
|
||||
@@ -151,4 +151,8 @@ export default compose(
|
||||
itemsCurrentPage,
|
||||
itemsTableLoading,
|
||||
})),
|
||||
)(ItemsDataTable);
|
||||
)(ItemsDataTable);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ function ItemsList({
|
||||
});
|
||||
setDeleteItem(false);
|
||||
});
|
||||
}, [requestDeleteItem, deleteItem]);
|
||||
}, [requestDeleteItem, deleteItem,formatMessage]);
|
||||
|
||||
// Handle fetch data table.
|
||||
const handleFetchData = useCallback(({ pageIndex, pageSize, sortBy }) => {
|
||||
@@ -155,7 +155,7 @@ function ItemsList({
|
||||
}).catch((errors) => {
|
||||
setBulkDelete(false);
|
||||
});
|
||||
}, [requestDeleteBulkItems, bulkDelete]);
|
||||
}, [requestDeleteBulkItems, bulkDelete,formatMessage]);
|
||||
|
||||
// Handle cancel accounts bulk delete.
|
||||
const handleCancelBulkDelete = useCallback(() => {
|
||||
|
||||
@@ -20,7 +20,7 @@ import withDashboard from 'containers/Dashboard/withDashboard';
|
||||
import withViewDetail from 'containers/Views/withViewDetails';
|
||||
import withItems from 'containers/Items/withItems';
|
||||
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T} from 'react-intl';
|
||||
|
||||
function ItemsViewsTabs({
|
||||
// #withViewDetail
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { connect } from 'react-redux';
|
||||
import t from 'store/types';
|
||||
import { getItemById } from 'store/items/items.reducer';
|
||||
|
||||
const mapStateToProps = (state, props) => ({
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import {Tabs, Tab} from '@blueprintjs/core';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import PreferencesSubContent from 'components/Preferences/PreferencesSubContent';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T} from 'react-intl';
|
||||
|
||||
export default function AccountsPreferences() {
|
||||
const history = useHistory();
|
||||
|
||||
@@ -12,7 +12,7 @@ function CurrenciesActions({
|
||||
}) {
|
||||
const handleClickNewCurrency = useCallback(() => {
|
||||
openDialog('currency-form');
|
||||
}, []);
|
||||
}, [openDialog]);
|
||||
|
||||
return (
|
||||
<div class="users-actions">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useCallback, useState, useMemo } from 'react';
|
||||
import React, { useCallback, useState, useMemo } from 'react';
|
||||
import {
|
||||
Button,
|
||||
Popover,
|
||||
@@ -41,17 +41,25 @@ function CurrenciesList({
|
||||
const fetchCurrencies = useQuery(['currencies-table'],
|
||||
() => requestFetchCurrencies());
|
||||
|
||||
const handleEditCurrency = (currency) => {
|
||||
// const handleEditCurrency = (currency) => {
|
||||
// openDialog('currency-form', {
|
||||
// action: 'edit',
|
||||
// currencyCode: currency.currency_code,
|
||||
// });
|
||||
// };
|
||||
const handleEditCurrency =useCallback((currency)=>{
|
||||
openDialog('currency-form', {
|
||||
action: 'edit',
|
||||
currencyCode: currency.currency_code,
|
||||
});
|
||||
};
|
||||
action: 'edit',
|
||||
currencyCode: currency.currency_code,
|
||||
});
|
||||
},[openDialog])
|
||||
|
||||
const onDeleteCurrency = (currency) => {
|
||||
setDeleteCurrencyState(currency);
|
||||
};
|
||||
|
||||
// const onDeleteCurrency = (currency) => {
|
||||
// setDeleteCurrencyState(currency);
|
||||
// };
|
||||
|
||||
const onDeleteCurrency =useCallback((currency)=>{setDeleteCurrencyState(currency);},[])
|
||||
const handleCancelCurrencyDelete = () => {
|
||||
setDeleteCurrencyState(false);
|
||||
};
|
||||
@@ -65,7 +73,7 @@ function CurrenciesList({
|
||||
});
|
||||
}
|
||||
);
|
||||
}, [deleteCurrencyState]);
|
||||
}, [requestDeleteCurrency,deleteCurrencyState,formatMessage]);
|
||||
|
||||
const actionMenuList = useCallback((currency) => (
|
||||
<Menu>
|
||||
@@ -78,7 +86,7 @@ function CurrenciesList({
|
||||
onClick={() => onDeleteCurrency(currency)}
|
||||
/>
|
||||
</Menu>
|
||||
), []);
|
||||
), [handleEditCurrency,onDeleteCurrency]);
|
||||
|
||||
const columns = useMemo(() => [
|
||||
{
|
||||
@@ -110,11 +118,11 @@ function CurrenciesList({
|
||||
className: 'actions',
|
||||
width: 50,
|
||||
},
|
||||
], [actionMenuList]);
|
||||
], [actionMenuList,formatMessage]);
|
||||
|
||||
const handleDatatableFetchData = useCallback(() => {
|
||||
onFetchData && onFetchData();
|
||||
}, []);
|
||||
}, [onFetchData]);
|
||||
|
||||
return (
|
||||
<LoadingIndicator>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useState, useCallback, useMemo, useEffect } from 'react';
|
||||
import React, { useState} from 'react';
|
||||
import { useFormik } from 'formik';
|
||||
import * as Yup from 'yup';
|
||||
import {
|
||||
@@ -13,6 +13,7 @@ import classNames from 'classnames';
|
||||
import { TimezonePicker } from '@blueprintjs/timezone';
|
||||
import { Select } from '@blueprintjs/select';
|
||||
import { useQuery } from 'react-query';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
import { compose, optionsMapToArray } from 'utils';
|
||||
|
||||
@@ -21,7 +22,6 @@ import AppToaster from 'components/AppToaster';
|
||||
|
||||
import withSettings from 'containers/Settings/withSettings';
|
||||
import withSettingsActions from 'containers/Settings/withSettingsActions';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
|
||||
function GeneralPreferences({
|
||||
@@ -79,13 +79,10 @@ function GeneralPreferences({
|
||||
|
||||
const {
|
||||
errors,
|
||||
values,
|
||||
touched,
|
||||
isSubmitting,
|
||||
setFieldValue,
|
||||
getFieldProps,
|
||||
handleSubmit,
|
||||
resetForm,
|
||||
} = useFormik({
|
||||
enableReinitialize: true,
|
||||
initialValues: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useCallback } from 'react';
|
||||
import { Tabs, Tab, Button, Intent } from '@blueprintjs/core';
|
||||
import React from 'react';
|
||||
import { Tabs, Tab } from '@blueprintjs/core';
|
||||
import PreferencesSubContent from 'components/Preferences/PreferencesSubContent';
|
||||
import connector from 'connectors/UsersPreferences.connector';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ function UsersActions({
|
||||
}) {
|
||||
const onClickNewUser = useCallback(() => {
|
||||
openDialog('user-form');
|
||||
}, []);
|
||||
}, [openDialog]);
|
||||
|
||||
return (
|
||||
<div claass="preferences-actions">
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
Tag
|
||||
} from '@blueprintjs/core';
|
||||
import { snakeCase } from 'lodash';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
import Icon from 'components/Icon';
|
||||
import LoadingIndicator from 'components/LoadingIndicator';
|
||||
@@ -25,7 +26,6 @@ import withUsers from 'containers/Users/withUsers';
|
||||
import withUsersActions from 'containers/Users/withUsersActions';
|
||||
|
||||
import { compose } from 'utils';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
|
||||
function UsersListPreferences({
|
||||
@@ -65,7 +65,7 @@ function UsersListPreferences({
|
||||
setInactiveUserState(false);
|
||||
AppToaster.show({ message: formatMessage({id:'the_user_has_been_successfully_inactivated'}) });
|
||||
});
|
||||
}, [inactiveUserState, requestInactiveUser, requestFetchUsers]);
|
||||
}, [inactiveUserState, requestInactiveUser, requestFetchUsers,formatMessage]);
|
||||
|
||||
const onDeleteUser = (user) => {
|
||||
setDeleteUserState(user);
|
||||
@@ -160,7 +160,7 @@ function UsersListPreferences({
|
||||
className: 'actions',
|
||||
width: 50,
|
||||
},
|
||||
], [actionMenuList]);
|
||||
], [actionMenuList,formatMessage]);
|
||||
|
||||
const handelDataTableFetchData = useCallback(() => {
|
||||
onFetchData && onFetchData();
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useCallback, useMemo } from 'react';
|
||||
import { useFormik } from 'formik';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
import { useParams, useHistory } from 'react-router-dom';
|
||||
import {useHistory } from 'react-router-dom';
|
||||
import {
|
||||
InputGroup,
|
||||
FormGroup,
|
||||
@@ -48,7 +48,7 @@ function ViewForm({
|
||||
return () => {
|
||||
changePageSubtitle('');
|
||||
};
|
||||
}, []);
|
||||
}, [changePageSubtitle,resourceMetadata.label]);
|
||||
|
||||
const [draggedColumns, setDraggedColumn] = useState([
|
||||
...(viewMeta && viewMeta.columns ? viewMeta.columns : []),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useEffect, useState, useMemo, useCallback} from 'react';
|
||||
import React, {useEffect, useState, useCallback} from 'react';
|
||||
import { useAsync } from 'react-use';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { Intent, Alert } from '@blueprintjs/core';
|
||||
@@ -57,7 +57,7 @@ function ViewFormPage({
|
||||
return () => {
|
||||
changePageTitle('');
|
||||
};
|
||||
}, [viewId, changePageTitle]);
|
||||
}, [viewId, changePageTitle,formatMessage]);
|
||||
|
||||
|
||||
// Handle delete view button click.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useState, useRef, useMemo, useCallback } from 'react';
|
||||
import React, { useState, useRef,useCallback } from 'react';
|
||||
import {
|
||||
ProgressBar,
|
||||
Classes,
|
||||
|
||||
@@ -18,7 +18,6 @@ export default {
|
||||
description: 'Description',
|
||||
from_date: 'From date',
|
||||
to_date: 'To date',
|
||||
accounting_basis: 'Accounting basis',
|
||||
report_date_range: 'Report date range',
|
||||
log_in: 'Log in',
|
||||
forget_my_password: 'Forget my password',
|
||||
@@ -39,7 +38,7 @@ export default {
|
||||
signing_in_or_creating:
|
||||
'By signing in or creating an account, you agree with our',
|
||||
terms_conditions: 'Terms & Conditions',
|
||||
and: 'and',
|
||||
and: 'And',
|
||||
privacy_statement: 'Privacy Statement',
|
||||
create_account: 'Create Account',
|
||||
success: 'Success',
|
||||
@@ -85,7 +84,6 @@ export default {
|
||||
category_name: 'Category Name',
|
||||
parent_category: 'Parent Category',
|
||||
new: 'New',
|
||||
new_category: 'New Category',
|
||||
invite_user: 'invite User',
|
||||
your_access_to_your_team:
|
||||
'Your teammate will get an email that gives them access to your team.',
|
||||
@@ -171,7 +169,6 @@ export default {
|
||||
edit_custom_view: 'Edit Custom View',
|
||||
new_custom_view: 'New Custom View',
|
||||
view_name: 'View Name',
|
||||
new_conditional: 'New Conditional',
|
||||
item: 'Item',
|
||||
service_has_been_successful_created:
|
||||
'{service} {name} has been successfully created.',
|
||||
@@ -203,6 +200,11 @@ export default {
|
||||
'The journal #{number} has been successfully created.',
|
||||
the_journal_has_been_successfully_edited:
|
||||
'The journal #{number} has been successfully edited.',
|
||||
the_journal_has_been_successfully_deleted:
|
||||
'The journal has been successfully deleted',
|
||||
the_manual_journal_id_has_been_published:
|
||||
'The manual journal id has been published',
|
||||
|
||||
credit: 'Credit',
|
||||
debit: 'Debit',
|
||||
once_delete_this_item_you_will_able_to_restore_it: `Once you delete this item, you won\'t be able to restore the item later. Are you sure you want to delete ?<br /><br />If you're not sure, you can inactivate it instead.`,
|
||||
|
||||
@@ -6,7 +6,7 @@ const symbolToString =
|
||||
const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;
|
||||
|
||||
function printNumber(val) {
|
||||
if (val != +val) return 'NaN';
|
||||
if (val !== +val) return 'NaN';
|
||||
const isNegativeZero = val === 0 && 1 / val < 0;
|
||||
return isNegativeZero ? '-0' : '' + val;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import t from 'store/types';
|
||||
import { createReducer, combineReducers } from '@reduxjs/toolkit';
|
||||
import { createReducer} from '@reduxjs/toolkit';
|
||||
import { createTableQueryReducers } from 'store/queryReducers';
|
||||
|
||||
const initialState = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {pickItemsFromIds} from 'store/selectors';
|
||||
import { getResourceField, getResourceColumn } from 'store/resources/resources.reducer';
|
||||
import {getResourceColumn } from 'store/resources/resources.reducer';
|
||||
|
||||
export const getResourceViews = (state, resourceName) => {
|
||||
const resourceViewsIds = state.views.resourceViews[resourceName] || [];
|
||||
|
||||
Reference in New Issue
Block a user