Commit 179a829c authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

Fix #455 - PreBarrage logs

Showing with 15 additions and 1 deletion
+15 -1
......@@ -8,7 +8,7 @@
<log [log]=iterationLog></log>
<!-- tableau de résultats des bassins -->
<pb-results-table *ngIf="hasBasinResults" [results]=pbResults [variableIndex]=pbResults?.variableIndex></pb-results-table>
<pb-results-table *ngIf="basinResultsHaveData" [results]=pbResults [variableIndex]=pbResults?.variableIndex></pb-results-table>
<!-- table des résultats fixés -->
<pb-cloison-results *ngIf="hasWallResults" [results]=pbResults.cloisonResults></pb-cloison-results>
......
......@@ -46,6 +46,11 @@ export class PbResultsComponent {
return this._pbResults && this._pbResults.hasBasinResults;
}
// true if basin results at current iteration have data
public get basinResultsHaveData(): boolean {
return this._pbResults && this._pbResults.basinResultsHaveData;
}
// true if wall results are present
public get hasWallResults(): boolean {
return this._pbResults && this._pbResults.hasWallResults;
......
......@@ -101,9 +101,18 @@ export class PrebarrageResults extends MultiDimensionResults {
}
public get hasBasinResults(): boolean {
// test du bassin 0 @TODO faire mieux
return this.bassinsResults.length > 0 && this.bassinsResults[0] && ! this.bassinsResults[0].hasOnlyErrors;
}
public get basinResultsHaveData(): boolean {
return (
this.bassinsResults.length > 0
&& this.bassinsResults[0].resultElements[this.variableIndex] !== undefined
&& this.bassinsResults[0].resultElements[this.variableIndex].ok
);
}
public get hasWallResults(): boolean {
return this.cloisonResults && this.cloisonResults.result && ! this.cloisonResults.result.hasOnlyErrors;
}
......
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