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
8f433b7b
Commit
8f433b7b
authored
Sep 27, 2021
by
Emmanuel Raviart
Browse files
Options
Downloads
Patches
Plain Diff
Show non-zero values of slider variable for other persons.
parent
8abd58eb
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib/components/test_cases/TestCaseView.svelte
+49
-29
49 additions, 29 deletions
src/lib/components/test_cases/TestCaseView.svelte
with
49 additions
and
29 deletions
src/lib/components/test_cases/TestCaseView.svelte
+
49
−
29
View file @
8f433b7b
...
...
@@ -77,6 +77,12 @@
$
:
adultsCount
=
Object
.
keys
(
personSituation
).
length
-
childrenCount
$
:
sliderEntity
=
slider
===
undefined
?
undefined
:
entityByKey
[
slider
.
entity
]
$
:
sliderEntitySituation
=
sliderEntity
===
undefined
?
undefined
:
situation
[
sliderEntity
.
key_plural
]
// $: updateSituation(year, adultes, enfants)
function
calculateTotal
(
...
...
@@ -195,7 +201,7 @@
<div
class=
"place-self-start shadow-md w-full rounded-t-sm bg-white mb-5 "
>
<div
class=
"bg-gray-100 border border-gray-200 border-b-2 p-4 pb-2
h-36
rounded-t-md"
class=
"bg-gray-100 border border-gray-200 border-b-2 p-4 pb-2 rounded-t-md"
>
<div
class=
"flex justify-between space-x-2"
>
<h1
class=
"font-bold text-gray-600"
>
{
situation
.
title
}
</h1>
...
...
@@ -215,7 +221,7 @@
</div>
<div
class=
"content-start grid grid-rows-1 mt-1"
>
<!-- Element 1 de la grille-->
<div
class=
"
h-8
flex"
>
<div
class=
"flex"
>
<!--Composition du foyer-->
<div
class=
"flex space-x-2"
>
<!-- Localité du cas type-->
...
...
@@ -247,23 +253,31 @@
{
variableSummaryByName
[
slider
.
name
].
ux_name
??
variableSummaryByName
[
slider
.
name
].
label
}
/an :
</span>
<ul
class=
"flex-shrink-0"
>
{
#each
Object
.
entries
(
sliderEntitySituation
??
{}).
sort
(
([
populationId1
],
[
populationId2
])
=>
populationId1
.
localeCompare
(
populationId2
),
)
as
[
populationId
,
population
]
}
{
#if
populationId
===
slider
.
id
||
getVariableValue
(
situation
,
slider
.
name
,
populationId
)
!==
0
}
<li>
<span
class=
"text-xs text-gray-500"
>
{
population
.
name
??
populationId
}
</span>
<span
>
{
euroAmountFormatter
.
format
(
getVariableValue
(
situation
,
slider
.
name
,
slider
.
i
d
),
getVariableValue
(
situation
,
slider
.
name
,
populationI
d
),
)
}
</span
>
{
#if
populationId
===
slider
.
id
}
<label
class=
"text-xs"
>
<input
checked=
{
situation
.
slider
!==
undefined
&&
situation
.
slider
.
entity
===
slider
.
entity
&&
situation
.
slider
.
id
===
slider
.
id
&&
situation
.
slider
.
name
===
slider
.
name
}
on:click=
{
()
=>
toggleSlider
(
variableSummaryByName
[
slider
.
name
])
}
on:click=
{
()
=>
toggleSlider
(
variableSummaryByName
[
slider
.
name
])
}
type=
"radio"
/>
Faire varier
</label>
</div>
{
#if
situation
.
slider
!==
undefined
&&
situation
.
slider
.
entity
===
slider
.
entity
&&
situation
.
slider
.
id
===
slider
.
id
&&
situation
.
slider
.
name
===
slider
.
name
}
<input
class=
"block mt-2 mx-2"
...
...
@@ -276,6 +290,12 @@
/>
{
/if
}
{
/if
}
</li>
{
/if
}
{
/each
}
</ul>
</div>
{
/if
}
<!--Identité de l'entreprise - Element 3 de la grid -->
<!--
<div class="flex h-8">
...
...
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