Skip to content

Commit 45fb111

Browse files
Sponsors portals (attendees) (#536)
* Attendees * Resume * Fix resume links, layout --------- Co-authored-by: Jiong Yan Yap <[email protected]>
1 parent 40ba1ec commit 45fb111

File tree

9 files changed

+255
-726
lines changed

9 files changed

+255
-726
lines changed

apps/dashboard/common/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export async function createSignedResumeUrl(resumeFilePath: string) {
122122
repo.setOptions({ useServiceKey: true });
123123
const { data, error } = await repo
124124
.getClient()
125-
.storage.from('rsvp-resume-hacker-2023')
125+
.storage.from('resume')
126126
.createSignedUrl(resumeFilePath, 300);
127127

128128
if (error) console.log(`Resume storage error: ${error.message}`);

apps/dashboard/components/nav/side-nav2.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const SideNav = ({ options }: Props) => {
1717
return (
1818
<div
1919
style={{
20-
height: '100vh',
2120
backgroundColor: 'white',
2221
width: '250px',
2322
display: 'flex',
@@ -55,9 +54,9 @@ const SideNav = ({ options }: Props) => {
5554
))}
5655
</div>
5756

58-
<div style={{width: '100%'}}>
57+
<div style={{ width: '100%' }}>
5958
<div style={{ fontSize: 11, margin: 25 }}>
60-
<div style={{marginBottom: 5}}>Contact HackSC Support</div>
59+
<div style={{ marginBottom: 5 }}>Contact HackSC Support</div>
6160
<div>(213)-513-1234</div>
6261
<div>[email protected]</div>
6362
</div>

apps/dashboard/layouts/themeless-layout.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function ThemelessLayout({ children }: ThemelessLayoutProps) {
3131
if (user == null) return Colors.Yellow.ArthurSweater;
3232
if (user.role === HibiscusRole.HACKER) return Colors.Red.Redward;
3333
if (user.role === HibiscusRole.VOLUNTEER) return Colors.Red.Redward;
34-
if (user.role === HibiscusRole.SPONSOR) return Colors.Red.DonatedBlood;
34+
if (user.role === HibiscusRole.SPONSOR) return Colors.Red.Redward;
3535
return Colors.Yellow.ArthurSweater;
3636
}, [user]);
3737
const shadowColor = useMemo(() => {
@@ -116,9 +116,7 @@ function ThemelessLayout({ children }: ThemelessLayoutProps) {
116116
<RightUtilityContainer>
117117
<UserText>{user.tag}</UserText>
118118
<RoleText>
119-
<GlowSpan color={color} shadowColor={shadowColor}>
120-
{user.role}
121-
</GlowSpan>
119+
<GlowSpan color={color}>{user.role}</GlowSpan>
122120
</RoleText>
123121
<LogoutButton onClick={logout}>
124122
<Image

apps/dashboard/pages/api/hacker-profile/resume/upload/[userId].ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,22 @@ const handler: NextApiHandler = async (req, res) => {
7474
const checkExists = await uploadClient.resumeExists(userIdString);
7575
if (!checkExists) {
7676
const meta = await uploadClient.uploadResume(data, userIdString);
77+
await hbc
78+
.getClient()
79+
.from('participants')
80+
.update({ resume: meta.path })
81+
.eq('id', userIdString);
7782
return res.status(200).json({
7883
success: true,
7984
path: meta.path,
8085
});
8186
} else {
8287
const meta = await uploadClient.updateResume(data, userIdString);
88+
await hbc
89+
.getClient()
90+
.from('participants')
91+
.update({ resume: meta.path })
92+
.eq('id', userIdString);
8393
return res.status(200).json({
8494
success: true,
8595
path: meta.path,

0 commit comments

Comments
 (0)