From 602ff0856420b2c5024265e5aea11adfd6ece6e4 Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Tue, 9 Apr 2024 14:41:59 +0100 Subject: [PATCH] Split questions into categories on one page --- .../path_placemaking_check/Progress.svelte | 153 ++++++++++++------ 1 file changed, 108 insertions(+), 45 deletions(-) diff --git a/src/routes/route_check/path_placemaking_check/Progress.svelte b/src/routes/route_check/path_placemaking_check/Progress.svelte index 4889dfce9c1..f473c768627 100644 --- a/src/routes/route_check/path_placemaking_check/Progress.svelte +++ b/src/routes/route_check/path_placemaking_check/Progress.svelte @@ -1,45 +1,99 @@
    - {#each questions as label, idx} -
  1. -
    - {#if currentIdx - startIdx != idx} - - {label} - - {:else} - {label} - {/if} - {#if completed[idx]} - Done - {:else} - Incomplete + {#each flatten(sections) as item} + {#if item.kind == "section"} +
    + {item.label} + {#if item.notes} +

    {item.notes}

    {/if}
    -
  2. + {:else} +
  3. +
    + {#if currentIdx - startIdx != item.idx} + + {item.label} + + {:else} + {item.label} + {/if} + {#if completed[item.idx]} + Done + {:else} + Incomplete + {/if} +
    +
  4. + {/if} {/each}