From 371a77c6b106412aca55318b30fc43e27f16ea16 Mon Sep 17 00:00:00 2001 From: siddheshmorewdi Date: Mon, 10 Jun 2024 12:26:31 +0530 Subject: [PATCH] Bug fix 10-06-2024 --- index.html | 2 +- src/Components/Banner/AddBanner.jsx | 8 +- src/Components/Banner/BannerEdit.jsx | 8 +- src/Components/Banner/BannerTable.jsx | 8 +- src/Components/ChipSelector/ChipSelector.jsx | 14 +- src/Components/Header.jsx | 9 +- .../BlogsAndArticles/AddBlogsAndArticles.jsx | 18 +- .../BlogsAndArticles/BlogsAndArticles.jsx | 15 +- .../BlogsAndArticles/EditBlogsAndArticles.jsx | 120 +-- .../BlogsAndArticles/ViewBlogsAndArticles.jsx | 1 - src/Pages/Community/AddComunity.jsx | 41 +- src/Pages/Community/Community.jsx | 15 +- src/Pages/Community/ComunityEditPage.jsx | 480 +++++----- src/Pages/Events/AddEvents.jsx | 714 +++++++++------ src/Pages/Events/EditEvents.jsx | 836 +++++++++--------- src/Pages/Events/Events.jsx | 117 +-- src/Pages/Events/ViewEvents.jsx | 14 + src/Pages/Faq/AddFaq.jsx | 21 +- src/Pages/Faq/EditFaq.jsx | 20 +- src/Pages/Faq/Faq.jsx | 14 +- src/Pages/Faq/ViewFaq.jsx | 4 +- src/Pages/NewLetter/NewsLetter.jsx | 12 +- src/Pages/News/AddNews.jsx | 76 +- src/Pages/News/EditNews.jsx | 51 +- src/Pages/News/News.jsx | 16 +- src/Pages/News/ViewNews.jsx | 10 +- src/Pages/Partners/AddPartners.jsx | 30 +- src/Pages/Partners/EditPartners.jsx | 30 +- src/Pages/Partners/Partner.jsx | 24 +- src/Pages/Partners/ViewPartner.jsx | 4 +- src/Pages/Policy/AddPolicy.jsx | 20 +- src/Pages/Policy/EditPolicy.jsx | 14 +- src/Pages/Policy/Policy.jsx | 14 +- src/Pages/Policy/ViewPolicy.jsx | 4 +- src/Pages/Terms/AddTerms.jsx | 22 +- src/Pages/Terms/EditTerms.jsx | 28 +- src/Pages/Terms/Terms.jsx | 16 +- src/Pages/Terms/ViewTerms.jsx | 4 +- src/Pages/Usecase/AddUseCase.jsx | 38 +- src/Pages/Usecase/EditUseCase.jsx | 33 +- src/Pages/Usecase/Usecase.jsx | 14 +- src/Pages/Videos/AddVideos.jsx | 38 +- src/Pages/Videos/EditVideos.jsx | 32 +- src/Pages/Videos/Videos.jsx | 14 +- src/Pages/Videos/ViewVideos.jsx | 2 +- src/Pages/Whitepapers/AddWhitepapers.jsx | 126 +-- src/Pages/Whitepapers/EditWhitepaper.jsx | 20 +- src/Pages/Whitepapers/ViewWhitePaper.jsx | 2 +- src/Pages/Whitepapers/Whitepapers.jsx | 16 +- src/Redux/Store.js | 2 +- src/Validations/Validations.js | 258 +++--- 51 files changed, 1980 insertions(+), 1469 deletions(-) diff --git a/index.html b/index.html index 2628b5b..d41d835 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@ const craftedMsg = "Crafted with ❤️ by WDI Team for a better web."; const craftedStyles = 'font-size: 16px; font-family: monospace; background: #000; color: #E5195E; padding: 12px 19px; border: 1.8px dashed; border-right: 0px #000 solid'; const websiteStyles = 'font-size: 16px; font-family: monospace; background: #E5195E; color: #000; padding: 12px 19px; border: 1.8px dashed #000; border-left: 0px #000 solid'; - console.log('%c' + craftedMsg + ' %c' + websiteMsg, craftedStyles, websiteStyles); + console.log('%c' + craftedMsg + ' %c' + websiteMsg, craftedStyles, websiteStyles); diff --git a/src/Components/Banner/AddBanner.jsx b/src/Components/Banner/AddBanner.jsx index e152450..68499cf 100644 --- a/src/Components/Banner/AddBanner.jsx +++ b/src/Components/Banner/AddBanner.jsx @@ -65,8 +65,8 @@ const AddBanner = ({ createApi, navigateLink, title, center }) => { createApi(formData) .then((response) => { // Handle the response here - console.log("Mutation response:", response?.data?.statusCode); - console.log("Mutation response:", response?.data?.message); + // // console.log("Mutation response:", response?.data?.statusCode); + // // console.log("Mutation response:", response?.data?.message); if (response?.data?.statusCode === 200) { setIsLoading(false); @@ -94,13 +94,13 @@ const AddBanner = ({ createApi, navigateLink, title, center }) => { }) .catch((error) => { // Handle errors - console.error("Error creating community:", error); + // // console.error("Error creating community:", error); setIsLoading(false); // Handle error notification if needed }); } catch (error) { // Handle errors - console.error("Error creating community:", error); + // // console.error("Error creating community:", error); setIsLoading(false); } }; diff --git a/src/Components/Banner/BannerEdit.jsx b/src/Components/Banner/BannerEdit.jsx index 2a03ea8..de9a1fd 100644 --- a/src/Components/Banner/BannerEdit.jsx +++ b/src/Components/Banner/BannerEdit.jsx @@ -110,13 +110,13 @@ const BannerEdit = ({isLoading, data, updateBanner, navigateTo, refetch, center} } // Log the FormData entries // for (const [key, value] of form.entries()) { - // console.log(`${key}: ${value}`); + // // console.log(`${key}: ${value}`); // } const mutationResult = await updateBanner({ id: id, data: form }) .then((response) => { // Handle the response here - console.log("Mutation response:", response?.data?.statusCode); - console.log("Mutation response:", response?.data?.message); + // // console.log("Mutation response:", response?.data?.statusCode); + // // console.log("Mutation response:", response?.data?.message); if (response?.data?.statusCode === 200) { setIsLoadingEdit(false); @@ -131,7 +131,7 @@ const BannerEdit = ({isLoading, data, updateBanner, navigateTo, refetch, center} } }) .catch((error) => { - console.error("Error creating community:", error); + // // console.error("Error creating community:", error); setIsLoadingEdit(false); // setDeleteIsLoading(false); // setDeleteAlert(false); diff --git a/src/Components/Banner/BannerTable.jsx b/src/Components/Banner/BannerTable.jsx index dfaa308..dacbfcb 100644 --- a/src/Components/Banner/BannerTable.jsx +++ b/src/Components/Banner/BannerTable.jsx @@ -86,13 +86,13 @@ const BannerCommunity = ({ } }) .catch((error) => { - console.error("Error creating community:", error); + // // console.error("Error creating community:", error); setDeleteIsLoading(false); setDeleteAlert(false); }); } catch (error) { // Handle errors - console.error("Error deleting community:", error); + // // console.error("Error deleting community:", error); } }; @@ -115,11 +115,11 @@ const BannerCommunity = ({ } }) .catch((error) => { - console.log(error); + // // console.log(error); }); } catch (error) { // Handle errors - console.error("Error updating community status:", error); + // // console.error("Error updating community status:", error); } } }; diff --git a/src/Components/ChipSelector/ChipSelector.jsx b/src/Components/ChipSelector/ChipSelector.jsx index 8a1bc8f..d969d75 100644 --- a/src/Components/ChipSelector/ChipSelector.jsx +++ b/src/Components/ChipSelector/ChipSelector.jsx @@ -1,8 +1,8 @@ import React, { useState } from "react"; -import { Box, Input, Tag, TagCloseButton, TagLabel } from "@chakra-ui/react"; +import { Box, FormHelperText, Input, Tag, TagCloseButton, TagLabel } from "@chakra-ui/react"; import { TiWarning } from "react-icons/ti"; -const ChipSelector = ({chips, setChips}) => { +const ChipSelector = ({chips, setChips, type}) => { const [text, setText] = useState(""); const [validationError, setValidationError] = useState(""); @@ -28,10 +28,11 @@ const ChipSelector = ({chips, setChips}) => { { onKeyDown={handlePressEnter} /> {validationError && {validationError}} + + + {type ? "Please select and press enter to add date." : "Please type and press enter to add tags."} + + { const { data, error, isLoading } = useGetNewsLetterEmailQuery(); - console.log(data); const handleDownload = () => { if (Array.isArray(data?.data?.rows)) { @@ -17,10 +16,10 @@ const Header = ({ link, btnTitle, title }) => { XLSX.utils.book_append_sheet(workbook, worksheet, "Sheet1"); XLSX.writeFile(workbook, "newsletter_emails.xlsx"); } else { - console.error( - "Expected data to be an array but received:", - data?.data?.rows - ); + // // console.error( + // "Expected data to be an array but received:", + // data?.data?.rows + // ); } }; return ( diff --git a/src/Pages/BlogsAndArticles/AddBlogsAndArticles.jsx b/src/Pages/BlogsAndArticles/AddBlogsAndArticles.jsx index 7ac0c00..4a6cdff 100644 --- a/src/Pages/BlogsAndArticles/AddBlogsAndArticles.jsx +++ b/src/Pages/BlogsAndArticles/AddBlogsAndArticles.jsx @@ -96,8 +96,8 @@ const AddBlogsAndArticles = () => { createBlog(formData) .then((response) => { // Handle the response here - console.log("Mutation response:", response?.data?.statusCode); - console.log("Mutation response:", response?.data?.message); + // // console.log("Mutation response:", response?.data?.statusCode); + // // console.log("Mutation response:", response?.data?.message); if (response?.data?.statusCode === 201) { setIsLoading(false); @@ -123,13 +123,13 @@ const AddBlogsAndArticles = () => { }) .catch((error) => { // Handle errors - console.error("Error creating community:", error); + // // console.error("Error creating community:", error); setIsLoading(false); // Handle error notification if needed }); } catch (error) { // Handle errors - console.error("Error creating community:", error); + // // console.error("Error creating community:", error); } }; @@ -148,7 +148,6 @@ const AddBlogsAndArticles = () => { const handleImageChangeLarge = (e) => { const file = e.target.files[0]; setLargeImageData(file); - console.log(largeImageData); if (file) { const reader = new FileReader(); reader.onloadend = () => { @@ -360,7 +359,7 @@ const AddBlogsAndArticles = () => {