- {getTeamHeading()}
- {!isOrganization ? (
-
- {!isUndefined(currentUser) &&
- teamActionButton(
- !isAlreadyJoinedTeam(currentTeam.id),
- currentTeam.isJoinable || false
- )}
- {entityPermissions.EditAll && (
-
- )}
-
- ) : (
-
- )}
-
- {emailElement}
-
-
- {isFetchingAdvancedDetails ? (
-
- ) : (
-
- {currentTab === TeamsPageTab.TEAMS &&
- (currentTeam.childrenCount === 0 && !searchTerm ? (
- fetchErrorPlaceHolder({
- onClick: () => handleAddTeam(true),
- permission: createTeamPermission,
- heading: t('label.team'),
- })
- ) : (
-
-
-
-
-
-
-
-
-
- {t('label.deleted')}
-
-
-
- {createTeamPermission && (
-
- )}
-
-
-
-
-
-
- ))}
-
- {currentTab === TeamsPageTab.USERS && (
-
+
+
+
+
+
+
+ {(currentTeam.owner?.id === currentUser?.id ||
+ entityPermissions.EditAll ||
+ isAlreadyJoinedTeam) && (
+
+
+
)}
- {currentTab === TeamsPageTab.ASSETS && (
- history.push(ROUTES.EXPLORE)}
- onAssetClick={setPreviewAsset}
- />
- )}
-
- {currentTab === TeamsPageTab.ROLES &&
- (isEmpty(currentTeam.defaultRoles || []) ? (
- fetchErrorPlaceHolder({
- permission: entityPermissions.EditAll,
- heading: t('label.role'),
- doc: ROLE_DOCS,
- children: t('message.assigning-team-entity-description', {
- entity: t('label.role'),
- name: currentTeam.name,
- }),
- type: ERROR_PLACEHOLDER_TYPE.ASSIGN,
- button: (
- }
- type="primary"
- onClick={() =>
- setAddAttribute({
- type: EntityType.ROLE,
- selectedData: currentTeam.defaultRoles || [],
- })
- }>
- {t('label.add')}
-
- ),
- })
- ) : (
-
-
-
- setEntity({ record, attribute: 'defaultRoles' })
- }
- />
-
- ))}
- {currentTab === TeamsPageTab.POLICIES &&
- (isEmpty(currentTeam.policies) ? (
- fetchErrorPlaceHolder({
- permission: entityPermissions.EditAll,
- children: t('message.assigning-team-entity-description', {
- entity: t('label.policy-plural'),
- name: currentTeam.name,
- }),
- type: ERROR_PLACEHOLDER_TYPE.ASSIGN,
- button: (
- }
- type="primary"
- onClick={() =>
- setAddAttribute({
- type: EntityType.POLICY,
- selectedData: currentTeam.policies || [],
- })
- }>
- {t('label.add')}
-
- ),
- })
- ) : (
-
-
-
- setEntity({ record, attribute: 'policies' })
- }
- />
-
- ))}
-
- )}
-
+
+
+
+ {t('label.description')}
+
+ {(entityPermissions.EditDescription ||
+ entityPermissions.EditAll) && (
+ descriptionHandler(true)}
+ />
+ )}
+
+ }>
+ descriptionHandler(false)}
+ onDescriptionUpdate={onDescriptionUpdate}
+ />
+
+
+
+
+
- ) : (
- fetchErrorPlaceHolder({
- onClick: () => handleAddTeam(true),
- permission: createTeamPermission,
- heading: t('label.team-plural'),
- doc: TEAMS_DOCS,
- })
- )}
- {previewAsset && (
-
-
setPreviewAsset(undefined)}
+
+
- )}
- setDeletingUser(DELETE_USER_INITIAL_STATE)}
- onConfirm={handleRemoveUser}
- />
-
- {addAttribute && (
- data.id)}
- title={`${t('label.add')} ${addAttribute.type}`}
- type={addAttribute.type}
- onCancel={() => setAddAttribute(undefined)}
- onSave={(data) => handleAddAttribute(data)}
+ setDeletingUser(DELETE_USER_INITIAL_STATE)}
+ onConfirm={handleRemoveUser}
/>
- )}
- {selectedEntity && (
- setEntity(undefined)}
- onOk={async () => {
- await handleAttributeDelete(
- selectedEntity.record,
- selectedEntity.attribute
- );
- setEntity(undefined);
- }}>
-
- {t('message.are-you-sure-you-want-to-remove-child-from-parent', {
- child: getEntityName(selectedEntity.record),
- parent: getEntityName(currentTeam),
- })}
-
-
- )}
-
+ {addAttribute && (
+ data.id)}
+ title={`${t('label.add')} ${addAttribute.type}`}
+ type={addAttribute.type}
+ onCancel={() => setAddAttribute(undefined)}
+ onSave={(data) => handleAddAttribute(data)}
+ />
+ )}
+ {selectedEntity && (
+ setEntity(undefined)}
+ onOk={async () => {
+ await handleAttributeDelete(
+ selectedEntity.record,
+ selectedEntity.attribute
+ );
+ setEntity(undefined);
+ }}>
+
+ {t('message.are-you-sure-you-want-to-remove-child-from-parent', {
+ child: getEntityName(selectedEntity.record),
+ parent: getEntityName(currentTeam),
+ })}
+
+
+ )}
+
+
);
};
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Team/TeamDetails/TeamHierarchy.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Team/TeamDetails/TeamHierarchy.tsx
index a27284ab2dc..671d255e466 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Team/TeamDetails/TeamHierarchy.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Team/TeamDetails/TeamHierarchy.tsx
@@ -138,7 +138,7 @@ const TeamHierarchy: FC