File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { useInstrumentInfoQuery } from '@/hooks/useInstrumentInfoQuery';
1212import { useInstrumentRecords } from '@/hooks/useInstrumentRecords' ;
1313import { useAppStore } from '@/store' ;
1414import { downloadSubjectTableExcel } from '@/utils/excel' ;
15+ import { useFindSession } from './useFindSession' ;
1516
1617type InstrumentVisualizationRecord = {
1718 [ key : string ] : unknown ;
@@ -54,6 +55,19 @@ export function useInstrumentVisualization({ params }: UseInstrumentVisualizatio
5455 }
5556 } ) ;
5657
58+ const usersQuery = recordsQuery . data ?. map ( ( item ) => {
59+ const sessionInfo = useFindSession ( {
60+ enabled : true ,
61+ params : { id : item . sessionId }
62+ } ) ;
63+ if ( sessionInfo . data ) {
64+ return sessionInfo . data . userId ;
65+ }
66+ return 'N/A' ;
67+ } ) ;
68+
69+ console . log ( usersQuery ) ;
70+
5771 const dl = ( option : 'CSV' | 'CSV Long' | 'Excel' | 'Excel Long' | 'JSON' | 'TSV' | 'TSV Long' ) => {
5872 if ( ! instrument ) {
5973 notifications . addNotification ( { message : t ( 'errors.noInstrumentSelected' ) , type : 'error' } ) ;
You can’t perform that action at this time.
0 commit comments