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
Show more breadcrumbs
Cassiopée
nghyd
Commits
ea948a50
Commit
ea948a50
authored
2 years ago
by
François Grand
Committed by
AUBRY JEAN-PASCAL
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
feat: MacroRugoRemous calculator: add target rock-ramp fishpass select
refs
#609
parent
76f96082
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!252
release: version 4.18.0
,
!213
Resolve "Ajout du module courbe de remous d'une passe à macro-rugosité"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/formulaire/elements/select/select-field-factory.ts
+4
-0
4 additions, 0 deletions
src/app/formulaire/elements/select/select-field-factory.ts
src/app/formulaire/elements/select/select-field-target-pam.ts
+39
-0
39 additions, 0 deletions
...app/formulaire/elements/select/select-field-target-pam.ts
with
43 additions
and
0 deletions
src/app/formulaire/elements/select/select-field-factory.ts
+
4
−
0
View file @
ea948a50
...
...
@@ -11,6 +11,7 @@ import { SelectFieldSearchedParam } from "./select-field-searched-param";
import
{
SelectFieldSpeciesList
}
from
"
./select-field-species-list
"
;
import
{
SelectFieldTargetPass
}
from
"
./select-field-target-pass
"
;
import
{
SelectFieldNubProperty
}
from
"
./select-field-nub-prop
"
;
import
{
SelectFieldTargetPam
}
from
"
./select-field-target-pam
"
;
export
class
SelectFieldFactory
{
/**
...
...
@@ -57,6 +58,9 @@ export class SelectFieldFactory {
case
"
select_upstream_basin
"
:
return
new
SelectFieldUpstreamBasin
(
parent
);
case
"
select_target_pam
"
:
return
new
SelectFieldTargetPam
(
parent
);
case
"
select_divingjetsupported
"
:
case
"
select_gridprofile
"
:
case
"
select_gridtype
"
:
...
...
This diff is collapsed.
Click to expand it.
src/app/formulaire/elements/select/select-field-target-pam.ts
0 → 100644
+
39
−
0
View file @
ea948a50
import
{
ServiceFactory
}
from
"
app/services/service-factory
"
;
import
{
decodeHtml
}
from
"
../../../util/util
"
;
import
{
CalculatorType
,
MacroRugoRemous
}
from
"
jalhyd
"
;
import
{
SelectField
}
from
"
./select-field
"
;
import
{
FormulaireNode
}
from
"
../formulaire-node
"
;
// Courbe de remous dans une passe à macro-rugo.
export
class
SelectFieldTargetPam
extends
SelectField
{
constructor
(
parent
:
FormulaireNode
)
{
super
(
parent
);
this
.
_associatedProperty
=
"
nubMacroRugo
"
;
}
protected
populate
()
{
const
fs
=
ServiceFactory
.
formulaireService
;
// find all rock-ramp fishpass forms
const
macroForms
:
any
[]
=
fs
.
formulaires
.
filter
((
element
,
index
,
self
)
=>
element
.
calculatorType
===
CalculatorType
.
MacroRugo
);
for
(
const
cn
of
macroForms
)
{
const
calc
=
cn
.
calculatorName
;
this
.
addEntry
(
this
.
createOrGetEntry
(
this
.
_entriesBaseId
+
cn
.
uid
,
cn
.
uid
,
decodeHtml
(
calc
)));
}
}
protected
initSelectedValue
()
{
const
mrr
=
(
this
.
nub
as
MacroRugoRemous
).
nubMacroRugo
;
if
(
mrr
!==
undefined
)
{
this
.
setValueFromId
(
this
.
_entriesBaseId
+
mrr
.
uid
);
}
}
public
updateLocalisation
()
{
// do not override localisation done in populate()
// ie. avoid what is done by SelectField.updateLocalisation()
}
}
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