Use team display name in team switcher menu
- /teams/find_teams returns team objects instead of just team names - use display_name in UI instead of name in the team switch menu
Этот коммит содержится в:
@@ -145,7 +145,7 @@ export default class NavbarDropdown extends React.Component {
|
||||
|
||||
var teams = [];
|
||||
|
||||
if (this.state.teams.length > 1) {
|
||||
if (Object.keys(this.state.teams).length > 1) {
|
||||
teams.push(
|
||||
<li
|
||||
className='divider'
|
||||
@@ -154,11 +154,14 @@ export default class NavbarDropdown extends React.Component {
|
||||
</li>
|
||||
);
|
||||
|
||||
this.state.teams.forEach((teamName) => {
|
||||
if (teamName !== this.props.teamName) {
|
||||
teams.push(<li key={teamName}><a href={Utils.getWindowLocationOrigin() + '/' + teamName}>{'Switch to ' + teamName}</a></li>);
|
||||
for (let teamId in this.state.teams) {
|
||||
if (this.state.teams.hasOwnProperty(teamId)) {
|
||||
let team = this.state.teams[teamId];
|
||||
if (team.name !== this.props.teamName) {
|
||||
teams.push(<li key={team.name}><a href={Utils.getWindowLocationOrigin() + '/' + team.name}>{'Switch to ' + team.display_name}</a></li>);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (global.window.config.EnableTeamCreation === 'true') {
|
||||
|
||||
Ссылка в новой задаче
Block a user