Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
MCSS-127: QR Decoding Update (#128)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Tedja <anthonytedja@users.noreply.github.com>
  • Loading branch information
hana-dowe and anthonytedja authored Feb 15, 2024
1 parent 5623ff9 commit 979ffcd
Show file tree
Hide file tree
Showing 5 changed files with 643 additions and 6 deletions.
7 changes: 1 addition & 6 deletions components/Dashboard/ModalScanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import Typography from '@mui/material/Typography'
import useMediaQuery from '@mui/material/useMediaQuery'

import Modal from '@/components/Dashboard/Modal'
import FullPageSpinner from '@/components/Shared/FullPageSpinner'
import theme from '@/styles/theme'
import { User } from '@/types/User'

Expand Down Expand Up @@ -45,7 +44,6 @@ const ModalScanner = (props: Props) => {
const isValidateName = isUserModal && userContext.success === undefined

const getModalTitle = () => {
if (isLoading) return ''
if (isUserModal) {
if (userContext.success === undefined) return 'Registration'
return userContext.success ? 'Success' : 'Error'
Expand All @@ -56,7 +54,6 @@ const ModalScanner = (props: Props) => {
const modalTitle = getModalTitle()

const getModalColor = () => {
if (isLoading) return ''
if (isUserModal) {
if (userContext.success === undefined) return ''
return userContext.success ? theme.palette.success.dark : theme.palette.error.dark
Expand Down Expand Up @@ -131,9 +128,7 @@ const ModalScanner = (props: Props) => {
},
}}
>
{isLoading ? (
<FullPageSpinner />
) : isUserModal ? (
{isUserModal ? (
// Registration validate name before actual check-in
<Grid
display="flex"
Expand Down
1 change: 1 addition & 0 deletions components/Shared/ScheduleGrid/ScheduleModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const ScheduleModal = (props: Props) => {
deerhacks: 'DeerHacks',
mcss: 'MCSS',
utmRobotics: 'UTM Robotics',
esports: 'Esports',
gdsc: 'GDSC',
cssc: 'CSSC',
utmsam: 'UTMSAM',
Expand Down
1 change: 1 addition & 0 deletions pages/dashboard/scanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ const QRCodeScanner = () => {
<QrScanner
stopDecoding={!context || !enableScanner}
onDecode={(qrId) => {
if (!context || !enableScanner) return
if (context === 'registration') {
handleRegistration(qrId)
} else {
Expand Down
639 changes: 639 additions & 0 deletions public/events/esports.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions types/Event/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const eventHosts = [
'deerhacks',
'mcss',
'utmRobotics',
'esports',
'gdsc',
'cssc',
'utmsam',
Expand Down

0 comments on commit 979ffcd

Please sign in to comment.