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

Ensure that $calculationTokenByName is reactive.

parent be962ef8
No related branches found
No related tags found
No related merge requests found
......@@ -449,8 +449,10 @@
situation: aggregatedSituation,
period: $year.toString(),
}
const newCalculationTokenByName: { [name in CalculationName]?: string } = {}
if (requestedCalculationsName.has("law") && $webSocketOpenByName.law) {
const token = ($calculationTokenByName.law = uuidv4())
const token = uuidv4()
newCalculationTokenByName.law = token
$calculationRunningByName = {
...$calculationRunningByName,
law: true,
......@@ -469,7 +471,8 @@
$billName !== undefined &&
$webSocketOpenByName.bill
) {
const token = ($calculationTokenByName.bill = uuidv4())
const token = uuidv4()
newCalculationTokenByName.bill = token
$calculationRunningByName = {
...$calculationRunningByName,
bill: true,
......@@ -496,7 +499,8 @@
Object.keys($parametricReform).length > 0 &&
$webSocketOpenByName.amendment
) {
const token = ($calculationTokenByName.amendment = uuidv4())
const token = uuidv4()
newCalculationTokenByName.amendment = token
$calculationRunningByName = {
...$calculationRunningByName,
amendment: true,
......@@ -519,6 +523,8 @@
}
delete $calculationRunningByName.amendment
}
$calculationTokenByName = newCalculationTokenByName
}
</script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment