Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
leximpact-client
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 dotations aux communes
leximpact-client
Commits
8192af37
Commit
8192af37
authored
3 years ago
by
benoit-cty
Browse files
Options
Downloads
Patches
Plain Diff
Other version
parent
511c3498
No related branches found
No related tags found
1 merge request
!152
Modification des colonnes du tableau des déciles
Pipeline
#1280
passed with warnings
3 years ago
Stage: install
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/ir/cartes-impact/carte-etat/simpop-tableur-infos-deciles/SimpopTableurInfosDeciles.tsx
+47
-39
47 additions, 39 deletions
...impop-tableur-infos-deciles/SimpopTableurInfosDeciles.tsx
with
47 additions
and
39 deletions
components/ir/cartes-impact/carte-etat/simpop-tableur-infos-deciles/SimpopTableurInfosDeciles.tsx
+
47
−
39
View file @
8192af37
...
...
@@ -32,13 +32,19 @@ function createFromDeciles(index: number, decile: Props["deciles"][0], frontiere
?
formatNumber
(
Math
.
round
((
decile
.
apres
/
decile
.
avant
-
1
)
*
100
))
:
"
-
"
;
}
let
ratioApresMoinsAvantSurRfrFoyer
:
string
|
undefined
;
if
(
typeof
decile
.
apres
===
"
number
"
)
{
ratioApresMoinsAvantSurRfrFoyer
=
formatNumber
(
Math
.
round
(
(
decile
.
avant
)
/
decile
.
sum_rfr
*
10000
)
/
100
);
}
let
ratioPlfMoinsAvantSurRfrFoyer
:
string
|
undefined
;
if
(
typeof
decile
.
sum_rfr
===
"
number
"
&&
typeof
decile
.
plf
===
"
number
"
)
{
//let ratio : number;
ratioPlfMoinsAvantSurRfrFoyer
=
formatNumber
(
Math
.
round
(
(
decile
.
plf
-
decile
.
avant
)
/
decile
.
sum_rfr
*
10000
)
/
10
);
(
decile
.
plf
)
/
decile
.
sum_rfr
*
10000
)
/
10
0
);
// ratioPlfMoinsAvantSurRfrFoyer = ratio != 0.0 ? formatNumber(ratio) : "-";
}
...
...
@@ -46,10 +52,34 @@ function createFromDeciles(index: number, decile: Props["deciles"][0], frontiere
if
(
typeof
decile
.
sum_rfr
===
"
number
"
&&
typeof
decile
.
plf
===
"
number
"
&&
typeof
decile
.
apres
===
"
number
"
)
{
//let ratio : number;
ratioApresMoinsPlfSurRfrFoyer
=
formatNumber
(
Math
.
round
(
(
decile
.
apres
-
decile
.
plf
)
/
decile
.
sum_rfr
*
10000
)
/
10
);
(
decile
.
apres
)
/
decile
.
sum_rfr
*
10000
)
/
10
0
);
//ratioApresMoinsPlfSurRfrFoyer = ratio != 0.0 ? formatNumber(ratio) : "-";
}
// let ratioApresMoinsAvantSurRfrFoyer: string | undefined;
// if (typeof decile.apres === "number") {
// ratioApresMoinsAvantSurRfrFoyer = formatNumber(Math.round(
// (decile.apres - decile.avant) / decile.sum_rfr * 10000
// )/10);
// }
// let ratioPlfMoinsAvantSurRfrFoyer: string | undefined;
// if (typeof decile.sum_rfr === "number" && typeof decile.plf === "number") {
// //let ratio : number;
// ratioPlfMoinsAvantSurRfrFoyer = formatNumber(Math.round(
// (decile.plf - decile.avant) / decile.sum_rfr * 10000
// )/10);
// // ratioPlfMoinsAvantSurRfrFoyer = ratio != 0.0 ? formatNumber(ratio) : "-";
// }
// let ratioApresMoinsPlfSurRfrFoyer: string | undefined;
// if (typeof decile.sum_rfr === "number" && typeof decile.plf === "number" && typeof decile.apres === "number") {
// //let ratio : number;
// ratioApresMoinsPlfSurRfrFoyer = formatNumber(Math.round(
// (decile.apres - decile.plf) / decile.sum_rfr * 10000
// )/10);
// //ratioApresMoinsPlfSurRfrFoyer = ratio != 0.0 ? formatNumber(ratio) : "-";
// }
const
impotMoyenFoyer
=
formatNumber
(
Math
.
round
(
decile
.
avant
/
decile
.
poids
));
...
...
@@ -83,6 +113,7 @@ function createFromDeciles(index: number, decile: Props["deciles"][0], frontiere
frontiereDecile
:
frontiere
,
id
,
rfrMoyenFoyer
,
ratioApresMoinsAvantSurRfrFoyer
,
ratioPlfMoinsAvantSurRfrFoyer
,
ratioApresMoinsPlfSurRfrFoyer
,
impactMoyenFoyerPlf
,
...
...
@@ -120,17 +151,9 @@ export function SimpopTableurInfosDeciles({ deciles, frontieresDeciles }: Props)
<
br
/>
(limite supérieure)
</
TableCell
>
{
/* <TableCell classes={{ root: styles.cellStyle }}>
<b>Impact moyen sur le foyer</b>
<br />
(par rapport au code existant)
</TableCell> */
}
<
TableCell
classes
=
{
{
root
:
styles
.
cellStyle
}
}
>
<
b
>
Impact moyen / RFR moyen des foyers
</
b
>
<
br
/>
(par rapport au code existant)
<
b
>
Montant de l'impôt par rapport au RFR moyen des foyers
</
b
>
</
TableCell
>
<
TableCell
classes
=
{
{
root
:
styles
.
cellStyle
}
}
>
<
b
>
Impôt moyen des foyers
</
b
>
<
br
/>
...
...
@@ -159,31 +182,6 @@ export function SimpopTableurInfosDeciles({ deciles, frontieresDeciles }: Props)
€/an
<
br
/>
</
TableCell
>
{
/* <TableCell classes={{ root: styles.cellStyle }}>
{
row.impactMoyenFoyerPlf === undefined
? null
: (
<span className={styles.plf}>
{row.impactMoyenFoyerPlf === "-"
? NON_APPLICABLE
: `${row.impactMoyenFoyerPlf}%`}
</span>
)
}
{
row.impactMoyenFoyerReforme === undefined
? null
: (
<span className={styles.reform}>
{row.impactMoyenFoyerReforme === "-"
? NON_APPLICABLE
: `${row.impactMoyenFoyerReforme}%`}
</span>
)
}
</TableCell> */
}
<
TableCell
classes
=
{
{
root
:
styles
.
cellStyle
}
}
>
<
Tooltip
classes
=
{
{
popper
:
styles
.
tooltipContainer
,
...
...
@@ -191,6 +189,16 @@ export function SimpopTableurInfosDeciles({ deciles, frontieresDeciles }: Props)
}
}
title
=
{
"
Moyenne des RFR du décile :
"
+
row
.
rfrMoyenFoyer
+
"
€ /an
"
}
>
<
div
>
{
row
.
ratioApresMoinsAvantSurRfrFoyer
===
undefined
?
null
:
(
<
span
className
=
{
styles
.
plf
}
>
{
row
.
ratioApresMoinsAvantSurRfrFoyer
===
"
-
"
?
NON_APPLICABLE
:
`
${
row
.
ratioApresMoinsAvantSurRfrFoyer
}
`
}
</
span
>
)
}
{
row
.
ratioPlfMoinsAvantSurRfrFoyer
===
undefined
?
null
...
...
@@ -218,7 +226,7 @@ export function SimpopTableurInfosDeciles({ deciles, frontieresDeciles }: Props)
)
}
€ pour mille
%
{
/* <Tooltip
classes={{
popper: styles.tooltipContainer,
...
...
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