Commit 659d7e0d authored by Erik Kimmel's avatar Erik Kimmel Committed by Célia Michotey

Split orderURL field in two distinct fields, one (orderURL) used to store only...

Split orderURL field in two distinct fields, one (orderURL) used to store only real URL and the other one (orderText) to store strings. GNP-5426.
parent 9673e865
......@@ -300,7 +300,8 @@ describe('BrapiService', () => {
panel: [germplasmSet],
collection: [germplasmSet],
population: [germplasmSet],
orderURL: 'test'
orderURL: 'test',
orderText: 'test'
};
let brapiService: BrapiService;
......
......@@ -348,14 +348,19 @@
<faidare-card-row
label="Order"
[value]="germplasmGnpis.orderURL">
<ng-template *ngIf="germplasmGnpis.orderURL.startsWith('See conditions')">
{{germplasmGnpis.orderURL}}
</ng-template>
<ng-template *ngIf="!germplasmGnpis.orderURL.startsWith('See conditions')">
<ng-template>
<a [href]="germplasmGnpis.orderURL" target="_blank">Order link</a>
</ng-template>
</faidare-card-row>
<faidare-card-row
label="Order"
[value]="germplasmGnpis.orderText">
<ng-template>
{{ germplasmGnpis.orderText }}
</ng-template>
</faidare-card-row>
</div>
</ng-template>
</faidare-card-section>
......
......@@ -187,7 +187,8 @@ describe('GermplasmCardComponent', () => {
collection: [gnpisGermplasmSet],
population: [gnpisGermplasmSet],
'schema:includedInDataCatalog': source,
orderURL: ''
orderURL: '',
orderText: ''
};
const gnpisService = jasmine.createSpyObj(
......
......@@ -24,6 +24,7 @@ export interface Germplasm extends BrapiGermplasm {
collection: GermplasmSet[];
population: GermplasmSet[];
orderURL?: string;
orderText?: string;
}
export interface Site {
......
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