mirror of
https://github.com/ansible/awx.git
synced 2026-05-14 04:47:44 -02:30
Adds Inventory Source List
This commit is contained in:
@@ -25,7 +25,9 @@ class Inventories extends InstanceGroupsMixin(Base) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
readHosts(id, params) {
|
readHosts(id, params) {
|
||||||
return this.http.get(`${this.baseUrl}${id}/hosts/`, { params });
|
return this.http.get(`${this.baseUrl}${id}/hosts/`, {
|
||||||
|
params,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async readHostDetail(inventoryId, hostId) {
|
async readHostDetail(inventoryId, hostId) {
|
||||||
@@ -45,7 +47,9 @@ class Inventories extends InstanceGroupsMixin(Base) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
readGroups(id, params) {
|
readGroups(id, params) {
|
||||||
return this.http.get(`${this.baseUrl}${id}/groups/`, { params });
|
return this.http.get(`${this.baseUrl}${id}/groups/`, {
|
||||||
|
params,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
readGroupsOptions(id) {
|
readGroupsOptions(id) {
|
||||||
@@ -62,6 +66,12 @@ class Inventories extends InstanceGroupsMixin(Base) {
|
|||||||
disassociate: true,
|
disassociate: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readSources(inventoryId, params) {
|
||||||
|
return this.http.get(`${this.baseUrl}${inventoryId}/inventory_sources/`, {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Inventories;
|
export default Inventories;
|
||||||
|
|||||||
@@ -0,0 +1,155 @@
|
|||||||
|
import React, { useCallback, useEffect } from 'react';
|
||||||
|
import { useParams, useLocation } from 'react-router-dom';
|
||||||
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
|
import useRequest, { useDeleteItems } from '@util/useRequest';
|
||||||
|
import { getQSConfig, parseQueryString } from '@util/qs';
|
||||||
|
import { InventoriesAPI, InventorySourcesAPI } from '@api';
|
||||||
|
import PaginatedDataList, {
|
||||||
|
ToolbarAddButton,
|
||||||
|
ToolbarDeleteButton,
|
||||||
|
} from '@components/PaginatedDataList';
|
||||||
|
import useSelected from '@util/useSelected';
|
||||||
|
import DatalistToolbar from '@components/DataListToolbar';
|
||||||
|
import AlertModal from '@components/AlertModal/AlertModal';
|
||||||
|
import ErrorDetail from '@components/ErrorDetail/ErrorDetail';
|
||||||
|
import InventorySourceListItem from './InventorySourceListItem';
|
||||||
|
|
||||||
|
const QS_CONFIG = getQSConfig('inventory', {
|
||||||
|
not__source: '',
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
order_by: 'name',
|
||||||
|
});
|
||||||
|
|
||||||
|
function InventorySourceList({ i18n }) {
|
||||||
|
const { inventoryType, id } = useParams();
|
||||||
|
const { search } = useLocation();
|
||||||
|
|
||||||
|
const {
|
||||||
|
isLoading,
|
||||||
|
error,
|
||||||
|
result: { sources, sourceCount, sourceChoices, sourceChoicesOptions },
|
||||||
|
request: fetchSources,
|
||||||
|
} = useRequest(
|
||||||
|
useCallback(async () => {
|
||||||
|
const params = parseQueryString(QS_CONFIG, search);
|
||||||
|
const results = await Promise.all([
|
||||||
|
InventoriesAPI.readSources(id, params),
|
||||||
|
InventorySourcesAPI.readOptions(),
|
||||||
|
]);
|
||||||
|
|
||||||
|
return {
|
||||||
|
sources: results[0].data.results,
|
||||||
|
sourceCount: results[0].data.count,
|
||||||
|
sourceChoices: results[1].data.actions.GET.source.choices,
|
||||||
|
sourceChoicesOptions: results[1].data.actions,
|
||||||
|
};
|
||||||
|
}, [id, search]),
|
||||||
|
{
|
||||||
|
sources: [],
|
||||||
|
sourceCount: 0,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
fetchSources();
|
||||||
|
}, [fetchSources]);
|
||||||
|
|
||||||
|
const { selected, isAllSelected, handleSelect, setSelected } = useSelected(
|
||||||
|
sources
|
||||||
|
);
|
||||||
|
|
||||||
|
const {
|
||||||
|
isLoading: isDeleteLoading,
|
||||||
|
deleteItems: handleDeleteSources,
|
||||||
|
deletionError,
|
||||||
|
clearDeletionError,
|
||||||
|
} = useDeleteItems(
|
||||||
|
useCallback(async () => {
|
||||||
|
return Promise.all(
|
||||||
|
selected.map(({ id: sourceId }) =>
|
||||||
|
InventorySourcesAPI.destroy(sourceId)
|
||||||
|
),
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
}, [selected]),
|
||||||
|
{
|
||||||
|
fetchItems: fetchSources,
|
||||||
|
allItemsSelected: isAllSelected,
|
||||||
|
qsConfig: QS_CONFIG,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const handleDelete = async () => {
|
||||||
|
await handleDeleteSources();
|
||||||
|
setSelected([]);
|
||||||
|
};
|
||||||
|
|
||||||
|
const canAdd =
|
||||||
|
sourceChoicesOptions &&
|
||||||
|
Object.prototype.hasOwnProperty.call(sourceChoicesOptions, 'POST');
|
||||||
|
const detailUrl = `/inventories/${inventoryType}/${id}/sources/`;
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<PaginatedDataList
|
||||||
|
contentError={error || deletionError}
|
||||||
|
hasContentLoading={isLoading || isDeleteLoading}
|
||||||
|
items={sources}
|
||||||
|
itemCount={sourceCount}
|
||||||
|
pluralizedItemName={i18n._(t`Sources`)}
|
||||||
|
qsConfig={QS_CONFIG}
|
||||||
|
renderToolbar={props => (
|
||||||
|
<DatalistToolbar
|
||||||
|
{...props}
|
||||||
|
showSelectAll
|
||||||
|
isAllSelected={isAllSelected}
|
||||||
|
onSelectAll={isSelected =>
|
||||||
|
setSelected(isSelected ? [...sources] : [])
|
||||||
|
}
|
||||||
|
qsConfig={QS_CONFIG}
|
||||||
|
additionalControls={[
|
||||||
|
...(canAdd
|
||||||
|
? [<ToolbarAddButton key="add" linkTo={`${detailUrl}add`} />]
|
||||||
|
: []),
|
||||||
|
<ToolbarDeleteButton
|
||||||
|
key="delete"
|
||||||
|
onDelete={handleDelete}
|
||||||
|
itemsToDelete={selected}
|
||||||
|
pluralizedItemName={i18n._(t`Inventory Source`)}
|
||||||
|
/>,
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
renderItem={inventorySource => {
|
||||||
|
sourceChoices.forEach(([scMatch, scLabel]) => {
|
||||||
|
if (inventorySource.source === scMatch) {
|
||||||
|
inventorySource.source = scLabel;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return (
|
||||||
|
<InventorySourceListItem
|
||||||
|
key={inventorySource.id}
|
||||||
|
source={inventorySource}
|
||||||
|
onSelect={() => handleSelect(inventorySource)}
|
||||||
|
detailUrl={`${detailUrl}${inventorySource.id}`}
|
||||||
|
isSelected={selected.some(row => row.id === inventorySource.id)}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{deletionError && (
|
||||||
|
<AlertModal
|
||||||
|
isOpen={deletionError}
|
||||||
|
variant="error"
|
||||||
|
title={i18n._(t`Error!`)}
|
||||||
|
onClose={clearDeletionError}
|
||||||
|
>
|
||||||
|
{i18n._(t`Failed to delete one or more Inventory Sources.`)}
|
||||||
|
<ErrorDetail error={deletionError} />
|
||||||
|
</AlertModal>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export default withI18n()(InventorySourceList);
|
||||||
@@ -0,0 +1,185 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Route } from 'react-router-dom';
|
||||||
|
import { createMemoryHistory } from 'history';
|
||||||
|
import { InventoriesAPI, InventorySourcesAPI } from '@api';
|
||||||
|
import { act } from 'react-dom/test-utils';
|
||||||
|
import { mountWithContexts, waitForElement } from '@testUtils/enzymeHelpers';
|
||||||
|
import InventorySourceList from './InventorySourceList';
|
||||||
|
|
||||||
|
jest.mock('@api/models/InventorySources');
|
||||||
|
jest.mock('@api/models/Inventories');
|
||||||
|
jest.mock('@api/models/InventoryUpdates');
|
||||||
|
|
||||||
|
describe('<InventorySourceList />', () => {
|
||||||
|
let wrapper;
|
||||||
|
let history;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
InventoriesAPI.readSources.mockResolvedValue({
|
||||||
|
data: {
|
||||||
|
results: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: 'Source Foo',
|
||||||
|
status: '',
|
||||||
|
source: 'ec2',
|
||||||
|
url: '/api/v2/inventory_sources/56/',
|
||||||
|
summary_fields: {
|
||||||
|
user_capabilities: {
|
||||||
|
edit: true,
|
||||||
|
delete: true,
|
||||||
|
start: true,
|
||||||
|
schedule: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
count: 1,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
InventorySourcesAPI.readOptions.mockResolvedValue({
|
||||||
|
data: {
|
||||||
|
actions: {
|
||||||
|
GET: { source: { choices: [['scm', 'SCM'], ['ec2', 'EC2']] } },
|
||||||
|
POST: {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
history = createMemoryHistory({
|
||||||
|
initialEntries: ['/inventories/inventory/1/sources'],
|
||||||
|
});
|
||||||
|
await act(async () => {
|
||||||
|
wrapper = mountWithContexts(
|
||||||
|
<Route path="/inventories/:inventoryType/:id/sources">
|
||||||
|
<InventorySourceList />
|
||||||
|
</Route>,
|
||||||
|
{
|
||||||
|
context: {
|
||||||
|
router: {
|
||||||
|
history,
|
||||||
|
route: {
|
||||||
|
location: { search: '' },
|
||||||
|
match: { params: { id: 1 } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
afterEach(() => {
|
||||||
|
jest.clearAllMocks();
|
||||||
|
});
|
||||||
|
test('should mount properly', async () => {
|
||||||
|
await waitForElement(wrapper, 'InventorySourceList', el => el.length > 0);
|
||||||
|
});
|
||||||
|
test('api calls should be made on mount', async () => {
|
||||||
|
await waitForElement(wrapper, 'InventorySourceList', el => el.length > 0);
|
||||||
|
expect(InventoriesAPI.readSources).toHaveBeenCalledWith('1', {
|
||||||
|
not__source: '',
|
||||||
|
order_by: 'name',
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
});
|
||||||
|
expect(InventorySourcesAPI.readOptions).toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
test('source data should render properly', async () => {
|
||||||
|
await waitForElement(wrapper, 'InventorySourceList', el => el.length > 0);
|
||||||
|
expect(wrapper.find('PFDataListCell[aria-label="name"]').text()).toBe(
|
||||||
|
'Source Foo'
|
||||||
|
);
|
||||||
|
expect(wrapper.find('PFDataListCell[aria-label="type"]').text()).toBe(
|
||||||
|
'EC2'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
test('add button is not disabled and delete button is disabled', async () => {
|
||||||
|
await waitForElement(wrapper, 'InventorySourceList', el => el.length > 0);
|
||||||
|
const addButton = wrapper.find('ToolbarAddButton').find('Link');
|
||||||
|
const deleteButton = wrapper.find('ToolbarDeleteButton').find('Button');
|
||||||
|
expect(addButton.prop('aria-disabled')).toBe(false);
|
||||||
|
expect(deleteButton.prop('isDisabled')).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('delete button becomes enabled and properly calls api to delete', async () => {
|
||||||
|
const deleteButton = wrapper.find('ToolbarDeleteButton').find('Button');
|
||||||
|
|
||||||
|
await waitForElement(wrapper, 'InventorySourceList', el => el.length > 0);
|
||||||
|
expect(deleteButton.prop('isDisabled')).toBe(true);
|
||||||
|
|
||||||
|
await act(async () =>
|
||||||
|
wrapper.find('DataListCheck').prop('onChange')({ id: 1 })
|
||||||
|
);
|
||||||
|
wrapper.update();
|
||||||
|
expect(wrapper.find('input#select-source-1').prop('checked')).toBe(true);
|
||||||
|
|
||||||
|
await act(async () =>
|
||||||
|
wrapper.find('Button[aria-label="Delete"]').prop('onClick')()
|
||||||
|
);
|
||||||
|
wrapper.update();
|
||||||
|
expect(wrapper.find('AlertModal').length).toBe(1);
|
||||||
|
|
||||||
|
await act(async () =>
|
||||||
|
wrapper.find('Button[aria-label="confirm delete"]').prop('onClick')()
|
||||||
|
);
|
||||||
|
expect(InventorySourcesAPI.destroy).toHaveBeenCalledWith(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('<InventorySourceList /> RBAC testing', () => {
|
||||||
|
test('should not render add button', async () => {
|
||||||
|
InventoriesAPI.readSources.mockResolvedValue({
|
||||||
|
data: {
|
||||||
|
results: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: 'Source Foo',
|
||||||
|
status: '',
|
||||||
|
source: 'ec2',
|
||||||
|
url: '/api/v2/inventory_sources/56/',
|
||||||
|
summary_fields: {
|
||||||
|
user_capabilities: {
|
||||||
|
edit: true,
|
||||||
|
delete: true,
|
||||||
|
start: true,
|
||||||
|
schedule: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
count: 1,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
InventorySourcesAPI.readOptions.mockResolvedValue({
|
||||||
|
data: {
|
||||||
|
actions: {
|
||||||
|
GET: { source: { choices: [['scm', 'SCM'], ['ec2', 'EC2']] } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
let wrapper;
|
||||||
|
const history = createMemoryHistory({
|
||||||
|
initialEntries: ['/inventories/inventory/1/sources'],
|
||||||
|
});
|
||||||
|
await act(async () => {
|
||||||
|
wrapper = mountWithContexts(
|
||||||
|
<Route path="/inventories/:inventoryType/:id/sources">
|
||||||
|
<InventorySourceList />
|
||||||
|
</Route>,
|
||||||
|
{
|
||||||
|
context: {
|
||||||
|
router: {
|
||||||
|
history,
|
||||||
|
route: {
|
||||||
|
location: { search: '' },
|
||||||
|
match: { params: { id: 1 } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
await waitForElement(wrapper, 'InventorySourceList', el => el.length > 0);
|
||||||
|
expect(wrapper.find('ToolbarAddButton').length).toBe(0);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { withI18n } from '@lingui/react';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
DataListItem,
|
||||||
|
DataListItemRow,
|
||||||
|
DataListCheck,
|
||||||
|
DataListItemCells,
|
||||||
|
DataListCell,
|
||||||
|
DataListAction,
|
||||||
|
} from '@patternfly/react-core';
|
||||||
|
import { PencilAltIcon } from '@patternfly/react-icons';
|
||||||
|
|
||||||
|
function InventorySourceListItem({
|
||||||
|
source,
|
||||||
|
isSelected,
|
||||||
|
onSelect,
|
||||||
|
i18n,
|
||||||
|
detailUrl,
|
||||||
|
}) {
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<DataListItem aria-labelledby={`check-action-${source.id}`}>
|
||||||
|
<DataListItemRow>
|
||||||
|
<DataListCheck
|
||||||
|
id={`select-source-${source.id}`}
|
||||||
|
checked={isSelected}
|
||||||
|
onChange={onSelect}
|
||||||
|
aria-labelledby={`check-action-${source.id}`}
|
||||||
|
/>
|
||||||
|
<DataListItemCells
|
||||||
|
dataListCells={[
|
||||||
|
<DataListCell aria-label={i18n._(t`name`)} key="name">
|
||||||
|
<span>
|
||||||
|
<Link to={`${detailUrl}/details`}>
|
||||||
|
<b>{source.name}</b>
|
||||||
|
</Link>
|
||||||
|
</span>
|
||||||
|
</DataListCell>,
|
||||||
|
<DataListCell aria-label={i18n._(t`type`)} key="type">
|
||||||
|
{source.source}
|
||||||
|
</DataListCell>,
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
<DataListAction
|
||||||
|
id="actions"
|
||||||
|
aria-labelledby="actions"
|
||||||
|
aria-label="actions"
|
||||||
|
>
|
||||||
|
{source.summary_fields.user_capabilities.edit && (
|
||||||
|
<Button
|
||||||
|
aria-label={i18n._(t`Edit Source`)}
|
||||||
|
variant="plain"
|
||||||
|
component={Link}
|
||||||
|
to={`${detailUrl}/edit`}
|
||||||
|
>
|
||||||
|
<PencilAltIcon />
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
</DataListAction>
|
||||||
|
</DataListItemRow>
|
||||||
|
</DataListItem>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export default withI18n()(InventorySourceListItem);
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { act } from 'react-dom/test-utils';
|
||||||
|
import { mountWithContexts } from '@testUtils/enzymeHelpers';
|
||||||
|
import InventorySourceListItem from './InventorySourceListItem';
|
||||||
|
|
||||||
|
const source = {
|
||||||
|
id: 1,
|
||||||
|
name: 'Foo',
|
||||||
|
source: 'Source Bar',
|
||||||
|
summary_fields: { user_capabilities: { start: true, edit: true } },
|
||||||
|
};
|
||||||
|
describe('<InventorySourceListItem />', () => {
|
||||||
|
afterEach(() => {
|
||||||
|
jest.clearAllMocks();
|
||||||
|
});
|
||||||
|
test('should mount properly', async () => {
|
||||||
|
let wrapper;
|
||||||
|
const onSelect = jest.fn();
|
||||||
|
await act(async () => {
|
||||||
|
wrapper = mountWithContexts(
|
||||||
|
<InventorySourceListItem
|
||||||
|
source={source}
|
||||||
|
isSelected={false}
|
||||||
|
onSelect={onSelect}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
expect(wrapper.find('InventorySourceListItem').length).toBe(1);
|
||||||
|
});
|
||||||
|
test('all buttons and text fields should render properly', async () => {
|
||||||
|
let wrapper;
|
||||||
|
const onSelect = jest.fn();
|
||||||
|
await act(async () => {
|
||||||
|
wrapper = mountWithContexts(
|
||||||
|
<InventorySourceListItem
|
||||||
|
source={source}
|
||||||
|
isSelected={false}
|
||||||
|
onSelect={onSelect}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
expect(wrapper.find('DataListCheck').length).toBe(1);
|
||||||
|
expect(
|
||||||
|
wrapper
|
||||||
|
.find('DataListCell')
|
||||||
|
.at(0)
|
||||||
|
.text()
|
||||||
|
).toBe('Foo');
|
||||||
|
expect(
|
||||||
|
wrapper
|
||||||
|
.find('DataListCell')
|
||||||
|
.at(1)
|
||||||
|
.text()
|
||||||
|
).toBe('Source Bar');
|
||||||
|
expect(wrapper.find('PencilAltIcon').length).toBe(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('item should be checked', async () => {
|
||||||
|
let wrapper;
|
||||||
|
const onSelect = jest.fn();
|
||||||
|
await act(async () => {
|
||||||
|
wrapper = mountWithContexts(
|
||||||
|
<InventorySourceListItem
|
||||||
|
source={source}
|
||||||
|
isSelected
|
||||||
|
onSelect={onSelect}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
expect(wrapper.find('DataListCheck').length).toBe(1);
|
||||||
|
expect(wrapper.find('DataListCheck').prop('checked')).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test(' should render edit buttons', async () => {
|
||||||
|
let wrapper;
|
||||||
|
const onSelect = jest.fn();
|
||||||
|
await act(async () => {
|
||||||
|
wrapper = mountWithContexts(
|
||||||
|
<InventorySourceListItem
|
||||||
|
source={{
|
||||||
|
...source,
|
||||||
|
summary_fields: { user_capabilities: { edit: false, start: true } },
|
||||||
|
}}
|
||||||
|
isSelected={false}
|
||||||
|
onSelect={onSelect}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
expect(wrapper.find('Button[aria-label="Edit Source"]').length).toBe(0);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -1,10 +1,16 @@
|
|||||||
import React, { Component } from 'react';
|
import React from 'react';
|
||||||
import { CardBody } from '@components/Card';
|
import { Switch, Route } from 'react-router-dom';
|
||||||
|
|
||||||
class InventorySources extends Component {
|
import InventorySourceList from './InventorySourceList';
|
||||||
render() {
|
|
||||||
return <CardBody>Coming soon :)</CardBody>;
|
function InventorySources() {
|
||||||
}
|
return (
|
||||||
|
<Switch>
|
||||||
|
<Route path="/inventories/:inventoryType/:id/sources">
|
||||||
|
<InventorySourceList />
|
||||||
|
</Route>
|
||||||
|
</Switch>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default InventorySources;
|
export default InventorySources;
|
||||||
|
|||||||
Reference in New Issue
Block a user