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