-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scouting alliance #218
Scouting alliance #218
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I commented on specific lines, but had a few additional comments:
-Add a way to specify if the alliance is for FRC or FTC
-Fire a Google Analytics event when an alliance is created. You could use the team created event, but add a parameter for if the team is an alliance
-Add a field to Team
tracking if the team is an alliance
-Make the wording on other pages change if the team is an alliance
<div className="btn btn-primary" onClick={()=>{ | ||
setSettingState(false) | ||
setCreatingTeam(false) | ||
}}>Create an Alliance</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to "Create an alliance" because the other option is "Create a team"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should change it to be undefined at some point though.
const [allianceNumber,setAllianceNumber] = useState<number>(); | ||
const [allianceName, setAllianceName] = useState<string>(); | ||
const [creatingTeam, setCreatingTeam] = useState<boolean>(); | ||
const [settingState, setSettingState] = useState<boolean>(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a more descriptive name
<div className="divider"></div> | ||
<input | ||
className="input input-bordered md:w-1/2" | ||
placeholder="Alliance ID (7 characters)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change Alliance ID to Alliance Number or something similar, so users know it should be a number. Also add a type attribute to the input so users can't enter letters. Entering letters breaks the page right now.
allianceName, | ||
allianceNumber!, | ||
session.user._id, | ||
"none", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use NotLinkedToTba
. It's a constant in ClientUtils.ts.
I added support for custom team names and teams not linked to TBA or TOA the other day (fixing the bug 25729 ran into), so this PR is unnecessary. Sorry about invalidating your work. |
I'm still a little rusty so I might have broken something or violated best practices somewhere.