Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
web-et-numerique
Factory
Resin
Client
Commits
143bf8af
Commit
143bf8af
authored
4 years ago
by
Jérémie BRISON
Browse files
Options
Downloads
Patches
Plain Diff
fix(form) : fix nbEquipements default value
parent
6399bb2f
No related branches found
No related tags found
3 merge requests
!68
Recette
,
!67
Dev
,
!66
Fix/form design create structure
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/form/form.component.ts
+13
-13
13 additions, 13 deletions
src/app/form/form.component.ts
with
13 additions
and
13 deletions
src/app/form/form.component.ts
+
13
−
13
View file @
143bf8af
...
...
@@ -146,7 +146,7 @@ export class FormComponent implements OnInit {
structureType
:
new
FormControl
(
structure
.
structureType
,
Validators
.
required
),
structureName
:
new
FormControl
(
structure
.
structureName
,
Validators
.
required
),
description
:
new
FormControl
(
structure
.
description
),
lockdownActivity
:
new
FormControl
(
structure
.
description
),
lockdownActivity
:
new
FormControl
(
structure
.
description
),
address
:
new
FormGroup
({
numero
:
new
FormControl
(
structure
.
address
.
numero
),
street
:
new
FormControl
(
structure
.
address
.
street
,
Validators
.
required
),
...
...
@@ -182,20 +182,20 @@ export class FormComponent implements OnInit {
socialAndProfessional
:
this
.
loadArrayForCheckbox
(
structure
.
socialAndProfessional
,
false
),
digitalCultureSecurity
:
this
.
loadArrayForCheckbox
(
structure
.
digitalCultureSecurity
,
false
),
nbComputers
:
new
FormControl
(
structure
.
equipmentsAndServices
.
includes
(
'
ordinateurs
'
)
?
structure
.
nbComputers
:
0
,
[
Validators
.
required
,
Validators
.
pattern
(
'
[
0
-9]{1
,
}
'
)]
//NOSONAR
structure
.
equipmentsAndServices
.
includes
(
'
ordinateurs
'
)
?
structure
.
nbComputers
:
1
,
[
Validators
.
required
,
Validators
.
pattern
(
'
[
1
-9]{1}
[0-9]*
'
)]
//NOSONAR
),
nbPrinters
:
new
FormControl
(
structure
.
equipmentsAndServices
.
includes
(
'
imprimantes
'
)
?
structure
.
nbPrinters
:
0
,
[
nbPrinters
:
new
FormControl
(
structure
.
equipmentsAndServices
.
includes
(
'
imprimantes
'
)
?
structure
.
nbPrinters
:
1
,
[
Validators
.
required
,
Validators
.
pattern
(
'
[
0
-9]{1
,
}
'
),
//NOSONAR
Validators
.
pattern
(
'
[
1
-9]{1}
[0-9]*
'
),
//NOSONAR
]),
nbTablets
:
new
FormControl
(
structure
.
equipmentsAndServices
.
includes
(
'
tablettes
'
)
?
structure
.
nbTablets
:
0
,
[
nbTablets
:
new
FormControl
(
structure
.
equipmentsAndServices
.
includes
(
'
tablettes
'
)
?
structure
.
nbTablets
:
1
,
[
Validators
.
required
,
Validators
.
pattern
(
'
[
0
-9]{1
,
}
'
),
//NOSONAR
Validators
.
pattern
(
'
[
1
-9]{1}
[0-9]*
'
),
//NOSONAR
]),
nbNumericTerminal
:
new
FormControl
(
structure
.
equipmentsAndServices
.
includes
(
'
bornesNumeriques
'
)
?
structure
.
nbNumericTerminal
:
0
,
[
Validators
.
required
,
Validators
.
pattern
(
'
[
0
-9]{1
,
}
'
)]
//NOSONAR
structure
.
equipmentsAndServices
.
includes
(
'
bornesNumeriques
'
)
?
structure
.
nbNumericTerminal
:
1
,
[
Validators
.
required
,
Validators
.
pattern
(
'
[
1
-9]{1}
[0-9]*
'
)]
//NOSONAR
),
equipmentsDetails
:
new
FormControl
(
structure
.
equipmentsDetails
),
equipmentsAccessType
:
this
.
loadArrayForCheckbox
(
structure
.
equipmentsAccessType
,
false
),
...
...
@@ -493,19 +493,19 @@ export class FormComponent implements OnInit {
if
(
!
equipment
.
openned
)
{
switch
(
e
.
module
.
id
)
{
case
Equipment
.
computer
:
{
this
.
getStructureControl
(
'
nbComputers
'
).
setValue
(
0
);
this
.
getStructureControl
(
'
nbComputers
'
).
setValue
(
1
);
break
;
}
case
Equipment
.
printer
:
{
this
.
getStructureControl
(
'
nbPrinters
'
).
setValue
(
0
);
this
.
getStructureControl
(
'
nbPrinters
'
).
setValue
(
1
);
break
;
}
case
Equipment
.
tablet
:
{
this
.
getStructureControl
(
'
nbTablets
'
).
setValue
(
0
);
this
.
getStructureControl
(
'
nbTablets
'
).
setValue
(
1
);
break
;
}
case
Equipment
.
bornes
:
{
this
.
getStructureControl
(
'
nbNumericTerminal
'
).
setValue
(
0
);
this
.
getStructureControl
(
'
nbNumericTerminal
'
).
setValue
(
1
);
break
;
}
}
...
...
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