chore: Refactoring all import directories to alias and all .js|.jsx renamed to be .ts|.tsx

This commit is contained in:
a.bouhuolia
2022-07-15 23:25:23 +02:00
parent cd08d0ee16
commit f00097f6c8
3846 changed files with 125197 additions and 128236 deletions

View File

@@ -1,15 +1,15 @@
import React from 'react';
import 'style/pages/InventoryAdjustments/List.scss';
import '@/style/pages/InventoryAdjustments/List.scss';
import { DashboardContentTable, DashboardPageContent } from 'components';
import { DashboardContentTable, DashboardPageContent } from '@/components';
import { InventoryAdjustmentsProvider } from './InventoryAdjustmentsProvider';
import InventoryAdjustmentTable from './InventoryAdjustmentTable';
import withInventoryAdjustments from './withInventoryAdjustments';
import { compose, transformTableStateToQuery } from 'utils';
import { compose, transformTableStateToQuery } from '@/utils';
/**
* Inventory Adjustment List.

View File

@@ -1,19 +1,18 @@
import React, { useCallback } from 'react';
import intl from 'react-intl-universal';
import { DataTable } from 'components';
import { TABLES } from 'common/tables';
import { DataTable } from '@/components';
import { TABLES } from '@/constants/tables';
import { useMemorizedColumnsWidths } from '@/hooks';
import { useInventoryAdjustmentsColumns, ActionsMenu } from './components';
import { useMemorizedColumnsWidths } from 'hooks';
import { useInventoryAdjustmentsContext } from './InventoryAdjustmentsProvider';
import withAlertsActions from 'containers/Alert/withAlertActions';
import withDrawerActions from 'containers/Drawer/withDrawerActions';
import withInventoryAdjustmentActions from './withInventoryAdjustmentActions';
import withInventoryAdjustments from './withInventoryAdjustments';
import withInventoryAdjustmentActions from './withInventoryAdjustmentActions';
import withAlertsActions from '@/containers/Alert/withAlertActions';
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
import { compose } from 'utils';
import { compose } from '@/utils';
/**
* Inventory adjustments datatable.

View File

@@ -1,24 +0,0 @@
import React from 'react';
import InventoryAdjustmentDataTable from './InventoryAdjustmentDataTable';
import { useInventoryAdjustmentsContext } from './InventoryAdjustmentsProvider';
import { compose } from 'utils';
/**
* Inventory adjustments view page.
*/
function InventoryAdjustmentsView({
// #withAlertsActions.
openAlert,
}) {
return (
<InventoryAdjustmentDataTable
inventoryAdjustments={inventoryAdjustments}
isLoading={isAdjustmentsLoading}
onDeleteInventoryAdjustment={handleDeleteInventoryAdjustment}
/>
);
}
export default compose(withAlertsActions)(InventoryAdjustmentsView);

View File

@@ -1,20 +0,0 @@
import React from 'react';
const InventoryAdjustmentDeleteAlert = React.lazy(() =>
import('../Alerts/Items/InventoryAdjustmentDeleteAlert'),
);
const InventoryAdjustmentPublishAlert = React.lazy(() =>
import('../Alerts/Items/InventoryAdjustmentPublishAlert'),
);
export default [
{
name: 'inventory-adjustment-delete',
component: InventoryAdjustmentDeleteAlert,
},
{
name: 'inventory-adjustment-publish',
component: InventoryAdjustmentPublishAlert,
},
];

View File

@@ -0,0 +1,20 @@
import React from 'react';
const InventoryAdjustmentDeleteAlert = React.lazy(
() => import('@/containers/Alerts/Items/InventoryAdjustmentDeleteAlert'),
);
const InventoryAdjustmentPublishAlert = React.lazy(
() => import('@/containers/Alerts/Items/InventoryAdjustmentPublishAlert'),
);
export default [
{
name: 'inventory-adjustment-delete',
component: InventoryAdjustmentDeleteAlert,
},
{
name: 'inventory-adjustment-publish',
component: InventoryAdjustmentPublishAlert,
},
];

View File

@@ -1,6 +1,6 @@
import React, { createContext } from 'react';
import DashboardInsider from 'components/Dashboard/DashboardInsider';
import { useInventoryAdjustments } from 'hooks/query';
import { DashboardInsider } from '@/components/Dashboard';
import { useInventoryAdjustments } from '@/hooks/query';
const InventoryAdjustmentsContext = createContext();

View File

@@ -1,4 +1,6 @@
import React from 'react';
import intl from 'react-intl-universal';
import moment from 'moment';
import {
Menu,
MenuDivider,
@@ -9,17 +11,14 @@ import {
Button,
Popover,
} from '@blueprintjs/core';
import intl from 'react-intl-universal';
import moment from 'moment';
import { FormattedMessage as T, Can } from 'components';
import { isNumber } from 'lodash';
import { Icon, Money, If } from 'components';
import { isBlank, safeCallback } from 'utils';
import { Icon, Money, If, FormattedMessage as T, Can } from '@/components';
import { isBlank, safeCallback } from '@/utils';
import {
InventoryAdjustmentAction,
AbilitySubject,
} from '../../common/abilityOption';
} from '@/constants/abilityOption';
/**
* Publish accessor

View File

@@ -1,5 +1,5 @@
import { connect } from 'react-redux';
import { setInventoryAdjustmentsTableState } from 'store/inventoryAdjustments/inventoryAdjustment.actions';
import { setInventoryAdjustmentsTableState } from '@/store/inventoryAdjustments/inventoryAdjustment.actions';
const mapDispatchToProps = (dispatch) => ({
setInventoryAdjustmentTableState: (queries) =>

View File

@@ -1,5 +1,5 @@
import { connect } from 'react-redux';
import { getInventroyAdjsTableStateFactory } from 'store/inventoryAdjustments/inventoryAdjustment.selector';
import { getInventroyAdjsTableStateFactory } from '@/store/inventoryAdjustments/inventoryAdjustment.selector';
export default (mapState) => {
const getInventoryAdjustmentTableState = getInventroyAdjsTableStateFactory();