Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
413e238
[npm]: Bump react and @types/react
dependabot[bot] Sep 23, 2024
bee8073
Merge branch 'main' into dependabot/npm_and_yarn/multi-5afa9e7274
renatodellosso Sep 23, 2024
592a7bb
Merge branch 'main' into dependabot/npm_and_yarn/multi-5afa9e7274
renatodellosso Sep 25, 2024
fa9aeaa
Merge branch 'main' into dependabot/npm_and_yarn/multi-5afa9e7274
renatodellosso Sep 27, 2024
2114299
Merge branch 'main' into dependabot/npm_and_yarn/multi-5afa9e7274
renatodellosso Oct 3, 2024
0bf077d
[npm]: Bump typescript from 5.0.4 to 5.6.2
dependabot[bot] Oct 7, 2024
8dbc39d
Merge branch 'main' into dependabot/npm_and_yarn/typescript-5.6.2
renatodellosso Oct 7, 2024
e4a9657
Merge branch 'main' into dependabot/npm_and_yarn/typescript-5.6.2
renatodellosso Oct 8, 2024
a81e082
Merge branch 'main' into dependabot/npm_and_yarn/typescript-5.6.2
renatodellosso Oct 8, 2024
d453ad5
Merge branch 'main' into dependabot/npm_and_yarn/typescript-5.6.2
renatodellosso Oct 12, 2024
185ce1d
[npm]: Bump cloc from 2.0.0-cloc to 2.11.0
dependabot[bot] Oct 20, 2024
12d1019
[npm]: Bump jose from 5.9.3 to 5.9.6
dependabot[bot] Oct 20, 2024
4328393
Merge branch 'main' into dependabot/npm_and_yarn/cloc-2.11.0
renatodellosso Oct 21, 2024
b5dc18e
Merge branch 'main' into dependabot/npm_and_yarn/jose-5.9.6
renatodellosso Oct 21, 2024
f8775a6
[npm]: Bump socket.io from 4.8.0 to 4.8.1
dependabot[bot] Oct 28, 2024
e8e7c7f
Merge branch 'main' into dependabot/npm_and_yarn/socket.io-4.8.1
renatodellosso Nov 3, 2024
063f901
Merge branch 'main' into dependabot/npm_and_yarn/jose-5.9.6
renatodellosso Nov 3, 2024
f314c84
Merge branch 'main' into dependabot/npm_and_yarn/cloc-2.11.0
renatodellosso Nov 3, 2024
83ddd05
Merge branch 'main' into dependabot/npm_and_yarn/typescript-5.6.2
renatodellosso Nov 3, 2024
bf0ac42
Merge branch 'main' into dependabot/npm_and_yarn/cloc-2.11.0
renatodellosso Nov 12, 2024
70073c5
[npm]: Bump the npm_and_yarn group with 3 updates
dependabot[bot] Nov 15, 2024
50e89ca
Merge branch 'main' into dependabot/npm_and_yarn/socket.io-4.8.1
renatodellosso Nov 15, 2024
f614b74
Merge branch 'main' into dependabot/npm_and_yarn/socket.io-4.8.1
renatodellosso Nov 15, 2024
aebf7b9
Merge branch 'main' into dependabot/npm_and_yarn/jose-5.9.6
renatodellosso Nov 15, 2024
302e502
Merge branch 'main' into dependabot/npm_and_yarn/cloc-2.11.0
renatodellosso Nov 15, 2024
a6eb730
Fixed team creation
renatodellosso Nov 18, 2024
066f620
Disabled Slack app
renatodellosso Nov 19, 2024
e9bb6ed
Merge branch 'main' into dependabot/npm_and_yarn/cloc-2.11.0
renatodellosso Nov 19, 2024
581d165
Merge branch 'main' into dependabot/npm_and_yarn/jose-5.9.6
renatodellosso Nov 19, 2024
a8045cc
Merge branch 'main' into dependabot/npm_and_yarn/socket.io-4.8.1
renatodellosso Nov 19, 2024
e149af9
Merge branch 'main' into dependabot/npm_and_yarn/typescript-5.6.2
renatodellosso Nov 19, 2024
fde3f2e
Merge branch 'main' into dependabot/npm_and_yarn/npm_and_yarn-f014aee0bc
renatodellosso Nov 19, 2024
66623e3
Update README.md
renatodellosso Nov 19, 2024
c65170c
Refactor CD workflow to remove secret handling and streamline job con…
renatodellosso Nov 23, 2024
6f77b8f
Merge pull request #253 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Nov 23, 2024
ff50599
Merge pull request #265 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Nov 23, 2024
62624e7
Merge pull request #267 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Nov 23, 2024
83dbb32
Merge pull request #270 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Nov 23, 2024
d16b1de
Merge branch 'main' into dependabot/npm_and_yarn/npm_and_yarn-f014aee0bc
renatodellosso Nov 23, 2024
36f5a14
Merge branch 'main' into dependabot/npm_and_yarn/multi-5afa9e7274
renatodellosso Nov 23, 2024
de5c76f
refactor: update createUser type to Omit<AdapterUser, "id"> for bette…
renatodellosso Nov 23, 2024
21e81f1
Merge pull request #276 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Nov 23, 2024
472b45f
Merge branch 'main' into dependabot/npm_and_yarn/multi-5afa9e7274
renatodellosso Nov 23, 2024
31b3cd0
[npm]: Bump cross-spawn from 7.0.3 to 7.0.6 in the npm_and_yarn group
dependabot[bot] Nov 23, 2024
567a4e9
fix: ensure dragRef is non-null in TeamCard component
renatodellosso Nov 23, 2024
3bf2c13
Merge branch 'dependabot/npm_and_yarn/multi-5afa9e7274' of github.com…
renatodellosso Nov 23, 2024
8e2ab45
Merge pull request #294 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Nov 23, 2024
7469d7f
fix: update dragRef to be non-null in TeamCard component
renatodellosso Nov 23, 2024
7da2827
Convert alerts to toasts
renatodellosso Nov 23, 2024
54cc62b
Overrode the type check in picklist dragrefs
renatodellosso Nov 24, 2024
12a8398
Merge branch 'main' into dependabot/npm_and_yarn/multi-5afa9e7274
renatodellosso Nov 24, 2024
55a2327
Merge pull request #237 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Nov 24, 2024
bfa3b06
Styled toasts
renatodellosso Nov 24, 2024
fac4e0c
Merge branch 'main' into toast-instead-of-alert
BanEvading Nov 25, 2024
486eafc
Merge pull request #295 from Decatur-Robotics/toast-instead-of-alert
renatodellosso Nov 25, 2024
29c9095
[npm]: Bump daisyui from 4.12.12 to 4.12.14
dependabot[bot] Nov 25, 2024
6ed7fd3
[npm]: Bump nodemailer from 6.9.14 to 6.9.16
dependabot[bot] Nov 25, 2024
b553fe2
[npm]: Bump formidable from 3.5.1 to 3.5.2
dependabot[bot] Nov 25, 2024
7f6e470
Merge pull request #296 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Nov 26, 2024
3b242c4
Merge pull request #297 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Nov 26, 2024
55ea53f
Merge pull request #298 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Nov 26, 2024
48a47c9
[npm]: Bump next from 14.2.14 to 15.0.3
dependabot[bot] Nov 26, 2024
1daf3e7
Remove console.log in App
renatodellosso Nov 26, 2024
d78664d
Removed console.logs in AccessLevels
renatodellosso Nov 27, 2024
f6f8ef5
Merge branch 'main' into dependabot/npm_and_yarn/next-15.0.3
renatodellosso Nov 27, 2024
f742ac6
Merge pull request #300 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ name: CD

on:
workflow_call:
secrets:
SSL_KEY:
required: true
SSL_CERT:
required: true
ENV_FILE:
required: true
workflow_dispatch: # Allows manual triggering of the workflow

permissions:
Expand All @@ -27,15 +20,6 @@ jobs:

- name: Create certs directory
run: mkdir certs

- name: Write SSL key
run: echo "${{ secrets.SSL_KEY }}" > certs/ssl.key

- name: Write SSL cert
run: echo "${{ secrets.SSL_CERT }}" > certs/ssl.cert

- name: Write ENV file
run: echo "${{ secrets.ENV_FILE }}" > .env

- name: Build and export
uses: docker/build-push-action@v6
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/onpush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,4 @@ jobs:
cd:
needs:
- ci
uses: ./.github/workflows/cd.yml
secrets:
SSL_KEY: ${{ secrets.SSL_KEY }}
SSL_CERT: ${{ secrets.SSL_CERT }}
ENV_FILE: ${{ secrets.ENV_FILE }}
uses: ./.github/workflows/cd.yml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Features full feature parity with SJ2, whilst remaining simpler, faster and cool
1. Run `npm run test`

## Contributing
You've made it past set up and are ready to contibure to the future scouting - here's how.
You've made it past set up and are ready to contibure to the future of scouting - here's how.

