Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate unitType #424

Merged
merged 11 commits into from
Nov 29, 2023
Merged

Integrate unitType #424

merged 11 commits into from
Nov 29, 2023

Conversation

mohitb35
Copy link
Contributor

@mohitb35 mohitb35 commented Aug 4, 2023

Changes

  1. Integrates unitType in Donations Form and Left Panel (Transaction Summary)
  2. integrates unitType in Thank you screen
  3. Temporarily disables planetcash payments and invitation gifts for "unitType: m2" projects.

@vercel
Copy link

vercel bot commented Aug 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
donate-with-planet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2023 5:08pm

- only for tree/conservation projects
- this is seen in the Left Panel
- Also converts `getAdditionalInfo` into a pure function
- Also adds a separate type definition for UnitType
- updates planet-sdk to get latest `Donation` type
- adapts thank you message and image text for donations with unitType = m2 and purpose = trees
- disables inv. gifts for "trees+m2" donations
- enables PC payment only for "unitType: tree" donations
@mohitb35 mohitb35 removed the request for review from Shreyaschorge October 26, 2023 06:53
Copy link
Contributor

@mariahosfeld mariahosfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality looks good to me.

Copy link
Contributor

@sunilsabatp sunilsabatp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

donation.destination && donation.units
? " " +
t("common:restorationDonationUsage", {
units: donation.units,
Copy link
Collaborator

@norbertschuler norbertschuler Nov 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want to format donation.units any more at all in the UI (I know you do not know if this is a number of trees, square meter or amount of currency)? (E.g. in src/Donations/LeftPanel/TransactionSummary.tsx we also use a function getAdditionalInfo to format the number depending on the unitType.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thank you for pointing this out. I've fixed it in f01b7e8

@mariahosfeld mariahosfeld merged commit de42253 into develop Nov 29, 2023
6 checks passed
@mariahosfeld mariahosfeld deleted the feature/integrate-unit-type branch November 29, 2023 09:55
@mariahosfeld mariahosfeld mentioned this pull request Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants