Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
cassiopee
nghyd
Commits
ae1800d8
Commit
ae1800d8
authored
May 05, 2022
by
Grand Francois
Browse files
fix: remove duplicated results in calculators when variable order is provided
refs
#535
parent
f2bcc865
Pipeline
#35776
passed with stages
in 17 minutes and 22 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/app/components/fixedvar-results/fixed-results.component.ts
View file @
ae1800d8
...
...
@@ -183,30 +183,6 @@ export class FixedResultsComponent extends ResultsComponentDirective {
}
}
}
// 2) else, is it a fixed parameter ?
if
(
!
resultFound
)
{
for
(
const
fp
of
this
.
fixedParams
)
{
if
(
fp
.
symbol
===
symbol
)
{
let
label
=
this
.
formattedLabel
(
fp
);
const
nub
=
fp
.
paramDefinition
.
parentNub
;
// add child type and position before label
if
(
nub
&&
nub
.
parent
&&
nub
.
parent
.
childrenType
)
{
const
pos
=
nub
.
findPositionInParent
();
// label = this.intlService.localizeText("INFO_OUVRAGE") + " n°" + (pos + 1) + ": " + label;
const
cn
=
capitalize
(
this
.
intlService
.
childName
(
nub
));
label
=
sprintf
(
this
.
intlService
.
localizeText
(
"
INFO_STUFF_N
"
),
cn
)
+
(
pos
+
1
)
+
"
:
"
+
label
;
}
label
+=
this
.
_fixedResults
.
getHelpLink
(
symbol
);
data
.
push
({
label
:
label
,
value
:
this
.
formattedValue
(
fp
),
isCalcResult
:
false
// for CSS
});
}
}
}
}
return
data
;
}
...
...
src/app/formulaire/definition/form-fixedvar.ts
View file @
ae1800d8
...
...
@@ -108,7 +108,7 @@ export class FormulaireFixedVar extends FormulaireDefinition {
protected
compute
()
{
this
.
runNubCalc
(
this
.
currentNub
);
this
.
refreshFieldsets
();
// important: before reaffectResultComponents() or it will break results components localization
this
.
reaffectResultComponents
();
//
this.reaffectResultComponents();
// seems useless since called from runNubCalc()
}
protected
reaffectResultComponents
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment