Skip to content

Commit

Permalink
Ensure design stage problems are unresolved
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Dec 4, 2024
1 parent 33b0da5 commit 396e5d5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/routes/route_check/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,18 @@ function validate(state: State) {

// Not entirely sure how, but at least one old file is missing this property and causing problems, so fill it in
state.summary.networkMap ||= { type: "FeatureCollection", features: [] };

// Ensure any design-stage problems are unresolved
for (let x of state.policyConflictLog) {
if (x.stage == "Design") {
x.resolved = "";
}
}
for (let x of state.criticalIssues) {
if (x.stage == "Design") {
x.resolved = "";
}
}
}

function describe(state: State): string {
Expand Down
5 changes: 5 additions & 0 deletions src/routes/route_check/problems_map/ConflictForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
import { policyConflictChoices } from "../lists";
export let idx: number;
// By definition, design-stage problems are unresolved
$: if ($state.policyConflictLog[idx].stage == "Design") {
$state.policyConflictLog[idx].resolved = "";
}
</script>

<div style="display: flex; justify-content: space-evenly">
Expand Down
5 changes: 5 additions & 0 deletions src/routes/route_check/problems_map/CriticalForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
import { criticalIssueChoices } from "../lists";
export let idx: number;
// By definition, design-stage problems are unresolved
$: if ($state.criticalIssues[idx].stage == "Design") {
$state.criticalIssues[idx].resolved = "";
}
</script>

<div style="display: flex; justify-content: space-evenly">
Expand Down

0 comments on commit 396e5d5

Please sign in to comment.