mirror of
https://github.com/ansible/awx.git
synced 2026-03-23 20:05:03 -02:30
Fixes broken link from User to UserOrg (#11759)
This commit is contained in:
@@ -20,7 +20,7 @@ const QS_CONFIG = getQSConfig('organizations', {
|
|||||||
|
|
||||||
function UserOrganizationList() {
|
function UserOrganizationList() {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const { id: userId } = useParams();
|
const { id } = useParams();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
result: { organizations, count, searchableKeys, relatedSearchableKeys },
|
result: { organizations, count, searchableKeys, relatedSearchableKeys },
|
||||||
@@ -36,8 +36,8 @@ function UserOrganizationList() {
|
|||||||
},
|
},
|
||||||
actions,
|
actions,
|
||||||
] = await Promise.all([
|
] = await Promise.all([
|
||||||
UsersAPI.readOrganizations(userId, params),
|
UsersAPI.readOrganizations(id, params),
|
||||||
UsersAPI.readOrganizationOptions(),
|
UsersAPI.readOrganizationOptions(id),
|
||||||
]);
|
]);
|
||||||
return {
|
return {
|
||||||
searchableKeys: Object.keys(actions.data.actions?.GET || {}).filter(
|
searchableKeys: Object.keys(actions.data.actions?.GET || {}).filter(
|
||||||
@@ -49,7 +49,7 @@ function UserOrganizationList() {
|
|||||||
organizations: results,
|
organizations: results,
|
||||||
count: orgCount,
|
count: orgCount,
|
||||||
};
|
};
|
||||||
}, [userId, location.search]),
|
}, [id, location.search]),
|
||||||
{
|
{
|
||||||
organizations: [],
|
organizations: [],
|
||||||
count: 0,
|
count: 0,
|
||||||
|
|||||||
@@ -72,6 +72,6 @@ describe('<UserOrganizationlist />', () => {
|
|||||||
page_size: 20,
|
page_size: 20,
|
||||||
type: 'organization',
|
type: 'organization',
|
||||||
});
|
});
|
||||||
expect(UsersAPI.readOrganizationOptions).toBeCalled();
|
expect(UsersAPI.readOrganizationOptions).toBeCalledWith('1');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export default function UserOrganizationListItem({ organization }) {
|
|||||||
>
|
>
|
||||||
<Td id={labelId} dataLabel={t`Name`}>
|
<Td id={labelId} dataLabel={t`Name`}>
|
||||||
<Link to={`/organizations/${organization.id}/details`} id={labelId}>
|
<Link to={`/organizations/${organization.id}/details`} id={labelId}>
|
||||||
{organization.name}
|
<b>{organization.name}</b>
|
||||||
</Link>
|
</Link>
|
||||||
</Td>
|
</Td>
|
||||||
<Td dataLabel={t`Description`}>{organization.description}</Td>
|
<Td dataLabel={t`Description`}>{organization.description}</Td>
|
||||||
|
|||||||
Reference in New Issue
Block a user