From fbfd339d4966887aa510bc03e4d3b148334e46aa Mon Sep 17 00:00:00 2001 From: MANDEEP N H <146331633+mandeepnh5@users.noreply.github.com> Date: Sun, 22 Dec 2024 04:43:09 +0000 Subject: [PATCH 1/9] Update fundcomapignpledge --- .../FundCampaignPledge/FundCampaignPledge.tsx | 48 ++-- .../FundCampaignPledge/PledgeDeleteModal.tsx | 2 +- .../FundCampaignPledge/PledgeModal.tsx | 10 +- src/style/app.module.css | 267 ++++++++++++++++++ 4 files changed, 297 insertions(+), 30 deletions(-) diff --git a/src/screens/FundCampaignPledge/FundCampaignPledge.tsx b/src/screens/FundCampaignPledge/FundCampaignPledge.tsx index d14ee9de06..fce056da86 100644 --- a/src/screens/FundCampaignPledge/FundCampaignPledge.tsx +++ b/src/screens/FundCampaignPledge/FundCampaignPledge.tsx @@ -9,7 +9,7 @@ import { Button, Dropdown, Form } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; import { Navigate, useParams } from 'react-router-dom'; import { currencySymbols } from 'utils/currency'; -import styles from './FundCampaignPledge.module.css'; +import styles from '../../style/app.module.css'; import PledgeDeleteModal from './PledgeDeleteModal'; import PledgeModal from './PledgeModal'; import { Breadcrumbs, Link, Stack, Typography } from '@mui/material'; @@ -200,11 +200,11 @@ const fundCampaignPledge = (): JSX.Element => { return (
- +
{tErrors('errorLoading', { entity: 'Pledges' })}
- {pledgeError.message} + {pledgeError.messagePledge}
@@ -219,7 +219,7 @@ const fundCampaignPledge = (): JSX.Element => { minWidth: 50, align: 'left', headerAlign: 'center', - headerClassName: `${styles.tableHeader}`, + headerClassName: `${styles.tableHeaderPledge}`, sortable: false, renderCell: (params: GridCellParams) => { return ( @@ -233,14 +233,14 @@ const fundCampaignPledge = (): JSX.Element => { src={user.image} alt="pledge" data-testid={`image${index + 1}`} - className={styles.TableImage} + className={styles.TableImagePledge} /> ) : (
@@ -272,7 +272,7 @@ const fundCampaignPledge = (): JSX.Element => { minWidth: 150, align: 'center', headerAlign: 'center', - headerClassName: `${styles.tableHeader}`, + headerClassName: `${styles.tableHeaderPledge}`, sortable: false, renderCell: (params: GridCellParams) => { return dayjs(params.row.startDate).format('DD/MM/YYYY'); @@ -284,7 +284,7 @@ const fundCampaignPledge = (): JSX.Element => { minWidth: 150, align: 'center', headerAlign: 'center', - headerClassName: `${styles.tableHeader}`, + headerClassName: `${styles.tableHeaderPledge}`, flex: 1, sortable: false, renderCell: (params: GridCellParams) => { @@ -298,7 +298,7 @@ const fundCampaignPledge = (): JSX.Element => { minWidth: 100, align: 'center', headerAlign: 'center', - headerClassName: `${styles.tableHeader}`, + headerClassName: `${styles.tableHeaderPledge}`, sortable: false, renderCell: (params: GridCellParams) => { return ( @@ -323,7 +323,7 @@ const fundCampaignPledge = (): JSX.Element => { minWidth: 100, align: 'center', headerAlign: 'center', - headerClassName: `${styles.tableHeader}`, + headerClassName: `${styles.tableHeaderPledge}`, sortable: false, renderCell: (params: GridCellParams) => { return ( @@ -348,7 +348,7 @@ const fundCampaignPledge = (): JSX.Element => { minWidth: 100, align: 'center', headerAlign: 'center', - headerClassName: `${styles.tableHeader}`, + headerClassName: `${styles.tableHeaderPledge}`, sortable: false, renderCell: (params: GridCellParams) => { return ( @@ -419,27 +419,27 @@ const fundCampaignPledge = (): JSX.Element => {
setProgressIndicator('pledged')} /> { checked={progressIndicator === 'raised'} />
-
-
+
+
setSearchTerm(e.target.value)} data-testid="searchPledger" @@ -496,7 +496,7 @@ const fundCampaignPledge = (): JSX.Element => { @@ -557,7 +557,7 @@ const fundCampaignPledge = (): JSX.Element => { ), }} sx={dataGridStyle} - getRowClassName={() => `${styles.rowBackground}`} + getRowClassName={() => `${styles.rowBackgroundPledge}`} autoHeight rowHeight={65} rows={pledges.map((pledge) => ({ @@ -607,14 +607,14 @@ const fundCampaignPledge = (): JSX.Element => { src={user.image} alt="pledger" data-testid={`extraImage${index + 1}`} - className={styles.TableImage} + className={styles.TableImagePledge} /> ) : (
= ({ = ({ format="DD/MM/YYYY" label={tCommon('startDate')} value={dayjs(pledgeStartDate)} - className={styles.noOutline} + className={styles.noOutlinePledge} onChange={(date: Dayjs | null): void => { if (date) { setFormState({ @@ -280,7 +280,7 @@ const PledgeModal: React.FC = ({ { if (date) { @@ -327,7 +327,7 @@ const PledgeModal: React.FC = ({ { if (parseInt(e.target.value) > 0) { diff --git a/src/style/app.module.css b/src/style/app.module.css index d21c2bb845..67810f426e 100644 --- a/src/style/app.module.css +++ b/src/style/app.module.css @@ -585,6 +585,273 @@ hr { right: -55%; } +.pledgeContainer { + margin: 0.6rem 0; +} + +.container { + min-height: 100vh; +} + +.pledgeModal { + max-width: 80vw; + margin-top: 2vh; + margin-left: 13vw; +} + +.titlemodal { + color: #707070; + font-weight: 600; + font-size: 32px; + width: 65%; + margin-bottom: 0px; +} + +.modalCloseBtn { + width: 40px; + height: 40px; + padding: 1rem; + display: flex; + justify-content: center; + align-items: center; +} + +.greenregbtn { + margin: 1rem 0 0; + margin-top: 15px; + border: 1px solid #e8e5e5; + box-shadow: 0 2px 2px #e8e5e5; + padding: 10px 10px; + border-radius: 5px; + background-color: #31bb6b; + width: 100%; + font-size: 16px; + color: white; + outline: none; + font-weight: 600; + cursor: pointer; + transition: + transform 0.2s, + box-shadow 0.2s; + width: 100%; +} + +.errorIconPledge { + transform: scale(1.5); + color: var(--bs-danger); + margin-bottom: 1rem; +} + +.btnsContainerPledge { + display: flex; + gap: 0.8rem; + margin: 2.2rem 0 0.8rem 0; +} + +.btnsContainerPledge .inputPledge { + flex: 1; + min-width: 18rem; + position: relative; +} + +.btnsContainerPledge input { + outline: 1px solid var(--bs-gray-400); +} + +.btnsContainerPledge .inputPledge button { + width: 52px; +} + +.inputFieldPledge { + background-color: white; + box-shadow: 0 1px 1px #31bb6b; +} + +.dropdownPledge { + background-color: white; + border: 1px solid #31bb6b; + position: relative; + display: inline-block; + color: #31bb6b; +} + +.tableHeaderPledge { + background-color: var(--bs-primary); + color: var(--bs-white); + font-size: 1rem; +} + +.rowBackgroundPledge { + background-color: var(--bs-white); + max-height: 120px; +} + +.TableImagePledge { + object-fit: cover; + width: 25px !important; + height: 25px !important; + border-radius: 100% !important; +} + +.avatarContainer { + width: 28px; + height: 26px; +} + +.imageContainer { + display: flex; + align-items: center; + justify-content: center; +} + +.pledgerContainer { + display: flex; + align-items: center; + justify-content: center; + margin: 0.1rem 0.25rem; + gap: 0.25rem; + padding: 0.25rem 0.45rem; + border-radius: 0.35rem; + background-color: #31bb6b33; + height: 2.2rem; + margin-top: 0.75rem; +} + +.noOutlinePledge input { + outline: none; +} + +.overviewContainer { + display: flex; + gap: 7rem; + width: 100%; + justify-content: space-between; + margin: 1.5rem 0 0 0; + padding: 1.25rem 2rem; + background-color: rgba(255, 255, 255, 0.591); + + box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; + border-radius: 0.5rem; +} + +.titleContainer { + display: flex; + flex-direction: column; + gap: 0.6rem; +} + +.titleContainer h3 { + font-size: 1.75rem; + font-weight: 750; + color: #5e5e5e; + margin-top: 0.2rem; +} + +.titleContainer span { + font-size: 0.9rem; + margin-left: 0.5rem; + font-weight: lighter; + color: #707070; +} + +.raisedAmount { + display: flex; + justify-content: center; + align-items: center; + font-size: 1.25rem; + font-weight: 750; + color: #5e5e5e; +} + +.progressContainer { + display: flex; + flex-direction: column; + gap: 0.5rem; + flex-grow: 1; +} + +.progress { + margin-top: 0.2rem; + display: flex; + flex-direction: column; + gap: 0.3rem; +} + +.endpoints { + display: flex; + position: relative; + font-size: 0.85rem; +} + +.start { + position: absolute; + top: 0px; +} + +.end { + position: absolute; + top: 0px; + right: 0px; +} + +.moreContainer { + display: flex; + align-items: center; +} + +.moreContainer:hover { + text-decoration: underline; + cursor: pointer; +} + +.popup { + z-index: 50; + border-radius: 0.5rem; + font-family: sans-serif; + font-weight: 500; + font-size: 0.875rem; + margin-top: 0.5rem; + padding: 0.75rem; + border: 1px solid #e2e8f0; + background-color: white; + color: #1e293b; + box-shadow: 0 0.5rem 1rem rgb(0 0 0 / 0.15); + display: flex; + flex-direction: column; + gap: 0.5rem; +} + +.popupExtra { + max-height: 15rem; + overflow-y: auto; +} + +.toggleGroupPledge { + width: 50%; + min-width: 27.75rem; + margin: 0.5rem 0rem; +} + +.toggleBtnPledge { + padding: 0rem; + height: 30px; + display: flex; + justify-content: center; + align-items: center; +} + +.toggleBtnPledge:hover { + color: #31bb6b !important; +} + +input[type='radioPledge']:checked + label { + background-color: #31bb6a50 !important; +} + +input[type='radioPledge']:checked + label:hover { + color: black !important; +} + @media (max-width: 1024px) { .pageNotFound h1.head { font-size: 200px; From 5e84b98693d38141e9f96fd5d0eb8ade1954f400 Mon Sep 17 00:00:00 2001 From: MANDEEP N H <146331633+mandeepnh5@users.noreply.github.com> Date: Sun, 22 Dec 2024 04:47:51 +0000 Subject: [PATCH 2/9] deleted fundcompaignpledge local css file --- .../FundCampaignPledge.module.css | 273 ------------------ 1 file changed, 273 deletions(-) delete mode 100644 src/screens/FundCampaignPledge/FundCampaignPledge.module.css diff --git a/src/screens/FundCampaignPledge/FundCampaignPledge.module.css b/src/screens/FundCampaignPledge/FundCampaignPledge.module.css deleted file mode 100644 index cdf4476267..0000000000 --- a/src/screens/FundCampaignPledge/FundCampaignPledge.module.css +++ /dev/null @@ -1,273 +0,0 @@ -.pledgeContainer { - margin: 0.6rem 0; -} - -.container { - min-height: 100vh; -} - -.pledgeModal { - max-width: 80vw; - margin-top: 2vh; - margin-left: 13vw; -} - -.titlemodal { - color: #707070; - font-weight: 600; - font-size: 32px; - width: 65%; - margin-bottom: 0px; -} - -.modalCloseBtn { - width: 40px; - height: 40px; - padding: 1rem; - display: flex; - justify-content: center; - align-items: center; -} - -.greenregbtn { - margin: 1rem 0 0; - margin-top: 15px; - border: 1px solid #e8e5e5; - box-shadow: 0 2px 2px #e8e5e5; - padding: 10px 10px; - border-radius: 5px; - background-color: #31bb6b; - width: 100%; - font-size: 16px; - color: white; - outline: none; - font-weight: 600; - cursor: pointer; - transition: - transform 0.2s, - box-shadow 0.2s; - width: 100%; -} -.message { - margin-top: 25%; - display: flex; - justify-content: center; - align-items: center; - flex-direction: column; -} - -.errorIcon { - transform: scale(1.5); - color: var(--bs-danger); - margin-bottom: 1rem; -} - -.btnsContainer { - display: flex; - gap: 0.8rem; - margin: 2.2rem 0 0.8rem 0; -} - -.btnsContainer .input { - flex: 1; - min-width: 18rem; - position: relative; -} - -.btnsContainer input { - outline: 1px solid var(--bs-gray-400); -} - -.btnsContainer .input button { - width: 52px; -} - -.inputField { - background-color: white; - box-shadow: 0 1px 1px #31bb6b; -} - -.dropdown { - background-color: white; - border: 1px solid #31bb6b; - position: relative; - display: inline-block; - color: #31bb6b; -} - -.tableHeader { - background-color: var(--bs-primary); - color: var(--bs-white); - font-size: 1rem; -} - -.rowBackground { - background-color: var(--bs-white); - max-height: 120px; -} - -.TableImage { - object-fit: cover; - width: 25px !important; - height: 25px !important; - border-radius: 100% !important; -} - -.avatarContainer { - width: 28px; - height: 26px; -} - -.imageContainer { - display: flex; - align-items: center; - justify-content: center; -} - -.pledgerContainer { - display: flex; - align-items: center; - justify-content: center; - margin: 0.1rem 0.25rem; - gap: 0.25rem; - padding: 0.25rem 0.45rem; - border-radius: 0.35rem; - background-color: #31bb6b33; - height: 2.2rem; - margin-top: 0.75rem; -} - -.noOutline input { - outline: none; -} - -.overviewContainer { - display: flex; - gap: 7rem; - width: 100%; - justify-content: space-between; - margin: 1.5rem 0 0 0; - padding: 1.25rem 2rem; - background-color: rgba(255, 255, 255, 0.591); - - box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; - border-radius: 0.5rem; -} - -.titleContainer { - display: flex; - flex-direction: column; - gap: 0.6rem; -} - -.titleContainer h3 { - font-size: 1.75rem; - font-weight: 750; - color: #5e5e5e; - margin-top: 0.2rem; -} - -.titleContainer span { - font-size: 0.9rem; - margin-left: 0.5rem; - font-weight: lighter; - color: #707070; -} - -.raisedAmount { - display: flex; - justify-content: center; - align-items: center; - font-size: 1.25rem; - font-weight: 750; - color: #5e5e5e; -} - -.progressContainer { - display: flex; - flex-direction: column; - gap: 0.5rem; - flex-grow: 1; -} - -.progress { - margin-top: 0.2rem; - display: flex; - flex-direction: column; - gap: 0.3rem; -} - -.endpoints { - display: flex; - position: relative; - font-size: 0.85rem; -} - -.start { - position: absolute; - top: 0px; -} - -.end { - position: absolute; - top: 0px; - right: 0px; -} - -.moreContainer { - display: flex; - align-items: center; -} - -.moreContainer:hover { - text-decoration: underline; - cursor: pointer; -} - -.popup { - z-index: 50; - border-radius: 0.5rem; - font-family: sans-serif; - font-weight: 500; - font-size: 0.875rem; - margin-top: 0.5rem; - padding: 0.75rem; - border: 1px solid #e2e8f0; - background-color: white; - color: #1e293b; - box-shadow: 0 0.5rem 1rem rgb(0 0 0 / 0.15); - display: flex; - flex-direction: column; - gap: 0.5rem; -} - -.popupExtra { - max-height: 15rem; - overflow-y: auto; -} - -.toggleGroup { - width: 50%; - min-width: 27.75rem; - margin: 0.5rem 0rem; -} - -.toggleBtn { - padding: 0rem; - height: 30px; - display: flex; - justify-content: center; - align-items: center; -} - -.toggleBtn:hover { - color: #31bb6b !important; -} - -input[type='radio']:checked + label { - background-color: #31bb6a50 !important; -} - -input[type='radio']:checked + label:hover { - color: black !important; -} From 8be933cf2fa73a9007102542dd1a9f3d35d314fb Mon Sep 17 00:00:00 2001 From: MANDEEP N H <146331633+mandeepnh5@users.noreply.github.com> Date: Sun, 22 Dec 2024 05:00:44 +0000 Subject: [PATCH 3/9] Fix linting issues --- src/screens/FundCampaignPledge/FundCampaignPledge.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/screens/FundCampaignPledge/FundCampaignPledge.tsx b/src/screens/FundCampaignPledge/FundCampaignPledge.tsx index fce056da86..52b2db9a38 100644 --- a/src/screens/FundCampaignPledge/FundCampaignPledge.tsx +++ b/src/screens/FundCampaignPledge/FundCampaignPledge.tsx @@ -200,7 +200,10 @@ const fundCampaignPledge = (): JSX.Element => { return (
- +
{tErrors('errorLoading', { entity: 'Pledges' })}
From 3a9a91cde20b314680845fe2d79ce229d6252c12 Mon Sep 17 00:00:00 2001 From: MANDEEP N H <146331633+mandeepnh5@users.noreply.github.com> Date: Sun, 22 Dec 2024 05:05:42 +0000 Subject: [PATCH 4/9] fixed type check --- src/screens/FundCampaignPledge/FundCampaignPledge.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screens/FundCampaignPledge/FundCampaignPledge.tsx b/src/screens/FundCampaignPledge/FundCampaignPledge.tsx index 52b2db9a38..bf4661a690 100644 --- a/src/screens/FundCampaignPledge/FundCampaignPledge.tsx +++ b/src/screens/FundCampaignPledge/FundCampaignPledge.tsx @@ -207,7 +207,7 @@ const fundCampaignPledge = (): JSX.Element => {
{tErrors('errorLoading', { entity: 'Pledges' })}
- {pledgeError.messagePledge} + {pledgeError.message}
From 2dd3e74d0ec27bb81b51fa45633e3ac2b272c864 Mon Sep 17 00:00:00 2001 From: MANDEEP N H <146331633+mandeepnh5@users.noreply.github.com> Date: Mon, 23 Dec 2024 18:10:41 +0530 Subject: [PATCH 5/9] Update src/style/app.module.css Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- src/style/app.module.css | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/style/app.module.css b/src/style/app.module.css index d9f898e79a..6fb83ade2a 100644 --- a/src/style/app.module.css +++ b/src/style/app.module.css @@ -622,14 +622,6 @@ hr { margin-left: 13vw; } -.titlemodal { - color: #707070; - font-weight: 600; - font-size: 32px; - width: 65%; - margin-bottom: 0px; -} - .modalCloseBtn { width: 40px; height: 40px; @@ -638,7 +630,6 @@ hr { justify-content: center; align-items: center; } - .greenregbtn { margin: 1rem 0 0; margin-top: 15px; From b0f9b43d8e82680997c7ee34ba89ca39e8ca541e Mon Sep 17 00:00:00 2001 From: MANDEEP N H <146331633+mandeepnh5@users.noreply.github.com> Date: Mon, 23 Dec 2024 12:41:30 +0000 Subject: [PATCH 6/9] fixed some coderabbit issue --- src/style/app.module.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/style/app.module.css b/src/style/app.module.css index 6fb83ade2a..aadc4f28f0 100644 --- a/src/style/app.module.css +++ b/src/style/app.module.css @@ -633,14 +633,14 @@ hr { .greenregbtn { margin: 1rem 0 0; margin-top: 15px; - border: 1px solid #e8e5e5; + border: 1px solid var(--bs-gray-300); box-shadow: 0 2px 2px #e8e5e5; padding: 10px 10px; border-radius: 5px; - background-color: #31bb6b; + background-color: var(--bs-primary); width: 100%; font-size: 16px; - color: white; + color: var(--bs-white); outline: none; font-weight: 600; cursor: pointer; From ef7d9e231312abc19634a2fff0c131cb56ccef95 Mon Sep 17 00:00:00 2001 From: MANDEEP N H <146331633+mandeepnh5@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:29:28 +0000 Subject: [PATCH 7/9] Fixed testing issue --- .../FundCampaignPledge/FundCampaignPledge.tsx | 29 ++++++------- .../FundCampaignPledge/PledgeModal.tsx | 2 +- src/style/app.module.css | 43 +++---------------- 3 files changed, 19 insertions(+), 55 deletions(-) diff --git a/src/screens/FundCampaignPledge/FundCampaignPledge.tsx b/src/screens/FundCampaignPledge/FundCampaignPledge.tsx index bf4661a690..8942265eea 100644 --- a/src/screens/FundCampaignPledge/FundCampaignPledge.tsx +++ b/src/screens/FundCampaignPledge/FundCampaignPledge.tsx @@ -200,10 +200,7 @@ const fundCampaignPledge = (): JSX.Element => { return (
- +
{tErrors('errorLoading', { entity: 'Pledges' })}
@@ -222,7 +219,7 @@ const fundCampaignPledge = (): JSX.Element => { minWidth: 50, align: 'left', headerAlign: 'center', - headerClassName: `${styles.tableHeaderPledge}`, + headerClassName: `${styles.tableHeader}`, sortable: false, renderCell: (params: GridCellParams) => { return ( @@ -242,7 +239,7 @@ const fundCampaignPledge = (): JSX.Element => {
{ minWidth: 150, align: 'center', headerAlign: 'center', - headerClassName: `${styles.tableHeaderPledge}`, + headerClassName: `${styles.tableHeader}`, sortable: false, renderCell: (params: GridCellParams) => { return dayjs(params.row.startDate).format('DD/MM/YYYY'); @@ -287,7 +284,7 @@ const fundCampaignPledge = (): JSX.Element => { minWidth: 150, align: 'center', headerAlign: 'center', - headerClassName: `${styles.tableHeaderPledge}`, + headerClassName: `${styles.tableHeader}`, flex: 1, sortable: false, renderCell: (params: GridCellParams) => { @@ -301,7 +298,7 @@ const fundCampaignPledge = (): JSX.Element => { minWidth: 100, align: 'center', headerAlign: 'center', - headerClassName: `${styles.tableHeaderPledge}`, + headerClassName: `${styles.tableHeader}`, sortable: false, renderCell: (params: GridCellParams) => { return ( @@ -326,7 +323,7 @@ const fundCampaignPledge = (): JSX.Element => { minWidth: 100, align: 'center', headerAlign: 'center', - headerClassName: `${styles.tableHeaderPledge}`, + headerClassName: `${styles.tableHeader}`, sortable: false, renderCell: (params: GridCellParams) => { return ( @@ -351,7 +348,7 @@ const fundCampaignPledge = (): JSX.Element => { minWidth: 100, align: 'center', headerAlign: 'center', - headerClassName: `${styles.tableHeaderPledge}`, + headerClassName: `${styles.tableHeader}`, sortable: false, renderCell: (params: GridCellParams) => { return ( @@ -422,12 +419,12 @@ const fundCampaignPledge = (): JSX.Element => {
{ { @@ -616,7 +613,7 @@ const fundCampaignPledge = (): JSX.Element => {
= ({ {/* Button to submit the pledge form */}