Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Adds active announcements tile to v2 admin dashboard. (#4833)
## Because <!-- Summarize the purpose or reasons for this PR, e.g. what problem it solves or what benefit it provides. --> This change adds a tile indicating active announcement count on the admin dashboard. This will allow admins to briefly see if there have been new announcements. Clicking on the tile will navigate the admin to the announcements page. ## This PR - Adds a `.active_count` scope on `announcement.rb`. It builds off of the existing `.active` scope. - The new scope is used in the admin/dashboardcontroller to populate `active_announcements_count`. - `active_announcements_count` is presented in the view as another tile similar to the unresolved flags tile. - The `announcement` model spec is updated to test for this new scope. ## Issue Closes #4619 ## Pull Request Requirements - [x] I have thoroughly read and understand [The Odin Project Contributing Guide](https://github.com/TheOdinProject/theodinproject/blob/main/CONTRIBUTING.md) - [x] The title of this PR follows the `keyword: brief description of change` format, using one of the following keywords: - `Feature` - adds new or amends existing user-facing behavior - `Chore` - changes that have no user-facing value, refactors, dependency bumps, etc - `Fix` - bug fixes - [x] The `Because` section summarizes the reason for this PR - [x] The `This PR` section has a bullet point list describing the changes in this PR - [x] I have verified all tests and linters pass after making these changes. - [x] If this PR addresses an open issue, it is linked in the `Issue` section - [x] If applicable, this PR includes new or updated automated tests
- Loading branch information