From 9dbc496b4a9599a964c6ac214c559185c21ab9ad Mon Sep 17 00:00:00 2001 From: Pranav Nathe <93403830+pranavnathe@users.noreply.github.com> Date: Wed, 1 Jan 2025 20:51:19 +0530 Subject: [PATCH 01/21] src/components/UpdateSession/UpdateSession.css --- .../UpdateSession/UpdateSession.css | 96 ------------------- .../UpdateSession/UpdateSession.tsx | 26 ++--- src/style/app.module.css | 94 ++++++++++++++++++ 3 files changed, 108 insertions(+), 108 deletions(-) delete mode 100644 src/components/UpdateSession/UpdateSession.css diff --git a/src/components/UpdateSession/UpdateSession.css b/src/components/UpdateSession/UpdateSession.css deleted file mode 100644 index 073bbf973d..0000000000 --- a/src/components/UpdateSession/UpdateSession.css +++ /dev/null @@ -1,96 +0,0 @@ -/* Card styles */ -.update-timeout-card { - width: 700px; - background: #ffffff; - border: none; - border-radius: 16px; - filter: drop-shadow(0px 4px 15.3px rgba(0, 0, 0, 0.08)); - padding: 20px; -} - -.update-timeout-card-header { - background: none; - padding: 16px; - border-bottom: none; -} - -.update-timeout-card-title { - font-family: 'Lato', sans-serif; - font-weight: 600; - font-size: 24px; - color: #000000; -} - -.update-timeout-card-body { - padding: 20px; -} - -.update-timeout-current { - font-family: 'Lato', sans-serif; - font-weight: 400; - font-size: 16px; - color: #000000; - margin-bottom: 20px; /* Increased margin to create more space */ -} - -.update-timeout-label { - font-family: 'Lato', sans-serif; - font-weight: 400; - font-size: 16px; - color: #000000; - margin-bottom: 10px; /* Keep the same margin to maintain spacing with the slider */ -} - -.update-timeout-labels-container { - display: flex; - flex-direction: column; - align-items: start; -} - -.update-timeout-value { - color: #14ae5c; - font-weight: bold; -} - -.update-timeout-slider-labels { - display: flex; - justify-content: space-between; - font-size: 0.9rem; - color: #757575; -} - -.update-timeout-button-container { - display: flex; - justify-content: right; - margin-top: 20px; -} - -.update-timeout-button { - width: 112px; - height: 36px; - background: #31bb6b; - border-radius: 6px; - font-family: 'Lato', sans-serif; - font-weight: 500; - font-size: 16px; - color: #ffffff; - display: flex; - align-items: center; - justify-content: center; - border: none; - box-shadow: none; -} - -.update-timeout-button:hover { - background-color: #28a745; - border-color: #28a745; - box-shadow: none; -} - -.update-timeout-button:active { - transform: scale(0.98); -} - -.update-timeout-slider-container { - position: relative; -} diff --git a/src/components/UpdateSession/UpdateSession.tsx b/src/components/UpdateSession/UpdateSession.tsx index f49970ebaa..d9263839fe 100644 --- a/src/components/UpdateSession/UpdateSession.tsx +++ b/src/components/UpdateSession/UpdateSession.tsx @@ -8,7 +8,7 @@ import { GET_COMMUNITY_SESSION_TIMEOUT_DATA } from 'GraphQl/Queries/Queries'; import { toast } from 'react-toastify'; import { errorHandler } from 'utils/errorHandler'; import { UPDATE_SESSION_TIMEOUT } from 'GraphQl/Mutations/mutations'; -import './UpdateSession.css'; +import styles from '../../style/app.module.css'; import Loader from 'components/Loader/Loader'; /** @@ -125,17 +125,19 @@ const UpdateTimeout: React.FC = ({ return ( <> - - -
Login Session Timeout
+ + +
+ Login Session Timeout +
- +
-
- +
+ Current Timeout: {communityTimeout !== undefined @@ -144,7 +146,7 @@ const UpdateTimeout: React.FC = ({ - + Update Timeout
@@ -174,7 +176,7 @@ const UpdateTimeout: React.FC = ({
15 min @@ -182,11 +184,11 @@ const UpdateTimeout: React.FC = ({ 45 min 60 min
-
+
diff --git a/src/style/app.module.css b/src/style/app.module.css index 28b6601175..b13ef71569 100644 --- a/src/style/app.module.css +++ b/src/style/app.module.css @@ -4282,3 +4282,88 @@ button[data-testid='createPostBtn'] { .updateTimeoutButton:active { transform: scale(0.98); } + +/* UserListCard.tsx */ + +.memberlist { + margin-top: -1px; +} + +.memberimg { + width: 200px; + height: 100px; + border-radius: 7px; + margin-left: 20px; +} + +.singledetails { + display: flex; + flex-direction: row; + justify-content: space-between; +} + +.singledetails p { + margin-bottom: -5px; +} + +.singledetails_data_left { + margin-top: 10px; + margin-left: 10px; + color: #707070; +} + +.singledetails_data_right { + justify-content: right; + margin-top: 10px; + text-align: right; + color: #707070; +} + +.membername { + font-size: 16px; + font-weight: bold; +} + +.memberfont { + margin-top: 3px; +} + +.memberfont > span { + width: 80%; +} + +.memberfontcreated { + margin-top: 18px; +} + +.memberfontcreatedbtnUserListCard { + margin-top: 33px; + border-radius: 7px; + border-color: #31bb6b; + background-color: #31bb6b; + color: white; + padding-right: 10px; + padding-left: 10px; + justify-content: flex-end; + float: right; + text-align: right; + box-shadow: none; +} + +@media only screen and (max-width: 600px) { + .singledetails { + margin-left: 20px; + } + + .memberimg { + margin: auto; + } + + .singledetails_data_right { + margin-right: -52px; + } + + .singledetails_data_left { + margin-left: 0px; + } +} From fafffdc7164770c082ec53880daa024f82fafe84 Mon Sep 17 00:00:00 2001 From: Pranav Nathe <93403830+pranavnathe@users.noreply.github.com> Date: Wed, 1 Jan 2025 21:50:09 +0530 Subject: [PATCH 03/21] Refactor src/components/UserPasswordUpdate/UserPasswordUpdate.module.css --- .../UserPasswordUpdate.module.css | 97 ------------------- .../UserPasswordUpdate/UserPasswordUpdate.tsx | 10 +- src/style/app.module.css | 68 +++++++++++++ 3 files changed, 73 insertions(+), 102 deletions(-) delete mode 100644 src/components/UserPasswordUpdate/UserPasswordUpdate.module.css diff --git a/src/components/UserPasswordUpdate/UserPasswordUpdate.module.css b/src/components/UserPasswordUpdate/UserPasswordUpdate.module.css deleted file mode 100644 index 90b5c09be3..0000000000 --- a/src/components/UserPasswordUpdate/UserPasswordUpdate.module.css +++ /dev/null @@ -1,97 +0,0 @@ -/* .userupdatediv{ - border: 1px solid #e8e5e5; - box-shadow: 2px 1px #e8e5e5; - padding:25px 16px; - border-radius: 5px; - background:#fdfdfd; -} */ -.settingstitle { - color: #707070; - font-size: 20px; - margin-bottom: 30px; - text-align: center; - margin-top: -10px; -} -.dispflex { - display: flex; - justify-content: flex-start; - margin: 0 auto; -} -.dispbtnflex { - width: 90%; - margin-top: 20px; - display: flex; - margin: 0 30%; -} -.dispflex > div { - width: 50%; - margin-right: 50px; -} - -.radio_buttons > input { - margin-bottom: 20px; - border: none; - box-shadow: none; - padding: 0 0; - border-radius: 5px; - background: none; - width: 50%; -} - -.whitebtn { - margin: 1rem 0 0; - margin-top: 10px; - border: 1px solid #e8e5e5; - box-shadow: 0 2px 2px #e8e5e5; - padding: 10px 20px; - border-radius: 5px; - background: none; - width: 20%; - font-size: 16px; - color: #31bb6b; - outline: none; - font-weight: 600; - cursor: pointer; - float: left; - transition: - transform 0.2s, - box-shadow 0.2s; -} -.greenregbtn { - margin: 1rem 0 0; - margin-top: 10px; - margin-right: 30px; - border: 1px solid #e8e5e5; - box-shadow: 0 2px 2px #e8e5e5; - padding: 10px 10px; - border-radius: 5px; - background-color: #31bb6b; - width: 20%; - font-size: 16px; - color: white; - outline: none; - font-weight: 600; - cursor: pointer; - transition: - transform 0.2s, - box-shadow 0.2s; -} -.radio_buttons { - width: 55%; - margin-top: 10px; - display: flex; - color: #707070; - font-weight: 600; - font-size: 14px; -} -.radio_buttons > input { - transform: scale(1.2); -} -.radio_buttons > label { - margin-top: -4px; - margin-left: 0px; - margin-right: 7px; -} -.idtitle { - width: 88%; -} diff --git a/src/components/UserPasswordUpdate/UserPasswordUpdate.tsx b/src/components/UserPasswordUpdate/UserPasswordUpdate.tsx index 1ea75811c1..29da6ff323 100644 --- a/src/components/UserPasswordUpdate/UserPasswordUpdate.tsx +++ b/src/components/UserPasswordUpdate/UserPasswordUpdate.tsx @@ -3,7 +3,7 @@ import { useMutation } from '@apollo/client'; import { UPDATE_USER_PASSWORD_MUTATION } from 'GraphQl/Mutations/mutations'; import { useTranslation } from 'react-i18next'; import Button from 'react-bootstrap/Button'; -import styles from './UserPasswordUpdate.module.css'; +import styles from '../../style/app.module.css'; import { toast } from 'react-toastify'; import { Form } from 'react-bootstrap'; @@ -93,7 +93,7 @@ const UserUpdate: React.FC<
{/*

Update Your Details

*/} -
+
-
+
-
+
-
+
{renderMonthDays()}
diff --git a/src/style/app.module.css b/src/style/app.module.css index b02529babd..bdc40f2d30 100644 --- a/src/style/app.module.css +++ b/src/style/app.module.css @@ -4464,3 +4464,151 @@ button[data-testid='createPostBtn'] { font-size: 16px; cursor: pointer; } + +/* YearlyEventCalender.tsx */ + +.calendar__weekdays { + display: grid; + grid-template-columns: repeat(7, 1fr); + background-color: #707070; + height: 60px; +} + +.calendar__days { + display: grid; + grid-template-columns: repeat(7, minmax(0, 1fr)); + grid-template-rows: repeat(6, 1fr); +} + +.day__outside { + color: #89898996 !important; +} + +.day__selected { + background-color: #007bff; + color: #707070; +} + +.day__today { + background-color: #def6e1; + font-weight: 700; + text-decoration: underline; + color: #31bb6b; +} + +.yearlyCalender { + background-color: #ffffff; + box-sizing: border-box; +} + +.closebtnYearlyEventCalender { + padding: 10px; +} + +.yearlyCalendarHeader { + display: flex; + flex-direction: row; +} + +.yearlyCalendarHeader > div { + font-weight: 600; + font-size: 2rem; + padding: 0 10px; + color: #4b4b4b; +} + +.cardYearlyEventCalender { + padding: 16px; + text-align: center; + height: 21rem; +} + +.cardHeaderYearlyEventCalender { + text-align: left; +} + +.rowYearlyEventCalender { + margin: 1px -5px; +} + +.rowYearlyEventCalender:after { + content: ''; + display: table; + clear: both; + margin: 0 -5px; + content: ''; + display: table; + clear: both; +} + +.weekday__yearly { + display: flex; + justify-content: center; + align-items: center; + background-color: #ffffff; + font-weight: 600; +} + +.columnYearlyEventCalender { + float: left; + width: 25%; + padding: 10px; +} + +.btn__more { + border: 0px; + font-size: 14px; + background-color: initial; + font-weight: 600; + transition: all 200ms; + position: relative; + display: block; + margin: -9px; + margin-top: -28px; +} + +.btn__more:hover { + color: #3ce080; +} + +.expand_event_list { + display: block; +} + +.expand_list_container { + width: 200px; + max-height: 250px; + z-index: 10; + position: absolute; + left: auto; + right: auto; + overflow: auto; + padding: 10px 4px 0px 4px; + background-color: rgb(241, 241, 241); + border: 1px solid rgb(201, 201, 201); + border-radius: 5px; + margin: 5px; +} + +@media only screen and (max-width: 700px) { + .event_list { + display: none; + } + + .expand_list_container { + width: 150px; + padding: 4px 4px 0px 4px; + } +} + +@media only screen and (max-width: 500px) { + .btn__more { + font-size: 12px; + } + + .columnYearlyEventCalender { + float: left; + width: 100%; + padding: 10px; + } +} From 5107531e59703f38331055205dff6fcd1d2f62e2 Mon Sep 17 00:00:00 2001 From: Pranav Nathe <93403830+pranavnathe@users.noreply.github.com> Date: Wed, 1 Jan 2025 23:37:47 +0530 Subject: [PATCH 06/21] Refactor src/components/AgendaItems/AgendaItemsContainer.module.css --- .../AgendaItemsContainer.module.css | 230 ------------------ .../AgendaItems/AgendaItemsContainer.tsx | 4 +- .../AgendaItems/AgendaItemsCreateModal.tsx | 8 +- .../AgendaItems/AgendaItemsDeleteModal.tsx | 2 +- .../AgendaItems/AgendaItemsPreviewModal.tsx | 4 +- .../AgendaItems/AgendaItemsUpdateModal.tsx | 8 +- src/style/app.module.css | 183 ++++++++++++++ 7 files changed, 196 insertions(+), 243 deletions(-) delete mode 100644 src/components/AgendaItems/AgendaItemsContainer.module.css diff --git a/src/components/AgendaItems/AgendaItemsContainer.module.css b/src/components/AgendaItems/AgendaItemsContainer.module.css deleted file mode 100644 index f254e7aad7..0000000000 --- a/src/components/AgendaItems/AgendaItemsContainer.module.css +++ /dev/null @@ -1,230 +0,0 @@ -.createModal { - margin-top: 20vh; - margin-left: 13vw; - max-width: 80vw; -} - -.titlemodal { - color: var(--bs-gray-600); - font-weight: 600; - font-size: 20px; - margin-bottom: 20px; - padding-bottom: 5px; - border-bottom: 3px solid var(--bs-primary); - width: 65%; -} - -.agendaItemsOptionsButton { - width: 24px; - height: 24px; -} - -.agendaItemModal { - max-width: 80vw; - margin-top: 2vh; - margin-left: 13vw; -} - -.iconContainer { - display: flex; - justify-content: flex-end; -} -.icon { - margin: 1px; -} - -.errorIcon { - transform: scale(1.5); - color: var(--bs-danger); - margin-bottom: 1rem; -} - -.greenregbtn { - margin: 1rem 0 0; - margin-top: 15px; - border: 1px solid var(--bs-gray-300); - box-shadow: 0 2px 2px var(--bs-gray-300); - padding: 10px 10px; - border-radius: 5px; - background-color: var(--bs-primary); - width: 100%; - font-size: 16px; - color: var(--bs-white); - outline: none; - font-weight: 600; - cursor: pointer; - transition: - transform 0.2s, - box-shadow 0.2s; - width: 100%; -} - -.preview { - display: flex; - flex-direction: row; - font-weight: 900; - font-size: 16px; - color: rgb(80, 80, 80); -} - -.view { - margin-left: 2%; - font-weight: 600; - font-size: 16px; - color: var(--bs-gray-600); -} - -.previewFile { - display: flex; - flex-direction: column; - align-items: center; - width: 100%; - margin-top: 10px; -} - -.previewFile img, -.previewFile video { - width: 100%; - max-width: 400px; - height: auto; - margin-bottom: 10px; -} - -.attachmentPreview { - position: relative; - width: 100%; -} - -.closeButtonFile { - position: absolute; - top: 10px; - right: 10px; - background: transparent; - transform: scale(1.2); - cursor: pointer; - border: none; - color: #707070; - font-weight: 600; - font-size: 16px; - cursor: pointer; -} - -.tableHeader { - background-color: var(--bs-primary); - color: var(--bs-white); - font-size: 16px; -} - -.noOutline input { - outline: none; -} - -.categoryContainer { - display: flex; - flex-wrap: wrap; - gap: 10px; - justify-content: center; -} - -.categoryChip { - display: inline-flex; - align-items: center; - background-color: #e0e0e0; - border-radius: 16px; - padding: 0 12px; - font-size: 14px; - height: 32px; - margin: 5px; -} - -.urlListItem { - display: flex; - align-items: center; - justify-content: space-between; - padding: 5px 0; -} - -.urlIcon { - margin-right: 10px; -} - -.deleteButton { - margin-left: auto; - padding: 2px 5px; -} - -.urlListItem a { - text-decoration: none; - color: inherit; -} - -.urlListItem a:hover { - text-decoration: underline; -} - -.agendaItemRow { - border: 1px solid #dee2e6; - border-radius: 4px; - transition: box-shadow 0.2s ease; - background-color: #fff; -} -.agendaItemRow:hover { - background-color: #f0f0f0; -} - -.dragging { - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); - z-index: 1000; - background-color: #f0f0f0; -} - -.droppable { - background-color: #f9f9f9; /* Background color of droppable area */ -} - -.droppableDraggingOver { - background-color: #e6f7ff; /* Background color of droppable area while dragging over */ -} - -.tableHead { - background-color: #31bb6b !important; - color: white; - border-radius: 20px 20px 0px 0px !important; - padding: 20px; -} - -@media (max-width: 768px) { - .createModal, - .agendaItemModal { - margin: 10vh auto; - max-width: 90%; - } - - .titlemodal { - width: 90%; - } - - .greenregbtn { - width: 90%; - } - - /* Add more specific styles for smaller screens as needed */ -} - -@media (max-width: 576px) { - .createModal, - .agendaItemModal { - margin: 5vh auto; - max-width: 95%; - } - - .titlemodal { - width: 100%; - } - - .greenregbtn { - width: 100%; - } - - /* Additional specific styles for even smaller screens */ -} diff --git a/src/components/AgendaItems/AgendaItemsContainer.tsx b/src/components/AgendaItems/AgendaItemsContainer.tsx index 4e50cb5fe8..d5c6ef003a 100644 --- a/src/components/AgendaItems/AgendaItemsContainer.tsx +++ b/src/components/AgendaItems/AgendaItemsContainer.tsx @@ -15,7 +15,7 @@ import type { InterfaceAgendaItemInfo, InterfaceAgendaItemCategoryInfo, } from 'utils/interfaces'; -import styles from './AgendaItemsContainer.module.css'; +import styles from '../../style/app.module.css'; import AgendaItemsPreviewModal from 'components/AgendaItems/AgendaItemsPreviewModal'; import AgendaItemsDeleteModal from 'components/AgendaItems/AgendaItemsDeleteModal'; @@ -258,7 +258,7 @@ function AgendaItemsContainer({ className={` shadow-sm ${agendaItemConnection === 'Event' ? 'rounded-top-4 mx-4' : 'rounded-top-2 mx-0'}`} > -

{t('agendaItemDetails')}

+

{t('agendaItemDetails')}

@@ -199,7 +182,7 @@ function addOnStore(): JSX.Element { title={t('available')} style={{ backgroundColor: 'white' }} > -
+
{(() => { const filteredPlugins = filterPlugins( data?.getPlugins || [], @@ -211,7 +194,7 @@ function addOnStore(): JSX.Element { } return ( -
+
{filteredPlugins.map((plug, i) => (
-
+
{(() => { const installedPlugins = (data?.getPlugins || []).filter( (plugin) => !plugin.uninstalledOrgs.includes(orgId ?? ''), diff --git a/src/style/app.module.css b/src/style/app.module.css index b12f182c2a..69212b36f7 100644 --- a/src/style/app.module.css +++ b/src/style/app.module.css @@ -4795,3 +4795,51 @@ button[data-testid='createPostBtn'] { width: 100%; } } + +/* AddOnStore.tsx */ + +.containerAddOnStore { + display: flex; + flex-direction: column; + background: var(--white); + margin: 2px; + padding: 10px; + border-radius: 20px; +} + +.colAddOnStore { + display: flex; + align-items: center; + justify-content: space-between; +} + +.inputAddOnStore { + display: flex; + position: relative; + width: 560px; +} + +.cardGridItem { + width: 38vw; +} + +.justifyspAddOnStore { + display: grid; + width: 100%; + justify-content: space-between; + align-items: baseline; + grid-template-rows: auto; + grid-template-columns: repeat(2, 1fr); + grid-gap: 0.8rem 0.4rem; +} + +@media screen and (max-width: 600px) { + .cardGridItem { + width: 100%; + } + .justifyspAddOnStore { + grid-template-columns: 1fr; + justify-content: center; + align-items: start; + } +} From 78253b121237b4afd266313c7012369255dfca7a Mon Sep 17 00:00:00 2001 From: Pranav Nathe <93403830+pranavnathe@users.noreply.github.com> Date: Wed, 1 Jan 2025 23:53:48 +0530 Subject: [PATCH 08/21] Refactor src/components/Advertisements/Advertisements.module.css --- .../Advertisements/Advertisements.module.css | 47 ------------------- .../Advertisements/Advertisements.tsx | 27 ++++------- src/style/app.module.css | 34 ++++++++++++++ 3 files changed, 43 insertions(+), 65 deletions(-) delete mode 100644 src/components/Advertisements/Advertisements.module.css diff --git a/src/components/Advertisements/Advertisements.module.css b/src/components/Advertisements/Advertisements.module.css deleted file mode 100644 index 6d9eb7f612..0000000000 --- a/src/components/Advertisements/Advertisements.module.css +++ /dev/null @@ -1,47 +0,0 @@ -.container { - display: flex; -} -.listBox { - display: grid; - width: 100%; - grid-template-rows: auto; - grid-template-columns: repeat(6, 1fr); - grid-gap: 0.8rem 0.4rem; -} - -.logintitle { - color: #707070; - font-weight: 600; - font-size: 20px; - margin-bottom: 30px; - padding-bottom: 5px; - border-bottom: 3px solid #31bb6b; - width: 15%; -} -.input { - display: flex; - position: relative; - width: 560px; -} -.justifysp { - display: grid; - width: 100%; - margin-top: 30px; -} -.actioninput { - text-decoration: none; - /* margin-bottom: 50px; */ - border-color: #e8e5e5; - background-color: white; - border-radius: 7px; - padding-top: 10px; - padding-bottom: 10px; - padding-right: 10px; - padding-left: 10px; - box-shadow: none; -} - -.actionradio input { - width: fit-content; - margin: inherit; -} diff --git a/src/components/Advertisements/Advertisements.tsx b/src/components/Advertisements/Advertisements.tsx index 5f0e2b2033..f428b569a0 100644 --- a/src/components/Advertisements/Advertisements.tsx +++ b/src/components/Advertisements/Advertisements.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import styles from './Advertisements.module.css'; +import styles from '../../style/app.module.css'; import { useQuery } from '@apollo/client'; import { ORGANIZATION_ADVERTISEMENT_LIST } from 'GraphQl/Queries/Queries'; import { Button, Col, Form, Row, Tab, Tabs } from 'react-bootstrap'; @@ -79,29 +79,20 @@ export default function advertisements(): JSX.Element { return ( <> - -
- -
+ +
+ +
setSearchText("search")} /> -
@@ -145,7 +136,7 @@ export default function advertisements(): JSX.Element { orgAdvertisementListData?.organizations[0].advertisements .pageInfo.hasNextPage ?? false } - className={styles.listBox} + className={styles.listBoxAdvertisements} data-testid="organizations-list" endMessage={ advertisements.filter( @@ -221,7 +212,7 @@ export default function advertisements(): JSX.Element { orgAdvertisementListData?.organizations[0].advertisements .pageInfo.hasNextPage ?? false } - className={styles.listBox} + className={styles.listBoxAdvertisements} data-testid="organizations-list" endMessage={ advertisements.filter( diff --git a/src/style/app.module.css b/src/style/app.module.css index 69212b36f7..4719ab3113 100644 --- a/src/style/app.module.css +++ b/src/style/app.module.css @@ -4843,3 +4843,37 @@ button[data-testid='createPostBtn'] { align-items: start; } } + +/* Advertisements.tsx */ + +.containerAdvertisements { + background-color: var(--white); + border-radius: 20px; +} + +.justifyspAdvertisements { + display: grid; + width: 100%; + margin-top: 30px; +} + +.colAdvertisements { + display: flex; + align-items: center; + justify-content: space-between; + padding: 10px; +} + +.inputAdvertisements { + display: flex; + position: relative; + width: 560px; +} + +.listBoxAdvertisements { + display: grid; + width: 100%; + grid-template-rows: auto; + grid-template-columns: repeat(6, 1fr); + grid-gap: 0.8rem 0.4rem; +} From c96ac354d70e1416072bad6f8279b258a576dc84 Mon Sep 17 00:00:00 2001 From: Pranav Nathe <93403830+pranavnathe@users.noreply.github.com> Date: Wed, 1 Jan 2025 23:58:20 +0530 Subject: [PATCH 09/21] Refactor src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.module.css --- .../AdvertisementRegister.module.css | 57 ------------------ .../AdvertisementRegister.tsx | 9 ++- src/style/app.module.css | 59 +++++++++++++++++++ 3 files changed, 65 insertions(+), 60 deletions(-) delete mode 100644 src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.module.css diff --git a/src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.module.css b/src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.module.css deleted file mode 100644 index 9d009cf021..0000000000 --- a/src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.module.css +++ /dev/null @@ -1,57 +0,0 @@ -.modalbtn { - margin-top: 1rem; - display: flex !important; - margin-left: auto; - align-items: center; -} - -.modalbtn i, -.button i { - height: min-content; - margin-right: 4px; -} - -.preview { - display: flex; - position: relative; - width: 100%; - margin-top: 10px; - justify-content: center; -} -.preview img { - width: 400px; - height: auto; -} -.preview video { - width: 400px; - height: auto; -} - -.closeButton { - position: absolute; - top: 0px; - right: 0px; - background: transparent; - transform: scale(1.2); - cursor: pointer; - border: none; - color: #707070; - font-weight: 600; - font-size: 16px; - cursor: pointer; -} - -.button { - min-width: 102px; -} - -.editHeader { - background-color: #31bb6b; - color: white; -} - -.link_check { - display: flex; - justify-content: center; - align-items: flex-start; -} diff --git a/src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx b/src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx index c347ae8959..e329ce6855 100644 --- a/src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx +++ b/src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx @@ -314,7 +314,10 @@ function advertisementRegister({ }} /> {formState.advertisementMedia && ( -
+
{formState.advertisementMedia.includes('video') ? (
+ + {t('deletePostMsg')} + + + + + + ); +}; + +export default DeletePostModal; diff --git a/src/components/OrgPostCard/OrgPostCard.tsx b/src/components/OrgPostCard/OrgPostCard.tsx index f392c6ad1c..5bc9ca1407 100644 --- a/src/components/OrgPostCard/OrgPostCard.tsx +++ b/src/components/OrgPostCard/OrgPostCard.tsx @@ -15,6 +15,7 @@ import convertToBase64 from 'utils/convertToBase64'; import { errorHandler } from 'utils/errorHandler'; import type { InterfacePostForm } from 'utils/interfaces'; import styles from '../../style/app.module.css'; +import DeletePostModal from './DeletePostModal'; interface InterfaceOrgPostCardProps { postID: string; id: string; @@ -57,11 +58,7 @@ export default function OrgPostCard( const [toggle] = useMutation(TOGGLE_PINNED_POST); const togglePostPin = async (id: string, pinned: boolean): Promise => { try { - const { data } = await toggle({ - variables: { - id, - }, - }); + const { data } = await toggle({ variables: { id } }); if (data) { setModalVisible(false); setMenuVisible(false); @@ -72,7 +69,6 @@ export default function OrgPostCard( } } catch (error: unknown) { if (error instanceof Error) { - /* istanbul ignore next */ errorHandler(t, error); } } @@ -106,10 +102,7 @@ export default function OrgPostCard( setMenuVisible(true); }; const clearImageInput = (): void => { - setPostFormState({ - ...postformState, - postphoto: '', - }); + setPostFormState({ ...postformState, postphoto: '' }); setPostPhotoUpdated(true); const fileInput = document.getElementById( 'postImageUrl', @@ -172,9 +165,7 @@ export default function OrgPostCard( const deletePost = async (): Promise => { try { const { data } = await deletePostMutation({ - variables: { - id, - }, + variables: { id }, }); if (data) { toast.success(t('postDeleted') as string); @@ -441,28 +432,11 @@ export default function OrgPostCard(
)}
- - -
{t('deletePost')}
- -
- {t('deletePostMsg')} - - - - -
+ deletePost()} + /> Date: Sun, 5 Jan 2025 18:58:34 +0530 Subject: [PATCH 20/21] TSDoc added for src/components/OrgPostCard/DeletePostModal.tsx --- src/components/OrgPostCard/DeletePostModal.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/OrgPostCard/DeletePostModal.tsx b/src/components/OrgPostCard/DeletePostModal.tsx index 7e5fdc0d4b..67f301ba72 100644 --- a/src/components/OrgPostCard/DeletePostModal.tsx +++ b/src/components/OrgPostCard/DeletePostModal.tsx @@ -2,6 +2,15 @@ import React, { type FC } from 'react'; import { Modal, Button } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; +/** + * A modal component that confirms a post delete operation. + * + * @param show - Whether the modal is visible. + * @param onHide - Callback invoked when the modal is dismissed. + * @param onDelete - Callback invoked to actually delete the post. + * @returns A rendered React Bootstrap Modal for post deletion. + */ + interface InterfaceDeletePostModalProps { show: boolean; onHide: () => void; From 8d8f1d49beae6adccab04959f85224273e79ca35 Mon Sep 17 00:00:00 2001 From: Pranav Nathe <93403830+pranavnathe@users.noreply.github.com> Date: Sun, 5 Jan 2025 19:01:31 +0530 Subject: [PATCH 21/21] removed duplicate cursor property --- src/style/app.module.css | 1 - 1 file changed, 1 deletion(-) diff --git a/src/style/app.module.css b/src/style/app.module.css index e17bc3d76f..02904e8af7 100644 --- a/src/style/app.module.css +++ b/src/style/app.module.css @@ -4448,7 +4448,6 @@ button[data-testid='createPostBtn'] { color: var(--grey-dark); font-weight: 600; font-size: 16px; - cursor: pointer; } /* YearlyEventCalender.tsx */