Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nghyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
A compter du 1er avril, attention à vos pipelines :
Nouvelles limitations de Docker Hub
Show more breadcrumbs
Cassiopée
nghyd
Commits
63d385ca
Commit
63d385ca
authored
2 years ago
by
François Grand
Browse files
Options
Downloads
Patches
Plain Diff
fix: pressure loss form: create child law nub when opening calculator
refs
#592
parent
047ce4c0
No related branches found
No related tags found
2 merge requests
!225
Release v4.17.0
,
!199
Resolve "Incohérence dans les fichiers de session"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/formulaire/definition/form-pressureloss.ts
+13
-2
13 additions, 2 deletions
src/app/formulaire/definition/form-pressureloss.ts
with
13 additions
and
2 deletions
src/app/formulaire/definition/form-pressureloss.ts
+
13
−
2
View file @
63d385ca
import
{
PressureLoss
,
Props
,
PressureLossType
}
from
"
jalhyd
"
;
import
{
PressureLoss
,
Props
,
PressureLossType
,
Session
,
PressureLossLaw
,
CalculatorType
}
from
"
jalhyd
"
;
import
{
FormulaireFixedVar
}
from
"
./form-fixedvar
"
;
/**
...
...
@@ -17,8 +17,19 @@ export class FormulairePressureLoss extends FormulaireFixedVar {
if
(
props
===
undefined
)
{
props
=
new
Props
();
}
// create pressure loss parent nub
const
pll
=
this
.
defaultProperties
[
"
pressureLossType
"
];
props
.
setPropValue
(
"
calcType
"
,
this
.
calculatorType
);
props
.
setPropValue
(
"
pressureLossType
"
,
this
.
defaultProperties
[
"
pressureLossType
"
]
);
props
.
setPropValue
(
"
pressureLossType
"
,
pll
);
super
.
initNub
(
props
);
// create pressure loss law child nub
const
propsLaw
:
Props
=
new
Props
();
const
pressureLossCalc
:
CalculatorType
=
PressureLossLaw
.
calcTypeFromPressureLossLaw
[
pll
];
propsLaw
.
setPropValue
(
"
calcType
"
,
pressureLossCalc
);
const
law
=
Session
.
getInstance
().
createNub
(
propsLaw
)
as
PressureLossLaw
;
const
pl
:
PressureLoss
=
this
.
currentNub
as
PressureLoss
;
pl
.
setLaw
(
law
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment