Integrate Partner statistics from mapswipe#6568
Conversation
404c2b6 to
cad3cdd
Compare
aa018c9 to
c882514
Compare
…dd support for external style
Drop unnecessary column: id rename column totalcontributionTime -> totalSwipeTimeInSeconds rename column totalcontributions -> totalSwipes
| import messages from './messages'; | ||
|
|
||
| const Legend = () => { | ||
| const indexes = [30, 50, 70, 100]; |
There was a problem hiding this comment.
these constants could be moved above the Legend component in L7.
| }; | ||
|
|
||
| export const ContributionsGrid = ({ contributionsByDate = [] }) => { | ||
| contributionsByDate = contributionsByDate.map((contribution) => ({ |
There was a problem hiding this comment.
do not reassign the props. create a new variable instead.
| }; | ||
| }} | ||
| /> | ||
| <Tooltip id={'partnerMapswipeContributionsGridTooltip'} /> |
There was a problem hiding this comment.
id="partnerMapswipeContributionsGridTooltip"
| return features; | ||
| }; | ||
|
|
||
| const zoomToH3ResMapping = { |
There was a problem hiding this comment.
can we write a function for these mappings?
There was a problem hiding this comment.
Not sure how a function can help here since we have pre-established static values.
We can retain it this way for now.
| <div className="flex items-center justify-start absolute top-0 left-0 right-0 pa2"> | ||
| <p | ||
| className="ma0 pa1 bg-white ba b--black-20 br2 partner-mapswipe-heatmap-zoom-text" | ||
| style={{ userSelect: 'none' }} |
There was a problem hiding this comment.
this can be written in scss file in partner-mapswipe-heatmap-zoom-text classname.
|
The cc - @VinayakRugvedi @emi420 |
…r with custom JSX
|






What type of PR is this? (check all applicable)
Related Issue
This PR fixes #6550 #6538 #6537 #6491
Describe this PR
This PR adds mapswipe statistics for partners.
Screenshots
Review Guide
Here are some group ids that we have tested with.
-NL6WXPOdFyWACqwNU2O(American Red cross)-NOyTo2zuMtyCNGaqb6J(Microsoft)-O1uWeupd5RrKo-QQGdU(HOT)-NPOaQfvxJ9arN1lmc2X(Leonardo DRS)You have to link partners with a valid mapswipe group ID first using Manage > edit partner. Needs admin access.
Then click on statistics button and then the mapswipe tab.
You can visit the following URL (after substituting the group ID) to view these stats on Mapswipe.
https://community.mapswipe.org/user-group/[groupid]/