From d24282c07e31294cd12f44fa5d60b8a148ef1801 Mon Sep 17 00:00:00 2001 From: AnkitPathak Date: Thu, 10 Oct 2024 11:19:28 +0530 Subject: [PATCH 1/4] updates sign-up btn --- .../src/components/LandingPages/Register/Signup/Signup.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/components/LandingPages/Register/Signup/Signup.js b/frontend/src/components/LandingPages/Register/Signup/Signup.js index cbb9f80..21b1d33 100644 --- a/frontend/src/components/LandingPages/Register/Signup/Signup.js +++ b/frontend/src/components/LandingPages/Register/Signup/Signup.js @@ -43,6 +43,11 @@ function Signup() { const navigate = useNavigate(); const submitHandler = (e) => { e.preventDefault(); + dispatchToast({ + color: 'danger', + message: 'Registrations are Closed.', + }); + return; dispatchToast({ color: 'primary', From cdabc7185d93009a1b2a37e116041780b7b70892 Mon Sep 17 00:00:00 2001 From: sksmagr23 Date: Thu, 10 Oct 2024 08:29:09 +0530 Subject: [PATCH 2/4] added registration closed alert --- frontend/package-lock.json | 6 +++++ frontend/package.json | 1 + .../Home/MiddleSection/MiddleSection.js | 27 ++++++++++++++++--- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index e56c6aa..c7cfd18 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -8,6 +8,7 @@ "name": "spardha23", "version": "4.0.1", "dependencies": { + "alertifyjs": "^1.14.0", "axios": "^0.26.1", "bootstrap": "^5.3.1", "caniuse-lite": "^1.0.30001660", @@ -4421,6 +4422,11 @@ } } }, + "node_modules/alertifyjs": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/alertifyjs/-/alertifyjs-1.14.0.tgz", + "integrity": "sha512-jUxJTcNYhJ2P1Wal73nmyTwMkaPim4PjZP9CAG+S8SK2SinraXxvOxnPrEY81/wc2iBPDFBP7mdg61db4WsuHQ==" + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", diff --git a/frontend/package.json b/frontend/package.json index 0946756..b734607 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -3,6 +3,7 @@ "version": "4.0.1", "private": true, "dependencies": { + "alertifyjs": "^1.14.0", "axios": "^0.26.1", "bootstrap": "^5.3.1", "caniuse-lite": "^1.0.30001660", diff --git a/frontend/src/components/LandingPages/Home/MiddleSection/MiddleSection.js b/frontend/src/components/LandingPages/Home/MiddleSection/MiddleSection.js index 51fdb49..a5767e6 100644 --- a/frontend/src/components/LandingPages/Home/MiddleSection/MiddleSection.js +++ b/frontend/src/components/LandingPages/Home/MiddleSection/MiddleSection.js @@ -1,10 +1,18 @@ import React, { useState, useEffect } from 'react'; import './MiddleSection.css'; import { NavHashLink } from 'react-router-hash-link'; +import { ToastContainer, toast } from 'react-toastify'; +import 'react-toastify/dist/ReactToastify.css'; function Mid() { const [daysLeft, setDaysLeft] = useState(0); - + + const showNotification = () => { + toast.error('Registrations closed!', { + position: toast.POSITION.TOP_CENTER, + }); + }; + useEffect(() => { const timer = setInterval(() => { const eventDate = new Date('2024-10-18'); @@ -32,14 +40,25 @@ function Mid() {
- - - + +
+ ); } From b993fcc4d05a78b6044ba64adde8bad2ec05bd71 Mon Sep 17 00:00:00 2001 From: AnkitPathak Date: Thu, 10 Oct 2024 19:48:32 +0530 Subject: [PATCH 3/4] updated register --- .../DashBoard/Registration/Events/Events.js | 17 ++++++++++++++--- .../DashBoard/Registration/Registration.js | 7 ++++++- .../LandingPages/Register/Signup/Signup.js | 11 +++++------ 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/DashBoard/Registration/Events/Events.js b/frontend/src/components/DashBoard/Registration/Events/Events.js index 695ce13..343affe 100644 --- a/frontend/src/components/DashBoard/Registration/Events/Events.js +++ b/frontend/src/components/DashBoard/Registration/Events/Events.js @@ -10,6 +10,8 @@ import { } from 'reactstrap'; import styles from './Events.module.css'; import { Link } from 'react-router-dom'; +import { toast } from 'react-toastify'; +import 'react-toastify/dist/ReactToastify.css'; const EventsDb = () => { const token = localStorage.getItem('token'); @@ -307,7 +309,10 @@ const EventsDb = () => {
BOYS
{toast.error('Registrations are closed', { + position: toast.POSITION.BOTTOM_RIGHT, + });}} style={{ textDecoration: 'none', color: 'rgba(2, 0, 33, 1)' }} > Edit @@ -607,7 +612,10 @@ const EventsDb = () => {
Girls
{toast.error('Registrations are closed', { + position: toast.POSITION.BOTTOM_RIGHT, + });}} style={{ textDecoration: 'none', color: 'rgba(2, 0, 33, 1)' }} > Edit @@ -905,7 +913,10 @@ const EventsDb = () => {
Mixed
{toast.error('Registrations are closed', { + position: toast.POSITION.BOTTOM_RIGHT, + });}} style={{ textDecoration: 'none', color: 'rgba(2, 0, 33, 1)' }} > Edit diff --git a/frontend/src/components/DashBoard/Registration/Registration.js b/frontend/src/components/DashBoard/Registration/Registration.js index 352434a..1f08f64 100644 --- a/frontend/src/components/DashBoard/Registration/Registration.js +++ b/frontend/src/components/DashBoard/Registration/Registration.js @@ -4,6 +4,8 @@ import './Registration.css'; import Events from './Events/Events'; import axios from 'axios'; import { Link } from 'react-router-dom'; +import { toast } from 'react-toastify'; +import 'react-toastify/dist/ReactToastify.css'; const Registration = () => { const [contdetails, setContDetails] = useState({ @@ -59,7 +61,10 @@ const Registration = () => {
CONTINGENT DETAILS
{toast.error('Registrations are closed', { + position: toast.POSITION.BOTTOM_RIGHT, + });}} style={{ textDecoration: 'none', color: 'rgba(2, 0, 33, 1)' }} > Edit diff --git a/frontend/src/components/LandingPages/Register/Signup/Signup.js b/frontend/src/components/LandingPages/Register/Signup/Signup.js index 21b1d33..43c64e6 100644 --- a/frontend/src/components/LandingPages/Register/Signup/Signup.js +++ b/frontend/src/components/LandingPages/Register/Signup/Signup.js @@ -43,12 +43,11 @@ function Signup() { const navigate = useNavigate(); const submitHandler = (e) => { e.preventDefault(); - dispatchToast({ - color: 'danger', - message: 'Registrations are Closed.', - }); - return; - + // dispatchToast({ + // color: 'danger', + // message: 'Registrations are Closed.', + // }); + // return; dispatchToast({ color: 'primary', message: 'Please wait while your request is being processed.', From 1db362f3c95c95e23dc3febb6083fbeb1a4835b3 Mon Sep 17 00:00:00 2001 From: AnkitPathak Date: Thu, 10 Oct 2024 23:04:43 +0530 Subject: [PATCH 4/4] minor change --- .../DashBoard/MainMenu/Layout/content/Topbar.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/DashBoard/MainMenu/Layout/content/Topbar.js b/frontend/src/components/DashBoard/MainMenu/Layout/content/Topbar.js index e5f5ff7..70b0356 100644 --- a/frontend/src/components/DashBoard/MainMenu/Layout/content/Topbar.js +++ b/frontend/src/components/DashBoard/MainMenu/Layout/content/Topbar.js @@ -9,6 +9,8 @@ import 'bootstrap/dist/css/bootstrap.min.css'; import axios from 'axios'; import { Link } from 'react-router-dom'; import { EventContext } from '../../../../../contexts/EventContext'; +import { toast } from 'react-toastify'; +import 'react-toastify/dist/ReactToastify.css'; const Topbar = ({ toggleSidebar }) => { const [open, setOpen] = useState(false); @@ -89,7 +91,12 @@ const Topbar = ({ toggleSidebar }) => {
  • - + {toast.error('Registrations are closed', { + position: toast.POSITION.BOTTOM_RIGHT, + });}} + className="register-now"> Register Now