Skip to content

Commit 9d5646b

Browse files
frano-mMillenniumFalconMechanic
authored andcommitted
Add sample type, model organ to project detail page. Resolves #805. (#894)
1 parent fc81a37 commit 9d5646b

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

spa/src/app/files/hca-project/hca-project.component.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,17 @@ <h4 class="fontsize-m semi-bold">Project Details</h4>
155155
<p class="fontsize-xs rhs">{{stringifyValues(state.project.project.genusSpecies,
156156
"Unspecified")}}</p>
157157
</div>
158+
<div>
159+
<p class="fontsize-xs semi-bold lhs">
160+
<hca-tooltip [tooltipClass]="'hca-tooltip narrow'"
161+
[tooltipContent]="getColumnDescription('sampleEntityType')"
162+
[tooltipDisabled]="false"
163+
[tooltipPosition]="'above'">{{getColumnDisplayName('sampleEntityType')}}
164+
</hca-tooltip>
165+
</p>
166+
<p class="fontsize-xs rhs">{{stringifyValues(state.project.project.sampleEntityType,
167+
"Unspecified")}}</p>
168+
</div>
158169
<div>
159170
<p class="fontsize-xs semi-bold lhs">
160171
<hca-tooltip [tooltipClass]="'hca-tooltip narrow'"
@@ -178,6 +189,17 @@ <h4 class="fontsize-m semi-bold">Project Details</h4>
178189
<p class="fontsize-xs rhs">{{stringifyValues(state.project.project.organPart,
179190
"Unspecified")}}</p>
180191
</div>
192+
<div *ngIf="!isSampleEntityTypeSpecimens(state.project.project.sampleEntityType)">
193+
<p class="fontsize-xs semi-bold lhs">
194+
<hca-tooltip [tooltipClass]="'hca-tooltip narrow'"
195+
[tooltipContent]="getColumnDescription('modelOrgan')"
196+
[tooltipDisabled]="false"
197+
[tooltipPosition]="'above'">{{getColumnDisplayName('modelOrgan')}}
198+
</hca-tooltip>
199+
</p>
200+
<p class="fontsize-xs rhs">{{stringifyValues(state.project.project.modelOrgan,
201+
"Unspecified")}}</p>
202+
</div>
181203
<div>
182204
<p class="fontsize-xs semi-bold lhs">
183205
<hca-tooltip [tooltipClass]="'hca-tooltip narrow'"

spa/src/app/files/hca-project/hca-project.component.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,17 @@ export class HCAProjectComponent implements OnDestroy, OnInit {
238238
return selectedProjectIds.indexOf(projectId) >= 0;
239239
}
240240

241+
/**
242+
* Returns true if sample entity type is "specimens".
243+
*
244+
* @param {string} sampleEntityType
245+
* @returns {boolean}
246+
*/
247+
public isSampleEntityTypeSpecimens(sampleEntityType: string): boolean {
248+
249+
return sampleEntityType === "specimens";
250+
}
251+
241252
/**
242253
* Returns true if workflow is any value other than "Unspecified".
243254
*

0 commit comments

Comments
 (0)