From ed3b9119455b05537522884cc089de17dc553f28 Mon Sep 17 00:00:00 2001 From: mohitb35 <44917347+mohitb35@users.noreply.github.com> Date: Wed, 25 Oct 2023 18:08:45 +0530 Subject: [PATCH] feat: temp adjustments for tree + m2 donations - disables inv. gifts for "trees+m2" donations - enables PC payment only for "unitType: m2" donations --- src/Donations/Components/DonationsForm.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Donations/Components/DonationsForm.tsx b/src/Donations/Components/DonationsForm.tsx index c466c684..be22af4c 100644 --- a/src/Donations/Components/DonationsForm.tsx +++ b/src/Donations/Components/DonationsForm.tsx @@ -109,6 +109,7 @@ function DonationsForm(): ReactElement { projectDetails !== null && projectDetails.purpose !== "funds" && projectDetails.purpose !== "planet-cash" && + paymentSetup?.unitType === "tree" && //Enables planetcash for restoration projects with unitType tree only (TEMP) profile !== null && isSignedUp && profile.planetCash !== null && @@ -339,7 +340,9 @@ function DonationsForm(): ReactElement { {/* show PlanetCashSelector only if user is signed up and have a planetCash account */} {canPayWithPlanetCash && } {!(onBehalf && onBehalfDonor.firstName === "") && - (projectDetails.purpose === "trees" ? ( + (projectDetails.purpose === "trees" && + (paymentSetup?.unitType !== "m2" || + giftDetails.type === "direct") ? (