Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
leximpact-budget-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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
leximpact
leximpact-budget-ui
Commits
f8c64f0c
Commit
f8c64f0c
authored
Mar 22, 2022
by
sandcha
Browse files
Options
Downloads
Patches
Plain Diff
Clean up unused openfisca variables as headers in LawEdit
parent
f25e5800
Branches
Branches containing commit
Tags
4.2.1
Tags containing commit
1 merge request
!5
Désactive le PLF 2022
Pipeline
#3278
passed
Mar 22, 2022
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib/components/budget/LawEdit.svelte
+3
-18
3 additions, 18 deletions
src/lib/components/budget/LawEdit.svelte
with
3 additions
and
18 deletions
src/lib/components/budget/LawEdit.svelte
+
3
−
18
View file @
f8c64f0c
<script
lang=
"ts"
>
import
{
session
}
from
"
$app/stores
"
import
{
getContext
}
from
"
svelte
"
import
type
{
NumberValue
,
ValueParameter
}
from
"
@openfisca/json-model
"
import
{
mergeParameters
,
ParameterClass
}
from
"
@openfisca/json-model
"
import
VariableHeader
from
"
$lib/components/variables/VariableHeader.svelte
"
import
VariableReferredNodeParameter
from
"
$lib/components/variables/VariableReferredNodeParameter.svelte
"
import
VariableReferredScaleParameter
from
"
$lib/components/variables/VariableReferredScaleParameter.svelte
"
import
VariableReferredValueParameter
from
"
$lib/components/variables/VariableReferredValueParameter.svelte
"
...
...
@@ -17,11 +15,9 @@
const
budgetConfig
=
$session
.
budget
const
CALCULATION_BASE_YEAR
=
budgetConfig
.
calculationBaseYear
// const year = getContext("year")
const
date
=
CALCULATION_BASE_YEAR
+
"
-01-01
"
//Concatenating the parameters by parent node:
const
date
=
CALCULATION_BASE_YEAR
+
"
-01-01
"
// Code sécurité sociale - taux global 9,2% : https://www.legifrance.gouv.fr/codes/id/LEGISCTA000006173099/
// -> non utilisé car on ne saurait pas s'il faut appliquer la réforme à la part déductible ou imposable
...
...
@@ -42,23 +38,14 @@
const
decomposition
=
undefined
// For decomposition variables unexisting in openfisca model.
//Calling variableSummaryByName to get all model variable content but its formula:
$
:
csg
=
variableSummaryByName
[
"
csg
"
]
// Code sécurité sociale - institution CSG + qui : https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000033712581/
$
:
csg_imposable_salaire
=
variableSummaryByName
[
"
csg_imposable_salaire
"
]
$
:
csg_deductible_salaire
=
variableSummaryByName
[
"
csg_deductible_salaire
"
]
//Si paramètre nb pss réformé alors : const reform = getContext("reform") as Writable
<
Reform
>
const
pss
=
(
(
getParameter
(
"
prelevements_sociaux.pss.plafond_securite_sociale_annuel
"
,
)
as
ValueParameter
).
values
[
"
2021-01-01
"
]
as
NumberValue
).
value
//TODO check date update and role
console
.
log
(
"
pss
"
,
pss
)
).
values
[
date
]
as
NumberValue
).
value
function
getContributionParameterSuffix
(
parameterName
)
{
const
CONTRIBUTION_PREFIX
=
"
prelevements_sociaux.contributions_sociales.
"
...
...
@@ -226,7 +213,6 @@
>
Part CSG imposable
</h1>
<!-- <VariableHeader {decomposition} variable={csg_imposable_salaire} /> -->
<h2>
<ul
class=
"mr-5"
>
<!-- Get parameter by name and date. -->
...
...
@@ -252,7 +238,6 @@
>
Part CSG déductible
</h1>
<!-- <VariableHeader {decomposition} variable={csg_deductible_salaire} /> -->
<ul
class=
"mr-5"
>
<!-- Get parameter by name and date. -->
{
#each
Object
.
values
(
rootParameterDeductibleById
).
sort
(
(
parameter1
,
parameter2
)
=>
(
parameter1
.
class
===
parameter2
.
class
|| (
parameter1
.
class
!==
ParameterClass
.
Node
&&
parameter2
.
class
!==
ParameterClass
.
Node
)
?
parameter1
.
title
.
localeCompare
(
parameter2
.
title
)
:
parameter1
.
class
===
ParameterClass
.
Node
?
1
:
-
1
),
)
as
parameter
}
...
...
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