Skip to content

Commit c4fbdf3

Browse files
authored
Merge pull request #194 from CBIIT/dev-1.2.2
Pull from Dev 1.2.2
2 parents 1c6f819 + 8fe6e9b commit c4fbdf3

File tree

5 files changed

+53
-36
lines changed

5 files changed

+53
-36
lines changed

src/components/common/NavBar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ const NavBar = () => {
414414
<MobileLiSection style={path === "/about" || path.startsWith("/about?") ? mobileActiveStyle : null}><NavLink to="/about" onClick={handleMobileMenuClick}>About CCDI Data Catalog</NavLink></MobileLiSection>
415415
<MobileLiSection style={path === "/glossary" || path.startsWith("/glossary?") ? mobileActiveStyle : null}><NavLink to="/glossary" onClick={handleMobileMenuClick}>Glossary</NavLink></MobileLiSection>
416416
<MobileLiSection style={path === "/siteupdate" || path.startsWith("/siteupdate?") ? mobileActiveStyle : null}><NavLink to="/siteupdate" onClick={handleMobileMenuClick}>Site Updates</NavLink></MobileLiSection>
417-
<MobileLiSection><a href="/User Guide for CCDC v1.2.1.pdf">User Guide (PDF)</a></MobileLiSection>
417+
<MobileLiSection><a href="/User Guide for CCDC v1.2.2.pdf">User Guide (PDF)</a></MobileLiSection>
418418
</MobileSubUl>
419419
</MobileUlContainer>
420420
<UlContainer id="primary-navigation" className="primary-navigation">
@@ -430,7 +430,7 @@ const NavBar = () => {
430430
<li><NavLink to="/about" style={({ isActive }) => (isActive ? activeStyle : null)}>&nbsp; &nbsp; About CCDI Data Catalog</NavLink></li>
431431
<li><NavLink to="/glossary" style={({ isActive }) => (isActive ? activeStyle : null)}>&nbsp; &nbsp; Glossary</NavLink></li>
432432
<li><NavLink to="/siteupdate" style={({ isActive }) => (isActive ? activeStyle : null)}>&nbsp; &nbsp; Site Updates</NavLink></li>
433-
<li><a href="/User Guide for CCDC v1.2.1.pdf" target="_blank" rel="noreferrer">&nbsp; &nbsp; User Guide (PDF)</a></li>
433+
<li><a href="/User Guide for CCDC v1.2.2.pdf" target="_blank" rel="noreferrer">&nbsp; &nbsp; User Guide (PDF)</a></li>
434434
</ul>
435435
</LiSection>
436436
</UlContainer>

src/pages/datasetDetailPage/DatasetDetail.js

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ const sortingAdditionalElement = (content) => {
9898
}
9999
const result = [];
100100
if (content.published_in) {
101-
result.push("published in");
101+
result.push("PUBLISHED IN");
102102
}
103103
if (content.projects) {
104-
result.push("projects");
104+
result.push("PROJECTS");
105105
}
106106
if (content.additional) {
107107
content.additional.forEach((ade) => {
108-
result.push(ade.attr_name.toLowerCase());
108+
result.push(ade.attr_name.toUpperCase());
109109
});
110110
}
111111
return result.sort();
@@ -135,36 +135,22 @@ const DatasetDetail = ({
135135
const additionalDict = {};
136136
if (content && content.additional) {
137137
content.additional.forEach((adt) => {
138-
additionalDict[adt.attr_name.toLowerCase()] = adt.attr_set;
138+
additionalDict[adt.attr_name.toUpperCase()] = adt.attr_set;
139139
});
140140
}
141141
let pocLinks = !content || content.poc_email === undefined || content.poc_email === null ? "" : content.poc_email;
142142
if (pocLinks) { pocLinks = pocLinks.split(';'); }
143143
const sortedAdditonals = sortingAdditionalElement(content);
144144
const grantIDs = [];
145-
const grantNames = [];
146145
const grants = new Map();
147146
if (sortedAdditonals) {
148-
sortedAdditonals.forEach((ad) => {
149-
if (ad.toUpperCase() === "GRANT ID") {
150-
additionalDict[ad].forEach((item, i) => {
151-
grantIDs[i] = item.k;
152-
});
153-
}
154-
if (ad.toUpperCase() === "GRANT NAME") {
155-
additionalDict[ad].forEach((item, i) => {
156-
grantNames[i] = item.k;
157-
});
158-
}
159-
});
160-
}
161-
for (let i = 0; i < grantIDs.length; i += 1) {
162-
if (grantNames[i] === null) {
163-
grants.set(grantIDs[i], grantNames[i - 1]);
147+
if (sortedAdditonals.includes("GRANT ID")) {
148+
additionalDict["GRANT ID"].forEach((item, i) => {
149+
grantIDs[i] = item.k;
150+
grants.set(item.k, additionalDict["GRANT NAME"][i].k);
151+
});
164152
}
165-
grants.set(grantIDs[i], grantNames[i]);
166153
}
167-
const sortedGrants = new Map([...grants].sort());
168154
useEffect(() => {
169155
if (!content) {
170156
onPageLoadDatasetDetail(id).catch(error => {
@@ -738,7 +724,7 @@ const DatasetDetail = ({
738724
{
739725
sortedAdditonals.map((ad, adIdx) => {
740726
const adkey = `ad_${adIdx}`;
741-
if (ad === "published in") {
727+
if (ad === "PUBLISHED IN") {
742728
let publishedLinks = content.published_in === undefined || content.published_in === null ? "" : content.published_in;
743729
if (content.published_in) {
744730
publishedLinks = publishedLinks.split(';');
@@ -752,15 +738,17 @@ const DatasetDetail = ({
752738
<>
753739
<div className="dataElementLabel">Published In</div>
754740
<div className="dataElementContentPublished">
755-
{publishedLinks[0] ? <a href={publishedLinks[0]} className="dataElementContentPublished" target="_blank" rel="noreferrer noopener">{publishedLinks[0]}</a> : null}
756-
<div>{publishedLinks[1] ? <a href={publishedLinks[1]} className="dataElementContentPublished" target="_blank" rel="noreferrer noopener">{publishedLinks[1]}</a> : null}</div>
757-
<div>{publishedLinks[2] ? <a href={publishedLinks[2]} className="dataElementContentPublished" target="_blank" rel="noreferrer noopener">{`${publishedLinks[2]}`}</a> : null}</div>
758-
{/* <a href={content.published_in} target="_blank" rel="noreferrer noopener">{content.published_in}</a> */}
741+
{ publishedLinks ? publishedLinks.map((item, idx) => {
742+
const key = `sort_${idx}`;
743+
return (
744+
<div key={key}><a href={item} className="dataElementContentPublished" target="_blank" rel="noreferrer noopener">{item}</a></div>
745+
);
746+
}) : null}
759747
</div>
760748
</>
761749
);
762750
}
763-
if (ad === "projects") {
751+
if (ad === "PROJECTS") {
764752
return (
765753
<>
766754
<div className="dataElementLabel">Projects</div>
@@ -790,7 +778,7 @@ const DatasetDetail = ({
790778
</>
791779
);
792780
}
793-
if (ad.toUpperCase() === "GRANT ID") {
781+
if (ad === "GRANT ID") {
794782
return (
795783
<>
796784
<div className="dataElementLabel">Grant Information</div>
@@ -801,7 +789,7 @@ const DatasetDetail = ({
801789
<tbody>
802790
<tr>
803791
{item ? <td width="210px"><div className="grantIDDataContainer">{item}</div></td> : null}
804-
{sortedGrants.get(item) ? <td><div className="grantNameDataContainer">{sortedGrants.get(item)}</div></td> : null}
792+
{grants.get(item) ? <td><div className="grantNameDataContainer">{grants.get(item)}</div></td> : null}
805793
</tr>
806794
</tbody>
807795
</table>
@@ -814,10 +802,10 @@ const DatasetDetail = ({
814802
return (
815803
<div>
816804
<div key={adkey} className="dataElementLabel">
817-
{ad.toUpperCase() === "GRANT ID" || ad.toUpperCase() === "GRANT NAME" ? null : ad.toUpperCase()}
818-
{ad.toUpperCase() === "GRANT ID" || ad.toUpperCase() === "GRANT NAME" ? null : <br />}
805+
{ad === "GRANT ID" || ad === "GRANT NAME" ? null : ad}
806+
{ad === "GRANT ID" || ad === "GRANT NAME" ? null : <br />}
819807
{additionalDict[ad].map((adee, adeeidx) => {
820-
if (ad.toUpperCase() !== "GRANT ID" && ad.toUpperCase() !== "GRANT NAME") {
808+
if (ad !== "GRANT ID" && ad !== "GRANT NAME") {
821809
const adeekey = `adee_${adeeidx}`;
822810
let additonalText = adee.k === undefined ? "" : adee.k;
823811
if (adee.k) { additonalText = additonalText.split(';'); }

src/pages/datasetDetailPage/datasetDetailPage.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ ul.breadcrumb li a:hover {
6060
font-family: Inter;
6161
width: 95%;
6262
inline-size: 960px;
63+
min-height: 120px;
6364
}
6465

6566
.datasetDetailHeaderLabelLong {
@@ -71,6 +72,7 @@ ul.breadcrumb li a:hover {
7172
width: 95%;
7273
inline-size: 960px;
7374
line-height: 36px;
75+
min-height: 120px;
7476
}
7577

7678
.datasetDetailHeaderLabel2 {
@@ -82,6 +84,7 @@ ul.breadcrumb li a:hover {
8284
width: 95%;
8385
inline-size: 960px;
8486
line-height: 36px;
87+
min-height: 120px;
8588
}
8689

8790
.datasetDetailHeaderLabel3 {
@@ -93,6 +96,7 @@ ul.breadcrumb li a:hover {
9396
width: 95%;
9497
inline-size: 960px;
9598
line-height: 33px;
99+
min-height: 120px;
96100
}
97101

98102
.datasetDetailHeaderLabel4 {
@@ -104,6 +108,7 @@ ul.breadcrumb li a:hover {
104108
width: 95%;
105109
inline-size: 960px;
106110
line-height: 24px;
111+
min-height: 120px;
107112
}
108113

109114
.datasetDetailHeaderContent {

src/pages/glossaryPage/index.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,12 @@ const Glossary = () => {
416416
<p className="glossaryItemDescription">MicroRNA Childhood Cancer Catalog</p>
417417
<br />
418418
</div>
419+
<div className="m">
420+
<h2 className="glossaryItemHeader">MCI</h2>
421+
<span className="glossaryItemType">Resource Abbreviation</span>
422+
<p className="glossaryItemDescription">Molecular Characterization Initiative</p>
423+
<br />
424+
</div>
419425
<div className="m">
420426
<h2 className="glossaryItemHeader">Mixed</h2>
421427
<span className="glossaryItemType">Pediatric Specific</span>
@@ -434,6 +440,12 @@ const Glossary = () => {
434440
<p className="glossaryItemDescription">Magnetic Resonance</p>
435441
<br />
436442
</div>
443+
<div className="m">
444+
<h2 className="glossaryItemHeader">MSKCC</h2>
445+
<span className="glossaryItemType">Resource Abbreviation</span>
446+
<p className="glossaryItemDescription">Memorial Sloan Kettering Cancer Center</p>
447+
<br />
448+
</div>
437449
<div className="m">
438450
<h2 className="glossaryItemHeader">MTP</h2>
439451
<span className="glossaryItemType">Resource Abbreviation</span>
@@ -496,6 +508,12 @@ const Glossary = () => {
496508
<p className="glossaryItemDescription">Osteosarcoma Genomics</p>
497509
<br />
498510
</div>
511+
<div className="o">
512+
<h2 className="glossaryItemHeader">OHSU</h2>
513+
<span className="glossaryItemType">Resource Abbreviation</span>
514+
<p className="glossaryItemDescription">Oregon Health & Science University</p>
515+
<br />
516+
</div>
499517
<div className="o">
500518
<h2 className="glossaryItemHeader">OT</h2>
501519
<span className="glossaryItemType">Resource Abbreviation</span>
@@ -721,6 +739,12 @@ const Glossary = () => {
721739
{
722740
key === 'U' && (
723741
<>
742+
<div className="u">
743+
<h2 className="glossaryItemHeader">UCSF</h2>
744+
<span className="glossaryItemType">Resource Abbreviation</span>
745+
<p className="glossaryItemDescription">University of California, San Francisco</p>
746+
<br />
747+
</div>
724748
<div className="u">
725749
<h2 className="glossaryItemHeader">US</h2>
726750
<span className="glossaryItemType">General Abbreviation</span>

0 commit comments

Comments
 (0)