[develop | DONE | FIXED] : show again enermaps tab in result landing

This commit is contained in:
argirok 2023-11-15 17:34:15 +02:00
parent 51bd7efcbe
commit f0c37512c3
2 changed files with 9 additions and 10 deletions

View File

@ -297,13 +297,13 @@
<my-tab *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0"
[tabTitle]="'External Databases'" [tabId]="'bioentities'" [tabNumber]="bioentitiesNum">
</my-tab>
<my-tab *ngIf="resultLandingInfo && (resultLandingInfo.measure || hasAltMetrics)"
[tabTitle]="'Metrics'" [tabId]="'metrics'">
</my-tab>
<my-tab *ngIf="enermapsId && properties.enermapsURL"
[tabTitle]="'Enermaps Tool'" [tabId]="'enermaps'"
customClass="portalTab">
</my-tab>
<my-tab *ngIf="resultLandingInfo && (resultLandingInfo.measure || hasAltMetrics)"
[tabTitle]="'Metrics'" [tabId]="'metrics'">
</my-tab>
</my-tabs>
</div>
</div>
@ -328,14 +328,14 @@
<ng-container *ngTemplateOutlet="bioentities_content"></ng-container>
</div>
</ng-container>
<ng-container *ngIf="resultLandingInfo && ((resultLandingInfo.measure && (resultLandingInfo.measure.bip.length || resultLandingInfo.measure.counts.length)) || hasAltMetrics)">
<ng-container *ngTemplateOutlet="metricsContent"></ng-container>
</ng-container>
<ng-container *ngIf="enermapsId && properties.enermapsURL">
<div id="enermaps" class="landing-section">
<ng-container *ngTemplateOutlet="enermapsTool_content"></ng-container>
</div>
</ng-container>
<ng-container *ngIf="resultLandingInfo && ((resultLandingInfo.measure && (resultLandingInfo.measure.bip.length || resultLandingInfo.measure.counts.length)) || hasAltMetrics)">
<ng-container *ngTemplateOutlet="metricsContent"></ng-container>
</ng-container>
</div>
<div class="uk-text-xsmall uk-hidden@m"><ng-container *ngTemplateOutlet="graph_and_feedback_template"></ng-container></div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"

View File

@ -554,10 +554,6 @@ export class ResultLandingComponent {
}
}
}
if (this.communityId && this.communityId == "enermaps" && properties.enermapsURL) {
this.enermapsId = ParsingFunctions.getEnermapsConceptId(this.resultLandingInfo.contexts);
}
this.relatedClassFilters = [{"label": "All relations", "value": ""}];
if (this.resultLandingInfo.relatedClassFilters.size > 1) {
for (let relClass of this.resultLandingInfo.relatedClassFilters) {
@ -591,6 +587,9 @@ export class ResultLandingComponent {
this.cdr.detectChanges();
if (contexts) {
if (this.communityId && this.communityId == "enermaps" && properties.enermapsURL) {
this.enermapsId = ParsingFunctions.getEnermapsConceptId(contexts);
}
await this.promise;
if(this.publicCommunities && this.publicCommunities.length > 0) {
this.resultLandingInfo.contexts = contexts.filter(context => {