Skip to content
Snippets Groups Projects
Commit ebdeec27 authored by David Smadja's avatar David Smadja
Browse files

Simplify getCalculatedVariableNumberValue

parent 17795a9f
No related branches found
No related tags found
1 merge request!292Refacto feuille de paie
...@@ -44,20 +44,6 @@ ...@@ -44,20 +44,6 @@
variableName: string, variableName: string,
populationId: string, populationId: string,
): number | undefined { ): number | undefined {
return getCalculatedVariableValue(
situation,
valuesByCalculationNameByVariableName,
variableName,
populationId,
) as number | undefined
}
function getCalculatedVariableValue(
situation: Situation,
valuesByCalculationNameByVariableName: ValuesByCalculationNameByVariableName,
variableName: string,
populationId: string,
): VariableValue | undefined {
const variable = variableSummaryByName[variableName] const variable = variableSummaryByName[variableName]
if (variable === undefined) { if (variable === undefined) {
return undefined return undefined
...@@ -67,7 +53,7 @@ ...@@ -67,7 +53,7 @@
valuesByCalculationNameByVariableName, valuesByCalculationNameByVariableName,
variable, variable,
populationId, populationId,
).law ).law as number | undefined
} }
</script> </script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment