-
-
Notifications
You must be signed in to change notification settings - Fork 277
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 Partner statistics from mapswipe #6568
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not reassign the props. create a new variable instead.
}; | ||
}} | ||
/> | ||
<Tooltip id={'partnerMapswipeContributionsGridTooltip'} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id="partnerMapswipeContributionsGridTooltip"
return features; | ||
}; | ||
|
||
const zoomToH3ResMapping = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we write a function for these mappings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be written in scss file in partner-mapswipe-heatmap-zoom-text
classname.
The cc - @VinayakRugvedi @emi420 |
…r with custom JSX
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready to go!
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]/