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

Enable Org Pro Dashboard View #2060

Merged
merged 11 commits into from Mar 18, 2019

Conversation

@Zhao-Andy
Copy link
Collaborator

commented Mar 13, 2019

This PR enables the org pro dashboard view. I decided to leave refactoring and making more data available for the next PR.

@lightalloy
Copy link
Collaborator

left a comment

Thanks for the refactoring 👍 I noticed it's work in progress, but still couldn't resist commenting )

app/facades/dashboard.rb Outdated Show resolved Hide resolved
app/facades/pro.rb Outdated Show resolved Hide resolved
end

def last_week_reactions_count
Reaction.where(reactable_id: user_article_ids, reactable_type: "Article").where("created_at > ? AND created_at < ?", 2.weeks.ago, 1.week.ago).size

This comment has been minimized.

Copy link
@lightalloy

lightalloy Mar 14, 2019

Collaborator

It's tempting to create private methods like reactions_scope and comments_scope for the repeating parts, just a suggestion.

This comment has been minimized.

Copy link
@Zhao-Andy

Zhao-Andy Mar 15, 2019

Author Collaborator

Yeah, I think I'll do that. There's definitely a better way to organize the mass amount of data.

@Zhao-Andy Zhao-Andy marked this pull request as ready for review Mar 18, 2019

Zhao-Andy added 2 commits Mar 18, 2019

@Zhao-Andy Zhao-Andy changed the title WIP Org Pro Dashboard Backend Org Pro Dashboard Backend Mar 18, 2019

@Zhao-Andy Zhao-Andy changed the title Org Pro Dashboard Backend Enable Org Pro Dashboard View Mar 18, 2019

@maestromac
Copy link
Collaborator

left a comment

👍

@maestromac maestromac merged commit 8a3d3ae into thepracticaldev:master Mar 18, 2019

7 checks passed

Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
codeclimate All good!
Details
codeclimate/diff-coverage 91% (50% threshold)
Details
codeclimate/total-coverage 89% (0.0% change)
Details
deploy/netlify Deploy preview ready!
Details
license/cla Contributor License Agreement is signed.
Details

@pr-triage pr-triage bot added the PR: merged label Mar 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.