Skip to content

Commit

Permalink
Fix datafileSearch investigationfacilitycycle and new facet requests #…
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-austin committed Sep 28, 2023
1 parent 1547842 commit 0193e68
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,17 @@ const DatasetCardView = (props: DatasetCardViewProps): React.ReactElement => {
minCount: minNumResults,
maxCount: maxNumResults,
restrict,
facets: [{ target: 'Dataset' }],
facets: [
{ target: 'Dataset' },
{
target: 'DatasetParameter',
dimensions: [{ dimension: 'type.name' }],
},
{
target: 'InvestigationInstrument',
dimensions: [{ dimension: 'instrument.name' }],
},
],
},
filters
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ const InvestigationCardView = (
},
{
target: 'Sample',
dimensions: [{ dimension: 'type.name' }],
dimensions: [{ dimension: 'sample.type.name' }],
},
{
target: 'InvestigationInstrument',
dimensions: [{ dimension: 'instrument.name' }],
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ const DatafileSearchTable = (
target: 'DatafileParameter',
dimensions: [{ dimension: 'type.name' }],
},
{
target: 'InvestigationInstrument',
dimensions: [{ dimension: 'instrument.name' }],
},
],
},
filters,
Expand Down Expand Up @@ -190,7 +194,7 @@ const DatafileSearchTable = (
instrumentId:
datafileData.investigationinstrument?.[0]?.['instrument.id'],
facilityCycleId:
datafileData.investigationfacilitycycle?.[0][
datafileData.investigationfacilitycycle?.[0]?.[
'facilityCycle.id'
],
},
Expand Down Expand Up @@ -239,7 +243,7 @@ const DatafileSearchTable = (
instrumentId:
datafileData.investigationinstrument?.[0]?.['instrument.id'],
facilityCycleId:
datafileData.investigationfacilitycycle?.[0][
datafileData.investigationfacilitycycle?.[0]?.[
'facilityCycle.id'
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,17 @@ const DatasetSearchTable = ({
minCount: minNumResults,
maxCount: maxNumResults,
restrict,
facets: [{ target: 'Dataset' }],
facets: [
{ target: 'Dataset' },
{
target: 'DatasetParameter',
dimensions: [{ dimension: 'type.name' }],
},
{
target: 'InvestigationInstrument',
dimensions: [{ dimension: 'instrument.name' }],
},
],
},
filters,
{ enabled: dataset }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ const InvestigationSearchTable = (
},
{
target: 'Sample',
dimensions: [{ dimension: 'type.name' }],
dimensions: [{ dimension: 'sample.type.name' }],
},
{
target: 'InvestigationInstrument',
dimensions: [{ dimension: 'instrument.name' }],
},
],
},
Expand Down

0 comments on commit 0193e68

Please sign in to comment.