-
Notifications
You must be signed in to change notification settings - Fork 1
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
[MPDX-8227] Show multiple 14 month partner currency tables #1076
Conversation
Preview branch generated at https://8227-14-month-currencies.d3dytjb8adxkk5.amplifyapp.com |
Bundle sizes [mpdx-react]Compared against bc5798e No significant changes found |
Some things I still see as discrepancies (looking at exports): React has (and Angular does not have): Angular has (and React does not have): Angular formats the status in a more readable manner. The dates are formatted differently between the two exports. Angular has the currency symbol, React does not. |
The multiple tables stuff is looking pretty good from my perspective. I do notice that the Avg and Min now get calculated differently between Angular and React on both reports (Angular has 42, React has 84). React is probably more accurate in this case. |
This is because the PR to add those fields to Angular is in staging but never merged into production. If you compare an export from this branch's preview environment and an export from Angular staging, they're nearly identical, ignoring rounding differences.
I changed the date formatting to be more similar (i.e. MM YY for en-US). It's not always identical because we now format dates in a locale-dependent way. I added the currency symbol to React as well. Angular also gives a different value for the totals of foreign currencies. Here is a condensed version of the output with extraneous totals removed. The totals for GPB and UGS should be 10,000 and 333,333,333, respectively, not 12,719 and 895. I believe that the React is correct in this case. Angular
React
|
src/components/Reports/FourteenMonthReports/FourteenMonthReport.tsx
Outdated
Show resolved
Hide resolved
@wrandall22 Do you mind reviewing this since Daniel is going to be out for the rest of the week? |
src/components/Reports/FourteenMonthReports/Layout/Table/helpers.test.ts
Show resolved
Hide resolved
Prevent the first table from being clipped by the second table
b351161
to
9edb045
Compare
Description
The 14 month partner currency report was only showing one table even when there were multiple currencies given. This PR fixes that in the UI and in the CSV export. It also does a fair amount of refactoring to move complex logic into independent helper functions. Lastly, it adds tests for those helper functions.
@dr-bizz The print styles you added were causing weird issues with multiple tables, so I had to remove a lot of them. It still seems to print well, but I'd love your feedback on whether I unintentionally removed some crucial print styles.
@wrandall22 This should fix the rest of the inconsistencies I was seeing in CSV exports. There are still differences in rounding (Angular appears to round down, and React rounds to the nearest dollar, which I believe is more correct). I'm investigating one more discrepancy involving totals, but Angular seems clearly wrong in this case because the export includes a number that's no where on the table in the UI.
MPDX-8227
Checklist: