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
c0cec6bc
Commit
c0cec6bc
authored
May 19, 2022
by
Dorine Lambinet
Browse files
Options
Downloads
Patches
Plain Diff
Met en forme loyer et revenus du capital
parent
8dd7feee
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!87
Resolve "Faire apparaître les revenus du capital et de rente et RSA dans les étiquettes cas types"
Pipeline
#3900
passed
May 19, 2022
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib/components/test_cases/TestCaseSummary.svelte
+71
-52
71 additions, 52 deletions
src/lib/components/test_cases/TestCaseSummary.svelte
with
71 additions
and
52 deletions
src/lib/components/test_cases/TestCaseSummary.svelte
+
71
−
52
View file @
c0cec6bc
...
...
@@ -30,6 +30,7 @@
type
VariableValue
,
}
from
"
$lib/variables
"
import
PictoBigHopital
from
"
../pictos/PictoBigHopital.svelte
"
import
PictoRevenusCapital
from
"
../pictos/PictoRevenusCapital.svelte
"
export
let
displayMode
:
DisplayMode
export
let
mode
:
"
compare
"
|
"
select
"
|
"
view
"
...
...
@@ -392,7 +393,7 @@
/>
<div
class=
{
mode
===
"
view
"
class=
{
mode
===
"
select
"
?
"
grid gap-x-8 grid-cols-2
"
:
mode
===
"
compare
"
?
"
flex flex-col
"
...
...
@@ -560,7 +561,63 @@
{
/if
}
</div>
{
/each
}
</div>
<div
class=
{
mode
===
"
select
"
?
"
grid gap-x-8 grid-cols-1
"
:
mode
===
"
compare
"
?
"
flex flex-col
"
:
"
grid gap-x-8 grid-cols-2 sm:grid-cols-3 md:grid-cols-2 xl:grid-cols-3
"
}
>
<!-- Ménages -->
{
#each
Object
.
keys
(
householdSituation
).
sort
(
(
populationId1
,
populationId2
)
=>
populationId1
.
localeCompare
(
populationId2
),
)
as
populationId
}
{
@
const
loyer
=
getVariableValue
(
situation
,
"
loyer
"
,
populationId
)
}
{
@
const
statut_occupation_logement
=
getVariableValue
(
situation
,
"
statut_occupation_logement
"
,
populationId
,
)
}
<!--Frais loyer-->
{
#if
(
loyer
>
0
&&
statut_occupation_logement
!==
"
proprietaire
"
)
||
statut_occupation_logement
===
"
loge_gratuitement
"
||
statut_occupation_logement
===
"
sans_domicile
"
}
<div>
<div
class=
"my-2 flex items-end gap-2"
>
<div
class=
"flex items-center"
>
<div>
<PictoMaison
/>
</div>
<div
class=
"pl-2"
>
<span>
<span
class=
"text-lg"
>
{
euroAmountFormatter
.
format
(
loyer
)
}
<span
class=
"text-xs"
title=
"Frais de loyer ou d'emprunt pour un primo-accédant par an"
>
{
#if
statut_occupation_logement
===
"
locataire_foyer
"
||
statut_occupation_logement
===
"
locataire_hlm
"
||
statut_occupation_logement
===
"
locataire_meuble
"
||
statut_occupation_logement
===
"
locataire_vide
"
}
de
loyer/an
{
:else
if
statut_occupation_logement
===
"
primo_accedant
"
}
d'emprunt
primo-accédant/an
{
/if
}
</span
></span
></span
>
</div>
</div>
<!--Frais carburants
<div class="flex items-center">
<PictoFraisGazoil />
<div class="pl-2">
<abbr class="text-sm" title="Frais en gazoil par an">
Frais carburant :</abbr
>
<span>XX/an</span>
</div>
</div>-->
</div>
</div>
{
/if
}
{
/each
}
<!-- Foyers fiscaux -->
{
#each
Object
.
keys
(
taxableHouseholdSituation
).
sort
(
(
populationId1
,
populationId2
)
=>
populationId1
.
localeCompare
(
populationId2
),
)
as
populationId
}
{
@
const
assiette_csg_revenus_capital
=
...
...
@@ -596,8 +653,12 @@
assiette_csg_plus_values
+
plus_values_base_large
-
rente_viagere_titre_onereux_net
}
<div
class=
"my-2"
>
{
#if
revenus_nets_du_capital
!==
0
}
<div
class=
"flex items-center"
>
<div>
<PictoRevenusCapital
/>
</div>
<div
class=
"pl-2"
>
<span
class=
"text-lg text-gray-800"
>
{
euroAmountFormatter
.
format
(
revenus_nets_du_capital
)
}
</span
>
...
...
@@ -606,50 +667,8 @@
title=
"Revenus du capital, hors rentes viagières, par an"
>
de revenus du capital/an
</abbr
>
{
/if
}
</div>
{
/each
}
<!-- Ménages -->
{
#each
Object
.
keys
(
householdSituation
).
sort
(
(
populationId1
,
populationId2
)
=>
populationId1
.
localeCompare
(
populationId2
),
)
as
populationId
}
{
@
const
loyer
=
getVariableValue
(
situation
,
"
loyer
"
,
populationId
)
}
{
@
const
statut_occupation_logement
=
getVariableValue
(
situation
,
"
statut_occupation_logement
"
,
populationId
,
)
}
<div
class=
"mb-4 flex items-end gap-2"
>
{
#if
(
loyer
>
0
&&
statut_occupation_logement
!==
"
proprietaire
"
)
||
statut_occupation_logement
===
"
loge_gratuitement
"
||
statut_occupation_logement
===
"
sans_domicile
"
}
<div
class=
"flex items-center"
>
<div>
<PictoMaison
/>
</div>
<div
class=
"pl-2"
>
<span
class=
"text-sm"
>
<span
class=
"text-sm"
title=
"Frais de loyer ou d'emprunt pour un primo-accédant par an"
>
{
#if
statut_occupation_logement
===
"
locataire_foyer
"
||
statut_occupation_logement
===
"
locataire_hlm
"
||
statut_occupation_logement
===
"
locataire_meuble
"
||
statut_occupation_logement
===
"
locataire_vide
"
}
Loyer
{
:else
if
statut_occupation_logement
===
"
primo_accedant
"
}
Emprunt
primo-accédant
{
/if
}
</span
>
:
</span
>
<span>
{
loyer
}
€
<span
class=
"text-xs"
>
/an
</span></span>
</div>
</div>
{
/if
}
<!--Frais carburants
<div class="flex items-center">
<PictoFraisGazoil />
<div class="pl-2">
<abbr class="text-sm" title="Frais en gazoil par an">
Frais carburant :</abbr
>
<span>XX/an</span>
</div>
</div>-->
</div>
{
/each
}
</div>
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