From 78c4f51344f6da3bc3d6b5491f096c8a80e5bbea Mon Sep 17 00:00:00 2001
From: May <40745122+SomewhatMay@users.noreply.github.com>
Date: Sun, 10 Mar 2024 19:12:44 -0400
Subject: [PATCH] team dropdown only appears once match has been chosen
---
src/lib/components/AddForm.svelte | 190 +++++++++++++++++-------------
1 file changed, 109 insertions(+), 81 deletions(-)
diff --git a/src/lib/components/AddForm.svelte b/src/lib/components/AddForm.svelte
index ff1404d..1906fa5 100644
--- a/src/lib/components/AddForm.svelte
+++ b/src/lib/components/AddForm.svelte
@@ -54,18 +54,6 @@
-
-
Form Type
-
- {#if formType == null}
-
Need to choose a form type
- {/if}
-
-
Need to choose a form type
{/if}
-
-
-
- {#if formType.name != "Pit Scouting"}
-
Match
- {#if manual}
-
- {:else}
-
-
- {/if}
- {#if match == "" || match == null}
-
Need to choose a match
- {/if}
- {/if}
-
{#if formType.name != "Pit Scouting"}
@@ -135,6 +103,16 @@
value={match.number}
>{match.number}
{/each}
+
+
+
+
{:else}
@@ -154,69 +132,60 @@
{/if}
-
-
Team
- {#if manual}
-
- {:else}
-
-
- {/if}
- {#if team == "" || team == null}
-
Need to choose a team
- {/if}
-
-
- {#if team == "" || team == null}
+ {#if (team == "" || team == null) && (manual || (match != "" && match != null))}
Need to choose a team
{/if}
-
-
Scout name
-
- {#if $scout == ""}
-
Scout needs a name
- {/if}
-
-
Create
+
+
+
+
+
Form Type
+
+ {#if formType == null}
+
Need to choose a form type
+ {/if}
+
+
+
+ {#if formType.name != "Pit Scouting"}
+
Match
+ {#if manual}
+
+ {:else}
+
+
+ {/if}
+ {#if match == "" || match == null}
+
Need to choose a match
+ {/if}
+ {/if}
+
+
+
+
Team
+ {#if manual}
+
+ {:else}
+
+
+ {/if}
+ {#if team == "" || team == null}
+
Need to choose a team
+ {/if}
+
+
+
+
Scout name
+
+ {#if $scout == ""}
+
Scout needs a name
+ {/if}
+
+
\ No newline at end of file