Skip to content
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

refactors user schema #77

Merged
merged 54 commits into from
Sep 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ac57850
renames users table
xwilson03 Aug 3, 2024
6eb7a3c
moves registration data fields to user data
xwilson03 Aug 3, 2024
12691fa
moves all profile data into user data
xwilson03 Aug 3, 2024
bdc6d33
moves some user data into registration data
xwilson03 Aug 3, 2024
4e391d8
TEMP: removes migrations:apply step from build
xwilson03 Aug 3, 2024
a4a84ad
removes checkedIn from user data
xwilson03 Aug 3, 2024
e128066
organizes fields for user and reg data
xwilson03 Aug 3, 2024
0b01091
renames reg data to hacker data
xwilson03 Aug 3, 2024
1f1af2f
adds serial PK to user data
xwilson03 Aug 3, 2024
fe47e2a
shortens lengthy column names
xwilson03 Aug 3, 2024
4488f94
updates userdata-hackerdata relation name
xwilson03 Aug 3, 2024
b6f174b
renames booleans
xwilson03 Aug 3, 2024
4eaee36
updates package lock
xwilson03 Aug 3, 2024
01a10b8
changes naming convention for user data tables
xwilson03 Aug 3, 2024
9eeafa2
updates trivial instances of changed schema columns
xwilson03 Aug 3, 2024
f8760a9
removes commented references to old schema
xwilson03 Aug 3, 2024
34088c0
updates scanner checkin action
xwilson03 Aug 3, 2024
6a3fdc8
updates more trivial substitutions
xwilson03 Aug 4, 2024
fd75399
reverts serial id change
xwilson03 Aug 4, 2024
b1b25dd
fixes team members relation
xwilson03 Aug 4, 2024
5e8c1e6
adds db migration
xwilson03 Aug 4, 2024
1cb2689
updates checkin page
xwilson03 Aug 5, 2024
d118050
slightly refactors checkin
xwilson03 Aug 5, 2024
b61c3c9
updates user interface
xwilson03 Aug 5, 2024
11468ac
updates and simplifies admin user table component
xwilson03 Aug 5, 2024
aebcde3
restructures user type interface
xwilson03 Aug 6, 2024
1478e2e
updates server sections of admin user table
xwilson03 Aug 6, 2024
a70247a
adds commonData relation to hackerData
xwilson03 Aug 6, 2024
bb6ce86
updates team page
xwilson03 Aug 6, 2024
e4a9950
updates trivial schema references
xwilson03 Aug 6, 2024
5ffeffd
updates last known references
xwilson03 Aug 7, 2024
3d609b2
deletes unused code in event columns
xwilson03 Aug 7, 2024
5c8d395
replaces last profileData refs
xwilson03 Aug 7, 2024
209e243
updates pass scanner
xwilson03 Aug 7, 2024
0dff0ea
runs formatter
xwilson03 Aug 7, 2024
5d66688
Merge remote-tracking branch 'origin/dev' into feat/refactor-user-schema
xwilson03 Aug 11, 2024
6b620f9
fixes schoolID rename
xwilson03 Aug 13, 2024
6cd422a
patcches user section of admin panel
xwilson03 Aug 14, 2024
5c146bd
slightly refactors scanner code
xwilson03 Aug 14, 2024
73a92be
slightly simplifies leaveTeam action
xwilson03 Aug 14, 2024
5a5edad
fixes scanner page
xwilson03 Aug 15, 2024
45febfc
adjusts formatting
xwilson03 Aug 15, 2024
a277824
adjusts whitespace
xwilson03 Aug 15, 2024
2179bdb
fixes admin export
xwilson03 Aug 15, 2024
fc1e67a
reruns formatter
xwilson03 Aug 15, 2024
dff44bf
moves invite relation to hacker data
xwilson03 Sep 8, 2024
82425a1
updates references to invite relation
xwilson03 Sep 8, 2024
a422b9b
trims schema imports
xwilson03 Sep 8, 2024
a8488a6
reruns formatter
xwilson03 Sep 8, 2024
513196a
Merge remote-tracking branch 'origin/dev' into feat/refactor-user-schema
christianhelp Sep 11, 2024
1a64b15
updates eventform schema
christianhelp Sep 11, 2024
0cd1a70
updates events type
christianhelp Sep 11, 2024
60948c3
updates lock file
christianhelp Sep 11, 2024
936fc69
adds back migrations
christianhelp Sep 11, 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
Prev Previous commit
Next Next commit
updates server sections of admin user table
xwilson03 committed Aug 6, 2024
commit 1478e2e4cf6e8ef3e02fb9f29f5a3cef3c893462
38 changes: 19 additions & 19 deletions apps/web/src/components/admin/users/ServerSections.tsx
Original file line number Diff line number Diff line change
@@ -14,16 +14,16 @@ export function PersonalInfo({ user }: { user: UserWithAllData }) {
<Cell
title="Gender"
value={titleCase(
user.registrationData.gender.toLowerCase(),
user.gender.toLowerCase(),
)}
/>
<Cell title="Pronouns" value={user.profileData.pronouns} />
<Cell title="Race" value={user.registrationData.race} />
<Cell title="Pronouns" value={user.pronouns} />
<Cell title="Race" value={user.race} />
<Cell
title="Ethnicity"
value={user.registrationData.ethnicity}
value={user.ethnicity}
/>
<Cell title="Age" value={user.registrationData.age} />
<Cell title="Age" value={user.age} />
</div>
</UserInfoSection>
);
@@ -34,31 +34,31 @@ export function ProfileInfo({ user }: { user: UserWithAllData }) {
<UserInfoSection title="Profile Info">
<div className="flex flex-wrap gap-x-10 gap-y-5">
<Cell title="Hacker Tag" value={`@${user.hackerTag}`} />
<Cell title="Team" value={user.teamID ? "Yes" : "No"} />
<Cell title="Team" value={user.hackerData.team ? "Yes" : "No"} />
<Cell
title="Discord"
value={user.profileData.discordUsername}
value={user.discord}
/>
<Cell
title="Linkedin"
value={user.registrationData.LinkedIn || "N/A"}
value={user.hackerData.LinkedIn || "N/A"}
/>
<Cell
title="Github"
value={user.registrationData.GitHub || "N/A"}
value={user.hackerData.GitHub || "N/A"}
/>
<Cell
title="Website"
value={user.registrationData.PersonalWebsite || "N/A"}
value={user.hackerData.PersonalWebsite || "N/A"}
/>
<Cell
title="Profile is Searchable"
value={user.hasSearchableProfile ? "Yes" : "No"}
value={user.isSearchable ? "Yes" : "No"}
/>
</div>
<div className="flex flex-col gap-y-5 pt-5">
<Cell title="Skills" value={"Coming soon..."} />
<Cell title="Bio" value={user.profileData.bio} />
<Cell title="Bio" value={user.bio} />
</div>
</UserInfoSection>
);
@@ -94,24 +94,24 @@ export function TeamInfo({ user }: { user: UserWithAllData }) {
return (
<UserInfoSection title="Team Info">
<div className="flex flex-wrap gap-x-10 gap-y-5 pb-5">
<Cell title="Is in Team" value={user.team ? "Yes" : "No"} />
{user.team ? (
<Cell title="Is in Team" value={user.hackerData.team ? "Yes" : "No"} />
{user.hackerData.team ? (
<>
<Cell title="Team Name" value={user.team.name} />
<Cell title="Team Tag" value={`~${user.team.tag}`} />
<Cell title="Team Name" value={user.hackerData.team.name} />
<Cell title="Team Tag" value={`~${user.hackerData.team.tag}`} />
<Cell
title="Is owner"
value={
user.team.ownerID === user.clerkID
user.hackerData.team.ownerID === user.clerkID
? "Yes"
: "No"
}
/>
</>
) : null}
</div>
{user.team ? (
<Link href={`/~${user.team.tag}`}>
{user.hackerData.team ? (
<Link href={`/~${user.hackerData.team.tag}`}>
<Button>View Team</Button>
</Link>
) : null}