Commit 246a37c1 authored by Jérémy Destin's avatar Jérémy Destin Committed by Célia Michotey
Browse files

fix: Fix germplasm card's bug about test before display. Rebase on the last...

fix: Fix germplasm card's bug about test before display. Rebase on the last version of master. Minor fixes GNP-5490
parent b88a3503
......@@ -5,7 +5,6 @@
Germplasm: {{ germplasmGnpis.germplasmName }}
</h3>
<div class="container-fluid">
<div class="row align-items-center">
<!--Section for the image representing the germplasm and the details about this image-->
......@@ -272,7 +271,6 @@
<ng-template>
<div class="card-body card-section-body">
<gpds-card-row
label="Institution">
<ng-template>
......@@ -352,27 +350,42 @@
<gpds-card-row
label="Accession number"
[value]="germplasmGnpis.collector.accessionNumber">
[test]="germplasmGnpis.collector && germplasmGnpis.collector.accessionNumber">
<ng-template>
{{ germplasmGnpis.collector.accessionNumber }}
</ng-template>
</gpds-card-row>
<gpds-card-row
label="Collectors"
[value]="germplasmGnpis.collector.collectors">
[test]="germplasmGnpis.collector && germplasmGnpis.collector.collectors">
<ng-template>
{{ germplasmGnpis.collector.collectors }}
</ng-template>
</gpds-card-row>
<gpds-card-row
label="Distribution status"
[value]="germplasmGnpis.collector.distributionStatus">
[test]="germplasmGnpis.collector && germplasmGnpis.collector.distributionStatus">
<ng-template>
{{ germplasmGnpis.collector.distributionStatus }}
</ng-template>
</gpds-card-row>
<gpds-card-row
label="Germplasm Permanent Unique Identifier"
[value]="germplasmGnpis.collector.germplasmPUI">
[test]="germplasmGnpis.collector && germplasmGnpis.collector.germplasmPUI">
<ng-template>
{{ germplasmGnpis.collector.germplasmPUI }}
</ng-template>
</gpds-card-row>
<gpds-card-row
label="Material type"
[value]="germplasmGnpis.collector.materialType">
[test]="germplasmGnpis.collector && germplasmGnpis.collector.materialType">
<ng-template>
{{ germplasmGnpis.collector.materialType }}
</ng-template>
</gpds-card-row>
<gpds-card-row
......@@ -490,8 +503,6 @@
</gpds-card-row>
</ng-template>
<div>
<gpds-card-row
label="Institute name"
[test]="donor.donorInstitute.instituteName">
......@@ -527,8 +538,6 @@
[value]="donor.donorInstituteCode">
</gpds-card-row>
</div>
</ng-container>
</ng-template>
</gpds-card-row>
......
......@@ -125,8 +125,8 @@ export class GermplasmCardComponent implements OnInit {
}
testCollectorInstituteFields() {
return (
this.germplasmGnpis.collector.germplasmPUI
return (this.germplasmGnpis.collector) &&
(this.germplasmGnpis.collector.germplasmPUI
|| this.germplasmGnpis.collector.accessionNumber
|| this.germplasmGnpis.collector.accessionCreationDate
|| this.germplasmGnpis.collector.materialType
......
Supports Markdown
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