diff --git a/jalhyd_branch b/jalhyd_branch index 094bda298f4c32b69e4a6b56399918bfde4dfca0..337ba388fa7117f44e60a4f7c88d39ab12fba155 100644 --- a/jalhyd_branch +++ b/jalhyd_branch @@ -1 +1 @@ -316-courbe-de-remous-et-bief-remonter-une-erreur-quand-le-pas-de-discretisation-est-superieur-la +320-prebarrages-regroupement-de-la-saisie-des-bassins diff --git a/src/app/components/fixedvar-results/fixed-results.component.ts b/src/app/components/fixedvar-results/fixed-results.component.ts index 7fb67ea7f92d6c3ca87749fdad152aaff2fe77b3..ae76c3e1989e993a78305a906f1a5d91c776ca21 100644 --- a/src/app/components/fixedvar-results/fixed-results.component.ts +++ b/src/app/components/fixedvar-results/fixed-results.component.ts @@ -95,7 +95,7 @@ export class FixedResultsComponent extends ResultsComponentDirective { let label = this.formattedLabel(fp); const nub = fp.paramDefinition.parentNub; // add child type and position before label - if (nub && nub.parent && nub.parent.childrenType) { + if (nub && nub.parent && nub.intlType) { const pos = nub.findPositionInParent(); // label = this.intlService.localizeText("INFO_OUVRAGE") + " n°" + (pos + 1) + ": " + label; const cn = capitalize(this.intlService.childName(nub)); @@ -198,7 +198,7 @@ export class FixedResultsComponent extends ResultsComponentDirective { let label = this.formattedLabel(fp); const nub = fp.paramDefinition.parentNub; // add child type and position before label - if (nub && nub.parent && nub.parent.childrenType) { + if (nub && nub.parent && nub.intlType) { const pos = nub.findPositionInParent(); const cn = capitalize(this.intlService.childName(nub)); label = sprintf(this.intlService.localizeText("INFO_STUFF_N"), cn) diff --git a/src/app/components/generic-input/generic-input.component.ts b/src/app/components/generic-input/generic-input.component.ts index 3154a308fbdf1b9a83750ca2668e046f5bf5f578..d95168143cb67edb5fff3ffe00586e65fe60ad4f 100644 --- a/src/app/components/generic-input/generic-input.component.ts +++ b/src/app/components/generic-input/generic-input.component.ts @@ -36,7 +36,7 @@ export abstract class GenericInputComponentDirective implements OnChanges { id = param.symbol; // if inside a child Nub, prefix with child position to disambiguate const nub = param.paramDefinition.parentNub; - if (nub && nub.parent && nub.parent.childrenType) { + if (nub && nub.parent && nub.intlType) { id = nub.findPositionInParent() + "_" + id; } } diff --git a/src/app/components/param-computed/param-computed.component.ts b/src/app/components/param-computed/param-computed.component.ts index 5525dcf7ab3cc4aa308f25491f006f7e755e4b87..85d6f4070e3d55302ecb29f89e3b812c587b79ec 100644 --- a/src/app/components/param-computed/param-computed.component.ts +++ b/src/app/components/param-computed/param-computed.component.ts @@ -32,7 +32,7 @@ export class ParamComputedComponent { let id = "calc_" + this.param.symbol; // if inside a child Nub, prefix with child position to disambiguate const nub = this.param.paramDefinition.parentNub; - if (nub && nub.parent && nub.parent.childrenType) { + if (nub && nub.parent && nub.intlType) { id = nub.findPositionInParent() + "_" + id; } return id; diff --git a/src/app/components/param-link/param-link.component.ts b/src/app/components/param-link/param-link.component.ts index 2571d9ec7cd0fab288fc147345c7e5ced4352a59..8e03ffeb2f39f59a2654949b2b702cf184f3deff 100644 --- a/src/app/components/param-link/param-link.component.ts +++ b/src/app/components/param-link/param-link.component.ts @@ -40,7 +40,7 @@ export class ParamLinkComponent implements OnChanges, Observer, OnDestroy { let id = "linked_" + this.param.symbol; // if inside a child Nub, prefix with child position to disambiguate const nub = this.param.paramDefinition.parentNub; - if (nub && nub.parent && nub.parent.childrenType) { + if (nub && nub.parent && nub.intlType) { id = nub.findPositionInParent() + "_" + id; } return id; diff --git a/src/app/components/param-values/param-values.component.ts b/src/app/components/param-values/param-values.component.ts index eeb36a21d27a6d06cca3f76a449ee6976d181f00..8f3959026a6006caa0f09cf6fcd0778d123f8988 100644 --- a/src/app/components/param-values/param-values.component.ts +++ b/src/app/components/param-values/param-values.component.ts @@ -47,7 +47,7 @@ export class ParamValuesComponent implements AfterViewInit, Observer { let id = "var_" + this.param.symbol; // if inside a child Nub, prefix with child position to disambiguate const nub = this.param.paramDefinition.parentNub; - if (nub && nub.parent && nub.parent.childrenType) { + if (nub && nub.parent && nub.intlType) { id = nub.findPositionInParent() + "_" + id; } return id; diff --git a/src/app/services/internationalisation.service.ts b/src/app/services/internationalisation.service.ts index 4b8f545f65dd4ebcdf9b9e7592c50920df7b95db..7dddda2a95c63a280013f2f72e74bdb618e055fb 100644 --- a/src/app/services/internationalisation.service.ts +++ b/src/app/services/internationalisation.service.ts @@ -334,8 +334,7 @@ export class I18nService extends Observable implements Observer { * @param short if true, will return short name */ public childName(nub: Nub, plural: boolean = false, short: boolean = false) { - const type: string = nub.parent.childrenType; - let k = "INFO_CHILD_TYPE_" + type.toUpperCase(); + let k = "INFO_CHILD_TYPE_" + nub.intlType.toUpperCase(); if (short) { k += "_SHORT"; } else if (plural) {