Fix : As admin, setting myself as owner of a table does not update the table view. (#1166)

This commit is contained in:
Sachin Chaurasiya 2021-11-12 15:38:48 +05:30 committed by GitHub
parent 2a3645577b
commit 42caa8abf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -45,9 +45,9 @@ const ErrorPlaceHolderES = ({ type, errorMessage, query = '' }: Props) => {
const getUserDisplayName = () => { const getUserDisplayName = () => {
return isAuthDisabled return isAuthDisabled
? AppState.users?.length > 0 ? AppState.users?.length > 0
? AppState.users[0].displayName ? AppState.users[0].displayName || AppState.users[0].name
: 'User' : 'User'
: AppState.userDetails.displayName; : AppState.userDetails.displayName || AppState.userDetails.name;
}; };
const noRecordForES = () => { const noRecordForES = () => {
return ( return (

View File

@ -216,7 +216,7 @@ const TeamsPage = () => {
data-testid="user-card-container"> data-testid="user-card-container">
{currentTeam?.users?.map((user, index) => { {currentTeam?.users?.map((user, index) => {
const User = { const User = {
description: user.description || '', description: user.displayName || '',
name: user.name || '', name: user.name || '',
id: user.id, id: user.id,
}; };

View File

@ -93,7 +93,7 @@ export const getOwnerFromId = (
const user = AppState.users.find((item) => item.id === id); const user = AppState.users.find((item) => item.id === id);
if (user) { if (user) {
retVal = { retVal = {
name: user.displayName, name: user.displayName || user.name,
id: user.id, id: user.id,
type: 'user', type: 'user',
}; };