mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-22 15:50:32 +00:00
chore: Refactoring all import directories to alias and all .js|.jsx renamed to be .ts|.tsx
This commit is contained in:
@@ -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.
|
||||
@@ -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.
|
||||
@@ -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);
|
||||
@@ -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,
|
||||
},
|
||||
];
|
||||
@@ -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,
|
||||
},
|
||||
];
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
@@ -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) =>
|
||||
@@ -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();
|
||||
Reference in New Issue
Block a user