Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Géocontrib Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GéoContrib
Géocontrib Frontend
Commits
e26173c6
Commit
e26173c6
authored
1 year ago
by
Timothee P
Browse files
Options
Downloads
Patches
Plain Diff
check forced value with isEqual to compare arrays for multiple selection custom fields
parent
18f051f0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!747
REDMINE_ISSUE-19163 | Tests automatisés - Signalements non-géographiques
,
!746
REDMINE_ISSUE-17629 | Tests automatiques (champs conditionnels)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/utils/index.js
+2
-2
2 additions, 2 deletions
src/utils/index.js
with
2 additions
and
2 deletions
src/utils/index.js
+
2
−
2
View file @
e26173c6
import
featureAPI
from
'
@/services/feature-api
'
;
import
{
isNil
}
from
'
lodash
'
;
import
{
isEqual
,
isNil
}
from
'
lodash
'
;
export
function
formatStringDate
(
stringDate
)
{
const
date
=
new
Date
(
stringDate
);
...
...
@@ -241,7 +241,7 @@ export function checkFieldForcedValue(field, extraForms) {
//* find the extraForm field conditioning the forced value
const
conditioningField
=
extraForms
.
find
((
xtraForm
)
=>
xtraForm
.
name
===
config
.
conditionField
);
//* if found check that its value match the condtionValue
if
(
conditioningField
&&
conditioningField
.
value
===
config
.
conditionValue
)
{
if
(
conditioningField
&&
isEqual
(
conditioningField
.
value
,
config
.
conditionValue
)
)
{
//* set this value with the forced value and disable the form field
field
.
value
=
config
.
forcedValue
;
field
.
disabled
=
true
;
...
...
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