Skip to content

Commit

Permalink
merging and fixing bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
NwinNwin committed May 7, 2024
2 parents 0acbe22 + a1d1676 commit 5ae90f5
Show file tree
Hide file tree
Showing 33 changed files with 664 additions and 207 deletions.
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const Layout = () => {
) : (
<NavbarDrawer isOpen={isNavbarDrawerOpen} onClose={onNavbarDrawerClose} />
)}
<Box as="main" ml={isLargerThan1200px ? 'var(--size-of-navbar)' : 0}>
<Box as="main" ml={isLargerThan1200px ? 'var(--size-of-navbar)' : 10}>
<Outlet />
</Box>
</NavbarContext.Provider>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Auth/AuthPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from 'prop-types';

const AuthPage = ({ children }) => {
return (
<SimpleGrid columns={2} spacing={0} minH={'100vh'} style={{ fontFamily: 'Poppins' }}>
<SimpleGrid columns={2} spacing={0} minH={'100vh'}>
<Box
backgroundColor="#2D558A"
position="relative"
Expand Down
11 changes: 7 additions & 4 deletions src/components/Checkin/CheckinModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import { FaUserAlt } from 'react-icons/fa'; // Icon for when there is no picture
import GroupIcon from '../../Assets/groupIcon.svg';

const CheckinModal = ({ isOpen, onClose, volunteer, onCheckInConfirm }) => {
const [numberOfParticipants, setNumberOfParticipants] = useState('');
const [submittable, setSubmittable] = useState(false);
const [numberOfParticipants, setNumberOfParticipants] = useState(1);
const [submittable, setSubmittable] = useState(true);

const handleInput = e => {
setNumberOfParticipants(e.target.value);
Expand All @@ -33,7 +33,7 @@ const CheckinModal = ({ isOpen, onClose, volunteer, onCheckInConfirm }) => {
};

const handleCheckIn = async () => {
if (volunteer && typeof volunteer === 'object' && volunteer.id) {
if (volunteer && typeof volunteer === 'object' && volunteer.id && volunteer.event_data_id) {
await onCheckInConfirm(volunteer, numberOfParticipants); // Pass the entire volunteer object
onClose();
} else {
Expand Down Expand Up @@ -76,7 +76,9 @@ const CheckinModal = ({ isOpen, onClose, volunteer, onCheckInConfirm }) => {
>
<FaUserAlt color="#49B164" />
<Text fontSize="xs" ml={1} fontWeight="bold">
{volunteer.number_in_party === 1 ? 'Individual' : 'Group'}
{!volunteer.number_in_party || volunteer.number_in_party == 1
? 'Individual'
: 'Group'}
</Text>
</Flex>
</Flex>
Expand Down Expand Up @@ -128,6 +130,7 @@ CheckinModal.propTypes = {
email: PropTypes.string,
image_url: PropTypes.string,
number_in_party: PropTypes.number,
event_data_id: PropTypes.number,
}),
};

Expand Down
30 changes: 0 additions & 30 deletions src/components/DummyVolunteerProfile/ProfilePageModals.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ const EditFirstNameModal = ({ isOpen, onClose, user }) => {
// Push over by the size of the button
width={'100%'}
fontWeight={'800'}
fontFamily={'Avenir'}
letterSpacing={'0em'}
>
Edit First Name
Expand Down Expand Up @@ -123,7 +122,6 @@ const EditFirstNameModal = ({ isOpen, onClose, user }) => {
fontWeight={'500'}
fontSize={'16px'}
marginLeft={'13px'}
fontFamily={'Avenir'}
lineHeight={'15px'}
letterSpacing={'0em'}
justify={'left'}
Expand All @@ -132,7 +130,6 @@ const EditFirstNameModal = ({ isOpen, onClose, user }) => {
First Name
</FormLabel>
<Input
fontFamily={'Inter, Arial, Helvetica, sans-serif'}
fontSize={'16px'}
fontWeight={'500'}
letterSpacing={'0em'}
Expand All @@ -159,7 +156,6 @@ const EditFirstNameModal = ({ isOpen, onClose, user }) => {
color={'#0075FF'}
gap={'6px'}
padding={'12 11.321188926696777 12 11.321188926696777'}
fontFamily={'Avenir'}
fontSize={'14px'}
_hover={{
bg: 'red',
Expand All @@ -179,7 +175,6 @@ const EditFirstNameModal = ({ isOpen, onClose, user }) => {
color={'#FFFFFF'}
onClick={handleSubmit}
isDisabled={isSubmittable}
fontFamily={'Avenir'}
fontSize={'14px'}
_hover={{
bg: 'green',
Expand Down Expand Up @@ -267,7 +262,6 @@ const EditLastNameModal = ({ isOpen, onClose, user }) => {
// Push over by the size of the button
width={'100%'}
fontWeight={'800'}
fontFamily={'Avenir'}
letterSpacing={'0em'}
>
Edit Last Name
Expand Down Expand Up @@ -298,7 +292,6 @@ const EditLastNameModal = ({ isOpen, onClose, user }) => {
fontWeight={'500'}
fontSize={'16px'}
marginLeft={'13px'}
fontFamily={'Avenir'}
lineHeight={'15px'}
letterSpacing={'0em'}
justify={'left'}
Expand All @@ -307,7 +300,6 @@ const EditLastNameModal = ({ isOpen, onClose, user }) => {
Last Name
</FormLabel>
<Input
fontFamily={'Inter, Arial, Helvetica, sans-serif'}
fontSize={'16px'}
fontWeight={'500'}
letterSpacing={'0em'}
Expand All @@ -334,7 +326,6 @@ const EditLastNameModal = ({ isOpen, onClose, user }) => {
color={'#0075FF'}
gap={'6px'}
padding={'12 11.321188926696777 12 11.321188926696777'}
fontFamily={'Avenir'}
fontSize={'14px'}
_hover={{
bg: 'red',
Expand All @@ -354,7 +345,6 @@ const EditLastNameModal = ({ isOpen, onClose, user }) => {
color={'#FFFFFF'}
onClick={handleSubmit}
isDisabled={isSubmittable}
fontFamily={'Avenir'}
fontSize={'14px'}
_hover={{
bg: 'green',
Expand Down Expand Up @@ -442,7 +432,6 @@ const EditEmailModal = ({ isOpen, onClose, user }) => {
// Push over by the size of the button
width={'100%'}
fontWeight={'800'}
fontFamily={'Avenir'}
letterSpacing={'0em'}
>
Edit Email
Expand Down Expand Up @@ -473,7 +462,6 @@ const EditEmailModal = ({ isOpen, onClose, user }) => {
fontWeight={'500'}
fontSize={'16px'}
marginLeft={'13px'}
fontFamily={'Avenir'}
lineHeight={'15px'}
letterSpacing={'0em'}
justify={'left'}
Expand All @@ -482,7 +470,6 @@ const EditEmailModal = ({ isOpen, onClose, user }) => {
Email
</FormLabel>
<Input
fontFamily={'Inter, Arial, Helvetica, sans-serif'}
fontSize={'16px'}
fontWeight={'500'}
letterSpacing={'0em'}
Expand All @@ -509,7 +496,6 @@ const EditEmailModal = ({ isOpen, onClose, user }) => {
color={'#0075FF'}
gap={'6px'}
padding={'12 11.321188926696777 12 11.321188926696777'}
fontFamily={'Avenir'}
fontSize={'14px'}
_hover={{
bg: 'red',
Expand All @@ -529,7 +515,6 @@ const EditEmailModal = ({ isOpen, onClose, user }) => {
color={'#FFFFFF'}
onClick={handleSubmit}
isDisabled={isSubmittable}
fontFamily={'Avenir'}
fontSize={'14px'}
_hover={{
bg: 'green',
Expand Down Expand Up @@ -617,7 +602,6 @@ const EditOrganizationModal = ({ isOpen, onClose, user }) => {
// Push over by the size of the button
width={'100%'}
fontWeight={'800'}
fontFamily={'Avenir'}
letterSpacing={'0em'}
>
Edit Organization
Expand Down Expand Up @@ -648,7 +632,6 @@ const EditOrganizationModal = ({ isOpen, onClose, user }) => {
fontWeight={'500'}
fontSize={'16px'}
marginLeft={'13px'}
fontFamily={'Avenir'}
lineHeight={'15px'}
letterSpacing={'0em'}
justify={'left'}
Expand All @@ -657,7 +640,6 @@ const EditOrganizationModal = ({ isOpen, onClose, user }) => {
Organization
</FormLabel>
<Input
fontFamily={'Inter, Arial, Helvetica, sans-serif'}
fontSize={'16px'}
fontWeight={'500'}
letterSpacing={'0em'}
Expand All @@ -684,7 +666,6 @@ const EditOrganizationModal = ({ isOpen, onClose, user }) => {
color={'#0075FF'}
gap={'6px'}
padding={'12 11.321188926696777 12 11.321188926696777'}
fontFamily={'Avenir'}
fontSize={'14px'}
_hover={{
bg: 'red',
Expand All @@ -704,7 +685,6 @@ const EditOrganizationModal = ({ isOpen, onClose, user }) => {
color={'#FFFFFF'}
onClick={handleSubmit}
isDisabled={isSubmittable}
fontFamily={'Avenir'}
fontSize={'14px'}
_hover={{
bg: 'green',
Expand Down Expand Up @@ -792,7 +772,6 @@ const EditPhoneNumberModal = ({ isOpen, onClose, user }) => {
// Push over by the size of the button
width={'100%'}
fontWeight={'800'}
fontFamily={'Avenir'}
letterSpacing={'0em'}
>
Edit Phone Number
Expand Down Expand Up @@ -823,7 +802,6 @@ const EditPhoneNumberModal = ({ isOpen, onClose, user }) => {
fontWeight={'500'}
fontSize={'16px'}
marginLeft={'13px'}
fontFamily={'Avenir'}
lineHeight={'15px'}
letterSpacing={'0em'}
justify={'left'}
Expand All @@ -832,7 +810,6 @@ const EditPhoneNumberModal = ({ isOpen, onClose, user }) => {
Phone Number
</FormLabel>
<Input
fontFamily={'Inter, Arial, Helvetica, sans-serif'}
fontSize={'16px'}
fontWeight={'500'}
letterSpacing={'0em'}
Expand All @@ -859,7 +836,6 @@ const EditPhoneNumberModal = ({ isOpen, onClose, user }) => {
color={'#0075FF'}
gap={'6px'}
padding={'12 11.321188926696777 12 11.321188926696777'}
fontFamily={'Avenir'}
fontSize={'14px'}
_hover={{
bg: 'red',
Expand All @@ -879,7 +855,6 @@ const EditPhoneNumberModal = ({ isOpen, onClose, user }) => {
color={'#FFFFFF'}
onClick={handleSubmit}
isDisabled={isSubmittable}
fontFamily={'Avenir'}
fontSize={'14px'}
_hover={{
bg: 'green',
Expand Down Expand Up @@ -967,7 +942,6 @@ const EditAboutMeModal = ({ isOpen, onClose, user }) => {
// Push over by the size of the button
width={'100%'}
fontWeight={'800'}
fontFamily={'Avenir'}
letterSpacing={'0em'}
>
Edit About Me Section
Expand Down Expand Up @@ -998,7 +972,6 @@ const EditAboutMeModal = ({ isOpen, onClose, user }) => {
fontWeight={'500'}
fontSize={'16px'}
marginLeft={'13px'}
fontFamily={'Avenir'}
lineHeight={'15px'}
letterSpacing={'0em'}
justify={'left'}
Expand All @@ -1007,7 +980,6 @@ const EditAboutMeModal = ({ isOpen, onClose, user }) => {
About Me
</FormLabel>
<Input
fontFamily={'Inter, Arial, Helvetica, sans-serif'}
fontSize={'16px'}
fontWeight={'500'}
letterSpacing={'0em'}
Expand All @@ -1034,7 +1006,6 @@ const EditAboutMeModal = ({ isOpen, onClose, user }) => {
color={'#0075FF'}
gap={'6px'}
padding={'12 11.321188926696777 12 11.321188926696777'}
fontFamily={'Avenir'}
fontSize={'14px'}
_hover={{
bg: 'red',
Expand All @@ -1054,7 +1025,6 @@ const EditAboutMeModal = ({ isOpen, onClose, user }) => {
color={'#FFFFFF'}
onClick={handleSubmit}
isDisabled={isSubmittable}
fontFamily={'Avenir'}
fontSize={'14px'}
_hover={{
bg: 'green',
Expand Down
3 changes: 1 addition & 2 deletions src/components/EventRegistration/LoadingModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ const LoadingModal = ({ ...props }) => {
<Spinner color="blue.500" size={'xl'} speed="0.8s" thickness="6px" />
</Flex>
<Box>
<Text fontFamily={'Avenir'} fontSize={'30px'} align={'center'} fontWeight={800}>
<Text fontSize={'30px'} align={'center'} fontWeight={800}>
{`Registering...`}
</Text>
<Text
color={'#717171'}
fontSize={'22px'}
align={'center'}
fontFamily={'Avenir'}
fontWeight={800}
>
{`Hang tight, and you'll registered soon!`}
Expand Down
3 changes: 1 addition & 2 deletions src/components/EventRegistration/RegistrationModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@ const RegistrationModal = ({
color={'#717171'}
fontSize={'20px'}
align={'center'}
fontFamily={'Avenir'}
fontWeight={800}
mb={'-6px'}
>
Volunteer registration
</Text>
<Text fontFamily={'Avenir'} fontSize={'32px'} align={'center'} fontWeight={800}>
<Text fontSize={'32px'} align={'center'} fontWeight={800}>
{title}
</Text>
</ModalHeader>
Expand Down
11 changes: 2 additions & 9 deletions src/components/EventRegistration/SignWaiverModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,14 @@ const SignWaiverModal = ({ registrationFlowState, ...props }) => {
continueText={'Register'}
{...props}
>
{/* color: var(--Primary-Text, #3B3B3B);
font-family: Avenir;
font-size: 18px;
font-style: normal;
font-weight: 500;
line-height: normal; */}
<Box>
<Text color={'#717171'} fontFamily={'Avenir'} fontSize={'16px'} fontWeight={'400'} pb="1">
<Text color={'#717171'} fontSize={'16px'} fontWeight={'400'} pb="1">
Read terms and conditions
</Text>
{/* Terms box */}
<Box maxH="250px" overflowY={'scroll'} borderRadius={'12px'} border="3px solid #EFEFEF">
<Text
color={'#3B3B3B'}
fontFamily={'Avenir'}
fontSize={'18px'}
fontWeight={'300'}
py="3"
Expand All @@ -49,7 +42,7 @@ line-height: normal; */}
pt="4"
style={{ '--chakra-colors-blue-500': '#0075FF', '--chakra-radii-sm': '5px' }}
>
<Text color={'#717171'} fontFamily={'Avenir'} fontSize={'16px'} fontWeight={'400'}>
<Text color={'#717171'} fontSize={'16px'} fontWeight={'400'}>
I agree to the terms and conditions
</Text>
</Checkbox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,13 @@ const SuccessfulRegistrationModal = ({ ...props }) => {
</svg>
</Flex>
<Box>
<Text fontFamily={'Avenir'} fontSize={'42px'} align={'center'} fontWeight={800}>
<Text fontSize={'42px'} align={'center'} fontWeight={800}>
{`You're all set!`}
</Text>
<Text
color={'#717171'}
fontSize={'22px'}
align={'center'}
fontFamily={'Avenir'}
fontWeight={800}
>
{`We're excited to see you at the event!`}
Expand Down
3 changes: 1 addition & 2 deletions src/components/Events/DataCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ const DataCard = ({ icon, text, amount }) => {
return (
<VStack bg="white" pt={25} pb={2} borderRadius="lg" align="center" w={'100%'}>
{icon}
<Text textAlign={'center'} fontWeight={500} fontSize={18} fontFamily={'Avenir'}>
<Text textAlign={'center'} fontWeight={500} fontSize={18}>
{text}
</Text>
<Text
textAlign={'center'}
fontSize={56}
fontWeight={800}
color={'rgba(0, 0, 0, 0.75)'}
fontFamily={'Avenir'}
>
{amount}
</Text>
Expand Down
Loading

0 comments on commit 5ae90f5

Please sign in to comment.