Skip to content

Feature/manage payouts#1552

Merged
mariahosfeld merged 62 commits into
developfrom
feature/manage-payouts
Oct 6, 2022
Merged

Feature/manage payouts#1552
mariahosfeld merged 62 commits into
developfrom
feature/manage-payouts

Conversation

@mohitb35

@mohitb35 mohitb35 commented Aug 16, 2022

Copy link
Copy Markdown
Member

Changes in this pull request:

  • Adds the Manage Payouts feature to the Dashboard under the Payments menu
  • Manage Payouts is accessible only to tpos. It is not seen in the dashboard for non-tpo users, and attempts to visit the link directly redirect to the profile if the user is not a tpo.
  • The Manage Payouts feature provides the following for TPO users:
  1. Users can see a list of bank accounts they have added in the Overview Tab.
  2. Users can add a new bank account from the Add Bank Details tab.
  3. Users can edit an existing bank account by clicking on the Edit button in the Overview Tab.
  4. Users can set a desired payment schedule in the Payout Schedule tab. The default setting is Manual.
  5. While creating a bank account, a minimum payout amount is required if a specific currency is selected.
  6. Each currency can have only one bank account, and only one default account is possible

Minor API changes are currently pending. Specifically:

  • 1 . routingNumber is to be an optional field while saving bank details. Currently the API responds with an error if this is not provided.
  • 2. holderType is an optional parameter while saving bank details and will not be sent from the front end. Currently the API responds with an error if this is not provided, and so we are always sending a hardcoded value of individual.
  • 3. We are currently not sending a clean request object while saving bank details i.e. empty fields are being sent as "" instead of null. This may change (a function already exists to clean the request object). - NOT TO BE DONE SO THAT USERS CAN REMOVE OPTIONAL FORM VALUES DURING EDIT

@vercel

vercel Bot commented Aug 16, 2022

Copy link
Copy Markdown

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

Name Status Preview Updated
planet-webapp ✅ Ready (Inspect) Visit Preview Oct 4, 2022 at 7:52AM (UTC)

@sagararyal

sagararyal commented Aug 16, 2022

Copy link
Copy Markdown
Member

- includes translations, basic controlled inputs
- includes translations
- updates translations for PayoutScheduleForm as well
- add constants for PaymentFrequencies and PayoutCurrency
- add explicit type declaration while declaring currencyOptions
@norbertschuler

This comment was marked as duplicate.

Comment thread src/features/common/Layout/TabbedView/TabSteps.tsx Outdated
Comment thread src/features/common/Layout/TabbedView/index.tsx Outdated
Comment on lines +33 to +34
const [stepToRender, setStepToRender] = useState<string | number | false>(
false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

here why did you used false as a type for stepToRender instead of Boolean as a type?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As per the MUI documentation, when no tab is selected, we need to set the value attribute for Tabs component to false. So stepToRender can take false as a value. However, true is not a valid value, so I've not used type boolean

https://mui.com/material-ui/api/tabs/

Comment thread src/features/user/ManagePayouts/components/BankDetailsForm.tsx
Comment thread src/features/user/ManagePayouts/components/NoBankAccount.tsx
Comment thread src/features/user/ManagePayouts/screens/EditBankAccount.tsx
Comment on lines +72 to +73
style={{ width: '175px', marginTop: '20px', marginLeft: '10px' }}
>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

avoid inline styles instead create a separate class for it

@mohitb35 mohitb35 Oct 4, 2022

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done here - fd789f7

@sunilsabatp

sunilsabatp commented Oct 3, 2022

Copy link
Copy Markdown
Contributor

image

@mohitb35 whenever I am selecting payment frequency in payout schedule I am getting 400
endpoint -> PUT(https://app-staging.plant-for-the-planet.org/app/profile)

payload

{
  "scheduleFrequency": "semiannually"
}

@mohitb35

mohitb35 commented Oct 4, 2022

Copy link
Copy Markdown
Member Author
image

@mohitb35 whenever I am selecting payment frequency in payout schedule I am getting 400 endpoint -> PUT(https://app-staging.plant-for-the-planet.org/app/profile)

payload

{
  "scheduleFrequency": "semiannually"
}

This is fixed now.

@mariahosfeld

Copy link
Copy Markdown
Contributor

Functionality looks good to me

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.

5 participants