Commit fb586eaa authored by Maud Marty's avatar Maud Marty Committed by Célia Michotey
Browse files

fix: test germplasmMcpd fields

parent e94afccd
<faidare-loading-spinner [loading]="loading" class="float-right"></faidare-loading-spinner>
<ng-container *ngIf="germplasmGnpis && germplasmMcpd">
<ng-container *ngIf="germplasmGnpis">
<h3 class="mb-4">
<img *ngIf="!loading && germplasmGnpis.holdingGenbank && germplasmGnpis.holdingGenbank.instituteName"
[src]="germplasmGnpis.holdingGenbank.logo"
......@@ -18,27 +18,27 @@
<ng-template #taxonTemplate>
<faidare-card-row
label="Genus"
[test]="germplasmMcpd.genus">
[test]="germplasmGnpis.genus">
<ng-template>
<i>{{ germplasmMcpd.genus }}</i>
<i>{{ germplasmGnpis.genus }}</i>
</ng-template>
</faidare-card-row>
<faidare-card-row
label="Species"
[test]="germplasmMcpd.species">
[test]="germplasmGnpis.species">
<ng-template>
<i>{{ germplasmMcpd.species }}</i>
{{ germplasmMcpd.speciesAuthority ? '(' + germplasmMcpd.speciesAuthority + ')' : '' }}
<i>{{ germplasmGnpis.species }}</i>
{{ germplasmGnpis.speciesAuthority ? '(' + germplasmGnpis.speciesAuthority + ')' : '' }}
</ng-template>
</faidare-card-row>
<faidare-card-row
label="Subtaxa"
[test]="germplasmMcpd.subtaxon">
[test]="germplasmGnpis.subtaxa">
<ng-template>
<i>{{ germplasmMcpd.subtaxon }}</i>
{{ germplasmMcpd.subtaxonAuthority ? '(' + germplasmMcpd.subtaxonAuthority + ')' : '' }}
<i>{{ germplasmGnpis.subtaxa }}</i>
{{ germplasmGnpis.subtaxaAuthority ? '(' + germplasmGnpis.subtaxaAuthority + ')' : '' }}
</ng-template>
</faidare-card-row>
......@@ -266,7 +266,7 @@
<faidare-card-row
label="Biological status"
[value]="germplasmMcpd.biologicalStatusOfAccessionCode">
[value]="germplasmGnpis.biologicalStatusOfAccessionCode">
</faidare-card-row>
<faidare-card-row
......@@ -281,7 +281,7 @@
<faidare-card-row
label="Pedigree"
[value]="germplasmMcpd.ancestralData">
[value]="germplasmGnpis.pedigree">
</faidare-card-row>
<faidare-card-row
......@@ -346,6 +346,14 @@
[value]="germplasmGnpis.presenceStatus">
</faidare-card-row>
<faidare-card-row
label="MLS status"
[test]="germplasmMcpd && germplasmMcpd.mlsStatus">
<ng-template>
{{ germplasmMcpd.mlsStatus }}
</ng-template>
</faidare-card-row>
</div>
</ng-template>
</faidare-card-section>
......@@ -401,7 +409,7 @@
<faidare-card-row
label="Acquisition Source Code"
[test]="germplasmMcpd.acquisitionSourceCode">
[test]="germplasmMcpd && germplasmMcpd.acquisitionSourceCode">
<ng-template>
{{ germplasmMcpd.acquisitionSourceCode }}
</ng-template>
......
......@@ -89,14 +89,14 @@ export class GermplasmCardComponent implements OnInit {
} else if (this.germplasmGnpis.genusSpecies) {
this.germplasmTaxon = this.germplasmGnpis.genusSpecies;
this.germplasmTaxonAuthor = this.germplasmGnpis.speciesAuthority;
} else if (this.germplasmMcpd.subtaxon) {
this.germplasmTaxon = this.germplasmMcpd.genus + ' ' + this.germplasmMcpd.species + ' ' + this.germplasmMcpd.subtaxon;
this.germplasmTaxonAuthor = this.germplasmMcpd.subtaxonAuthority;
} else if (this.germplasmMcpd.species) {
this.germplasmTaxon = this.germplasmMcpd.genus + ' ' + this.germplasmMcpd.species;
} else if (this.germplasmGnpis.subtaxa) {
this.germplasmTaxon = this.germplasmGnpis.genus + ' ' + this.germplasmGnpis.species + ' ' + this.germplasmGnpis.subtaxa;
this.germplasmTaxonAuthor = this.germplasmGnpis.subtaxaAuthority;
} else if (this.germplasmGnpis.species) {
this.germplasmTaxon = this.germplasmGnpis.genus + ' ' + this.germplasmGnpis.species;
this.germplasmTaxonAuthor = this.germplasmGnpis.speciesAuthority;
} else {
this.germplasmTaxon = this.germplasmMcpd.genus;
this.germplasmTaxon = this.germplasmGnpis.genus;
this.germplasmTaxonAuthor = '';
}
}
......
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