From: Daniel Kutyła Date: Wed, 3 Feb 2021 19:29:08 +0000 (+0100) Subject: 17205: Fixed types X-Git-Tag: 2.1.2~3^2 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/c6ccae902b16d7ff421e87f1b9c3578ef8a4334e 17205: Fixed types Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła --- diff --git a/src/views-components/data-explorer/renderers.tsx b/src/views-components/data-explorer/renderers.tsx index 7d870bc1..6cf29fae 100644 --- a/src/views-components/data-explorer/renderers.tsx +++ b/src/views-components/data-explorer/renderers.tsx @@ -20,7 +20,7 @@ import { WorkflowResource } from '~/models/workflow'; import { ResourceStatus as WorkflowStatus } from '~/views/workflow-panel/workflow-panel-view'; import { getUuidPrefix, openRunProcess } from '~/store/workflow-panel/workflow-panel-actions'; import { openSharingDialog } from '~/store/sharing-dialog/sharing-dialog-actions'; -import { UserResource } from '~/models/user'; +import { getUserFullname, User, UserResource } from '~/models/user'; import { toggleIsActive, toggleIsAdmin } from '~/store/users/users-actions'; import { LinkResource } from '~/models/link'; import { navigateTo } from '~/store/navigation/navigation-action'; @@ -440,10 +440,10 @@ export const ResourceOwnerWithName = connect( (state: RootState, props: { uuid: string }) => { let ownerName = ''; - const resource = getResource(props.uuid)(state.resources); + const resource = getResource(props.uuid)(state.resources); if (resource) { - ownerName = (resource as any).fullName || resource.name; + ownerName = getUserFullname(resource as User) || (resource as GroupContentsResource).name; } return { uuid: props.uuid, ownerName }; @@ -460,7 +460,7 @@ export const ResourceOwnerWithName = } return - {uuid} ({ownerName}) + {ownerName} ({uuid}) ; }); diff --git a/src/views-components/details-panel/project-details.tsx b/src/views-components/details-panel/project-details.tsx index 34a372c9..61797373 100644 --- a/src/views-components/details-panel/project-details.tsx +++ b/src/views-components/details-panel/project-details.tsx @@ -61,7 +61,7 @@ const ProjectDetailsComponent = connect(null, mapDispatchToProps)( ({ classes, project, onClick }: ProjectDetailsComponentProps) =>
} lowercaseValue={true} /> + uuidEnhancer={(uuid: string) => } /> diff --git a/src/views/collection-panel/collection-panel.tsx b/src/views/collection-panel/collection-panel.tsx index 32e37d46..7d54992e 100644 --- a/src/views/collection-panel/collection-panel.tsx +++ b/src/views/collection-panel/collection-panel.tsx @@ -289,7 +289,7 @@ export const CollectionDetailsAttributes = (props: { item: CollectionResource, t + linkToUuid={item.uuid} />