Skip to content

Commit

Permalink
feat: temp adjustments for tree + m2 donations
Browse files Browse the repository at this point in the history
- disables inv. gifts for "trees+m2" donations
- disables PC payment for "tree + m2" donation
  • Loading branch information
mohitb35 committed Oct 25, 2023
1 parent 238f907 commit 7048de0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Donations/Components/DonationsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ function DonationsForm(): ReactElement {
projectDetails !== null &&
projectDetails.purpose !== "funds" &&
projectDetails.purpose !== "planet-cash" &&
!(projectDetails.purpose === "trees" && paymentSetup?.unitType === "m2") && //Disables planetcash for restoration projects with unitType m2 (TEMP)
profile !== null &&
isSignedUp &&
profile.planetCash !== null &&
Expand Down Expand Up @@ -339,7 +340,9 @@ function DonationsForm(): ReactElement {
{/* show PlanetCashSelector only if user is signed up and have a planetCash account */}
{canPayWithPlanetCash && <PlanetCashSelector />}
{!(onBehalf && onBehalfDonor.firstName === "") &&
(projectDetails.purpose === "trees" ? (
(projectDetails.purpose === "trees" &&
(paymentSetup?.unitType !== "m2" ||
giftDetails.type === "direct") ? (
<div className="donations-gift-container mt-10">
<GiftForm />
</div>
Expand Down

0 comments on commit 7048de0

Please sign in to comment.