mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-23 08:10:32 +00:00
chore: Refactoring all import directories to alias and all .js|.jsx renamed to be .ts|.tsx
This commit is contained in:
@@ -4,10 +4,10 @@ import intl from 'react-intl-universal';
|
||||
import BranchesDataTable from './BranchesDataTable';
|
||||
import BranchesEmptyStatus from './BranchesEmptyStatus';
|
||||
|
||||
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
|
||||
import withDashboardActions from '@/containers/Dashboard/withDashboardActions';
|
||||
import { useBranchesContext } from './BranchesProvider';
|
||||
|
||||
import { compose } from 'utils';
|
||||
import { compose } from '@/utils';
|
||||
|
||||
function Branches({
|
||||
// #withDashboardActions
|
||||
@@ -1,10 +1,10 @@
|
||||
import React from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
|
||||
import { Features } from 'common';
|
||||
import { FeatureCan, FormattedMessage as T, Icon } from 'components';
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
import { compose } from 'utils';
|
||||
import { Features } from '@/constants';
|
||||
import { FeatureCan, FormattedMessage as T, Icon } from '@/components';
|
||||
import withDialogActions from '@/containers/Dialog/withDialogActions';
|
||||
import { compose } from '@/utils';
|
||||
|
||||
function BranchesActions({
|
||||
//#ownProps
|
||||
@@ -1,16 +0,0 @@
|
||||
import React from 'react';
|
||||
|
||||
const BranchDeleteAlert = React.lazy(() =>
|
||||
import('../../Alerts/Branches/BranchDeleteAlert'),
|
||||
);
|
||||
// const BranchMarkPrimaryAlert = React.lazy(() =>
|
||||
// import('../../Alerts/Branches/BranchMarkPrimaryAlert'),
|
||||
// );
|
||||
|
||||
export default [
|
||||
{ name: 'branch-delete', component: BranchDeleteAlert },
|
||||
// {
|
||||
// name: 'branch-mark-primary',
|
||||
// component: BranchMarkPrimaryAlert,
|
||||
// },
|
||||
];
|
||||
7
src/containers/Preferences/Branches/BranchesAlerts.tsx
Normal file
7
src/containers/Preferences/Branches/BranchesAlerts.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
const BranchDeleteAlert = React.lazy(
|
||||
() => import('@/containers/Alerts/Branches/BranchDeleteAlert'),
|
||||
);
|
||||
|
||||
export default [{ name: 'branch-delete', component: BranchDeleteAlert }];
|
||||
@@ -3,18 +3,17 @@ import intl from 'react-intl-universal';
|
||||
import styled from 'styled-components';
|
||||
import { Intent } from '@blueprintjs/core';
|
||||
|
||||
import 'style/pages/Preferences/branchesList.scss';
|
||||
import '@/style/pages/Preferences/branchesList.scss';
|
||||
|
||||
import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
|
||||
import { DataTable, Card, AppToaster } from 'components';
|
||||
import { DataTable, Card, AppToaster, TableSkeletonRows } from '@/components';
|
||||
import { useBranchesTableColumns, ActionsMenu } from './components';
|
||||
import { useBranchesContext } from './BranchesProvider';
|
||||
import { useMarkBranchAsPrimary } from 'hooks/query';
|
||||
import { useMarkBranchAsPrimary } from '@/hooks/query';
|
||||
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
import withAlertActions from 'containers/Alert/withAlertActions';
|
||||
import withDialogActions from '@/containers/Dialog/withDialogActions';
|
||||
import withAlertActions from '@/containers/Alert/withAlertActions';
|
||||
|
||||
import { compose } from 'utils';
|
||||
import { compose } from '@/utils';
|
||||
|
||||
/**
|
||||
* Branches data table.
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T, EmptyStatus } from '../../../components';
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
import { FormattedMessage as T, EmptyStatus } from '@/components';
|
||||
import withDialogActions from '@/containers/Dialog/withDialogActions';
|
||||
|
||||
import { compose } from 'utils';
|
||||
import { compose } from '@/utils';
|
||||
|
||||
function BranchesEmptyStatus({
|
||||
// #withDialogActions
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { CLASSES } from 'common/classes';
|
||||
import { useBranches } from 'hooks/query';
|
||||
import { useFeatureCan } from 'hooks/state';
|
||||
import { Features } from 'common';
|
||||
import { CLASSES } from '@/constants/classes';
|
||||
import { useBranches } from '@/hooks/query';
|
||||
import { useFeatureCan } from '@/hooks/state';
|
||||
import { Features } from '@/constants';
|
||||
import { isEmpty } from 'lodash';
|
||||
|
||||
const BranchesContext = React.createContext();
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
import { Intent, Menu, MenuDivider, MenuItem } from '@blueprintjs/core';
|
||||
|
||||
import { safeCallback } from 'utils';
|
||||
import { Icon, If } from 'components';
|
||||
import { safeCallback } from '@/utils';
|
||||
import { Icon, If } from '@/components';
|
||||
|
||||
/**
|
||||
* Context menu of Branches.
|
||||
@@ -1,6 +1,6 @@
|
||||
import intl from 'react-intl-universal';
|
||||
import { Intent } from '@blueprintjs/core';
|
||||
import { AppToaster } from 'components';
|
||||
import { AppToaster } from '@/components';
|
||||
|
||||
/**
|
||||
* Handle delete errors.
|
||||
Reference in New Issue
Block a user