From 1ace754f8c2e2fcf7d55537252f8ccb55fe11a2a Mon Sep 17 00:00:00 2001 From: Bittu kumar Date: Tue, 21 Jan 2025 13:30:24 +0530 Subject: [PATCH 1/3] Refactor css --- .../EventsAttendedMemberModal.tsx | 2 +- .../MemberDetail/customTableCell.tsx | 2 +- .../MemberDetail/MemberDetail.module.css | 686 ------------------ 3 files changed, 2 insertions(+), 688 deletions(-) delete mode 100644 src/screens/MemberDetail/MemberDetail.module.css diff --git a/src/components/MemberDetail/EventsAttendedMemberModal.tsx b/src/components/MemberDetail/EventsAttendedMemberModal.tsx index 69913998b1..0d07288e72 100644 --- a/src/components/MemberDetail/EventsAttendedMemberModal.tsx +++ b/src/components/MemberDetail/EventsAttendedMemberModal.tsx @@ -11,7 +11,7 @@ import { } from '@mui/material'; import { Modal } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; -import styles from '../../screens/MemberDetail/MemberDetail.module.css'; +import styles from '../../style/app.module.css'; import { CustomTableCell } from './customTableCell'; /** * Modal component to display paginated list of events attended by a member diff --git a/src/components/MemberDetail/customTableCell.tsx b/src/components/MemberDetail/customTableCell.tsx index b8cc2bdd98..1a3a5768e9 100644 --- a/src/components/MemberDetail/customTableCell.tsx +++ b/src/components/MemberDetail/customTableCell.tsx @@ -2,7 +2,7 @@ import { useQuery } from '@apollo/client'; import { CircularProgress, TableCell, TableRow } from '@mui/material'; import { EVENT_DETAILS } from 'GraphQl/Queries/Queries'; import React from 'react'; -import styles from '../../screens/MemberDetail/MemberDetail.module.css'; +import styles from '../../style/app.module.css'; import { Link } from 'react-router-dom'; /** * Custom table cell component to display event details diff --git a/src/screens/MemberDetail/MemberDetail.module.css b/src/screens/MemberDetail/MemberDetail.module.css deleted file mode 100644 index 7b421adcf8..0000000000 --- a/src/screens/MemberDetail/MemberDetail.module.css +++ /dev/null @@ -1,686 +0,0 @@ -.mainpage { - display: flex; - flex-direction: row; -} - -.sidebar { - z-index: 0; - padding-top: 5px; - margin: 0; - height: 100%; -} - -.editIcon { - position: absolute; - top: 10px; - left: 20px; - cursor: pointer; -} -.selectWrapper { - position: relative; -} - -.selectWithChevron { - appearance: none; - padding-right: 30px; -} - -.selectWrapper::after { - content: '\25BC'; - position: absolute; - top: 50%; - right: 10px; - transform: translateY(-50%); - pointer-events: none; -} - -.sidebar:after { - content: ''; - background-color: #f7f7f7; - position: absolute; - width: 2px; - height: 600px; - top: 10px; - left: 94%; - display: block; -} - -.sidebarsticky { - padding: 0 2rem; - text-overflow: ellipsis; - /* overflow-x: hidden; */ -} - -/* .sidebarsticky:hover{ - overflow-x:visible; - transition: all 0.4s ease; - background-color: #707070; - -} */ -.sidebarsticky > p { - margin-top: -10px; -} - -.navitem { - padding-left: 27%; - padding-top: 12px; - padding-bottom: 12px; - cursor: pointer; -} - -.searchtitle { - color: #707070; - font-weight: 600; - font-size: 18px; - margin-top: 60px; - margin-bottom: 20px; - padding-bottom: 5px; - border-bottom: 3px solid #31bb6b; - width: 60%; -} - -.contact { - width: 100%; -} - -.sidebarsticky > input { - text-decoration: none; - margin-bottom: 50px; - border-color: #e8e5e5; - width: 80%; - border-radius: 7px; - padding-top: 5px; - padding-bottom: 5px; - padding-right: 10px; - padding-left: 10px; - box-shadow: none; -} - -.logintitle { - color: #707070; - font-weight: 600; - font-size: 20px; - margin-bottom: 30px; - padding-bottom: 5px; - border-bottom: 3px solid #31bb6b; - width: 30%; -} - -.logintitleadmin { - color: #707070; - font-weight: 600; - font-size: 20px; - margin-top: 50px; - margin-bottom: 40px; - padding-bottom: 5px; - border-bottom: 3px solid #31bb6b; - width: 60%; -} -.cardBody { - height: 35vh; - overflow-y: scroll; -} - -.admindetails { - display: flex; - justify-content: space-between; -} - -.admindetails > p { - margin-top: -12px; - margin-right: 30px; -} - -.mainpageright > hr { - margin-top: 20px; - width: 100%; - margin-left: -15px; - margin-right: -15px; - margin-bottom: 20px; -} - -.justifysp { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: flex-start; - /* gap : 2px; */ -} - -.flexclm { - display: flex; - flex-direction: column; -} - -.btngroup { - display: flex; - gap: 2rem; - margin-bottom: 2rem; -} -@media screen and (max-width: 1200px) { - .justifysp { - padding-left: 55px; - display: flex; - justify-content: space-evenly; - } - - .mainpageright { - width: 100%; - } - - .invitebtn { - position: relative; - right: 15px; - } -} - -.invitebtn { - border: 1px solid #e8e5e5; - box-shadow: 0 2px 2px #e8e5e5; - border-radius: 5px; - font-size: 16px; - height: 60%; - color: white; - outline: none; - font-weight: 600; - cursor: pointer; - transition: - transform 0.2s, - box-shadow 0.2s; - background-color: #31bb6b; - margin-right: 13px; -} - -.flexdir { - display: flex; - flex-direction: row; - justify-content: space-between; - border: none; -} - -.form_wrapper { - margin-top: 27px; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - position: absolute; - display: flex; - flex-direction: column; - width: 30%; - padding: 40px 30px; - background: #ffffff; - border-color: #e8e5e5; - border-width: 5px; - border-radius: 10px; - max-height: 86vh; - overflow: auto; -} - -.form_wrapper form { - display: flex; - align-items: left; - justify-content: left; - flex-direction: column; -} - -.titlemodal { - color: #707070; - font-weight: 600; - font-size: 20px; - margin-bottom: 20px; - padding-bottom: 5px; - border-bottom: 3px solid #31bb6b; - width: 65%; -} - -.checkboxdiv > label { - margin-right: 50px; -} - -.checkboxdiv > label > input { - margin-left: 10px; -} - -.orgphoto { - margin-top: 5px; -} - -.orgphoto > input { - margin-top: 10px; - cursor: pointer; - margin-bottom: 5px; -} - -.cancel > i { - margin-top: 5px; - transform: scale(1.2); - cursor: pointer; - color: #707070; -} - -.modalbody { - width: 50px; -} - -.greenregbtn { - margin: 1rem 0 0; - margin-top: 10px; - border: 1px solid #e8e5e5; - box-shadow: 0 2px 2px #e8e5e5; - padding: 10px 10px; - border-radius: 5px; - background-color: #31bb6b; - font-size: 16px; - color: white; - outline: none; - font-weight: 600; - cursor: pointer; - transition: - transform 0.2s, - box-shadow 0.2s; -} -.whiteregbtn { - margin: 1rem 0 0; - margin-right: 2px; - margin-top: 10px; - border: 1px solid #31bb6b; - padding: 10px 10px; - border-radius: 5px; - background-color: white; - font-size: 16px; - color: #31bb6b; - outline: none; - font-weight: 600; - cursor: pointer; - transition: - transform 0.2s, - box-shadow 0.2s; -} - -.loader, -.loader:after { - border-radius: 50%; - width: 10em; - height: 10em; -} - -.loader { - margin: 60px auto; - margin-top: 35vh !important; - font-size: 10px; - position: relative; - text-indent: -9999em; - border-top: 1.1em solid rgba(255, 255, 255, 0.2); - border-right: 1.1em solid rgba(255, 255, 255, 0.2); - border-bottom: 1.1em solid rgba(255, 255, 255, 0.2); - border-left: 1.1em solid #febc59; - -webkit-transform: translateZ(0); - -ms-transform: translateZ(0); - transform: translateZ(0); - -webkit-animation: load8 1.1s infinite linear; - animation: load8 1.1s infinite linear; -} - -@-webkit-keyframes load8 { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} - -@keyframes load8 { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} - -.list_box { - height: 70vh; - overflow-y: auto; - width: auto; - padding-right: 50px; -} - -.dispflex { - display: flex; -} - -.dispflex > input { - width: 20%; - border: none; - box-shadow: none; - margin-top: 5px; -} - -.checkboxdiv { - display: flex; -} - -.checkboxdiv > div { - width: 50%; -} - -@media only screen and (max-width: 600px) { - .sidebar { - position: relative; - bottom: 18px; - } - - .invitebtn { - width: 135px; - position: relative; - right: 10px; - } - - .form_wrapper { - width: 90%; - } - - .searchtitle { - margin-top: 30px; - } -} - -/* User page */ - -.memberfontcreatedbtn { - border-radius: 7px; - border-color: #31bb6b; - background-color: #31bb6b; - color: white; - box-shadow: none; - height: 2.5rem; - width: max-content; - display: flex; - justify-content: center; - align-items: center; -} - -.userImage { - width: 180px; - height: 180px; - object-fit: cover; - border-radius: 8px; -} - -@media only screen and (max-width: 1200px) { - .userImage { - width: 100px; - height: 100px; - } -} - -.activeBtn { - width: 100%; - display: flex; - color: #fff; - border: 1px solid #000; - background-color: #31bb6b; - transition: 0.5s; -} - -.activeBtn:hover { - color: #fff; - background: #23864c; - transition: 0.5s; -} - -.inactiveBtn { - width: 100%; - display: flex; - color: #31bb6b; - border: 1px solid #31bb6a60; - background-color: #fff; - transition: 0.5s; -} - -.inactiveBtn:hover { - color: #fff; - background: #31bb6b; - transition: 0.5s; -} - -.sidebarsticky > button { - display: flex; - align-items: center; - text-align: start; - padding: 0 1.5rem; - height: 3.25rem; - margin: 0 0 1.5rem 0; - font-weight: bold; - border-radius: 50px; -} - -.bgFill { - height: 2rem; - width: 2rem; - border-radius: 50%; - margin-right: 1rem; - display: flex; - justify-content: center; - align-items: center; -} - -.activeBtn .bgFill { - background-color: #fff; -} - -.activeBtn i { - color: #31bb6b; -} - -.inactiveBtn .bgFill { - background-color: #31bb6b; -} - -.inactiveBtn:hover .bgFill { - background-color: #fff; -} - -.inactiveBtn i { - color: #fff; -} - -.inactiveBtn:hover i { - color: #31bb6b; -} - -.topRadius { - border-top-left-radius: 16px; - border-top-right-radius: 16px; -} -.eventContainer { - display: flex; - align-items: start; -} - -.eventDetailsBox { - position: relative; - box-sizing: border-box; - background: #ffffff; - width: 66%; - box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1); - border-radius: 20px; - margin-bottom: 0; - margin-top: 20px; -} -.ctacards { - padding: 20px; - width: 100%; - display: flex; - margin: 0 4px; - justify-content: space-between; - box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1); - align-items: center; - border-radius: 20px; -} -.ctacards span { - color: rgb(181, 181, 181); - font-size: small; -} -/* .eventDetailsBox::before { - content: ''; - position: absolute; - top: 0; - height: 100%; - width: 6px; - background-color: #31bb6b; - border-radius: 20px; -} */ - -.time { - display: flex; - justify-content: space-between; - padding: 15px; - padding-bottom: 0px; - width: 33%; - - box-sizing: border-box; - background: #ffffff; - box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1); - border-radius: 20px; - margin-bottom: 0; - margin-top: 20px; - margin-left: 10px; -} - -.startTime, -.endTime { - display: flex; - font-size: 20px; -} - -.to { - padding-right: 10px; -} - -.startDate, -.endDate { - color: #808080; - font-size: 14px; -} - -.titlename { - font-weight: 600; - font-size: 25px; - padding: 15px; - padding-bottom: 0px; - width: 50%; -} - -.description { - color: #737373; - font-weight: 300; - font-size: 14px; - word-wrap: break-word; - padding: 15px; - padding-bottom: 0px; -} - -.toporgloc { - font-size: 16px; - padding: 15px; - padding-bottom: 0px; -} - -.toporgloc span { - color: #737373; -} - -.inputColor { - background: #f1f3f6; -} -.cardHeader { - display: flex; - justify-content: space-between; - align-items: center; -} -.width60 { - width: 60%; -} - -.maxWidth40 { - max-width: 40%; -} -.maxWidth50 { - max-width: 50%; -} - -.allRound { - border-radius: 16px; -} - -.WidthFit { - width: fit-content; -} - -.datebox { - border-radius: 7px; - border-color: #e8e5e5; - outline: none; - box-shadow: none; - padding-top: 2px; - padding-bottom: 2px; - padding-right: 5px; - padding-left: 5px; - margin-right: 5px; - margin-left: 5px; -} - -.datebox > div > input { - padding: 0.5rem 0 0.5rem 0.5rem !important; /* top, right, bottom, left */ - background-color: #f1f3f6; - border-radius: var(--bs-border-radius) !important; - border: none !important; -} - -.datebox > div > div { - margin-left: 0px !important; -} - -.datebox > div > fieldset { - border: none !important; - /* background-color: #f1f3f6; */ - border-radius: var(--bs-border-radius) !important; -} - -.datebox > div { - margin: 0.5rem !important; - background-color: #f1f3f6; -} - -input::file-selector-button { - background-color: black; - color: white; -} - -.noOutline { - outline: none; -} - -.Outline { - outline: 1px solid var(--bs-gray-400); -} - -.tagLink { - font-weight: 600; - color: var(--bs-gray-700); - cursor: pointer; -} - -.tagLink:hover { - font-weight: 800; - color: var(--bs-blue); - text-decoration: underline; -} From 140692e155d5e459ddbf4fd071472517ef1efc7e Mon Sep 17 00:00:00 2001 From: Bittu kumar <123286618+Bittukr7479@users.noreply.github.com> Date: Tue, 21 Jan 2025 15:22:36 +0530 Subject: [PATCH 2/3] Update customTableCell.tsx --- src/components/MemberDetail/customTableCell.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MemberDetail/customTableCell.tsx b/src/components/MemberDetail/customTableCell.tsx index 1a3a5768e9..692cd7fa58 100644 --- a/src/components/MemberDetail/customTableCell.tsx +++ b/src/components/MemberDetail/customTableCell.tsx @@ -29,7 +29,7 @@ export const CustomTableCell: React.FC<{ eventId: string }> = ({ eventId }) => { ); - /*istanbul ignore next*/ + if (error) { return ( @@ -40,7 +40,7 @@ export const CustomTableCell: React.FC<{ eventId: string }> = ({ eventId }) => { ); } const event = data?.event; - /*istanbul ignore next*/ + if (!event) { return ( From a3ca02c21775a0892e0bbeb5875ca6a564742489 Mon Sep 17 00:00:00 2001 From: Bittu kumar <123286618+Bittukr7479@users.noreply.github.com> Date: Wed, 22 Jan 2025 01:58:09 +0530 Subject: [PATCH 3/3] Update customTableCell.tsx --- src/components/MemberDetail/customTableCell.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/MemberDetail/customTableCell.tsx b/src/components/MemberDetail/customTableCell.tsx index 692cd7fa58..0cd83ee961 100644 --- a/src/components/MemberDetail/customTableCell.tsx +++ b/src/components/MemberDetail/customTableCell.tsx @@ -29,7 +29,6 @@ export const CustomTableCell: React.FC<{ eventId: string }> = ({ eventId }) => { ); - if (error) { return ( @@ -40,7 +39,6 @@ export const CustomTableCell: React.FC<{ eventId: string }> = ({ eventId }) => { ); } const event = data?.event; - if (!event) { return (