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

Epic: Show payment activity widget with payment volumes for the last 7 days, for the selected currency. #8490

Closed
2 of 3 tasks
jessy-p opened this issue Mar 27, 2024 · 4 comments · Fixed by #8915
Closed
2 of 3 tasks
Assignees
Labels
category: projects For any issues which are part of any project, including bugs, enhancements, etc. focus: reporting status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. type: epic

Comments

@jessy-p
Copy link
Contributor

jessy-p commented Mar 27, 2024

UPDATE: blocked for redesign that may change the scope - p1712152065311419/1711574043.001329-slack-C06BBFTF6EM

Some merchants have multiple deposit currencies, so the activity widget will need to show insights for different currencies.

This issue is about updating the Payment Activity Widget to work with a selected currency. Introducing the currency switcher is a dependency, see issue:


Dev notes

We can use the useSelectedCurrency react hook to listen to the selected currency on the Payments → Overview screen.

/**
* Custom hook for retrieving and updating the selected currency.
* This is used to determine which currency to display in the overview page.
* The selected currency is set as a 'selected_currency' query parameter in the URL.
*
* @return {UseSelectedCurrencyResult} An object containing the selected currency and a setter function.
*/
export const useSelectedCurrency = (): UseSelectedCurrencyResult => {
const setSelectedCurrency = ( currencyCode: CurrencyCode ) => {
updateQueryString( {
selected_currency: currencyCode,
} );
};
const selectedCurrency = getQuery().selected_currency;
return {
setSelectedCurrency,
selectedCurrency,
};
};

Tasks

  1. category: projects focus: reporting type: enhancement
    haszari
@jessy-p jessy-p changed the title Show payment activity widget with payment volumes for the last 7 days, for the currency selected from the currency tabs on Balance box Epic: Show payment activity widget with payment volumes for the last 7 days, for the currency selected from the currency tabs on Balance box Apr 4, 2024
@jessy-p jessy-p added the status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. label Apr 4, 2024
@RadoslavGeorgiev RadoslavGeorgiev added type: epic category: projects For any issues which are part of any project, including bugs, enhancements, etc. focus: reporting labels Apr 4, 2024
@haszari
Copy link
Contributor

haszari commented May 2, 2024

FYI @jessy-p I added screenshots of the design for the page currency switcher. Possibly we might want to re-estimate.

@jessy-p jessy-p changed the title Epic: Show payment activity widget with payment volumes for the last 7 days, for the currency selected from the currency tabs on Balance box Epic: Show payment activity widget with payment volumes for the last 7 days, for the currency selected. May 2, 2024
@jessy-p jessy-p changed the title Epic: Show payment activity widget with payment volumes for the last 7 days, for the currency selected. Epic: MVP+ : Show payment activity widget with payment volumes for the last 7 days, for the selected currency. May 2, 2024
@Jinksi
Copy link
Member

Jinksi commented May 2, 2024

Possibly we might want to re-estimate.

I agree, the scope has changed significantly.

@jessy-p I've reset this issue's SP so it appears in our needs SP list. (Note the previous version of this was SP 3).

@jessy-p jessy-p changed the title Epic: MVP+ : Show payment activity widget with payment volumes for the last 7 days, for the selected currency. Epic : Show payment activity widget with payment volumes for the last 7 days, for the selected currency. May 3, 2024
@jessy-p jessy-p changed the title Epic : Show payment activity widget with payment volumes for the last 7 days, for the selected currency. Epic: Show payment activity widget with payment volumes for the last 7 days, for the selected currency. May 3, 2024
@haszari haszari self-assigned this May 22, 2024
@haszari
Copy link
Contributor

haszari commented May 23, 2024

Assigning myself, I'm working on allowing the widget to show a specified deposit currency (for stores with multiple payout accounts. My plan is to implement this under the hood, no UI, since @Jinksi is in progress on UI to switch currency (#8765). i.e. can edit JS to hard-code USD or CAD and the widget will show correct data.

There are two aspects to this:

  • Adding currency prop/argument to the relevant components as needed. Mostly just usePaymentActivityData and PaymentActivityQuery.
  • Ensure the server API request generates data based on the specified currency.

@haszari
Copy link
Contributor

haszari commented May 23, 2024

Added issues / tasks for plugin & server changes, I'm in progress but anyone is free to take over at any time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: projects For any issues which are part of any project, including bugs, enhancements, etc. focus: reporting status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. type: epic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants