Skip to content
Snippets Groups Projects
Commit c3337761 authored by mathias.chouet's avatar mathias.chouet
Browse files

Fix #236

parent 33113506
No related branches found
No related tags found
1 merge request!49Resolve "Ajout du module de calcul d'une passe à bassins"
<!-- @TODO copied from var-results.component.html > merge ?-->
<div class="pab-results-table-container" #pabResultsTable *ngIf="hasResults" fxLayout="row wrap" fxLayoutAlign="center center">
<div class="pab-results-table-container" #pabResultsTable fxLayout="row wrap" fxLayoutAlign="center center">
<div fxFlex="1 1 100%">
<div class="pab-results-table-buttons">
<button mat-icon-button (click)="exportAsSpreadsheet()">
......
......@@ -117,10 +117,6 @@ export class PabResultsTableComponent extends ResultsComponent {
}
}
public get hasResults(): boolean {
return this._pabResults && this._pabResults.hasResults;
}
public get headers() {
return this._headers;
}
......
......@@ -9,9 +9,9 @@
<div>
<!-- tableau de résultats -->
<pab-results-table [results]="pabResults"></pab-results-table>
<pab-results-table *ngIf="hasDisplayableResults" [results]="pabResults"></pab-results-table>
</div>
<results-graph *ngIf="hasResults"></results-graph>
<results-graph *ngIf="hasDisplayableResults"></results-graph>
</div>
......@@ -199,6 +199,7 @@ export class PabResultsComponent implements DoCheck {
private updateResults() {
let pabUpdated: boolean;
let graphUpdated: boolean;
let selectorUpdated: boolean;
// results or not, there might be a log
const logUpdated = (this.iterationLogComponent !== undefined || this.generalLogComponent !== undefined); // gne ?
......@@ -212,6 +213,9 @@ export class PabResultsComponent implements DoCheck {
pabUpdated = this.pabResultsTableComponent !== undefined;
if (pabUpdated) {
this.pabResultsTableComponent.results = this._pabResults;
}
selectorUpdated = this.pabVariableResultsSelectorComponent !== undefined;
if (selectorUpdated) {
this.pabVariableResultsSelectorComponent.results = this._pabResults;
}
graphUpdated = this.resultsGraphComponent !== undefined;
......@@ -222,9 +226,10 @@ export class PabResultsComponent implements DoCheck {
} else {
pabUpdated = true;
graphUpdated = true;
selectorUpdated = true;
}
return pabUpdated && logUpdated && graphUpdated;
return pabUpdated && logUpdated && graphUpdated && selectorUpdated;
}
public get pabResults() {
......@@ -244,6 +249,21 @@ export class PabResultsComponent implements DoCheck {
return this._pabResults && this._pabResults.hasResults;
}
public get hasDisplayableResults(): boolean {
let ret = this._pabResults && this._pabResults.hasResults;
if (
this._pabResults
&& this._pabResults.variatedParameters
&& this._pabResults.variatedParameters.length > 0
) {
ret = ret
&& this._pabResults.variableIndex !== undefined
&& this._pabResults.result.resultElements[this._pabResults.variableIndex] !== undefined
&& this._pabResults.result.resultElements[this._pabResults.variableIndex].resultsOk;
}
return ret;
}
public get uitextGeneralLogTitle(): string {
return this.i18nService.localizeText("INFO_TITREJOURNAL_GLOBAL");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment