Skip to content
Snippets Groups Projects
Commit 5424686f authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Corrige les couleurs du chomage_brut et de la retraite_brute

parent f0acbd4f
No related branches found
No related tags found
No related merge requests found
......@@ -129,7 +129,9 @@
let svgPadding = { bottom: 20, left: 8, right: 20, top: 20 }
let grapheExplanationOpen = $state(false)
let variableCustomizations = $state(variableCustomizationsBase)
let variableCustomizations = $state(
structuredClone(variableCustomizationsBase),
)
let variableValues: VariableGraph[][] = $state([])
let variableGroups: {
css?: string
......@@ -137,7 +139,7 @@
name?: string
hideOpen?: boolean
variables: VariableGraph[]
}[] = $state()
}[] = $state([])
let visibleDecompositionsGraph: VisibleDecompositionForGraph[] | undefined =
$state(undefined)
......@@ -168,8 +170,8 @@
) {
untrack(() => {
const ressourcesBrutes = [
"remuneration_brute",
"chomage_brut",
"remuneration_brute",
"retraite_brute",
]
......@@ -240,10 +242,9 @@
]
const splitIndex =
prelevementsValues.findIndex(
(variable) => variable.name === "remuneration_brute",
prelevementsValues.findLastIndex((variable) =>
ressourcesBrutes.includes(variable.name),
) + 1
variableGroups = [
{
variables: [
......@@ -273,16 +274,13 @@
for (const row of variable.rows) {
const key = `${variable.name}_${row.calculationName}`
if (
!Object.keys(variableCustomizations).includes(key) &&
((row.calculationName !== "law" &&
row.calculationName !== "revaluation") ||
!Object.keys(variableCustomizations).includes(
variable.name,
))
variableCustomizations[variable.name] === undefined ||
(variableCustomizations[key] === undefined &&
row.calculationName !== "law" &&
row.calculationName !== "revaluation")
) {
const types = ["base", "prelevement", "prestation"]
variableCustomizations[key] = JSON.parse(
JSON.stringify(
variableCustomizations[key] = structuredClone(
variableCustomizations[
getVariableCustomizationName(
variable.parent,
......@@ -294,7 +292,6 @@
? "law"
: row.calculationName
],
),
)
}
}
......@@ -369,16 +366,13 @@
for (const row of variable.rows) {
const key = `${variable.name}_${row.calculationName}`
if (
!Object.keys(variableCustomizations).includes(key) &&
((row.calculationName !== "law" &&
row.calculationName !== "revaluation") ||
!Object.keys(variableCustomizations).includes(
variable.name,
))
variableCustomizations[variable.name] === undefined ||
(variableCustomizations[key] === undefined &&
row.calculationName !== "law" &&
row.calculationName !== "revaluation")
) {
const types = ["base", "cotisation", "allegement"]
variableCustomizations[key] = JSON.parse(
JSON.stringify(
variableCustomizations[key] = structuredClone(
variableCustomizations[
getVariableCustomizationName(
variable.parent,
......@@ -390,7 +384,6 @@
? "law"
: row.calculationName
],
),
)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment