Commit 9f1702a5 authored by Alejandro De Maria Antolinos's avatar Alejandro De Maria Antolinos
Browse files

It fixes icat/E-DataPortalls

parent 0c12d10d
Pipeline #51179 passed with stage
in 2 minutes and 56 seconds
......@@ -115,6 +115,7 @@ export function beamlineFormatter(investigation) {
}
export function nameFormatter(investigation, showLink, section = 'datasets') {
console.log(investigation);
const { id, name } = investigation;
if (!showLink) {
......
......@@ -39,7 +39,15 @@ const ParcelColumns = [
{
text: 'Proposal',
dataField: 'experiment',
formatter: (_, parcel) => nameFormatter(parcel.investigation, true),
formatter: (_, parcel) => {
console.log(parcel);
return nameFormatter(
parcel.investigation
? parcel.investigation
: { name: parcel.investigationName, id: parcel.investigationId },
true
);
},
sort: true,
responsiveHeaderStyle: {
xs: { width: 150, hidden: UI.userPortal.isLinkEnabled },
......@@ -76,7 +84,7 @@ const ParcelColumns = [
if (!parcel.investigation) {
return false;
}
const beamline = parcel.investigation.instrument.name;
const beamline = parcel.investigation?.instrument?.name;
return !!beamline && beamline.toLowerCase().includes(searchText);
},
sort: true,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment