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

Correction bug: les entêtes de résultats de PAB s'affichaient sur tous les modules

parent e2f4144a
No related branches found
No related tags found
1 merge request!45Resolve "Ajout du module de calcul d'une passe à bassins"
This commit is part of merge request !45. Comments created here will be created in the context of that merge request.
......@@ -53,7 +53,7 @@ export class PabResultsTableComponent {
];
this._dataSet = [];
if (this._pabResults) {
if (this._pabResults && this._pabResults.cloisonsResults && this._pabResults.cloisonsResults.length > 0) {
const pr = this._pabResults;
const nDigits = this.appSetupService.displayDigits;
// line 1
......@@ -150,6 +150,6 @@ export class PabResultsTableComponent {
const wb: XLSX.WorkBook = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, "default");
// save and download
XLSX.writeFile(wb, "VariableResults.xlsx");
XLSX.writeFile(wb, "PABResults.xlsx");
}
}
......@@ -35,7 +35,8 @@ export class PabResultsComponent implements DoCheck {
) { }
public set results(rs: CalculatorResults[]) {
if (rs.length > 0) {
this._pabResults = undefined;
if (rs.length > 0 && rs[0] instanceof PabResults) {
this._pabResults = rs[0] as PabResults;
}
this.updateView();
......
......@@ -34,7 +34,6 @@ export class FormComputePab extends FormCompute {
const cq: number[] = [];
// valeur de QA pour chaque bassin
const bqa: number[] = [];
console.log("pab.children[0].result >>", pab.children[0].result);
for (const c of pab.children) {
cr.push(c.result);
cq.push(c.prms.Q.v);
......
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