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

336 profile page #360

Merged
merged 82 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from 80 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
3d71652
teardown profile card
choden-dev May 1, 2024
ae3dc1d
run prettier :clown_face:
choden-dev May 1, 2024
b000dfe
create edit view for profile
choden-dev May 1, 2024
d7bdaa9
run prettier
choden-dev May 15, 2024
e5ab0f8
fixing typo on BENSON's work
zlrkw11 May 15, 2024
67e44e0
importing JEFFEREY's profile information components
zlrkw11 May 15, 2024
6d4dc5b
importing background image
zlrkw11 May 15, 2024
a488b27
adding name as header
zlrkw11 May 15, 2024
0aebe0c
putting 2 more profile info components on
zlrkw11 May 15, 2024
f6f54b1
changes to play with
choden-dev May 18, 2024
17cef93
fix eslint
choden-dev May 18, 2024
a312b0d
fixed the destruring issue
zlrkw11 May 19, 2024
8f32423
testing first and last name
zlrkw11 May 19, 2024
4fdfc41
restyling the overall template
zlrkw11 May 19, 2024
c0052ad
added outside wrapper div for all cards component
zlrkw11 May 19, 2024
183ff5c
styled the user's name and adjusted its position
zlrkw11 May 19, 2024
2a44d9b
imported the figma button to make an exit button.
zlrkw11 May 19, 2024
2f574dc
fixing the user data import destrurcturing process
zlrkw11 May 19, 2024
ab7813f
adjusting grid spacing for the name and the exit button
zlrkw11 May 19, 2024
a2fbcf2
making the exit button instead of having a fixed styled figma button
zlrkw11 May 19, 2024
7aa21bb
final adjustments on the EXIT button
zlrkw11 May 19, 2024
cc85aac
added the calender section, required more editing
zlrkw11 May 19, 2024
8f44b00
prettier
zlrkw11 May 19, 2024
49a51cc
added the calender component's inserting space for testing purpose
zlrkw11 May 19, 2024
28400f3
made adjustments on the top personal panel. Making grids suit for design
zlrkw11 May 19, 2024
8d2a613
implemented all contents for both membership and additional details p…
zlrkw11 May 19, 2024
9fe3e40
x
zlrkw11 May 19, 2024
4b7e310
x
zlrkw11 May 19, 2024
2fef81d
adjusted spacing for top panel
zlrkw11 May 19, 2024
de45b37
added onclick icons for each panel
zlrkw11 May 19, 2024
f511b7f
prettier
zlrkw11 May 19, 2024
fd025dc
added description text
zlrkw11 May 19, 2024
b20f61f
implemented footer
zlrkw11 May 19, 2024
d7708cd
adjusting button position
zlrkw11 May 19, 2024
fc99e84
refined spacing for personal panel and spacing in general
zlrkw11 May 19, 2024
0cd574e
moved up the entire section to the top
zlrkw11 May 19, 2024
6111cde
changing button text
zlrkw11 May 19, 2024
62f9181
made the sign out function and implemented on the sign out button.
zlrkw11 May 19, 2024
4ae086b
fixed the name of button
zlrkw11 May 19, 2024
6ca431c
Merge branch 'master' into 336-profile-page
zlrkw11 May 19, 2024
fe0e612
making mobile version 1 column according to BENSON's comment
zlrkw11 May 19, 2024
3462f18
Merge branch '336-profile-page' of https://github.com/UoaWDCC/uasc-we…
zlrkw11 May 19, 2024
329cdb5
prettier
zlrkw11 May 19, 2024
a73caf4
spaced the button to make it visible while in mobile version
zlrkw11 May 19, 2024
387cd93
fixed the date with a function to convert seconds into the date string.
zlrkw11 May 19, 2024
a9655fa
made a strip function to strip out the GMT
zlrkw11 May 19, 2024
b47548a
using the image instead of the component as bg image
zlrkw11 May 20, 2024
db35001
removing the import for bg image
zlrkw11 May 20, 2024
e5a8205
making responsive background image component to serve for profile page
zlrkw11 May 20, 2024
9668423
writing up storybook file for the responsive background image
zlrkw11 May 20, 2024
ec77e29
prettier
zlrkw11 May 20, 2024
4daffa2
importing the responsive background image component into profile page
zlrkw11 May 20, 2024
aca6b20
footer absolute bottom
zlrkw11 May 20, 2024
6a72507
un did the change on full bg img component
zlrkw11 May 20, 2024
9640170
fixed date
zlrkw11 May 20, 2024
4e811ec
placing the footer at the very bottom
zlrkw11 May 20, 2024
91c9d70
fixed the opacity applying problem on all children
zlrkw11 May 20, 2024
fb04b6e
x-justify-end for the button fixing the horizontal scrolling issue.
zlrkw11 May 20, 2024
e09088b
prettier
zlrkw11 May 20, 2024
8fa5882
284 refresh user id token (#355)
AzizPatel786 May 15, 2024
a3e212a
Update membership types, make membership selectable on frontend (#356)
choden-dev May 16, 2024
89ec947
353 react calendar (#359)
ganznz May 18, 2024
59a4dbb
prettier
zlrkw11 May 19, 2024
c0f3dd9
spaced the button to make it visible while in mobile version
zlrkw11 May 19, 2024
d31622c
fixed the date with a function to convert seconds into the date string.
zlrkw11 May 19, 2024
d72d7d0
made a strip function to strip out the GMT
zlrkw11 May 19, 2024
e1c808c
using the image instead of the component as bg image
zlrkw11 May 20, 2024
df86018
removing the import for bg image
zlrkw11 May 20, 2024
db47da6
making responsive background image component to serve for profile page
zlrkw11 May 20, 2024
2c6064b
writing up storybook file for the responsive background image
zlrkw11 May 20, 2024
cb78805
prettier
zlrkw11 May 20, 2024
04b0212
importing the responsive background image component into profile page
zlrkw11 May 20, 2024
53d9770
footer absolute bottom
zlrkw11 May 20, 2024
638c875
un did the change on full bg img component
zlrkw11 May 20, 2024
b4b7192
fixed date
zlrkw11 May 20, 2024
d19d11e
placing the footer at the very bottom
zlrkw11 May 20, 2024
1bd5cf2
fixed the opacity applying problem on all children
zlrkw11 May 20, 2024
77e5184
x-justify-end for the button fixing the horizontal scrolling issue.
zlrkw11 May 20, 2024
43af2d1
prettier
zlrkw11 May 20, 2024
d65ea5c
Merge branch '336-profile-page' of https://github.com/UoaWDCC/uasc-we…
zlrkw11 May 20, 2024
225745b
Merge branch 'master' into 336-profile-page
zlrkw11 May 20, 2024
1f735a0
x
zlrkw11 May 20, 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { Card, Typography, CardContent, Stack, Box } from "@mui/material"

function ProfileCalendarCard() {
return (
<div>
<Card
sx={{
boxShadow: "0px 8px 44px 0px rgba(0, 0, 0, 0.14)",
backgroundColor: "white",
borderRadius: "15px"
}}
>
<CardContent sx={{ padding: "36px" }}>
<Stack spacing={2}>
<Typography
variant="h5"
align="left"
color="#457CC3"
sx={{ fontWeight: "900" }}
>
Calendar
</Typography>
<Box></Box>
</Stack>
</CardContent>
</Card>
</div>
)
}

export default ProfileCalendarCard
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import Button from "components/generic/FigmaButtons/FigmaButton"
import { UserAdditionalInfo } from "models/User"

interface IUserInformationDisplay {
userData?: UserAdditionalInfo
editHandler?: () => void
}

const UserInformationDisplay = ({
userData,
editHandler
}: IUserInformationDisplay) => {
if (userData) {
const { date_of_birth, ...displayableFields } = userData
return (
<>
<Button variant="default-sm" onClick={editHandler}>
Edit
</Button>
<div>
{/* TODO: Properly style and name fields */}
{Object.keys(displayableFields).map((key) => {
const _key = key as keyof typeof displayableFields
return (
<>
<h5>
{_key}: {displayableFields[_key]}
</h5>
</>
)
})}
<h5>{new Date(date_of_birth.seconds * 1000).toDateString()}</h5>
</div>
</>
)
}
return <>No Data found</>
}

export default UserInformationDisplay
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import Button from "components/generic/FigmaButtons/FigmaButton"
import TextInput from "components/generic/TextInputComponent/TextInput"
import { UserAdditionalInfo } from "models/User"

interface IUserInformationEdit {
userData?: UserAdditionalInfo
saveHandler?: () => void
}

const UserInformationEdit = ({
userData,
saveHandler
}: IUserInformationEdit) => {
if (userData) {
const { date_of_birth, ...displayableFields } = userData
return (
<>
<Button variant="default-sm" onClick={saveHandler}>
Save
</Button>
<div>
{/* TODO: Properly style and name fields */}
{Object.keys(displayableFields).map((key) => {
const _key = key as keyof typeof displayableFields
return (
<>
<h5>{_key}</h5>
<TextInput value={(displayableFields[_key] as string) || ""} />
</>
)
})}
<h5>{new Date(date_of_birth.seconds * 1000).toDateString()}</h5>
</div>
</>
)
}
return <>No Data found</>
}

export default UserInformationEdit
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { useState } from "react"
import { useSearchParams } from "react-router-dom"
import UserInformationEdit from "./UserInformationEdit"
import UserInformationDisplay from "./UserInformationDisplay"
import { UserAdditionalInfo } from "models/User"

interface IUserInformationSection {
userData?: UserAdditionalInfo
}

const UserInformationSection = ({ userData }: IUserInformationSection) => {
const [searchParams] = useSearchParams()
const [isEdit, setIsEdit] = useState<boolean>(!!searchParams.get("edit"))

return (
<>
{isEdit ? (
<UserInformationEdit
saveHandler={() => setIsEdit(false)}
userData={userData}
/>
) : (
<UserInformationDisplay
editHandler={() => setIsEdit(true)}
userData={userData}
/>
)}
</>
)
}

export default UserInformationSection

This file was deleted.

Loading