Skip to content
Snippets Groups Projects
Commit cd3910f7 authored by Toufic Batache's avatar Toufic Batache
Browse files

Fix: display mode was being correctly put back after login/logout but calculation wasn't requested

parent 506c05cc
Branches
Tags 0.0.645
No related merge requests found
Pipeline #13548 passed
......@@ -49,9 +49,9 @@
const action = $page.url.searchParams.get("action")
if (action === "login") {
goto("/auth/login")
window.location.href = "/auth/login"
} else if (action === "logout") {
goto("/auth/logout")
window.location.href = "/auth/logout"
} else {
goto("/")
}
......
......@@ -8,6 +8,10 @@
import type { Situation } from "$lib/situations"
import { newSimulationUrl } from "$lib/urls"
import type { ValuesByCalculationNameByVariableName } from "$lib/variables"
import {
requestAllTestCasesCalculations,
type RequestedCalculations,
} from "$lib/calculations"
const evaluationByNameArray = getContext("evaluationByNameArray") as Writable<
EvaluationByName[]
......@@ -22,6 +26,9 @@
const parametricReform = getContext(
"parametricReform",
) as Writable<ParametricReform>
const requestedCalculations = getContext(
"requestedCalculations",
) as Writable<RequestedCalculations>
const testCases = getContext("testCases") as Writable<Situation[]>
const valuesByCalculationNameByVariableNameArray = getContext(
"valuesByCalculationNameByVariableNameArray",
......@@ -56,6 +63,11 @@
$testCases.length,
).fill({})
$requestedCalculations = requestAllTestCasesCalculations(
$requestedCalculations,
null,
)
localStorage.removeItem("simulatorState")
goto(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment