Skip to main content
Sign in
Snippets Groups Projects
Commit 9c122279 authored by sandcha's avatar sandcha
Browse files

Spread resources fix to test case editor

parent 93b7f568
No related branches found
No related tags found
1 merge request!12Fix the attribution of RSA for test cases with high income
...@@ -209,12 +209,25 @@ ...@@ -209,12 +209,25 @@
...adultes.map((adulte, index) => [ ...adultes.map((adulte, index) => [
`Adulte ${index + 1}`, `Adulte ${index + 1}`,
{ {
// set all resources for 3 years
// salaire_de_base: { [year]: adulte.salaire_de_base }, // salaire_de_base: { [year]: adulte.salaire_de_base },
salaire_de_base: Object.fromEntries( salaire_de_base: Object.fromEntries(
[...new Array(12)].map((_, index) => [ [...new Array(12)]
.map((_, index) => [
[
`${year - 2}-${(index + 1).toString().padStart(2, "0")}`,
adulte.salaire_de_base / 12,
],
[
`${year - 1}-${(index + 1).toString().padStart(2, "0")}`,
adulte.salaire_de_base / 12,
],
[
`${year}-${(index + 1).toString().padStart(2, "0")}`, `${year}-${(index + 1).toString().padStart(2, "0")}`,
adulte.salaire_de_base / 12, adulte.salaire_de_base / 12,
]), ],
])
.flat(1),
), ),
}, },
]), ]),
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment