Skip to content
Snippets Groups Projects

Resolve "Restructurer Lechapt et Calmon pour de nouvelles lois de pertes de charge"

2 unresolved threads
1 file
+ 15
4
Compare changes
  • Side-by-side
  • Inline
@@ -10,6 +10,7 @@ import { NgParameter } from "../../formulaire/elements/ngparam";
import { capitalize, Result, ResultElement } from "jalhyd";
import { sprintf } from "sprintf-js";
import { PressureLoss } from "jalhyd";
@Component({
selector: "fixed-results",
@@ -256,10 +257,20 @@ export class FixedResultsComponent extends ResultsComponentDirective {
if (sn.parent) {
ct = sn.parent.calcType;
}
const cn = capitalize(this.intlService.childName(c));
let label = sprintf(this.intlService.localizeText("INFO_STUFF_N"), cn)
+ (c.findPositionInParent() + 1) + " : "
+ this.formService.expandVariableNameAndUnit(ct, k);
// do not display child rank in case of pressure loss law
const displayChildRank = !(sn instanceof PressureLoss);
let label: string;
if (displayChildRank) {
const cn = capitalize(this.intlService.childName(c));
label = sprintf(this.intlService.localizeText("INFO_STUFF_N"), cn) + (c.findPositionInParent() + 1);
}
else {
label = capitalize(this.intlService.childName(c));
}
label += " : ";
label += this.formService.expandVariableNameAndUnit(ct, k);
label += this._fixedResults.getHelpLink(k);
data.push({
label: label,
Loading