Skip to content

Commit

Permalink
changed the gallery to anwesha 24 glimpse
Browse files Browse the repository at this point in the history
  • Loading branch information
anvithagowda098 committed Dec 15, 2024
1 parent a4a2eff commit 8012eeb
Show file tree
Hide file tree
Showing 67 changed files with 5,823 additions and 2,894 deletions.
28 changes: 14 additions & 14 deletions components/BigModal/Modal.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
}

.modal_head h1 {
width: 100%;
text-align: center;
width: 100%;
text-align: center;
font-size: 32px !important;
color: #010031;
font-weight: 600;
margin-left: 32px;
color: #010031;
font-weight: 600;
margin-left: 32px;
}

@media screen and (max-width: 950px) {
Expand All @@ -73,30 +73,30 @@

.leftColumn {
display: flex;
flex-direction: column;
flex-direction: column;
width: 220px;
align-items: flex-start;
gap: 14px;
gap: 14px;
}

.modal_body {
padding: 15px;
padding-bottom: 0;
padding-bottom: 0;
background-color: #fff;
max-width: 600px;
/* max-height: 60vh; */
@media screen and (min-width: 768px) {
border-left: #000000 dashed;
}

@media screen and (min-width: 768px) {
border-left: #000000 dashed;
}
}

.btn {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 52px;
height: 52px;
font-size: 20px;
font-weight: 500;
border-radius: 15px;
Expand Down Expand Up @@ -209,7 +209,7 @@
display: flex;
flex-direction: row;
align-items: center;
margin-top: 20px;
margin-top: 20px;
}

.contacts img {
Expand Down
146 changes: 84 additions & 62 deletions components/BigModal/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// simple react modal component
import React, { useEffect, useState, useContext } from 'react'
import { AuthContext } from '../authContext'
import { soloEventRegistration, soloEventRegistrationiitp } from '../Event Registration/soloEventRegistration'
import {
soloEventRegistration,
soloEventRegistrationiitp,
} from '../Event Registration/soloEventRegistration'
import { ToastContainer, toast } from 'react-toastify'
import styles from './Modal.module.css'
import { useRouter } from 'next/router'
Expand All @@ -15,28 +18,29 @@ const Modal = (props) => {
if (userData.isAuth) {
if (props.body.is_active) {
if (props.body.is_solo) {
if (userData.state.user.user_type !== 'iitp_student' || props.body.id == 'EVT49870' || props.body.id == 'EVT68cb3') {
if (props.body.registration_fee === "0.00")
if (
userData.state.user.user_type !== 'iitp_student' ||
props.body.id == 'EVT49870' ||
props.body.id == 'EVT68cb3'
) {
if (props.body.registration_fee === '0.00')
soloEventRegistrationiitp(
props.body.id,
router,
props.closeHandler
)
else soloEventRegistration(
props.body.id,
props.body.registration_fee,
userData.state.user.email_id,
userData.state.user.phone_number,
userData.state.user.anwesha_id,
router,
props.closeHandler
)


}

else {
if (props.body.tags === "5")
else
soloEventRegistration(
props.body.id,
props.body.registration_fee,
userData.state.user.email_id,
userData.state.user.phone_number,
userData.state.user.anwesha_id,
router,
props.closeHandler
)
} else {
if (props.body.tags === '5')
soloEventRegistration(
props.body.id,
props.body.registration_fee,
Expand All @@ -46,11 +50,12 @@ const Modal = (props) => {
router,
props.closeHandler
)
else soloEventRegistrationiitp(
props.body.id,
router,
props.closeHandler
)
else
soloEventRegistrationiitp(
props.body.id,
router,
props.closeHandler
)
}
} else {
// router.replace(props.body.registration_link)
Expand All @@ -68,9 +73,8 @@ const Modal = (props) => {
},
})
}
}
else {
toast.info("Registration Closed !", {
} else {
toast.info('Registration Closed !', {
position: 'top-right',
autoClose: 3000,
hideProgressBar: false,
Expand All @@ -85,7 +89,7 @@ const Modal = (props) => {
router.push('/userLogin')
}
}
let description = props.body.description.replace(/\n/g, '<br>');
let description = props.body.description.replace(/\n/g, '<br>')
return (
<React.StrictMode>
<ToastContainer
Expand Down Expand Up @@ -162,7 +166,7 @@ const Modal = (props) => {
className={styles.btn}
id={styles.rulebtn}
href={props.body.video}
// onClick={(e) => props.closeHandler()}
// onClick={(e) => props.closeHandler()}
>
Rulebook
</a>
Expand All @@ -179,42 +183,51 @@ const Modal = (props) => {
<div className={styles.date_venue}>
<span className={styles.date_text}>Date:</span>
<span className={styles.date_value}>
{props.body.start_time.substring(5, 7) !== props.body.end_time.substring(5, 7) ? (
<> {new Date(
props.body.start_time
).toLocaleString('default', {
day: 'numeric',
})}
{props.body.start_time.substring(5, 7) !==
props.body.end_time.substring(5, 7) ? (
<>
{' '}
{new Date(
props.body.start_time
).toLocaleString('default', {
day: 'numeric',
})}{' '}
{new Date(
props.body.start_time
).toLocaleString('default', {
month: 'long',
})}
{' - '}
</>
) :
) : (
<>
{props.body.start_time.substring(8, 10) !== props.body.end_time.substring(8, 10) ?
(<>
{
new Date(
props.body.start_time
).toLocaleString('default', {
{props.body.start_time.substring(
8,
10
) !==
props.body.end_time.substring(
8,
10
) ? (
<>
{new Date(
props.body.start_time
).toLocaleString(
'default',
{
day: 'numeric',
})
}
}
)}
{' - '}
</>) : null
}
</>
) : null}
</>
}
)}
{new Date(
props.body.end_time
).toLocaleString('default', {
day: 'numeric',
})}
{' '}
})}{' '}
{new Date(
props.body.end_time
).toLocaleString('default', {
Expand All @@ -227,24 +240,31 @@ const Modal = (props) => {
{props.body.venue}
</span>
</div>
<p dangerouslySetInnerHTML={{ __html: description }} className={styles.description} />
<p
dangerouslySetInnerHTML={{
__html: description,
}}
className={styles.description}
/>
<div className={styles.team_pay}>
<div style={{ fontWeight: '600' }}>
{/* <img src="/assets/team.svg" /> */}
{props.body.max_team_size === 1
? 'Individual Participation'
: props.body.min_team_size ===
props.body.max_team_size
? props.body.min_team_size + ' members'
: props.body.min_team_size +
' - ' +
props.body.max_team_size +
' members'}
props.body.max_team_size
? props.body.min_team_size + ' members'
: props.body.min_team_size +
' - ' +
props.body.max_team_size +
' members'}
</div>
{props.body.registration_fee ? (
!userData.isAuth ||
(userData.state.user.user_type !==
'iitp_student') || props.body.id == 'EVT68cb3' || props.body.id == 'EVT49870' ? (
userData.state.user.user_type !==
'iitp_student' ||
props.body.id == 'EVT68cb3' ||
props.body.id == 'EVT49870' ? (
<p>
Registration Fee&nbsp;
{/* <img src="/assets/payment.svg" /> */}
Expand All @@ -258,7 +278,7 @@ const Modal = (props) => {
{props.body.registration_deadline ? (
<div
className={styles.team_pay}
// style={{ flexDirection: 'row' }}
// style={{ flexDirection: 'row' }}
>
<p>
{/* <img src="/assets/alert.svg" /> */}
Expand Down Expand Up @@ -294,7 +314,9 @@ const Modal = (props) => {
className={styles.team_pay}
style={{ flexDirection: 'column' }}
>
{props.body.tags == "5" ? "POC" : "Organizers"}
{props.body.tags == '5'
? 'POC'
: 'Organizers'}
{props.body.organizer.map(
(e, index) => {
return (
Expand All @@ -304,9 +326,9 @@ const Modal = (props) => {
e[1]
? null
: {
pointerEvents:
'none',
}
pointerEvents:
'none',
}
}
target="_blank"
rel="noreferrer"
Expand Down
41 changes: 25 additions & 16 deletions components/Event Registration/proniteRegistration.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,23 @@ function loadScript(src) {
document.body.appendChild(script)
})
}
function openPay(data){
const options = {
"atomTokenId": data.atomTokenId,
"merchId": data.merchId,
"custEmail": data.custEmail,
"custMobile": data.custMobile,
"returnUrl": data.returnUrl,
}
let atom = new AtomPaynetz(options,'uat');
function openPay(data) {
const options = {
atomTokenId: data.atomTokenId,
merchId: data.merchId,
custEmail: data.custEmail,
custMobile: data.custMobile,
returnUrl: data.returnUrl,
}
async function soloEventRegistration(eventID, amount, email, phone, anwesha_id) {
let atom = new AtomPaynetz(options, 'uat')
}
async function soloEventRegistration(
eventID,
amount,
email,
phone,
anwesha_id
) {
var myHeaders = new Headers()
myHeaders.append('Content-Type', 'application/json')

Expand All @@ -36,7 +42,7 @@ async function soloEventRegistration(eventID, amount, email, phone, anwesha_id)
email: email,
phone: phone,
anwesha_id: anwesha_id,
type: "solo"
type: 'solo',
})
var requestOptions = {
method: 'POST',
Expand All @@ -51,12 +57,15 @@ async function soloEventRegistration(eventID, amount, email, phone, anwesha_id)
.catch((error) => {
console.error(error)
})

const res = await loadScript('https://psa.atomtech.in/staticdata/ots/js/atomcheckout.js?v='+data.atomTokenId)

const res = await loadScript(
'https://psa.atomtech.in/staticdata/ots/js/atomcheckout.js?v=' +
data.atomTokenId
)
openPay(data)
}

async function soloEventRegistrationiitp (eventID) {
async function soloEventRegistrationiitp(eventID) {
var myHeaders = new Headers()
myHeaders.append('Content-Type', 'application/json')

Expand All @@ -78,7 +87,7 @@ async function soloEventRegistrationiitp (eventID) {
console.error(error)
})

toast.success((data.message || data.messagge), {
toast.success(data.message || data.messagge, {
position: 'top-right',
autoClose: 3000,
hideProgressBar: false,
Expand All @@ -89,4 +98,4 @@ async function soloEventRegistrationiitp (eventID) {
theme: 'light',
})
}
export { soloEventRegistration, soloEventRegistrationiitp };
export { soloEventRegistration, soloEventRegistrationiitp }
Loading

0 comments on commit 8012eeb

Please sign in to comment.