mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
feat(warehouseTransfer): add crud warehouse transfer.
This commit is contained in:
@@ -16,6 +16,7 @@ export const TABLES = {
|
|||||||
CASHFLOW_Transactions: 'cashflow_transactions',
|
CASHFLOW_Transactions: 'cashflow_transactions',
|
||||||
CREDIT_NOTES: 'credit_notes',
|
CREDIT_NOTES: 'credit_notes',
|
||||||
VENDOR_CREDITS: 'vendor_credits',
|
VENDOR_CREDITS: 'vendor_credits',
|
||||||
|
WAREHOUSE_TRANSFERS:'warehouse_transfers'
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TABLE_SIZE = {
|
export const TABLE_SIZE = {
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ const WarehouseTransferDetailDrawerContext = React.createContext();
|
|||||||
* Warehouse transfer detail drawer provider.
|
* Warehouse transfer detail drawer provider.
|
||||||
*/
|
*/
|
||||||
function WarehouseTransferDetailDrawerProvider({
|
function WarehouseTransferDetailDrawerProvider({
|
||||||
warehouseTransferId = 5,
|
warehouseTransferId,
|
||||||
...props
|
...props
|
||||||
}) {
|
}) {
|
||||||
// Handle fetch invoice detail.
|
// Handle fetch warehouse transfer detail.
|
||||||
const { data: warehouseTransfer, isLoading: isWarehouseTransferLoading } =
|
const { data: warehouseTransfer, isLoading: isWarehouseTransferLoading } =
|
||||||
useWarehouseTransfer(warehouseTransferId, {
|
useWarehouseTransfer(warehouseTransferId, {
|
||||||
enabled: !!warehouseTransferId,
|
enabled: !!warehouseTransferId,
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ function WarehouseTransferForm({
|
|||||||
// Form initial values.
|
// Form initial values.
|
||||||
const initialValues = React.useMemo(
|
const initialValues = React.useMemo(
|
||||||
() => ({
|
() => ({
|
||||||
...(!isEmpty(null)
|
...(!isEmpty(warehouseTransfer)
|
||||||
? { ...transformToEditForm(null) }
|
? { ...transformToEditForm(warehouseTransfer) }
|
||||||
: {
|
: {
|
||||||
...defaultWarehouseTransfer,
|
...defaultWarehouseTransfer,
|
||||||
entries: orderingLinesIndexes(defaultWarehouseTransfer.entries),
|
entries: orderingLinesIndexes(defaultWarehouseTransfer.entries),
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { useParams } from 'react-router-dom';
|
||||||
|
|
||||||
import '../../../style/pages/WarehouseTransfers/PageForm.scss'
|
import '../../../style/pages/WarehouseTransfers/PageForm.scss';
|
||||||
import WarehouseTransferForm from './WarehouseTransferForm';
|
import WarehouseTransferForm from './WarehouseTransferForm';
|
||||||
import { WarehouseTransferFormProvider } from './WarehouseTransferFormProvider';
|
import { WarehouseTransferFormProvider } from './WarehouseTransferFormProvider';
|
||||||
|
|
||||||
@@ -8,8 +9,10 @@ import { WarehouseTransferFormProvider } from './WarehouseTransferFormProvider';
|
|||||||
* WarehouseTransfer form page.
|
* WarehouseTransfer form page.
|
||||||
*/
|
*/
|
||||||
export default function WarehouseTransferFormPage() {
|
export default function WarehouseTransferFormPage() {
|
||||||
|
const { id } = useParams();
|
||||||
|
const idAsInteger = parseInt(id, 10);
|
||||||
return (
|
return (
|
||||||
<WarehouseTransferFormProvider warehouseTransferId={null}>
|
<WarehouseTransferFormProvider warehouseTransferId={idAsInteger}>
|
||||||
<WarehouseTransferForm />
|
<WarehouseTransferForm />
|
||||||
</WarehouseTransferFormProvider>
|
</WarehouseTransferFormProvider>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
|||||||
import {
|
import {
|
||||||
useItems,
|
useItems,
|
||||||
useWarehouses,
|
useWarehouses,
|
||||||
|
useWarehouseTransfer,
|
||||||
useCreateWarehouseTransfer,
|
useCreateWarehouseTransfer,
|
||||||
useEditWarehouseTransfer,
|
useEditWarehouseTransfer,
|
||||||
} from 'hooks/query';
|
} from 'hooks/query';
|
||||||
@@ -24,6 +25,12 @@ function WarehouseTransferFormProvider({ warehouseTransferId, ...props }) {
|
|||||||
stringified_filter_roles: ITEMS_FILTER_ROLES_QUERY,
|
stringified_filter_roles: ITEMS_FILTER_ROLES_QUERY,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Handle fetch warehouse transfer detail.
|
||||||
|
const { data: warehouseTransfer, isLoading: isWarehouseTransferLoading } =
|
||||||
|
useWarehouseTransfer(warehouseTransferId, {
|
||||||
|
enabled: !!warehouseTransferId,
|
||||||
|
});
|
||||||
|
|
||||||
// Fetch warehouses list.
|
// Fetch warehouses list.
|
||||||
const {
|
const {
|
||||||
data: warehouses,
|
data: warehouses,
|
||||||
@@ -47,7 +54,7 @@ function WarehouseTransferFormProvider({ warehouseTransferId, ...props }) {
|
|||||||
const provider = {
|
const provider = {
|
||||||
items,
|
items,
|
||||||
warehouses,
|
warehouses,
|
||||||
warehouseTransfer: [],
|
warehouseTransfer,
|
||||||
|
|
||||||
isItemsFetching,
|
isItemsFetching,
|
||||||
isWarehouesFetching,
|
isWarehouesFetching,
|
||||||
@@ -58,9 +65,12 @@ function WarehouseTransferFormProvider({ warehouseTransferId, ...props }) {
|
|||||||
createWarehouseTransferMutate,
|
createWarehouseTransferMutate,
|
||||||
editWarehouseTransferMutate,
|
editWarehouseTransferMutate,
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardInsider
|
<DashboardInsider
|
||||||
loading={isItemsLoading || isWarehouesLoading}
|
loading={
|
||||||
|
isItemsLoading || isWarehouesLoading || isWarehouseTransferLoading
|
||||||
|
}
|
||||||
name={'warehouse-transfer-form'}
|
name={'warehouse-transfer-form'}
|
||||||
>
|
>
|
||||||
<WarehouseFormContext.Provider value={provider} {...props} />
|
<WarehouseFormContext.Provider value={provider} {...props} />
|
||||||
|
|||||||
@@ -18,6 +18,11 @@ import {
|
|||||||
} from 'components';
|
} from 'components';
|
||||||
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
|
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
|
||||||
|
|
||||||
|
import { useWarehouseTranfersListContext } from './WarehouseTransfersListProvider';
|
||||||
|
|
||||||
|
import withWarehouseTransfers from './withWarehouseTransfers';
|
||||||
|
import withWarehouseTransfersActions from './withWarehouseTransfersActions';
|
||||||
|
import withSettings from '../../Settings/withSettings';
|
||||||
import withSettingsActions from 'containers/Settings/withSettingsActions';
|
import withSettingsActions from 'containers/Settings/withSettingsActions';
|
||||||
|
|
||||||
import { compose } from 'utils';
|
import { compose } from 'utils';
|
||||||
@@ -26,11 +31,24 @@ import { compose } from 'utils';
|
|||||||
* Warehouse Transfers actions bar.
|
* Warehouse Transfers actions bar.
|
||||||
*/
|
*/
|
||||||
function WarehouseTransfersActionsBar({
|
function WarehouseTransfersActionsBar({
|
||||||
|
// #withWarehouseTransfers
|
||||||
|
warehouseTransferFilterRoles,
|
||||||
|
|
||||||
|
// #withWarehouseTransfersActions
|
||||||
|
setWarehouseTransferTableState,
|
||||||
|
|
||||||
|
// #withSettings
|
||||||
|
warehouseTransferTableSize,
|
||||||
|
|
||||||
// #withSettingsActions
|
// #withSettingsActions
|
||||||
addSetting,
|
addSetting,
|
||||||
}) {
|
}) {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
|
||||||
|
// credit note list context.
|
||||||
|
const { WarehouseTransferView, fields, refresh } =
|
||||||
|
useWarehouseTranfersListContext();
|
||||||
|
|
||||||
// Handle new warehouse transfer button click.
|
// Handle new warehouse transfer button click.
|
||||||
const handleClickNewWarehouseTransfer = () => {
|
const handleClickNewWarehouseTransfer = () => {
|
||||||
history.push('/warehouses-transfers/new');
|
history.push('/warehouses-transfers/new');
|
||||||
@@ -38,14 +56,19 @@ function WarehouseTransfersActionsBar({
|
|||||||
|
|
||||||
// Handle click a refresh warehouse transfers
|
// Handle click a refresh warehouse transfers
|
||||||
const handleRefreshBtnClick = () => {
|
const handleRefreshBtnClick = () => {
|
||||||
// refresh();
|
refresh();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handle views tab change.
|
// Handle views tab change.
|
||||||
const handleTabChange = (view) => {};
|
const handleTabChange = (view) => {
|
||||||
|
setWarehouseTransferTableState({ viewSlug: view ? view.slug : null });
|
||||||
|
};
|
||||||
|
|
||||||
// Handle table row size change.
|
// Handle table row size change.
|
||||||
const handleTableRowSizeChange = (size) => {};
|
const handleTableRowSizeChange = (size) => {
|
||||||
|
addSetting('warehouseTransfer', 'tableSize', size);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardActionsBar>
|
<DashboardActionsBar>
|
||||||
<NavbarGroup>
|
<NavbarGroup>
|
||||||
@@ -63,6 +86,22 @@ function WarehouseTransfersActionsBar({
|
|||||||
onClick={handleClickNewWarehouseTransfer}
|
onClick={handleClickNewWarehouseTransfer}
|
||||||
/>
|
/>
|
||||||
<NavbarDivider />
|
<NavbarDivider />
|
||||||
|
|
||||||
|
<AdvancedFilterPopover
|
||||||
|
advancedFilterProps={{
|
||||||
|
conditions: warehouseTransferFilterRoles,
|
||||||
|
defaultFieldKey: 'created_at',
|
||||||
|
fields: fields,
|
||||||
|
onFilterChange: (filterConditions) => {
|
||||||
|
setWarehouseTransferTableState({ filterRoles: filterConditions });
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<DashboardFilterButton
|
||||||
|
conditionsCount={warehouseTransferFilterRoles.length}
|
||||||
|
/>
|
||||||
|
</AdvancedFilterPopover>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
className={Classes.MINIMAL}
|
className={Classes.MINIMAL}
|
||||||
icon={<Icon icon={'print-16'} iconSize={'16'} />}
|
icon={<Icon icon={'print-16'} iconSize={'16'} />}
|
||||||
@@ -80,8 +119,8 @@ function WarehouseTransfersActionsBar({
|
|||||||
/>
|
/>
|
||||||
<NavbarDivider />
|
<NavbarDivider />
|
||||||
<DashboardRowsHeightButton
|
<DashboardRowsHeightButton
|
||||||
// initialValue={warehouseTransfersTableSize}
|
initialValue={warehouseTransferTableSize}
|
||||||
// onChange={handleTableRowSizeChange}
|
onChange={handleTableRowSizeChange}
|
||||||
/>
|
/>
|
||||||
<NavbarDivider />
|
<NavbarDivider />
|
||||||
</NavbarGroup>
|
</NavbarGroup>
|
||||||
@@ -89,11 +128,20 @@ function WarehouseTransfersActionsBar({
|
|||||||
<Button
|
<Button
|
||||||
className={Classes.MINIMAL}
|
className={Classes.MINIMAL}
|
||||||
icon={<Icon icon="refresh-16" iconSize={14} />}
|
icon={<Icon icon="refresh-16" iconSize={14} />}
|
||||||
// onClick={handleRefreshBtnClick}
|
onClick={handleRefreshBtnClick}
|
||||||
/>
|
/>
|
||||||
</NavbarGroup>
|
</NavbarGroup>
|
||||||
</DashboardActionsBar>
|
</DashboardActionsBar>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default compose(withSettingsActions)(WarehouseTransfersActionsBar);
|
export default compose(
|
||||||
|
withSettingsActions,
|
||||||
|
withWarehouseTransfersActions,
|
||||||
|
withWarehouseTransfers(({ warehouseTransferTableState }) => ({
|
||||||
|
warehouseTransferFilterRoles: warehouseTransferTableState.filterRoles,
|
||||||
|
})),
|
||||||
|
withSettings(({ warehouseTransferSettings }) => ({
|
||||||
|
warehouseTransferTableSize: warehouseTransferSettings?.tableSize,
|
||||||
|
})),
|
||||||
|
)(WarehouseTransfersActionsBar);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
|
|||||||
import TableSkeletonHeader from 'components/Datatable/TableHeaderSkeleton';
|
import TableSkeletonHeader from 'components/Datatable/TableHeaderSkeleton';
|
||||||
|
|
||||||
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
|
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
|
||||||
|
import withWarehouseTransfersActions from './withWarehouseTransfersActions';
|
||||||
import withDrawerActions from 'containers/Drawer/withDrawerActions';
|
import withDrawerActions from 'containers/Drawer/withDrawerActions';
|
||||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||||
import withAlertsActions from 'containers/Alert/withAlertActions';
|
import withAlertsActions from 'containers/Alert/withAlertActions';
|
||||||
@@ -25,6 +26,9 @@ import { compose } from 'utils';
|
|||||||
* Warehouse transfers datatable.
|
* Warehouse transfers datatable.
|
||||||
*/
|
*/
|
||||||
function WarehouseTransfersDataTable({
|
function WarehouseTransfersDataTable({
|
||||||
|
// #withWarehouseTransfersActions
|
||||||
|
setWarehouseTransferTableState,
|
||||||
|
|
||||||
// #withAlertsActions
|
// #withAlertsActions
|
||||||
openAlert,
|
openAlert,
|
||||||
|
|
||||||
@@ -33,15 +37,45 @@ function WarehouseTransfersDataTable({
|
|||||||
|
|
||||||
// #withDialogAction
|
// #withDialogAction
|
||||||
openDialog,
|
openDialog,
|
||||||
|
|
||||||
|
// #withSettings
|
||||||
|
warehouseTransferTableSize,
|
||||||
}) {
|
}) {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
|
||||||
// Warehouse transfers list context.
|
// Warehouse transfers list context.
|
||||||
const { isEmptyStatus } = useWarehouseTranfersListContext();
|
const {
|
||||||
|
warehousesTransfers,
|
||||||
|
pagination,
|
||||||
|
isEmptyStatus,
|
||||||
|
isWarehouseTransfersLoading,
|
||||||
|
isWarehouseTransfersFetching,
|
||||||
|
} = useWarehouseTranfersListContext();
|
||||||
|
|
||||||
// Invoices table columns.
|
// Invoices table columns.
|
||||||
const columns = useWarehouseTransfersTableColumns();
|
const columns = useWarehouseTransfersTableColumns();
|
||||||
|
|
||||||
|
// Local storage memorizing columns widths.
|
||||||
|
const [initialColumnsWidths, , handleColumnResizing] =
|
||||||
|
useMemorizedColumnsWidths(TABLES.WAREHOUSE_TRANSFERS);
|
||||||
|
|
||||||
|
// Handles fetch data once the table state change.
|
||||||
|
const handleDataTableFetchData = React.useCallback(
|
||||||
|
({ pageSize, pageIndex, sortBy }) => {
|
||||||
|
setWarehouseTransferTableState({
|
||||||
|
pageSize,
|
||||||
|
pageIndex,
|
||||||
|
sortBy,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
[setWarehouseTransferTableState],
|
||||||
|
);
|
||||||
|
|
||||||
|
// Display invoice empty status instead of the table.
|
||||||
|
if (isEmptyStatus) {
|
||||||
|
return <WarehouseTransfersEmptyStatus />;
|
||||||
|
}
|
||||||
|
|
||||||
// Handle view detail.
|
// Handle view detail.
|
||||||
const handleViewDetailWarehouseTransfer = ({ id }) => {
|
const handleViewDetailWarehouseTransfer = ({ id }) => {
|
||||||
openDrawer('warehouse-transfer-detail-drawer', { warehouseTransferId: id });
|
openDrawer('warehouse-transfer-detail-drawer', { warehouseTransferId: id });
|
||||||
@@ -64,41 +98,31 @@ function WarehouseTransfersDataTable({
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// Local storage memorizing columns widths.
|
|
||||||
const [initialColumnsWidths, , handleColumnResizing] =
|
|
||||||
useMemorizedColumnsWidths(TABLES.WAREHOUSETRANSFERS);
|
|
||||||
|
|
||||||
// Handles fetch data once the table state change.
|
|
||||||
const handleDataTableFetchData = React.useCallback(
|
|
||||||
({ pageSize, pageIndex, sortBy }) => {},
|
|
||||||
[],
|
|
||||||
);
|
|
||||||
|
|
||||||
// Display invoice empty status instead of the table.
|
|
||||||
if (isEmptyStatus) {
|
|
||||||
return <WarehouseTransfersEmptyStatus />;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardContentTable>
|
<DashboardContentTable>
|
||||||
<DataTable
|
<DataTable
|
||||||
columns={columns}
|
columns={columns}
|
||||||
data={[]}
|
data={warehousesTransfers}
|
||||||
// loading={}
|
loading={isWarehouseTransfersLoading}
|
||||||
// headerLoading={}
|
headerLoading={isWarehouseTransfersLoading}
|
||||||
// progressBarLoading={}
|
progressBarLoading={isWarehouseTransfersFetching}
|
||||||
onFetchData={handleDataTableFetchData}
|
onFetchData={handleDataTableFetchData}
|
||||||
manualSortBy={true}
|
manualSortBy={true}
|
||||||
selectionColumn={true}
|
selectionColumn={true}
|
||||||
noInitialFetch={true}
|
noInitialFetch={true}
|
||||||
sticky={true}
|
sticky={true}
|
||||||
|
pagination={true}
|
||||||
|
manualPagination={true}
|
||||||
|
pagesCount={pagination.pagesCount}
|
||||||
|
autoResetSortBy={false}
|
||||||
|
autoResetPage={false}
|
||||||
TableLoadingRenderer={TableSkeletonRows}
|
TableLoadingRenderer={TableSkeletonRows}
|
||||||
TableHeaderSkeletonRenderer={TableSkeletonHeader}
|
TableHeaderSkeletonRenderer={TableSkeletonHeader}
|
||||||
ContextMenu={ActionsMenu}
|
ContextMenu={ActionsMenu}
|
||||||
onCellClick={handleCellClick}
|
onCellClick={handleCellClick}
|
||||||
initialColumnsWidths={initialColumnsWidths}
|
initialColumnsWidths={initialColumnsWidths}
|
||||||
onColumnResizing={handleColumnResizing}
|
onColumnResizing={handleColumnResizing}
|
||||||
// size={invoicesTableSize}
|
size={warehouseTransferTableSize}
|
||||||
payload={{
|
payload={{
|
||||||
onViewDetails: handleViewDetailWarehouseTransfer,
|
onViewDetails: handleViewDetailWarehouseTransfer,
|
||||||
onDelete: handleDeleteWarehouseTransfer,
|
onDelete: handleDeleteWarehouseTransfer,
|
||||||
@@ -110,7 +134,11 @@ function WarehouseTransfersDataTable({
|
|||||||
}
|
}
|
||||||
export default compose(
|
export default compose(
|
||||||
withDashboardActions,
|
withDashboardActions,
|
||||||
|
withWarehouseTransfersActions,
|
||||||
withAlertsActions,
|
withAlertsActions,
|
||||||
withDrawerActions,
|
withDrawerActions,
|
||||||
withDialogActions,
|
withDialogActions,
|
||||||
|
withSettings(({ warehouseTransferSettings }) => ({
|
||||||
|
warehouseTransferTableSize: warehouseTransferSettings?.tableSize,
|
||||||
|
})),
|
||||||
)(WarehouseTransfersDataTable);
|
)(WarehouseTransfersDataTable);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default function WarehouseTransfersEmptyStatus() {
|
|||||||
intent={Intent.PRIMARY}
|
intent={Intent.PRIMARY}
|
||||||
large={true}
|
large={true}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
history.push('/warehouse-transfers/new');
|
history.push('/warehouses-transfers/new');
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<T id={'warehouse_transfer.action.new_warehouse_transfer'} />
|
<T id={'warehouse_transfer.action.new_warehouse_transfer'} />
|
||||||
|
|||||||
@@ -3,16 +3,36 @@ import React from 'react';
|
|||||||
// style..
|
// style..
|
||||||
import { DashboardPageContent } from 'components';
|
import { DashboardPageContent } from 'components';
|
||||||
import WarehouseTransfersActionsBar from './WarehouseTransfersActionsBar';
|
import WarehouseTransfersActionsBar from './WarehouseTransfersActionsBar';
|
||||||
|
|
||||||
import WarehouseTransfersViewTabs from './WarehouseTransfersViewTabs';
|
import WarehouseTransfersViewTabs from './WarehouseTransfersViewTabs';
|
||||||
import WarehouseTransfersDataTable from './WarehouseTransfersDataTable';
|
import WarehouseTransfersDataTable from './WarehouseTransfersDataTable';
|
||||||
|
|
||||||
import { WarehouseTransfersListProvider } from './WarehouseTransfersListProvider';
|
import withWarehouseTransfers from './withWarehouseTransfers';
|
||||||
import { compose } from 'utils';
|
import withWarehouseTransfersActions from './withWarehouseTransfersActions';
|
||||||
|
|
||||||
|
import { WarehouseTransfersListProvider } from './WarehouseTransfersListProvider';
|
||||||
|
import { transformTableStateToQuery, compose } from 'utils';
|
||||||
|
|
||||||
|
function WarehouseTransfersList({
|
||||||
|
// #withWarehouseTransfers
|
||||||
|
warehouseTransferTableState,
|
||||||
|
warehouseTransferTableStateChanged,
|
||||||
|
|
||||||
|
// #withWarehouseTransfersActions
|
||||||
|
resetWarehouseTransferTableState,
|
||||||
|
}) {
|
||||||
|
// Resets the warehouse transfer table state once the page unmount.
|
||||||
|
React.useEffect(
|
||||||
|
() => () => {
|
||||||
|
resetWarehouseTransferTableState();
|
||||||
|
},
|
||||||
|
[resetWarehouseTransferTableState],
|
||||||
|
);
|
||||||
|
|
||||||
function WarehouseTransfersList({}) {
|
|
||||||
return (
|
return (
|
||||||
<WarehouseTransfersListProvider>
|
<WarehouseTransfersListProvider
|
||||||
|
query={transformTableStateToQuery(warehouseTransferTableState)}
|
||||||
|
tableStateChanged={warehouseTransferTableStateChanged}
|
||||||
|
>
|
||||||
<WarehouseTransfersActionsBar />
|
<WarehouseTransfersActionsBar />
|
||||||
<DashboardPageContent>
|
<DashboardPageContent>
|
||||||
<WarehouseTransfersViewTabs />
|
<WarehouseTransfersViewTabs />
|
||||||
@@ -22,4 +42,12 @@ function WarehouseTransfersList({}) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default WarehouseTransfersList;
|
export default compose(
|
||||||
|
withWarehouseTransfersActions,
|
||||||
|
withWarehouseTransfers(
|
||||||
|
({ warehouseTransferTableState, warehouseTransferTableStateChanged }) => ({
|
||||||
|
warehouseTransferTableState,
|
||||||
|
warehouseTransferTableStateChanged,
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
)(WarehouseTransfersList);
|
||||||
|
|||||||
@@ -2,22 +2,74 @@ import React from 'react';
|
|||||||
import { isEmpty } from 'lodash';
|
import { isEmpty } from 'lodash';
|
||||||
|
|
||||||
import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
||||||
|
import {
|
||||||
|
useResourceViews,
|
||||||
|
useResourceMeta,
|
||||||
|
useWarehousesTransfers,
|
||||||
|
useRefreshWarehouseTransfers,
|
||||||
|
} from 'hooks/query';
|
||||||
|
|
||||||
|
import { getFieldsFromResourceMeta } from 'utils';
|
||||||
|
|
||||||
const WarehouseTransfersListContext = React.createContext();
|
const WarehouseTransfersListContext = React.createContext();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WarehouseTransfer data provider
|
* WarehouseTransfer data provider
|
||||||
*/
|
*/
|
||||||
function WarehouseTransfersListProvider({ ...props }) {
|
function WarehouseTransfersListProvider({
|
||||||
|
query,
|
||||||
|
tableStateChanged,
|
||||||
|
...props
|
||||||
|
}) {
|
||||||
|
// warehouse transfers refresh action.
|
||||||
|
const { refresh } = useRefreshWarehouseTransfers();
|
||||||
|
|
||||||
|
// Fetch warehouse transfers list according to the given custom view id.
|
||||||
|
const {
|
||||||
|
data: { warehousesTransfers, pagination, filterMeta },
|
||||||
|
isFetching: isWarehouseTransfersFetching,
|
||||||
|
isLoading: isWarehouseTransfersLoading,
|
||||||
|
} = useWarehousesTransfers(query, { keepPreviousData: true });
|
||||||
|
|
||||||
// Detarmines the datatable empty status.
|
// Detarmines the datatable empty status.
|
||||||
const isEmptyStatus = false;
|
const isEmptyStatus =
|
||||||
|
isEmpty(warehousesTransfers) && !isWarehouseTransfersLoading;
|
||||||
|
|
||||||
|
// Fetch create notes resource views and fields.
|
||||||
|
const { data: WarehouseTransferView, isLoading: isViewsLoading } =
|
||||||
|
useResourceViews('warehouse_transfer');
|
||||||
|
|
||||||
|
// Fetch the accounts resource fields.
|
||||||
|
const {
|
||||||
|
data: resourceMeta,
|
||||||
|
isLoading: isResourceLoading,
|
||||||
|
isFetching: isResourceFetching,
|
||||||
|
} = useResourceMeta('warehouse_transfer');
|
||||||
|
|
||||||
// Provider payload.
|
// Provider payload.
|
||||||
const provider = {
|
const provider = {
|
||||||
|
warehousesTransfers,
|
||||||
|
pagination,
|
||||||
|
|
||||||
|
WarehouseTransferView,
|
||||||
|
refresh,
|
||||||
|
|
||||||
|
resourceMeta,
|
||||||
|
fields: getFieldsFromResourceMeta(resourceMeta.fields),
|
||||||
|
isResourceLoading,
|
||||||
|
isResourceFetching,
|
||||||
|
|
||||||
|
isWarehouseTransfersLoading,
|
||||||
|
isWarehouseTransfersFetching,
|
||||||
|
isViewsLoading,
|
||||||
isEmptyStatus,
|
isEmptyStatus,
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardInsider name={'warehouse-transfers-list'}>
|
<DashboardInsider
|
||||||
|
loading={isViewsLoading || isResourceLoading}
|
||||||
|
name={'warehouse-transfers-list'}
|
||||||
|
>
|
||||||
<WarehouseTransfersListContext.Provider value={provider} {...props} />
|
<WarehouseTransfersListContext.Provider value={provider} {...props} />
|
||||||
</DashboardInsider>
|
</DashboardInsider>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,23 +1,34 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useHistory } from 'react-router';
|
|
||||||
import { Alignment, Navbar, NavbarGroup } from '@blueprintjs/core';
|
import { Alignment, Navbar, NavbarGroup } from '@blueprintjs/core';
|
||||||
import { FormattedMessage as T } from 'components';
|
import { FormattedMessage as T } from 'components';
|
||||||
|
|
||||||
import { DashboardViewsTabs } from 'components';
|
import { DashboardViewsTabs } from 'components';
|
||||||
|
|
||||||
import { useWarehouseTranfersListContext } from './WarehouseTransfersListProvider';
|
import withWarehouseTransfers from './withWarehouseTransfers';
|
||||||
|
import withWarehouseTransfersActions from './withWarehouseTransfersActions';
|
||||||
|
|
||||||
import { compose } from 'utils';
|
import { useWarehouseTranfersListContext } from './WarehouseTransfersListProvider';
|
||||||
|
import { compose, transfromViewsToTabs } from 'utils';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Warehouse transfer view tabs.
|
* Warehouse transfer view tabs.
|
||||||
*/
|
*/
|
||||||
function WarehouseTransfersViewTabs() {
|
function WarehouseTransfersViewTabs({
|
||||||
|
// #withWarehouseTransfers
|
||||||
|
warehouseTransferCurrentView,
|
||||||
|
|
||||||
|
// #withWarehouseTransfersActions
|
||||||
|
setWarehouseTransferTableState,
|
||||||
|
}) {
|
||||||
|
const { WarehouseTransferView } = useWarehouseTranfersListContext();
|
||||||
|
|
||||||
// Handles click a new view tab.
|
// Handles click a new view tab.
|
||||||
const handleClickNewView = () => {};
|
const handleClickNewView = () => {};
|
||||||
|
|
||||||
// Handles the active tab chaing.
|
// Handles the active tab chaing.
|
||||||
const handleTabsChange = (customView) => {};
|
const handleTabsChange = (viewSlug) => {
|
||||||
|
setWarehouseTransferTableState({ viewSlug });
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Navbar className={'navbar--dashboard-views'}>
|
<Navbar className={'navbar--dashboard-views'}>
|
||||||
@@ -34,4 +45,9 @@ function WarehouseTransfersViewTabs() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default WarehouseTransfersViewTabs;
|
export default compose(
|
||||||
|
withWarehouseTransfersActions,
|
||||||
|
withWarehouseTransfers(({ warehouseTransferTableState }) => ({
|
||||||
|
warehouseTransferCurrentView: warehouseTransferTableState?.viewSlug,
|
||||||
|
})),
|
||||||
|
)(WarehouseTransfersViewTabs);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export function useWarehouseTransfersTableColumns() {
|
|||||||
{
|
{
|
||||||
id: 'date',
|
id: 'date',
|
||||||
Header: intl.get('date'),
|
Header: intl.get('date'),
|
||||||
accessor: 'date',
|
accessor: 'formatted_date',
|
||||||
Cell: FormatDateCell,
|
Cell: FormatDateCell,
|
||||||
width: 120,
|
width: 120,
|
||||||
className: 'date',
|
className: 'date',
|
||||||
@@ -66,36 +66,29 @@ export function useWarehouseTransfersTableColumns() {
|
|||||||
textOverview: true,
|
textOverview: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'transfer_no',
|
id: 'transaction_number',
|
||||||
Header: intl.get('warehouse_transfer.column.transfer_no'),
|
Header: intl.get('warehouse_transfer.column.transfer_no'),
|
||||||
accessor: 'transfer_no',
|
accessor: 'transaction_number',
|
||||||
width: 120,
|
width: 100,
|
||||||
className: 'transfer_no',
|
className: 'transaction_number',
|
||||||
clickable: true,
|
clickable: true,
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'from_warehouse',
|
id: 'from_warehouse',
|
||||||
Header: intl.get('warehouse_transfer.column.from_warehouse'),
|
Header: intl.get('warehouse_transfer.column.from_warehouse'),
|
||||||
accessor: 'from_warehouse',
|
accessor: 'from_warehouse.name',
|
||||||
width: 150,
|
width: 140,
|
||||||
|
className: 'from_warehouse',
|
||||||
clickable: true,
|
clickable: true,
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'to_warehouse',
|
id: 'to_warehouse',
|
||||||
Header: intl.get('warehouse_transfer.column.to_warehouse'),
|
Header: intl.get('warehouse_transfer.column.to_warehouse'),
|
||||||
accessor: 'to_warehouse',
|
accessor: 'to_warehouse.name',
|
||||||
width: 150,
|
width: 140,
|
||||||
clickable: true,
|
className: 'to_warehouse',
|
||||||
textOverview: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'reason',
|
|
||||||
Header: intl.get('reason'),
|
|
||||||
accessor: 'reason',
|
|
||||||
className: 'reason',
|
|
||||||
width: 120,
|
|
||||||
clickable: true,
|
clickable: true,
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
},
|
},
|
||||||
@@ -103,7 +96,7 @@ export function useWarehouseTransfersTableColumns() {
|
|||||||
id: 'status',
|
id: 'status',
|
||||||
Header: intl.get('status'),
|
Header: intl.get('status'),
|
||||||
// accessor: (row) => statusAccessor(row),
|
// accessor: (row) => statusAccessor(row),
|
||||||
width: 160,
|
width: 140,
|
||||||
className: 'status',
|
className: 'status',
|
||||||
clickable: true,
|
clickable: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import { connect } from 'react-redux';
|
||||||
|
import {
|
||||||
|
getWarehouseTransfersTableStateFactory,
|
||||||
|
isWarehouseTransferTableStateChangedFactory,
|
||||||
|
} from '../../../store/WarehouseTransfer/warehouseTransfer.selector';
|
||||||
|
|
||||||
|
export default (mapState) => {
|
||||||
|
const getWarehouseTransferTableState = getWarehouseTransfersTableStateFactory();
|
||||||
|
const isWarehouseTransferTableChanged = isWarehouseTransferTableStateChangedFactory();
|
||||||
|
|
||||||
|
const mapStateToProps = (state, props) => {
|
||||||
|
const mapped = {
|
||||||
|
warehouseTransferTableState: getWarehouseTransferTableState(state, props),
|
||||||
|
warehouseTransferTableStateChanged: isWarehouseTransferTableChanged(state, props),
|
||||||
|
};
|
||||||
|
return mapState ? mapState(mapped, state, props) : mapped;
|
||||||
|
};
|
||||||
|
return connect(mapStateToProps);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { connect } from 'react-redux';
|
||||||
|
import {
|
||||||
|
setWarehouseTransferTableState,
|
||||||
|
resetWarehouseTransferTableState,
|
||||||
|
} from '../../../store/WarehouseTransfer/warehouseTransfer.actions';
|
||||||
|
|
||||||
|
const mapDipatchToProps = (dispatch) => ({
|
||||||
|
setWarehouseTransferTableState: (queries) =>
|
||||||
|
dispatch(setWarehouseTransferTableState(queries)),
|
||||||
|
resetWarehouseTransferTableState: () => dispatch(resetWarehouseTransferTableState()),
|
||||||
|
});
|
||||||
|
|
||||||
|
export default connect(null, mapDipatchToProps);
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import { useQueryClient, useMutation } from 'react-query';
|
import { useQueryClient, useMutation } from 'react-query';
|
||||||
|
import { transformPagination } from 'utils';
|
||||||
import { useRequestQuery } from '../useQueryRequest';
|
import { useRequestQuery } from '../useQueryRequest';
|
||||||
import useApiRequest from '../useRequest';
|
import useApiRequest from '../useRequest';
|
||||||
import t from './types';
|
import t from './types';
|
||||||
@@ -129,7 +130,7 @@ export function useEditWarehouseTransfer(props) {
|
|||||||
const apiRequest = useApiRequest();
|
const apiRequest = useApiRequest();
|
||||||
|
|
||||||
return useMutation(
|
return useMutation(
|
||||||
([id, values]) => apiRequest.post(`warehouses/transfers${id}`, values),
|
([id, values]) => apiRequest.post(`warehouses/transfers/${id}`, values),
|
||||||
{
|
{
|
||||||
onSuccess: (res, [id, values]) => {
|
onSuccess: (res, [id, values]) => {
|
||||||
// Invalidate specific sale invoice.
|
// Invalidate specific sale invoice.
|
||||||
@@ -162,6 +163,12 @@ export function useDeleteWarehouseTransfer(props) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const transformWarehousesTransfer = (res) => ({
|
||||||
|
warehousesTransfers: res.data.data,
|
||||||
|
pagination: transformPagination(res.data.pagination),
|
||||||
|
filterMeta: res.data.filter,
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve Warehoues list.
|
* Retrieve Warehoues list.
|
||||||
*/
|
*/
|
||||||
@@ -170,8 +177,16 @@ export function useWarehousesTransfers(query, props) {
|
|||||||
[t.WAREHOUSE_TRANSFERS, query],
|
[t.WAREHOUSE_TRANSFERS, query],
|
||||||
{ method: 'get', url: 'warehouses/transfers', params: query },
|
{ method: 'get', url: 'warehouses/transfers', params: query },
|
||||||
{
|
{
|
||||||
select: (res) => res.data,
|
select: transformWarehousesTransfer,
|
||||||
defaultData: [],
|
defaultData: {
|
||||||
|
warehousesTransfers: [],
|
||||||
|
pagination: {
|
||||||
|
page: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
filterMeta: {},
|
||||||
|
},
|
||||||
...props,
|
...props,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -186,9 +201,19 @@ export function useWarehouseTransfer(id, props, requestProps) {
|
|||||||
[t.WAREHOUSE_TRANSFER, id],
|
[t.WAREHOUSE_TRANSFER, id],
|
||||||
{ method: 'get', url: `warehouses/transfers/${id}`, ...requestProps },
|
{ method: 'get', url: `warehouses/transfers/${id}`, ...requestProps },
|
||||||
{
|
{
|
||||||
select: (res) => res.data.warehouse_transfer,
|
select: (res) => res.data.data,
|
||||||
defaultData: {},
|
defaultData: {},
|
||||||
...props,
|
...props,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function useRefreshWarehouseTransfers() {
|
||||||
|
const queryClient = useQueryClient();
|
||||||
|
|
||||||
|
return {
|
||||||
|
refresh: () => {
|
||||||
|
queryClient.invalidateQueries(t.WAREHOUSE_TRANSFERS);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
@@ -117,10 +117,15 @@ export const getDashboardRoutes = () => [
|
|||||||
defaultSearchResource: RESOURCES_TYPES.ITEM,
|
defaultSearchResource: RESOURCES_TYPES.ITEM,
|
||||||
subscriptionActive: [SUBSCRIPTION_TYPE.MAIN],
|
subscriptionActive: [SUBSCRIPTION_TYPE.MAIN],
|
||||||
},
|
},
|
||||||
|
|
||||||
// Warehouse Transfer.
|
// Warehouse Transfer.
|
||||||
{
|
{
|
||||||
path: `/warehouses-transfers/:id/edit`,
|
path: `/warehouses-transfers/:id/edit`,
|
||||||
component: lazy(() => import('containers/Items/ItemFormPage')),
|
component: lazy(() =>
|
||||||
|
import(
|
||||||
|
'../containers/WarehouseTransfers/WarehouseTransferForm/WarehouseTransferFormPage'
|
||||||
|
),
|
||||||
|
),
|
||||||
name: 'warehouse-transfer-edit',
|
name: 'warehouse-transfer-edit',
|
||||||
pageTitle: intl.get('warehouse_transfer.label.edit_warehouse_transfer'),
|
pageTitle: intl.get('warehouse_transfer.label.edit_warehouse_transfer'),
|
||||||
backLink: true,
|
backLink: true,
|
||||||
|
|||||||
14
src/store/WarehouseTransfer/warehouseTransfer.actions.js
Normal file
14
src/store/WarehouseTransfer/warehouseTransfer.actions.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import t from 'store/types';
|
||||||
|
|
||||||
|
export const setWarehouseTransferTableState = (queries) => {
|
||||||
|
return {
|
||||||
|
type: t.WAREHOUSE_TRANSFERS_TABLE_STATE_SET,
|
||||||
|
payload: { queries },
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export const resetWarehouseTransferTableState = () => {
|
||||||
|
return {
|
||||||
|
type: t.WAREHOUSE_TRANSFERS_TABLE_STATE_RESET,
|
||||||
|
};
|
||||||
|
};
|
||||||
34
src/store/WarehouseTransfer/warehouseTransfer.reducer.js
Normal file
34
src/store/WarehouseTransfer/warehouseTransfer.reducer.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import { createReducer } from '@reduxjs/toolkit';
|
||||||
|
import { persistReducer, purgeStoredState } from 'redux-persist';
|
||||||
|
import storage from 'redux-persist/lib/storage';
|
||||||
|
import { createTableStateReducers } from 'store/tableState.reducer';
|
||||||
|
import t from 'store/types';
|
||||||
|
|
||||||
|
export const defaultTableQuery = {
|
||||||
|
pageSize: 20,
|
||||||
|
pageIndex: 0,
|
||||||
|
filterRoles: [],
|
||||||
|
viewSlug: null,
|
||||||
|
};
|
||||||
|
|
||||||
|
const initialState = {
|
||||||
|
tableState: defaultTableQuery,
|
||||||
|
};
|
||||||
|
|
||||||
|
const STORAGE_KEY = 'bigcapital:warehouse_transfers';
|
||||||
|
|
||||||
|
const CONFIG = {
|
||||||
|
key: STORAGE_KEY,
|
||||||
|
whitelist: [],
|
||||||
|
storage,
|
||||||
|
};
|
||||||
|
|
||||||
|
const reducerInstance = createReducer(initialState, {
|
||||||
|
...createTableStateReducers('WAREHOUSE_TRANSFERS', defaultTableQuery),
|
||||||
|
|
||||||
|
[t.RESET]: () => {
|
||||||
|
purgeStoredState(CONFIG);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default persistReducer(CONFIG, reducerInstance);
|
||||||
33
src/store/WarehouseTransfer/warehouseTransfer.selector.js
Normal file
33
src/store/WarehouseTransfer/warehouseTransfer.selector.js
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import { isEqual } from 'lodash';
|
||||||
|
import { paginationLocationQuery } from 'store/selectors';
|
||||||
|
import { createDeepEqualSelector } from 'utils';
|
||||||
|
import { defaultTableQuery } from './warehouseTransfer.reducer';
|
||||||
|
|
||||||
|
const warehouseTransfersTableStateSelector = (state) =>
|
||||||
|
state.warehouseTransfers.tableState;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve warehouse transfers table state.
|
||||||
|
*/
|
||||||
|
export const getWarehouseTransfersTableStateFactory = () =>
|
||||||
|
createDeepEqualSelector(
|
||||||
|
paginationLocationQuery,
|
||||||
|
warehouseTransfersTableStateSelector,
|
||||||
|
(locationQuery, tableState) => {
|
||||||
|
return {
|
||||||
|
...locationQuery,
|
||||||
|
...tableState,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve warehouse transfers table state.
|
||||||
|
*/
|
||||||
|
export const isWarehouseTransferTableStateChangedFactory = () =>
|
||||||
|
createDeepEqualSelector(
|
||||||
|
warehouseTransfersTableStateSelector,
|
||||||
|
(tableState) => {
|
||||||
|
return !isEqual(tableState, defaultTableQuery);
|
||||||
|
},
|
||||||
|
);
|
||||||
4
src/store/WarehouseTransfer/warehouseTransfer.type.js
Normal file
4
src/store/WarehouseTransfer/warehouseTransfer.type.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
export default {
|
||||||
|
WAREHOUSE_TRANSFERS_TABLE_STATE_SET: 'WAREHOUSE_TRANSFERS/TABLE_STATE_SET',
|
||||||
|
WAREHOUSE_TRANSFERS_TABLE_STATE_RESET: 'WAREHOUSE_TRANSFERS/TABLE_STATE_RESET',
|
||||||
|
};
|
||||||
@@ -34,6 +34,7 @@ import inventoryAdjustments from './inventoryAdjustments/inventoryAdjustment.red
|
|||||||
import plans from './plans/plans.reducer';
|
import plans from './plans/plans.reducer';
|
||||||
import creditNotes from './CreditNote/creditNote.reducer';
|
import creditNotes from './CreditNote/creditNote.reducer';
|
||||||
import vendorCredit from './VendorCredit/VendorCredit.reducer';
|
import vendorCredit from './VendorCredit/VendorCredit.reducer';
|
||||||
|
import warehouseTransfers from './WarehouseTransfer/warehouseTransfer.reducer';
|
||||||
|
|
||||||
const appReducer = combineReducers({
|
const appReducer = combineReducers({
|
||||||
authentication,
|
authentication,
|
||||||
@@ -68,6 +69,7 @@ const appReducer = combineReducers({
|
|||||||
plans,
|
plans,
|
||||||
creditNotes,
|
creditNotes,
|
||||||
vendorCredit,
|
vendorCredit,
|
||||||
|
warehouseTransfers,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Reset the state of a redux store
|
// Reset the state of a redux store
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import subscription from './subscription/subscription.types';
|
|||||||
import inventoryAdjustments from './inventoryAdjustments/inventoryAdjustment.type';
|
import inventoryAdjustments from './inventoryAdjustments/inventoryAdjustment.type';
|
||||||
import creditNote from './CreditNote/creditNote.type';
|
import creditNote from './CreditNote/creditNote.type';
|
||||||
import vendorCredit from './VendorCredit/vendorCredit.type';
|
import vendorCredit from './VendorCredit/vendorCredit.type';
|
||||||
|
import WarehouseTransfer from './WarehouseTransfer/warehouseTransfer.type';
|
||||||
import plans from './plans/plans.types';
|
import plans from './plans/plans.types';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -65,5 +66,6 @@ export default {
|
|||||||
...inventoryAdjustments,
|
...inventoryAdjustments,
|
||||||
...plans,
|
...plans,
|
||||||
...creditNote,
|
...creditNote,
|
||||||
...vendorCredit
|
...vendorCredit,
|
||||||
|
...WarehouseTransfer,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user