From 1d1e9416abcd1dfb3059b69252be013626189168 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sun, 10 Nov 2024 19:13:32 +0000 Subject: [PATCH] Re-enable 'Find by Code' Backend fixes now mean this feature works again. --- src/routes/pis/+page.svelte | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/routes/pis/+page.svelte b/src/routes/pis/+page.svelte index fbd78ea..e753f39 100644 --- a/src/routes/pis/+page.svelte +++ b/src/routes/pis/+page.svelte @@ -2,7 +2,6 @@ import Header from "$lib/navigation/header.svelte"; import Nav from "$lib/navigation/nav.svelte"; import Island from "$lib/islands/island.svelte"; - import Loading from "$lib/navigation/loading.svelte"; import { uuid } from "$lib/stores/uuid"; import StylesToc from "$lib/train/styles-toc.svelte"; import { getApiUrl } from "$lib/scripts/upstream"; @@ -17,23 +16,17 @@ let data = []; let error = false; let errMsg = "Unknown Error"; - let isLoading = false; async function findByStartEnd() { - isLoading = true; const url = `${getApiUrl()}/api/v2/pis/byStartEnd/${entryStartCRS}/${entryEndCRS}`; await fetchData(url); - isLoading = false; } - /* Temporarily Disabled + async function findByPis() { - isLoading = true; const url = `${getApiUrl()}/api/v2/pis/byCode/${entryPIS}`; await fetchData(url); - isLoading = false; } - */ async function fetchData(url: string) { const options = { @@ -77,7 +70,6 @@ entryStartCRS = ""; entryEndCRS = ""; toast.success("Form reset"); - isLoading = false; } onMount(() => { @@ -89,10 +81,6 @@
-{#if isLoading} - -{/if} - {#if error}

{errMsg}

@@ -124,14 +112,14 @@
- + {/if}