-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* formatting/type errors * tweak for pi array check, updated placeholder text * initial work minus file listing for nees publication details * reworking top level data styling * updated citation modal title * first pass at adding file listing * fix: app card design bugs DES-2741 through DES-2745 (#1223) * fix: DES-2471, DES-2472, DES-2473 bugs (#1221) * fix: DES-2744 hover and focus card UI (#1224) * hotfix: des 2745 global font icon size tweaks (#1225) * refactor: des-2745 rename DS font icons stylesheet * fix: des-2745 load DS font icons + allow customize * chore: des-2745 obvious app-card font icon space * fix: des-2745 use rem not em for icon–title space * fix: des-2745 DS font icons not found * feat: des-2745 re-align certain DS font icons * feat: des-2745 re-position certain DS font icons * chore: des-2745 use (proper) `::before` syntax * fix: des-2745 title alignment after icon resize * fix: DES-2766 app with 1 variant needs diff list (#1232) * fix: DES-2766 app with 1 variant needs diff list * fix: DES-2766 more padding (designer request) * formatting * add nees listing breadcrumbs * add breadcrumbs * fix breadcrumbs --------- Co-authored-by: Jake Rosenberg <[email protected]> Co-authored-by: Wesley B <[email protected]>
- Loading branch information
1 parent
aaeeed0
commit a68714a
Showing
15 changed files
with
617 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
export { useNeesListing } from './useNeesListing'; | ||
export type { TNeesListingItem } from './useNeesListing'; | ||
|
||
export { useNeesDetails } from './useNeesDetails'; | ||
export type { TNeesDetailsItem } from './useNeesDetails'; |
112 changes: 112 additions & 0 deletions
112
client/modules/_hooks/src/datafiles/nees/useNeesDetails.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
import { useQuery } from '@tanstack/react-query'; | ||
import apiClient from '../../apiClient'; | ||
|
||
export type TNeesDetailsItem = { | ||
agavePath: string; | ||
children: Record<string, unknown>[]; | ||
deleted: boolean; | ||
format: string; | ||
length: number; | ||
name: string; | ||
path: string; | ||
permissions: string; | ||
system: string; | ||
systemID: string; | ||
type: string; | ||
metadata: { | ||
experiments: TNeesExperimentMetadata[]; | ||
project: TNeesProjectMetadata; | ||
}; | ||
}; | ||
|
||
export type TNeesExperimentMetadata = { | ||
creators: { | ||
lastName: string; | ||
firstName: string; | ||
}[]; | ||
doi: string; | ||
startDate: string; | ||
endDate: string; | ||
description: string; | ||
title: string; | ||
deleted: boolean; | ||
material: { | ||
materials: string[]; | ||
component: string; | ||
}[]; | ||
facility: { | ||
country: string; | ||
state: string; | ||
name: string; | ||
}[]; | ||
equipment: { | ||
equipment: string; | ||
component: string; | ||
equipmentClass: string; | ||
facility: string; | ||
}[]; | ||
path: string; | ||
sensors: string[]; | ||
type: string; | ||
specimenType: { | ||
name: string; | ||
}[]; | ||
name: string; | ||
}; | ||
|
||
export type TNeesProjectMetadata = { | ||
description: string; | ||
endDate: string; | ||
startDate: string; | ||
facility: { | ||
country: string; | ||
state: string; | ||
name: string; | ||
}[]; | ||
name: string; | ||
organization: { | ||
country: string; | ||
state: string; | ||
name: string; | ||
}[]; | ||
pis: { | ||
firstName: string; | ||
lastName: string; | ||
}[]; | ||
project: string; | ||
publications: { | ||
authors: string[]; | ||
title: string; | ||
}[]; | ||
system: string; | ||
title: string; | ||
sponsor: { | ||
url: string; | ||
name: string; | ||
}[]; | ||
systemId: string; | ||
}; | ||
|
||
async function getNeesDetails({ | ||
neesId, | ||
signal, | ||
}: { | ||
neesId: string; | ||
signal: AbortSignal; | ||
}) { | ||
const resp = await apiClient.get<TNeesDetailsItem>( | ||
`/api/projects/nees-publication/${neesId}/`, | ||
{ | ||
signal, | ||
} | ||
); | ||
return resp.data; | ||
} | ||
|
||
export function useNeesDetails(neesId: string) { | ||
return useQuery({ | ||
queryKey: ['datafiles', 'nees', 'details', neesId], | ||
queryFn: ({ signal }) => getNeesDetails({ neesId, signal }), | ||
enabled: !!neesId, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.line-clamped { | ||
display: -webkit-box; | ||
-webkit-box-orient: vertical; | ||
-webkit-line-clamp: 4; | ||
overflow: hidden; | ||
} | ||
|
||
.line-unclamped { | ||
display: -webkit-box; | ||
-webkit-box-orient: vertical; | ||
overflow: hidden; | ||
} | ||
|
||
th { | ||
vertical-align: top; | ||
} | ||
|
||
.nees-th { | ||
width: 25%; | ||
} | ||
|
||
.nees-td { | ||
width: 75%; | ||
} | ||
|
||
.nees-mini-table { | ||
width: 100%; | ||
margin-bottom: 0; | ||
} | ||
|
||
.nees-divider { | ||
margin-top: 10px; | ||
margin-bottom: 10px; | ||
} |
Oops, something went wrong.