Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
leximpact-socio-fiscal-ui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leximpact
Simulateur socio-fiscal
leximpact-socio-fiscal-ui
Commits
b3c7c1d8
Commit
b3c7c1d8
authored
Jun 17, 2024
by
Toufic Batache
Browse files
Options
Downloads
Patches
Plain Diff
Fix filters for virtual variables
parent
f4f74317
No related branches found
No related tags found
No related merge requests found
Pipeline
#14579
passed
Jun 17, 2024
Stage: build
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib/components/test_cases/TestCaseFilters.svelte
+8
-3
8 additions, 3 deletions
src/lib/components/test_cases/TestCaseFilters.svelte
with
8 additions
and
3 deletions
src/lib/components/test_cases/TestCaseFilters.svelte
+
8
−
3
View file @
b3c7c1d8
<script
lang=
"ts"
>
import
{
scaleByInstantFromBrackets
}
from
"
@openfisca/json-model
"
import
{
scaleByInstantFromBrackets
,
type
Variable
,
}
from
"
@openfisca/json-model
"
import
{
createEventDispatcher
,
getContext
}
from
"
svelte
"
import
type
{
Writable
}
from
"
svelte/store
"
...
...
@@ -179,6 +182,7 @@
filterValueByName
,
showOnlyDeciles
,
filterNiveauDeVieValue
,
variableSummary
,
)
$
:
filterValueByName
=
Object
.
fromEntries
(
...
...
@@ -222,6 +226,7 @@
},
showOnlyDeciles
:
boolean
,
filterNiveauDeVie
:
string
|
undefined
,
variableSummary
:
Variable
|
undefined
,
):
[
Situation
,
number
][]
{
const
filtered
:
[
Situation
,
number
][]
=
[]
for
(
const
[
index
,
situation
]
of
testCases
.
entries
())
{
...
...
@@ -377,7 +382,7 @@
}
}
}
if
(
filterValueByName
[
"
dispositif
"
])
{
if
(
filterValueByName
[
"
dispositif
"
]
&&
variableSummary
!==
undefined
)
{
const
latestCalculationValue
=
getLatestCalculation
(
$evaluationByNameArray
[
index
][
variableName
]
?.
calculationEvaluationByName
,
...
...
@@ -423,7 +428,7 @@
<div
class=
"mt-2 flex flex-wrap gap-2"
>
{
#each
filters
as
filter
}
{
#if
filter
.
name
!==
"
dispositif
"
||
shortLabel
}
{
#if
filter
.
name
!==
"
dispositif
"
||
variableSummary
!==
undefined
}
<button
class=
"relative flex items-center gap-1 px-3 py-1 rounded-full overflow-hidden transition after:absolute after:inset-0 after:rounded-full after:transition hover:after:bg-black/5 active:after:bg-black/10"
class:bg-gray-200=
{
filter
.
value
===
false
}
...
...
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