Skip to content

Commit

Permalink
Merge pull request #249 from DurhamAcademy/245-edit-matches-page-for-…
Browse files Browse the repository at this point in the history
…this-year

Edited the Matches page -- now has necessary categories for this year
  • Loading branch information
Ryan-Bauroth authored Jan 7, 2025
2 parents 5ea864f + ee11eef commit 5670dcd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion pages/dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ async function updateTeamData() {
<div
class="w-full my-8 text-center font-sans font-bold !text-primary text-5xl"
>
ChocoChips Scouting
ChocoChips Scouting 🍪<! -- title! -->
</div>
<UCard
class="mb-8 px-4 pb-4"
Expand Down
23 changes: 11 additions & 12 deletions pages/matches.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,30 +45,29 @@ const headers = [
title: 'Auto',
align: 'center',
children: [
{ title: 'Amp', align: 'end', value: 'auto.amp' },
{ title: 'Missed Amp', align: 'end', value: 'auto.missedAmp' },
{ title: 'Speaker', align: 'end', value: 'auto.speakerNA' },
{ title: 'Missed Speaker', align: 'end', value: 'auto.missedSpeaker' },
{ title: 'Position', align: 'start', value: 'auto.position' },
{ title: 'Mobility', align: 'end', value: 'auto.mobility' },
{ title: 'Coral L1', align: 'end', value: 'auto.coralL1' },
{ title: 'Coral L2', align: 'end', value: 'auto.coralL2' },
{ title: 'Coral L3', align: 'end', value: 'auto.coralL3' },
{ title: 'Coral L4', align: 'end', value: 'auto.coralL4' },
{ title: 'Algae in Processor', align: 'end', value: 'auto.processor' },
],
},
{
title: 'Tele-op',
align: 'center',
children: [
{ title: 'Amp', align: 'end', value: 'teleop.amp' },
{ title: 'Missed Amp', align: 'end', value: 'teleop.missedAmp' },
{ title: 'Speaker', align: 'end', value: 'teleop.speakerNA' },
{ title: 'Missed Speaker', align: 'end', value: 'teleop.missedSpeaker' },
{ title: 'Coral L1', align: 'end', value: 'teleop.coralL1' },
{ title: 'Coral L2', align: 'end', value: 'teleop.coralL2' },
{ title: 'Coral L3', align: 'end', value: 'teleop.coralL3' },
{ title: 'Coral L4', align: 'end', value: 'teleop.coralL4' },
{ title: 'Algae in Processor', align: 'end', value: 'teleop.processor' },
],
},
{
title: 'Endgame',
align: 'center',
children: [
{ title: 'Onstage', align: 'end', value: 'endgame.endgame' },
{ title: 'Trap', align: 'end', value: 'endgame.trap' },
{ title: 'Climb', align: 'end', value: 'endgame.endgame' },
],
},
];
Expand Down
1 change: 0 additions & 1 deletion pages/scout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ let scoutData = ref<ScoutingData>({
net: 0,
},
endgame: {
trap: 0,
endgame: [endgameOptions[0]],
},
notes: {
Expand Down
12 changes: 6 additions & 6 deletions utils/scoreMatch.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export function scoreMatch(match: any){
let autoScores = match.auto.speakerNA * 5 + match.auto.amp * 2 + match.auto.mobility * 2
let teleopScores = match.teleop.speakerNA * 2 + match.teleop.amp
let endgameScores = match.endgame.trap * 5
if(match.endgame.endgame.includes("Parked")) endgameScores += 1
if(match.endgame.endgame.includes("Onstage")) endgameScores += 3
if(match.endgame.endgame.includes("Harmony")) endgameScores += 2
let autoScores = match.auto.coralL1 * 3 + match.auto.coralL2 * 4 + match.auto.coralL3 * 6 + match.auto.coralL4 * 7 + match.auto.processor * 6
let teleopScores = match.teleop.coralL1 * 2 + match.teleop.coralL2 * 3 + match.teleop.coralL3 * 4 + match.teleop.coralL4 * 5 + match.teleop.processor * 6
let endgameScores = 0
if(match.endgame.endgame.includes("Parked")) endgameScores += 2
if(match.endgame.endgame.includes("Shallow")) endgameScores += 6
if(match.endgame.endgame.includes("Deep")) endgameScores += 12
return autoScores + teleopScores + endgameScores
}

0 comments on commit 5670dcd

Please sign in to comment.