ISSUE : fix teams page breaking issue (#17268)

* fix teams page breaking issue

* minor changes

* unpushed file

---------

Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com>
This commit is contained in:
Ashish Gupta 2024-08-02 22:46:51 +05:30 committed by GitHub
parent 84083aef4a
commit dd8158552c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 16 additions and 23 deletions

View File

@ -15,7 +15,7 @@ import { uuid } from './common';
export const createTeam = async (page: Page, isPublic?: boolean) => {
const teamData = {
name: `pwteam-${uuid()}`,
name: `pw%team-${uuid()}`,
displayName: `PW ${uuid()}`,
email: `pwteam${uuid()}@example.com`,
description: 'This is a PW team',

View File

@ -207,7 +207,6 @@ const TeamsInfo = ({
className="toolbar-button align-middle"
component={EditIcon}
data-testid="edit-email"
style={{ fontSize: '16px' }}
onClick={(e) => {
// Used to stop click propagation event to parent TeamDetailV1 collapsible panel
e.stopPropagation();
@ -252,21 +251,18 @@ const TeamsInfo = ({
{hasEditPermission && (
<Tooltip
title={t('label.edit-entity', {
entity: t('label.team-type'),
})}>
title={
isGroupType
? t('message.group-team-type-change-message')
: t('label.edit-entity', {
entity: t('label.team-type'),
})
}>
<Icon
className={classNames('vertical-middle m-l-xs', {
'opacity-50': isGroupType,
className={classNames('align-middle m-l-xss', {
'opacity-30': isGroupType,
})}
data-testid="edit-team-type-icon"
title={
isGroupType
? t('message.group-team-type-change-message')
: t('label.edit-entity', {
entity: t('label.team-type'),
})
}
onClick={(e) => {
// Used to stop click propagation event to parent TeamDetailV1 collapsible panel
e.stopPropagation();

View File

@ -49,7 +49,6 @@ import { getUsers } from '../../../../../rest/userAPI';
import { formatUsersResponse } from '../../../../../utils/APIUtils';
import { getEntityName } from '../../../../../utils/EntityUtils';
import { getSettingsPathWithFqn } from '../../../../../utils/RouterUtils';
import { getDecodedFqn } from '../../../../../utils/StringsUtils';
import { commonUserDetailColumns } from '../../../../../utils/Users.util';
import ManageButton from '../../../../common/EntityPageInfos/ManageButton/ManageButton';
import ErrorPlaceHolder from '../../../../common/ErrorWithPlaceholder/ErrorPlaceHolder';
@ -99,7 +98,7 @@ export const UserTab = ({
getUsers({
fields: `${TabSpecificField.TEAMS},${TabSpecificField.ROLES}`,
limit: pageSize,
team: getDecodedFqn(team),
team,
...paging,
})
.then((res) => {

View File

@ -68,10 +68,6 @@ jest.mock('../../utils/ToastUtils', () => ({
showErrorToast: jest.fn(),
}));
jest.mock('../../utils/StringsUtils', () => ({
getDecodedFqn: jest.fn(),
}));
jest.mock('../../utils/RouterUtils', () => ({
getTeamsWithFqnPath: jest.fn(),
}));

View File

@ -48,7 +48,6 @@ import { updateUserDetail } from '../../rest/userAPI';
import { getEntityReferenceFromEntity } from '../../utils/EntityUtils';
import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
import { getTeamsWithFqnPath } from '../../utils/RouterUtils';
import { getDecodedFqn } from '../../utils/StringsUtils';
import { showErrorToast, showSuccessToast } from '../../utils/ToastUtils';
import AddTeamForm from './AddTeamForm';
@ -112,7 +111,7 @@ const TeamsPage = () => {
const fetchAllTeamsBasicDetails = async (parentTeam?: string) => {
try {
const { data } = await getTeams({
parentTeam: getDecodedFqn(parentTeam ?? '') ?? 'organization',
parentTeam: parentTeam ?? 'organization',
include: Include.All,
});
@ -138,7 +137,7 @@ const TeamsPage = () => {
try {
const { data } = await getTeams({
parentTeam: getDecodedFqn(parentTeam ?? '') ?? 'organization',
parentTeam: parentTeam ?? 'organization',
include: Include.All,
fields: [
TabSpecificField.USER_COUNT,

View File

@ -413,6 +413,9 @@ a[href].link-text-grey,
.opacity-0 {
opacity: 0;
}
.opacity-30 {
opacity: 0.3;
}
.opacity-50 {
opacity: 0.5;
}