Skip to content

Commit

Permalink
verified build
Browse files Browse the repository at this point in the history
  • Loading branch information
subru-37 committed Nov 29, 2024
1 parent ca46983 commit b1b7c9b
Show file tree
Hide file tree
Showing 4 changed files with 18,450 additions and 14,084 deletions.
2 changes: 1 addition & 1 deletion apps/registration-admin/tsconfig.app.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"root":["./src/App.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/hooks/useAlert.tsx","./src/hooks/useFetch.tsx","./src/pages/Form.tsx","./src/pages/NotFound.tsx","./src/pages/Registered.tsx"],"version":"5.7.2"}
{"root":["./src/App.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/hooks/useAlert.tsx","./src/hooks/useFetch.tsx","./src/pages/Form.tsx","./src/pages/NotFound.tsx","./src/pages/Registered.tsx"],"version":"5.7.2"}
6 changes: 3 additions & 3 deletions apps/registration-admin/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
preview:{
preview: {
host: true,
port: 3004
}
port: 3004,
},
});
55 changes: 37 additions & 18 deletions apps/web-admin/src/pages/[orgId]/events/[eventId]/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


import { useRouter } from 'next/router';
import { useEffect, useState, useRef } from 'react';
import { useDisclosure, Box, VStack } from '@chakra-ui/react';
Expand Down Expand Up @@ -40,7 +38,6 @@ export default function EventById() {
const { orgId, eventId } = router.query;
const showAlert = useAlert();


// const { loading, get } = useFetch();

const { useGetQuery } = useWrapper();
Expand Down Expand Up @@ -106,7 +103,7 @@ export default function EventById() {
cursor: 'pointer',
fontSize: { base: '14px', md: '17px' },
fontWeight: '600',
width: { base: '100%', md: 'auto' },
width: { base: '100%', md: 'auto' },
});

return (
Expand Down Expand Up @@ -140,21 +137,23 @@ export default function EventById() {
borderRadius="8px"
display={{ base: 'block', md: 'flex' }}
>
<VStack
spacing={2}
align="stretch"
display={{ base: 'flex', md: 'none' }}
>
<VStack spacing={2} align="stretch" display={{ base: 'flex', md: 'none' }}>
{['participants', 'check-in', 'attributes', 'extras'].map((tab) => (
<Button
key={tab}
style={tabStyle(activeTab === tab)}
onClick={() => {
setActiveTab(tab);
router.push(`/${orgId}/events/${eventId}/${tab === 'check-in' ? 'participants/check-in' : tab}`);
router.push(
`/${orgId}/events/${eventId}/
${tab === 'check-in' ? 'participants/check-in' : tab}
`,
);
}}
>
{tab === 'check-in' ? 'Participant Check In' : tab.replace(/(^\w|\s\w)/g, m => m.toUpperCase())}
{tab === 'check-in'
? 'Participant Check In'
: tab.replace(/(^\w|\s\w)/g, (m) => m.toUpperCase())}
</Button>
))}
</VStack>
Expand All @@ -163,30 +162,45 @@ export default function EventById() {
justifyContent="space-evenly"
alignItems="center"
width="100%"
display={{ base: 'none', md: 'flex' }} // Horizontal layout on desktop
display={{ base: 'none', md: 'flex' }} // Horizontal layout on desktop
>
{['participants', 'check-in', 'attributes', 'extras'].map((tab) => (
<Button
key={tab}
style={tabStyle(activeTab === tab)}
onClick={() => {
setActiveTab(tab);
router.push(`/${orgId}/events/${eventId}/${tab === 'check-in' ? 'participants/check-in' : tab}`);
router.push(
`/${orgId}/events/${eventId}/
${tab === 'check-in' ? 'participants/check-in' : tab}
`,
);
}}
>
{tab === 'check-in' ? 'Participant Check In' : tab.replace(/(^\w|\s\w)/g, m => m.toUpperCase())}
{tab === 'check-in'
? 'Participant Check In'
: tab.replace(/(^\w|\s\w)/g, (m) => m.toUpperCase())}
</Button>
))}
</Flex>
</Box>

<Flex height="100%" flexDirection="column" justifyContent="center" alignItems="center" gap={4} py={6}>
<Flex
height="100%"
flexDirection="column"
justifyContent="center"
alignItems="center"
gap={4}
py={6}
>
<Text fontSize={{ base: 'xl', md: '3xl' }}>
Total Participants: <span style={{ fontWeight: 'bold' }}>{event.numberOfParticipants}</span>
Total Participants:{' '}
<span style={{ fontWeight: 'bold' }}>{event.numberOfParticipants}</span>
</Text>

<Text fontSize={{ base: 'xl', md: '3xl' }}>
Participants checked in: <span style={{ fontWeight: 'bold' }}>{event.numberOfParticipantsCheckedIn}</span>
Participants checked in:{' '}
<span style={{ fontWeight: 'bold' }}>{event.numberOfParticipantsCheckedIn}</span>
</Text>
</Flex>
</Flex>
Expand All @@ -208,7 +222,12 @@ export default function EventById() {
</DrawerContent>
</Drawer>
) : (
<Modal initialFocusRef={initialRef} finalFocusRef={finalRef} isOpen={isOpen} onClose={onClose}>
<Modal
initialFocusRef={initialRef}
finalFocusRef={finalRef}
isOpen={isOpen}
onClose={onClose}
>
<ModalOverlay />
<ModalContent>
<ModalHeader>Registration Form</ModalHeader>
Expand Down
Loading

0 comments on commit b1b7c9b

Please sign in to comment.