We recommend you start with issues labelled `good first issue` to get a feel for the codebase. Fork the repo (unless you're part of Decatur Robotics, in which case make a new branch) and then make a pull request to the main branch. We'll review it and, if it looks good, merge it.

Expand Down
7 changes: 4 additions & 3 deletions components/competition/CompetitionIndex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import CompHeaderCard from "./CompHeaderCard";
import InsightsAndSettingsCard from "./InsightsAndSettingsCard";
import MatchScheduleCard from "./MatchScheduleCard";
import PitScoutingCard from "./PitScoutingCard";
import toast from "react-hot-toast";

const api = new ClientApi();

Expand Down Expand Up @@ -386,7 +387,7 @@ export default function CompetitionIndex(props: {
}

if ((res.result as string).toLowerCase() !== "success") {
alert(res.result);
toast.error(res.result);
}

setAssigningMatches(false);
Expand All @@ -395,11 +396,11 @@ export default function CompetitionIndex(props: {
const reloadCompetition = async () => {
const num = Math.floor(Math.random() * 1000000);
if(prompt(`Are you sure you want to reload the competition? This will overwrite ALL your data. We CANNOT recover your data. If you are sure, type '${num}'`) !== String(num)) {
alert("Cancelled");
toast("Cancelled");
return;
}

alert("Reloading competition...");
toast("Reloading competition...");

setUpdatingComp("Checking for Updates...");
const res = await api.reloadCompetition(comp?._id!);
Expand Down
6 changes: 3 additions & 3 deletions components/stats/Picklist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function TeamCard(props: { cardData: CardData, draggable: boolean, picklist?: Pi
return (
<div
className={`w-${props.width ?? "[150px]"} h-${props.height ?? "[100px]"} bg-base-100 rounded-lg p-1 flex items-center justify-center border-2 border-base-100 hover:border-primary`}
ref={dragRef}
ref={dragRef as unknown as () => void}
>
<h1>
{props.rank !== undefined ? `${props.rank + 1}. ` : ""}<span className="max-sm:hidden">Team</span> <span className="text-accent">#{teamNumber}</span>
Expand Down Expand Up @@ -115,7 +115,7 @@ function PicklistCard(props: { picklist: Picklist, picklists: Picklist[] }) {
return (
<div
className="bg-base-200 min-h-[30rem] h-fit rounded-lg w-1/3 sm:w-1/6 min-h-32 flex flex-col items-center space-y-2 p-2 sm:p-4"
ref={dropRef}
ref={dropRef as unknown as () => void}
>
<input defaultValue={picklist.name} className="w-[95%] input input-sm max-sm:hidden" onChange={changeName} />
<h1 className="w-[95%] input input-sm input-disabled sm:hidden">{picklist.name}</h1>
Expand Down Expand Up @@ -148,7 +148,7 @@ export function TeamList(props: { teams: CardData[], picklists: Picklist[], expe
});

return (
<div ref={dropRef} className="w-full h-fit flex flex-row bg-base-300 space-x-2 p-2 overflow-x-scroll">
<div ref={dropRef as unknown as () => void} className="w-full h-fit flex flex-row bg-base-300 space-x-2 p-2 overflow-x-scroll">
{
props.teams.sort((a, b) => a.number - b.number).map((team) => (
<TeamCard
Expand Down
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const httpsOptions = {

console.log("HTTPS options set");

startSlackApp();
// startSlackApp();

console.log("App preparing...");
app.prepare().then(() => {
Expand Down
3 changes: 2 additions & 1 deletion lib/Auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { Analytics } from '@/lib/client/Analytics';
import Email from "next-auth/providers/email";
import ResendUtils from "./ResendUtils";
import CollectionId from "./client/CollectionId";
import { AdapterUser } from "next-auth/adapters";

var db = getDatabase();

Expand Down Expand Up @@ -128,7 +129,7 @@ export const AuthenticationOptions: AuthOptions = {
debug: false,
adapter: {
...adapter,
createUser: async (user) => {
createUser: async (user: Omit<AdapterUser, "id">) => {
const createdUser = await adapter.createUser!(user);

Analytics.newSignUp(user.name ?? "Unknown User");
Expand Down
5 changes: 0 additions & 5 deletions lib/api/AccessLevels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ namespace AccessLevels {
return { authorized: false, authData: undefined };
}

console.log(team.owners, user._id?.toString());

return { authorized: team.owners.includes(user._id?.toString()!), authData: { team, comp } };
}

Expand Down Expand Up @@ -241,8 +239,6 @@ namespace AccessLevels {
}

export async function IfOnTeamThatOwnsPicklist(req: NextApiRequest, res: ApiLib.ApiResponse<any>, { userPromise, db }: UserAndDb, picklistId: string) {
console.log("IfOnTeamThatOwnsPicklist", picklistId);

const user = await userPromise;
if (!user) {
return { authorized: false, authData: undefined };
Expand All @@ -258,7 +254,6 @@ namespace AccessLevels {
return { authorized: false, authData: undefined };
}

console.log(team.users, user._id?.toString());
return { authorized: team.users.includes(user._id?.toString()!), authData: { team, picklist } };
}
}
Expand Down
3 changes: 2 additions & 1 deletion lib/api/ApiLib.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { NextApiRequest, NextApiResponse } from "next";
import { OmitCallSignature } from "@/lib/Types";
import toast from "react-hot-toast";

/**
* @tested_by tests/lib/api/ApiLib.test.ts
Expand Down Expand Up @@ -108,7 +109,7 @@ namespace ApiLib {

if (res?.error) {
if (res.error === "Unauthorized") {
alert(`Unauthorized API request: ${subUrl}. If this is an error, please contact the developers.`);
toast.error(`Unauthorized API request: ${subUrl}. If this is an error, please contact the developers.`);
}
throw new Error(`${subUrl}: ${res.error}`);
}
Expand Down
Loading
Loading