mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-23 16:19:49 +00:00
chore: Refactoring all import directories to alias and all .js|.jsx renamed to be .ts|.tsx
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
import '../../../style/pages/Preferences/warehousesList.scss';
|
||||
import '@/style/pages/Preferences/warehousesList.scss';
|
||||
|
||||
import WarehousesGrid from './WarehousesGrid';
|
||||
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
|
||||
import { compose } from 'utils';
|
||||
import withDashboardActions from '@/containers/Dashboard/withDashboardActions';
|
||||
import { compose } from '@/utils';
|
||||
|
||||
/**
|
||||
* Warehouses.
|
||||
@@ -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';
|
||||
|
||||
/**
|
||||
* Warehouse actions.
|
||||
@@ -1,19 +0,0 @@
|
||||
import React from 'react';
|
||||
|
||||
const WarehouseDeleteAlert = React.lazy(() =>
|
||||
import('../../Alerts/Warehouses/WarehouseDeleteAlert'),
|
||||
);
|
||||
// const WarehouseMarkPrimaryAlert = React.lazy(() =>
|
||||
// import('../../Alerts/Warehouses/WarehouseMarkPrimaryAlert'),
|
||||
// );
|
||||
|
||||
/**
|
||||
* Warehouses alerts.
|
||||
*/
|
||||
export default [
|
||||
{ name: 'warehouse-delete', component: WarehouseDeleteAlert },
|
||||
// {
|
||||
// name: 'warehouse-mark-primary',
|
||||
// component: WarehouseMarkPrimaryAlert,
|
||||
// },
|
||||
];
|
||||
10
src/containers/Preferences/Warehouses/WarehousesAlerts.tsx
Normal file
10
src/containers/Preferences/Warehouses/WarehousesAlerts.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import React from 'react';
|
||||
|
||||
const WarehouseDeleteAlert = React.lazy(
|
||||
() => import('@/containers/Alerts/Warehouses/WarehouseDeleteAlert'),
|
||||
);
|
||||
|
||||
/**
|
||||
* Warehouses alerts.
|
||||
*/
|
||||
export default [{ name: 'warehouse-delete', component: WarehouseDeleteAlert }];
|
||||
@@ -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 WarehousesEmptyStatus({
|
||||
// #withDialogActions
|
||||
@@ -3,13 +3,13 @@ import intl from 'react-intl-universal';
|
||||
import { Intent } from '@blueprintjs/core';
|
||||
import { ContextMenu2 } from '@blueprintjs/popover2';
|
||||
|
||||
import { AppToaster } from 'components';
|
||||
import { AppToaster } from '@/components';
|
||||
import { WarehouseContextMenu, WarehousesGridItemBox } from './components';
|
||||
import { useMarkWarehouseAsPrimary } from 'hooks/query';
|
||||
import { useMarkWarehouseAsPrimary } from '@/hooks/query';
|
||||
|
||||
import withAlertsActions from '../../Alert/withAlertActions';
|
||||
import withDialogActions from '../../Dialog/withDialogActions';
|
||||
import { compose } from 'utils';
|
||||
import withAlertsActions from '@/containers/Alert/withAlertActions';
|
||||
import withDialogActions from '@/containers/Dialog/withDialogActions';
|
||||
import { compose } from '@/utils';
|
||||
|
||||
/**
|
||||
* warehouse grid item.
|
||||
@@ -1,12 +1,12 @@
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import classNames from 'classnames';
|
||||
import { CLASSES } from 'common/classes';
|
||||
import { useWarehouses, useCashflowAccounts } from 'hooks/query';
|
||||
import { CLASSES } from '@/constants/classes';
|
||||
import { useWarehouses } from '@/hooks/query';
|
||||
import { isEmpty } from 'lodash';
|
||||
|
||||
import { Features } from 'common';
|
||||
import { useFeatureCan } from 'hooks/state';
|
||||
import { Features } from '@/constants';
|
||||
import { useFeatureCan } from '@/hooks/state';
|
||||
|
||||
const WarehousesContext = React.createContext();
|
||||
|
||||
@@ -9,8 +9,8 @@ import {
|
||||
Classes,
|
||||
} from '@blueprintjs/core';
|
||||
|
||||
import { Icon, If } from '../../../components';
|
||||
import { safeCallback } from 'utils';
|
||||
import { Icon, If } from '@/components';
|
||||
import { safeCallback } from '@/utils';
|
||||
|
||||
const WAREHOUSES_SKELETON_N = 4;
|
||||
|
||||
@@ -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