Skip to content

Commit

Permalink
finished scout page update i hope
Browse files Browse the repository at this point in the history
  • Loading branch information
PrestonSwigart committed Jan 7, 2025
1 parent bdab1f9 commit 81578ba
Showing 1 changed file with 122 additions and 64 deletions.
186 changes: 122 additions & 64 deletions pages/scout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type { Ref } from '@vue/reactivity';
import type { UnwrapRef } from 'vue';
import { loginStateKey } from '~/utils/keys';
import { useEventKey } from '~/composables/useEventKey';
import SingleSelect from "~/components/scouting-components/SingleSelect.vue";
/*
START SEASONAL UPDATE AREA
Expand All @@ -30,7 +31,10 @@ const endgameOptions = [
'Harmony',
];
const currentLevel = ref(1);
/*
Used to configure coral buttons
*/
const coralLevel = ref(0);
/*
Configuration variables done
Expand Down Expand Up @@ -253,78 +257,132 @@ async function submit() {
<!-- In this section put all the elements you want to be shown under the autonomous tab -->
<div v-if="gameTime == GameTime.Autonomous">
<div class="flex text-center">
<div class="max-w-24 w-24">
<h1 class="text-gray-700 dark:text-gray-200 font-sans mr-3 mb-1 font-bold underline">
Net
</h1>
<h1 class="text-coral-400 font-sans mr-3 mt-1 font-light text-sm">
Scored
</h1>
<!-- (- 0 +) button for scoring that updates the scoutData under the auto tab.
amp is the 2024 game's name for a scoring method -->
<IncrementalButton
class="mb-1 mr-3 mt-1"
v-model="scoutData.auto.net"
></IncrementalButton>
<br />
<h1 class="text-coral-400 font-sans mr-3 mt-1 font-light text-sm">
Missed
<div class="max-w-30 w-30">
<h1 class="text-gray-700 dark:text-gray-200 font-sans mr-6 mb-1 font-bold underline">
Coral Level
</h1>
<!-- we decided it was easiest to separate scoring and missing this year
so this does the same thing as the above incremental button but for missed shots -->
<IncrementalButton
class="mb-0 mr-3 mt-1"
v-model="scoutData.auto.netMiss"
></IncrementalButton>
</div>
<div class="max-w-24 w-24">
<h1
class="text-gray-700 dark:text-gray-200 font-sans mr-3 mb-1 font-bold underline"
>
Processor
</h1>
<h1 class="text-coral-400 font-sans mr-3 mt-1 font-light text-sm">
Scored
</h1>
<!-- input method for auto and the scoring method 'speaker' for 24' season -->
<IncrementalButton
class="mb-1 mr-3 mt-1"
v-model="scoutData.auto.processor"
></IncrementalButton>
<br />
<h1 class="text-coral-400 font-sans mr-3 mt-1 font-light text-sm">
Missed
</h1>
<!-- missed points for speaker -->
<IncrementalButton
class="mb-0 mr-3 mt-1"
v-model="scoutData.auto.processorMiss"
></IncrementalButton>
</div>
<div>
<br />
<br />
<!-- a true/false button (custom component) -->
<BooleanButton
class="mt-1"
v-model="scoutData.auto.mobility"
:default-value="'Mobility'"
:other-value="'Mobility'"
/>
<div class="flex flex-auto justify-center">
<SingleSelect
v-model="coralLevel"
:options="['L1', 'L2', 'L3', 'L4']"
/>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.teleop.coralL1"
v-if="coralLevel==0"
></IncrementalButton>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.teleop.coralL2"
v-else-if="coralLevel==1"
></IncrementalButton>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.teleop.coralL3"
v-else-if="coralLevel==2"
></IncrementalButton>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.teleop.coralL4"
v-else
></IncrementalButton>
</div>
<br/>
<div class="flex text-center">
<div class="max-w-24 w-24">
<h1 class="text-gray-700 dark:text-gray-200 font-sans mr-3 mb-1 font-bold underline">
Net
</h1>
<h1 class="text-coral-400 font-sans mr-3 mt-1 font-light text-sm">
Scored
</h1>
<IncrementalButton
class="mb-1 mr-3 mt-1"
v-model="scoutData.auto.net"
></IncrementalButton>
<br/>
<h1 class="text-coral-400 font-sans mr-3 mt-1 font-light text-sm">
Missed
</h1>
<!-- we decided it was easiest to separate scoring and missing this year
so this does the same thing as the above incremental button but for missed shots -->
<IncrementalButton
class="mb-0 mr-3 mt-1"
v-model="scoutData.auto.netMiss"
></IncrementalButton>
</div>
<div class="max-w-24 w-24">
<h1
class="text-gray-700 dark:text-gray-200 font-sans mr-3 mb-1 font-bold underline"
>
Processor
</h1>
<h1 class="text-coral-400 font-sans mr-3 mt-1 font-light text-sm">
Scored
</h1>
<!-- input method for auto and the scoring method 'processor' for 24' season -->
<IncrementalButton
class="mb-1 mr-3 mt-1"
v-model="scoutData.auto.processor"
></IncrementalButton>
<br />
<h1 class="text-coral-400 font-sans mr-3 mt-1 font-light text-sm">
Missed
</h1>
<!-- missed points for processor -->
<IncrementalButton
class="mb-0 mr-3 mt-1"
v-model="scoutData.auto.processorMiss"
></IncrementalButton>
</div>
<div>
<br />
<br />
<!-- a true/false button (custom component) -->
<BooleanButton
class="mt-1"
v-model="scoutData.auto.mobility"
:default-value="'Mobility'"
:other-value="'Mobility'"
/>
</div>
</div>
</div>
</div>
</div>

<!-- In this section put all the elements you want to be shown under the teleop tab -->
<div v-if="gameTime == GameTime.Teleoperated">
<div class="flex text-center">
<div class="max-w-24 w-24">
<h1 class="text-gray-700 dark:text-gray-200 font-sans mr-3 mb-1 font-bold underline">
Coral
<div class="max-w-30 w-30">
<h1 class="text-gray-700 dark:text-gray-200 font-sans mr-6 mb-1 font-bold underline">
Coral Level
</h1>
<div class="flex flex-auto">
<URange :min="1" :max="4" size="md" v-model="currentLevel"/>
<UBadge class="ml-3" :label="currentLevel"/>
<div class="flex flex-auto justify-center">
<SingleSelect
v-model="coralLevel"
:options="['L1', 'L2', 'L3', 'L4']"
/>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.teleop.coralL1"
v-if="coralLevel==0"
></IncrementalButton>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.teleop.coralL2"
v-else-if="coralLevel==1"
></IncrementalButton>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.teleop.coralL3"
v-else-if="coralLevel==2"
></IncrementalButton>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.teleop.coralL4"
v-else
></IncrementalButton>
</div>
<br/>
<div class="flex text-center">
Expand Down

0 comments on commit 81578ba

Please sign in to comment.