diff --git a/packages/libs/user-datasets/src/lib/Actions/UserDatasetsActions.ts b/packages/libs/user-datasets/src/lib/Actions/UserDatasetsActions.ts index 17b0968c8d..1e26325ee0 100644 --- a/packages/libs/user-datasets/src/lib/Actions/UserDatasetsActions.ts +++ b/packages/libs/user-datasets/src/lib/Actions/UserDatasetsActions.ts @@ -466,8 +466,7 @@ export function loadUserDatasetDetail(id: string, loadedProjectId?: string) { .map((d) => ({ userDisplayName: d.recipient.firstName + ' ' + d.recipient.lastName, - // TODO: need a way to pass in the unique userId in details - user: 378138370, + user: d.recipient.userID, })), }; return detailReceived(id, transformedResponse); diff --git a/packages/libs/user-datasets/src/lib/Utils/types.ts b/packages/libs/user-datasets/src/lib/Utils/types.ts index f4ab23159b..18cf9f61f5 100644 --- a/packages/libs/user-datasets/src/lib/Utils/types.ts +++ b/packages/libs/user-datasets/src/lib/Utils/types.ts @@ -230,12 +230,11 @@ const visibilityOptions = keyof({ public: null, }); -const userDatasetListShareDetails = type({ +const userDatasetRecipientDetails = type({ userID: number, firstName: string, lastName: string, organization: string, - accepted: boolean, }); export const userDataset = intersection([ @@ -256,14 +255,16 @@ export const userDataset = intersection([ summary: string, description: string, sourceUrl: string, - shares: array(userDatasetListShareDetails), + shares: array( + intersection([userDatasetRecipientDetails, type({ accepted: boolean })]) + ), importMessages: array(string), }), ]); const userDatasetDetailsShareDetails = type({ status: keyof({ grant: null, revoke: null }), - recipient: userMetadata, + recipient: userDatasetRecipientDetails, }); export const userDatasetDetails = intersection([