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
57042c78
Commit
57042c78
authored
6 years ago
by
francois.grand
Browse files
Options
Downloads
Patches
Plain Diff
#77
suppression du getter FieldSet.fields
parent
50f4b892
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!15
Resolve "faire les modifications nécessaires prendre en compte le ticket cassiopee/jalhyd#46 (Gestion de la session dans la lib)"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/components/field-set/field-set.component.ts
+1
-1
1 addition, 1 deletion
src/app/components/field-set/field-set.component.ts
src/app/formulaire/fieldset.ts
+12
-13
12 additions, 13 deletions
src/app/formulaire/fieldset.ts
with
13 additions
and
14 deletions
src/app/components/field-set/field-set.component.ts
+
1
−
1
View file @
57042c78
...
...
@@ -54,7 +54,7 @@ export class FieldSetComponent implements DoCheck {
private
_isValid
:
boolean
=
false
;
private
get
fields
()
{
return
this
.
_fieldSet
.
fiel
ds
;
return
this
.
_fieldSet
.
ki
ds
;
}
private
hasRadioFix
():
boolean
{
...
...
This diff is collapsed.
Click to expand it.
src/app/formulaire/fieldset.ts
+
12
−
13
View file @
57042c78
...
...
@@ -46,22 +46,18 @@ export class FieldSet extends FormulaireElement implements Observer {
this
.
_props
=
new
Props
();
}
public
get
fields
():
Field
[]
{
return
this
.
kids
as
Field
[];
}
public
get
sessionNub
():
SessionNub
{
return
this
.
_sessionNub
;
}
p
ublic
addField
(
f
:
Field
)
{
p
rivate
addField
(
f
:
Field
)
{
if
(
f
==
undefined
)
throw
new
Error
(
"
FieldSet.addField() : argument incorrect (undefined)
"
);
this
.
fiel
ds
.
push
(
f
);
this
.
ki
ds
.
push
(
f
);
}
public
get
hasInputs
():
boolean
{
for
(
le
t
f
of
this
.
fiel
ds
)
for
(
cons
t
f
of
this
.
ki
ds
)
if
(
f
instanceof
NgParameter
)
return
true
;
return
false
;
...
...
@@ -69,7 +65,7 @@ export class FieldSet extends FormulaireElement implements Observer {
public
getInput
(
i
:
number
):
NgParameter
{
let
n
=
0
;
for
(
let
f
of
this
.
fiel
ds
)
{
for
(
let
f
of
this
.
ki
ds
)
{
if
(
f
instanceof
NgParameter
)
{
if
(
n
==
i
)
return
f
;
...
...
@@ -85,8 +81,11 @@ export class FieldSet extends FormulaireElement implements Observer {
public
get
isValid
():
boolean
{
let
res
:
boolean
=
true
;
for
(
let
f
of
this
.
fields
)
res
=
res
&&
f
.
isValid
;
for
(
const
f
of
this
.
kids
)
{
if
(
f
instanceof
Field
)
if
(
f
.
isDisplayed
)
res
=
res
&&
f
.
isValid
;
}
return
res
;
}
...
...
@@ -352,7 +351,7 @@ export class FieldSet extends FormulaireElement implements Observer {
}
public
getNodeParameter
(
symbol
:
string
):
NgParameter
{
for
(
le
t
p
of
this
.
fiel
ds
)
for
(
cons
t
p
of
this
.
ki
ds
)
if
(
p
instanceof
NgParameter
)
if
(
p
.
isDisplayed
&&
p
.
symbol
===
symbol
)
return
p
;
...
...
@@ -381,9 +380,9 @@ export class FieldSet extends FormulaireElement implements Observer {
* @returns valeur courante du select sans le préfixe
*/
public
getSelectedValue
(
selectFieldId
:
string
):
string
{
for
(
le
t
p
of
this
.
fiel
ds
)
for
(
cons
t
p
of
this
.
ki
ds
)
if
(
p
instanceof
SelectField
&&
p
.
isDisplayed
&&
p
.
id
===
selectFieldId
)
{
le
t
value
:
string
=
p
.
getValue
().
value
;
cons
t
value
:
string
=
p
.
getValue
().
value
;
return
FormulaireElement
.
removePrefix
(
value
,
selectFieldId
+
"
_
"
);
}
return
undefined
;
...
...
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