Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…couting into testing
  • Loading branch information
Ryan-Bauroth committed Jan 14, 2025
2 parents a94e48f + c255def commit c7eecb3
Show file tree
Hide file tree
Showing 7 changed files with 976 additions and 205 deletions.
1 change: 1 addition & 0 deletions components/website-utils/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { loginStateKey } from '~/utils/keys';
import PouchDB from 'pouchdb';
import { eventOptions } from '~/utils/eventOptions';
import { useEventKey } from '~/composables/useEventKey';
import { VerticalNavigationLink } from '#ui/types';
const {
usernameState,
sessionState,
Expand Down
2 changes: 1 addition & 1 deletion pages/notes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async function submit() {
data.value.event = selectedEvent;
if (data.value.teamNumber != null) {
let doc = db.post(data.value);
await navigateTo('dashboard');
await navigateTo('/dashboard');
}
}
</script>
Expand Down
78 changes: 77 additions & 1 deletion pages/scout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ let scoutData = ref<ScoutingData>({
coralL2: 0,
coralL3: 0,
coralL4: 0,
coralL1Miss: 0,
coralL2Miss: 0,
coralL3Miss: 0,
coralL4Miss: 0,
reef: 0,
reefMiss: 0,
processorMiss: 0,
processor: 0,
netMiss: 0,
Expand All @@ -82,6 +88,12 @@ let scoutData = ref<ScoutingData>({
coralL2: 0,
coralL3: 0,
coralL4: 0,
coralL1Miss: 0,
coralL2Miss: 0,
coralL3Miss: 0,
coralL4Miss: 0,
reef: 0,
reefMiss: 0,
processorMiss: 0,
processor: 0,
netMiss: 0,
Expand Down Expand Up @@ -179,7 +191,7 @@ async function submit() {
scoutData.value.author = usernameState.value;
scoutData.value.event = currentEvent.value || eventOptions[0];
await db.post(scoutData.value);
await navigateTo('/matches');
await navigateTo('/teams');
}
}
</script>
Expand Down Expand Up @@ -262,6 +274,9 @@ async function submit() {
<h1 class="text-gray-700 dark:text-gray-200 font-sans mr-6 mb-1 font-bold underline">
Coral Level
</h1>
<h1 class="text-coral-400 font-sans mr-3 mt-1 font-light text-sm">
Scored
</h1>
<div class="flex flex-auto justify-center">
<SingleSelect
v-model="autoCoralLevel"
Expand All @@ -288,6 +303,35 @@ async function submit() {
v-else
></IncrementalButton>
</div>
<h1 class="text-coral-400 font-sans mr-3 mt-1 font-light text-sm">
Missed
</h1>
<div class="flex flex-auto justify-center">
<SingleSelect
v-model="autoCoralLevel"
:options="['L1', 'L2', 'L3', 'L4']"
/>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.auto.coralL1Miss"
v-if="autoCoralLevel==0"
></IncrementalButton>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.auto.coralL2Miss"
v-else-if="autoCoralLevel==1"
></IncrementalButton>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.auto.coralL3Miss"
v-else-if="autoCoralLevel==2"
></IncrementalButton>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.auto.coralL4Miss"
v-else
></IncrementalButton>
</div>
<br/>
<div class="flex text-center">
<div class="max-w-24 w-24">
Expand Down Expand Up @@ -359,6 +403,9 @@ async function submit() {
<h1 class="text-gray-700 dark:text-gray-200 font-sans mr-6 mb-1 font-bold underline">
Coral Level
</h1>
<h1 class="text-coral-400 font-sans mr-3 mt-1 font-light text-sm">
Scored
</h1>
<div class="flex flex-auto justify-center">
<SingleSelect
v-model="teleopCoralLevel"
Expand All @@ -385,6 +432,35 @@ async function submit() {
v-else
></IncrementalButton>
</div>
<h1 class="text-coral-400 font-sans mr-3 mt-1 font-light text-sm">
Missed
</h1>
<div class="flex flex-auto justify-center">
<SingleSelect
v-model="teleopCoralLevel"
:options="['L1', 'L2', 'L3', 'L4']"
/>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.teleop.coralL1Miss"
v-if="teleopCoralLevel==0"
></IncrementalButton>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.teleop.coralL2Miss"
v-else-if="teleopCoralLevel==1"
></IncrementalButton>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.teleop.coralL3Miss"
v-else-if="teleopCoralLevel==2"
></IncrementalButton>
<IncrementalButton
class="mb-1 mr-3 mt-1 ml-2"
v-model="scoutData.teleop.coralL4Miss"
v-else
></IncrementalButton>
</div>
<br/>
<div class="flex text-center">
<div class="max-w-24 w-24">
Expand Down
2 changes: 1 addition & 1 deletion pages/teams/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ watch(width, () => {
<div class="mx-auto flex justify-center align-center">
<UInputMenu
v-model="filterTeam"
:options="teamOptions"
:options[]="teamOptions"
@change="navigateTo('/teams/' + filterTeam)"
class="max-w-36 w-36 flex-auto h-8"
placeholder="Select a team"
Expand Down
4 changes: 2 additions & 2 deletions pages/teams/attachments/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async function goBack() {
<div class="p-2 flex-wrap justify-center">
<p class="font-sans font-bold text-opacity-60">Choose Tags To Filter</p>
<div class="flex justify-center">
<UButton v-for="(tag, index) in possibleTags" :label="tag" class="justify center" style="margin:5px" :variant="tagStyles[index]" :ui="{ rounded: 'rounded-full' }" @click="toggleTag(index)"/>
<UButton v-for="(tag, index) in possibleTags" :label="tag" class="justify center" style="margin:5px" :variant[]="tagStyles[index]" :ui="{ rounded: 'rounded-full' }" @click="toggleTag(index)"/>
</div>
</div>
</template>
Expand All @@ -134,7 +134,7 @@ async function goBack() {
<div class="flex-wrap justify-center p-2">
<p class="font-sans font-bold text-opacity-60">Choose Events To Filter</p>
<div class="flex justify-center">
<UButton v-for="(tag, index) in possibleEvents" :label="tag" class="justify center" style="margin:5px" :variant="eventStyles[index]" :ui="{ rounded: 'rounded-full' }" @click="toggleEvent(index)"/>
<UButton v-for="(tag, index) in possibleEvents" :label="tag" class="justify center" style="margin:5px" :variant[]="eventStyles[index]" :ui="{ rounded: 'rounded-full' }" @click="toggleEvent(index)"/>
</div>
</div>
</template>
Expand Down
Loading

0 comments on commit c7eecb3

Please sign in to comment.