-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
Dashboard! #3788
Dashboard! #3788
Conversation
Removes the highly duplicated nested card divs and card-tools. Results in the same HTML (modulo whitespace)
Has slightly different layout than the others, so required some changes to the partial.
Create dashboard/card partial
Fixes #3736 These changes include: - Removing Purchase Summary card from user's dashboard - Adds new purchase summary page & item in navigation - Changes to updated card styling/formatting - Adds a shared date filter card partial in shared directory - Adds a shared card partial for use throughout in the shared directory
This reverts commit cd08a7b. :wq#
Lists the pending and started requests right on the main page so that the user has an idea of what they need to work on now. resolves #3669
A huge list of outstanding requests starts to overwhelm the page and make other things hard to find. Show 25 and a link that says how many other requests there are.
The +/- collapse doesn't work with the layout of the table cards. Instead, those cards had a remove button.
3669 outstanding requests
Restore remove button to dashboard cards
… (#3793) * Remove old "Distributions by County" button * Add Distribution by County report to sidebar * Make reports menu visible to non-admin users
…ed-donations-3733 Conflicts: app/views/layouts/_lte_sidebar.html.erb
Not sure how these got into this branch specifically, but ok.
Fixes #3736 These changes include: Needed to change the dashboard to not contain any information about the purchases summary - this has now been moved to the new purchases summary page within the nav bar under `reporting and auditing`. Filtering has also been added to said page, and filter partials and the card have been added to a shared area for ease of access and consistency. Page tests added for new content.
fixed weird spacing issue, removed duplicate file
Fixed small issue in render - duplicate partial now removed
…rm-dash Move purchase from dashboard to standalone report [#3736]
Pre-existing problem noted -- if you have everything expanding, you can't scroll all the way to the bottom of the l.h.m. |
@awwaiid -- This is being a little picky, but could we change the order of the l.h.m?-- within each of Distribution, Donation, Purchases, I like the Summary at the top, but there's not really any rhyme or reason to the rest --- can we get them in alpha order? |
app/helpers/application_helper.rb
Outdated
else | ||
controller_path | ||
end | ||
(name.include?(controller_path) || name.include?(controller_path + '/' + action_name)) ? 'active' : controller_path |
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.
@dorner not only "could" this mess us up, upon clicking through every menu entry it was in fact messing things up. This switches to look at the whole path or the path+action.
I'm still waiting for the event sourced version before running the next round of tests. |
I had to do some fixes for the low-inventory report, both to the report and to the specs, so that it can work with events. I also manually tested how the extracted summary reports work with Event mode and verified that it has no affect. I locally manually reset an entire org's InventoryItems to a small/fixed qty that doesn't match their event snapshot, and then flipped them back and forth between event-mode and old-mode, and verified each report that way. @cielf this is ready for another manual test if you're up for it! |
app/queries/low_inventory_query.rb
Outdated
inventory = InventoryAggregate.inventory_for(organization.id) | ||
|
||
items = {} | ||
inventory.storage_locations.values.each do |storage_location| |
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.
@dorner this is the adaptation of the SQL query -> an in-memory rollup. Is there a preferred way to do this? I tested it on moms-for-moms, which has quite a few items, and it is fast with our dataset.
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.
@awwaiid take a look at View::Inventory
. There are a lot of extra methods in there that you should be able to use to clean this up.
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.
Updated to use View::Inventory!
Great! I'm at the end of my hours for today, but this is a high priority for me tomorrow. |
Here's my current take. The low inventory matches up to the history, as does the itemized distribution report (spot checked on prod data for each). It turns out that it doesn't match up to the storage location report -- it looks like we're showing 0 if we have negative inventory there (which we never should actually have). That's a discussion to have about the storage location report? I'm good with pushing this forward if @dorner is. [Honestly, I'd love to be able to say "Dashboard is in the next release" in the stakeholder meeting tomorrow.] |
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.
We're super close!
app/helpers/application_helper.rb
Outdated
else | ||
controller_path | ||
end | ||
(name.include?(controller_path) || name.include?(controller_path + '/' + action_name.to_s)) ? 'active' : controller_path |
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.
I think this can be done more cleanly by using params[:controller]
and (if necessary) params[:action]
. We shouldn't be doing any kind of string munging of the path.
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.
Done. It might look similar, but now you can specify the controller name and optionally the action name.
app/queries/low_inventory_query.rb
Outdated
inventory = InventoryAggregate.inventory_for(organization.id) | ||
|
||
items = {} | ||
inventory.storage_locations.values.each do |storage_location| |
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.
@awwaiid take a look at View::Inventory
. There are a lot of extra methods in there that you should be able to use to clean this up.
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.
I am good with this!
Some specs failing though :( |
Conflicts: spec/system/admin/users_system_spec.rb spec/system/dashboard_system_spec.rb
Hurrah!!! |
@awwaiid: Your PR |
This is an epic feature branch that moves more historic-reporting-oriented blocks off of the dashboard and adds some action-oriented blocks in. We'll review and merge it as a slate!